/* Pechanga concept — shared comp styles.
   Palette sampled from the tribal seal (see brand-notes.md).
   Contrast (WCAG 2.2, checked by formula):
     ink #0E0A04 on paper #FFFEFD ........ 19.4:1
     brown #6B4024 / white ............... 8.8:1
     green #007954 / white ............... 5.4:1
     ink on gold #F9A11B ................. 9.5:1   (gold never carries white text)
     ink on sky #51C8E9 .................. 9.2:1
     gold on ink ......................... 9.5:1
     muted #5C4A38 on paper .............. 8.4:1
     alert red #9E1B1B / white ........... 8.1:1
*/
:root {
  --dur-fast: 150ms; --dur: 220ms; --dur-slow: 420ms; --ease: cubic-bezier(.2,.7,.2,1);
  --gold: #F9A11B;
  --brown: #6B4024;
  --brown-deep: #4A2C18;
  --brown-darkest: #2A170B;
  --green: #007954;
  --green-deep: #005A3E;
  --sky: #51C8E9;
  --ink: #0E0A04;
  --paper: #FFFEFD;
  --cream: #F6EFE3;
  --sand: #EADFCC;
  --muted: #5C4A38;
  --line: #DCCFBA;
  --alert: #9E1B1B;
  --alert-deep: #7A1212;

  --display: "Fraunces", Georgia, serif;
  --body: "Open Sans", system-ui, sans-serif;

  --gutter: 80px;
  --max: 1440px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--gold); color: var(--ink); padding: 10px 16px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }

.eyebrow {
  font-family: var(--body); font-size: 14px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Emergency alert (takeover state) ---------- */
.alert { display: none; background: var(--alert); color: #fff; }
.has-alert .alert { display: block; }
.alert .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.alert__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--alert-deep);
  font-weight: 400; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 4px;
}
.alert__title { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; }
.alert__meta { font-size: 16px; margin-top: 4px; opacity: 0.95; }
.alert__link {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--paper); color: var(--alert-deep); font-weight: 700; text-decoration: none;
  padding: 12px 18px; border-radius: var(--radius);
}

/* ---------- Utility bar + header ---------- */
.utility { background: var(--ink); color: #F3EADB; font-size: 14px; }
.utility .wrap { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.utility nav { display: flex; gap: 32px; }
.utility a { text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility__est { color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; font-size: 14px; }

.header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 40px; }
.brand { flex: none; text-decoration: none; display: flex; align-items: center; gap: 8px; line-height: 1; }
.brand__seal { width: 70px; height: 70px; flex: none; }
.brand__text { display: flex; flex-direction: column; gap: 6px; }
.brand__name { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--brown); letter-spacing: -0.015em; }
.brand__sub { font-size: 14px; font-weight: 400; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav > a, .nav__trigger {
  text-decoration: none; font-weight: 600; font-size: 16px; padding: 10px 14px; border-radius: var(--radius);
  position: relative;
}
.nav > a:hover, .nav__trigger:hover, .nav__trigger[aria-expanded="true"] { background: var(--cream); }
.nav > a[aria-current], .nav__trigger.is-current { color: var(--brown); }
.nav > a[aria-current]::after, .nav__trigger.is-current::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -22px; height: 4px; background: var(--gold); }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 0;
  border: 2px solid var(--brown); color: var(--brown); background: transparent;
  font: inherit; font-weight: 700; font-size: 16px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.menu-btn { display: none; }
.header { position: relative; }
@media (max-width: 1400px) {
  .nav, .search-btn { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    background: var(--brown); color: #fff; border: 0; border-radius: var(--radius); width: 52px; min-height: 44px; padding: 0; cursor: pointer;
  }
  .nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    background: var(--paper); border-bottom: 2px solid var(--brown); padding: 8px var(--gutter) 20px;
    box-shadow: 0 16px 32px rgba(14,10,4,0.14);
  }
  .nav-open .nav > a, .nav-open .nav__trigger { padding: 14px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-open .nav > a[aria-current]::after, .nav-open .nav__trigger.is-current::after { display: none; }
  .nav-open .nav > a[aria-current], .nav-open .nav__trigger.is-current { box-shadow: inset 4px 0 0 var(--gold); padding-left: 14px; }
  .nav-open .nav__trigger { width: 100%; justify-content: space-between; }
  .nav-open .dd { position: static; translate: none; width: auto; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0 16px 16px; }
  .nav-open .dd__head { display: none; }
  .nav-open .dd__list { grid-template-columns: 1fr; }
  .nav-open .nav .search-btn { display: inline-flex; margin: 16px 0 0; align-self: start; }
}
@media (max-width: 1100px) {
  :root {
  --dur-fast: 150ms; --dur: 220ms; --dur-slow: 420ms; --ease: cubic-bezier(.2,.7,.2,1); --gutter: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 14px 22px; border-radius: var(--radius);
  min-height: 48px;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #FFB43F; }
.btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9); }
.btn--brown { background: var(--brown); color: #fff; }
.more { font-weight: 700; color: var(--brown); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 { font-size: 40px; }
.section-head .eyebrow { color: var(--green); margin-bottom: 10px; display: block; }

/* ---------- Cards (CMS-fed) ---------- */
.card {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; min-width: 0;
}
.card { position: relative; }
.card:hover { border-color: var(--brown); }
/* Accessible card: the title is the only link; ::after stretches its hit area over the whole card */
/* Underline drawn as a background so line-clamp clipping can't cut it off; grows in on hover/focus */
.card__link { color: inherit; text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0% 3px no-repeat; padding-bottom: 4px; transition: background-size var(--dur) var(--ease); }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card__link, .card__link:focus-visible { background-size: 100% 3px; }
.card__link:focus-visible { outline: none; box-shadow: none; }
.card:has(.card__link:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.card__media { aspect-ratio: 16 / 10; background: var(--sand); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__tag { color: var(--green); }
.card__title {
  font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  padding-bottom: 8px; margin-bottom: -8px; /* room for the underline below the last line */
}
.card__foot { margin-top: 0; padding-top: 0; font-size: 16px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
/* No-image state: the card stays a card — gold rule + mark, no grey box */
.card--noimg { border-top: 6px solid var(--gold); background: var(--cream); }
.card--noimg .card__media { display: none; }
.card--noimg .card__body { padding-top: 28px; }
.card--noimg .card__title { font-size: 26px; -webkit-line-clamp: 6; }

.placeholder { color: var(--muted); font-style: italic; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #E9DFCF; margin-top: 0; }
.footer__top { border-top: 6px solid var(--gold); }
.footer .wrap { padding-top: 64px; padding-bottom: 40px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 181px); gap: 48px; }
.footer h2 { font-family: var(--body); font-size: 14px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 16px; line-height: 1.5; color: #F3EADB; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__brand { line-height: 1; font-family: var(--display); font-size: 30px; letter-spacing: -0.01em; color: #fff; font-weight: 600; }
.footer__est { margin-top: 8px; font-size: 14px; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: #F3EADB; }
.footer__base { margin-top: 56px; padding-top: 24px; border-top: 1px solid #3A3127; font-size: 14px; color: #F3EADB; display: flex; justify-content: space-between; }

/* ---------- Mobile (390) ---------- */
@media (max-width: 760px) {
  :root {
  --dur-fast: 150ms; --dur: 220ms; --dur-slow: 420ms; --ease: cubic-bezier(.2,.7,.2,1); --gutter: 20px; }
  body { font-size: 16px; }
  .utility { display: none; }
  .header .wrap { height: 68px; }
  .header .wrap { gap: 12px; }
  .brand { min-width: 0; flex: 0 1 auto; }
  .brand { gap: 6px; }
  .brand__seal { width: 50px; height: 50px; }
  .brand__text { gap: 4px; min-width: 0; }
  .brand__name { font-size: 16px; white-space: nowrap; }
  .brand__sub { letter-spacing: 0; white-space: nowrap; }
  .alert .wrap { grid-template-columns: 1fr; gap: 12px; padding-top: 16px; padding-bottom: 18px; }
  .alert__title { font-size: 21px; }
  .alert__link { justify-content: center; white-space: normal; text-align: center; }
  .section-head { flex-direction: column; align-items: start; margin-bottom: 20px; }
  .section-head h2 { font-size: 30px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .footer__grid > :first-child { text-align: center; }
  .footer__est { margin-top: 12px; }
  .footer .wrap { padding-top: 48px; padding-bottom: 32px; }
  .footer__base { flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-top: 40px; }
  /* Footer accordion (mobile): heading becomes a disclosure button (a11y.js) */
  .fcol__btn { all: unset; box-sizing: border-box; display: flex; width: 100%; min-height: 44px; margin: -10px 0; align-items: center; justify-content: space-between; cursor: pointer;
    font-family: var(--body); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
  .fcol__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
  .fcol__icon { width: 24px; height: 24px; border-radius: 50%; border: 1.2px solid var(--gold); box-sizing: border-box; display: grid; place-items: center; flex: none; }
  .fcol__icon::before { content: "+"; font-family: var(--body); font-size: 16px; line-height: 1; color: var(--gold); }
  .fcol__btn[aria-expanded="true"] .fcol__icon { background: var(--gold); }
  .fcol__btn[aria-expanded="true"] .fcol__icon::before { content: "–"; color: var(--ink); }
  .fcol ul[hidden] { display: none; }
  .fcol .fcol__h { margin-bottom: 12px; }
  .fcol:has(ul[hidden]) .fcol__h { margin-bottom: 0; }
}

/* Accessibility: placeholder contrast, reduced motion, forced colours */
::placeholder { color: var(--muted); opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn, .alert__link, .menu-btn, .search-btn, .card, .dept-search { border: 1px solid CanvasText; } }
@media (max-width: 1100px) and (min-width: 761px) { .alert .wrap { grid-template-columns: 1fr; gap: 14px; } .alert__link { justify-self: start; } }
@media (max-width: 380px) { .brand__name, .brand__sub { white-space: normal; } }

/* Department tiles: the department name is the link, stretched over the tile */
.dept { position: relative; }
.dept__name { margin: 0; }
.dept__name a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dept__name a::after { content: ""; position: absolute; inset: 0; }
.dept:hover .dept__name a { text-decoration-thickness: 3px; }
.dept__name a:focus-visible { outline: none; box-shadow: none; }
.dept:has(a:focus-visible) { outline: 3px solid var(--gold); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--ink); }

@media (max-width: 1100px) and (min-width: 761px) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Departments dropdown ---------- */
.nav__dd { position: relative; }
.nav__trigger { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font-family: inherit; color: inherit; cursor: pointer; }
.nav__chev { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.nav__trigger[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.dd { position: absolute; top: calc(100% + 18px); left: 50%; translate: -50% 0; z-index: 30; width: 560px;
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 0 0 10px 10px;
  box-shadow: 0 24px 60px rgba(14,10,4,0.16); padding: 20px 24px 22px; }
.dd:not([hidden]) { animation: dd-in var(--dur) var(--ease); }
.dd__head { color: var(--green); margin: 0 0 10px; }
.dd__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
.dd__list a { display: block; padding: 9px 10px; margin: 0 -10px; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 16px; color: var(--ink); line-height: 1.3;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.dd__list a:hover { background: var(--cream); color: var(--brown); }
.dd__list a[aria-current] { color: var(--brown); box-shadow: inset 3px 0 0 var(--gold); }
.dd__all { margin-top: 14px; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Micro-interactions (all disabled under prefers-reduced-motion) ---------- */
.btn, .search-btn, .menu-btn, .alert__link { transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:active, .search-btn:active, .menu-btn:active, .alert__link:active { transform: translateY(1px); }
.btn--brown:hover { background: #7B4C2C; }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.search-btn:hover { background: var(--cream); }
.btn .icon, .more .icon, .alert__link .icon, .fb-banner > .icon, .crr-card__link .icon { transition: transform var(--dur) var(--ease); }
.btn:hover .icon, .more:hover .icon, .alert__link:hover .icon, .fb-banner:hover > .icon, .crr-card__link:hover .icon,
.video-card:hover .video-card__cta .icon, .anniv:hover .anniv__cta .icon, .card:hover .card__foot .icon { transform: translateX(4px); }
.more { transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.more:hover { border-color: var(--brown); }
.nav > a, .nav__trigger { transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.nav > a[aria-current]::after, .nav__trigger.is-current::after { animation: grow-x var(--dur-slow) var(--ease); transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: none; } }
.card, .video-card, .anniv, .crr-feature, .tile { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card:hover, .crr-feature:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(14,10,4,0.10); }
.video-card:hover, .anniv:hover { transform: translateY(-3px); }
.card__media img, .video-card__media img, .anniv__media img, .tile img { transition: transform var(--dur-slow) var(--ease); }
.card:hover .card__media img, .video-card:hover .video-card__media img, .anniv:hover .anniv__media img { transform: scale(1.04); }
.tile:hover img { scale: 1.03; transition: scale var(--dur-slow) var(--ease); }
.tile img { transition: scale var(--dur-slow) var(--ease); }
.tile li a, .tribe__links a { transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.tile li a:hover { background: rgba(255,254,253,0.26); }
.tribe__links a:hover { background: rgba(249,161,27,0.12); }
.dept__name a { transition: text-decoration-thickness var(--dur-fast) var(--ease), text-underline-offset var(--dur-fast) var(--ease); }
.dept:hover .dept__name a { text-underline-offset: 6px; }
.doc { transition: background-color var(--dur-fast) var(--ease); }
.doc:hover { background: linear-gradient(90deg, var(--cream), transparent); }
.status__dot { transition: background-color var(--dur) var(--ease); }
.has-alert .status__dot { animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(158,27,27,.5); } 70% { box-shadow: 0 0 0 8px rgba(158,27,27,0); } 100% { box-shadow: 0 0 0 0 rgba(158,27,27,0); } }
.acc summary::after, .crr-feature__transcript summary::after, .fcol__icon { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.acc details[open] summary::after, .crr-feature__transcript[open] summary::after, .fcol__btn[aria-expanded="true"] .fcol__icon { transform: rotate(180deg); }
.acc details[open] .acc__b, .crr-feature__transcript[open] > div, .fcol ul:not([hidden]) { animation: fade-down var(--dur) var(--ease); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.alert { animation: fade-down var(--dur-slow) var(--ease); }
/* Reveal on scroll: only when JS is running (content is never hidden without it) */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; } .card:hover, .crr-feature:hover, .video-card:hover, .anniv:hover { transform: none; } .tile:hover img { scale: 1; } }

/* ---------- Sticky site header: utility bar scrolls away, main nav always visible ---------- */
html { scroll-padding-top: 112px; } /* keeps focused/anchored content clear of the sticky bar (WCAG 2.4.11) */
.site-top { position: sticky; top: -40px; z-index: 40; }
.site-top .header { transition: box-shadow var(--dur) var(--ease); }
.site-top.is-stuck .header { box-shadow: 0 8px 24px rgba(14,10,4,0.10); }
@media (max-width: 760px) {
  html { scroll-padding-top: 84px; }
  .site-top { top: 0; }
  .nav-open .nav { max-height: calc(100vh - 68px); overflow-y: auto; overscroll-behavior: contain; }
}
