/* ====== Esselen Tribe — Design Tokens ====== */
:root {
  --bg: #F2EBDD;
  --bg-2: #E8E0CE;
  --bg-3: #DCD2BC;
  --fg: #2A1F16;
  --fg-soft: #5A4A3A;
  --fg-mute: #897962;
  --line: #C9BFA8;
  --line-2: #B8AC92;

  --terracotta: #B85539;
  --terracotta-dark: #8E3E27;
  --sage: #6E7E5A;
  --sage-dark: #4F5B40;
  --ochre: #C9924A;
  --deep: #1A130C;

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --font-body: "DM Sans", "Söhne", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Typography helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 999px; background: var(--terracotta);
  vertical-align: middle; margin-right: 10px; transform: translateY(-2px);
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.05;
  text-wrap: balance;
}
.h-xxl { font-size: clamp(56px, 9vw, 132px); line-height: 0.95; letter-spacing: -0.025em; }
.h-xl  { font-size: clamp(44px, 6vw, 84px); }
.h-l   { font-size: clamp(34px, 4.2vw, 58px); }
.h-m   { font-size: clamp(26px, 2.6vw, 36px); }
.h-s   { font-size: clamp(20px, 1.8vw, 24px); }

.italic-display { font-style: italic; font-family: var(--font-display); }

.lede { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.55; color: var(--fg-soft); text-wrap: pretty; max-width: 62ch; }
.body-prose { max-width: 64ch; }
.body-prose p { margin: 0 0 1.1em; }

/* Layout */
.page { min-height: 100vh; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(80px, 9vw, 140px) 0; }
.section-tight { padding: clamp(48px, 6vw, 88px) 0; }
.divider { height: 1px; background: var(--line); width: 100%; }

/* ====== Top Nav ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg), transparent 12%);
  border-bottom: 1px solid color-mix(in oklab, var(--line), transparent 40%);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter); max-width: 1480px; margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nav-brand img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }
.nav-brand .nb-title { font-family: var(--font-display); font-size: 19px; line-height: 1; letter-spacing: -0.005em; }
.nav-brand .nb-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); margin-top: 4px; }
.nav-links { display: flex; gap: 2px; margin-left: 18px; flex: 1; }
.nav-link {
  position: relative;
  font-size: 14px; font-weight: 500; color: var(--fg);
  padding: 10px 14px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent; background: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { background: color-mix(in oklab, var(--fg), transparent 94%); }
.nav-link.active { background: var(--fg); color: var(--bg); }
.nav-link .caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px,-1px); opacity: 0.6; }

.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px; min-width: 280px;
  box-shadow: 0 30px 60px -20px rgba(42,31,22,.18);
  display: none;
}
.nav-link-wrap { position: relative; }
.nav-link-wrap:hover .nav-dropdown,
.nav-link-wrap:focus-within .nav-dropdown { display: block; }
.nav-dd-item {
  display: block; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; font-size: 14px; color: var(--fg);
}
.nav-dd-item:hover { background: var(--bg-2); }
.nav-dd-item .nd-sub { display: block; font-size: 11.5px; color: var(--fg-mute); margin-top: 2px; }

.nav-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--terracotta); color: #fff;
  font-weight: 500; font-size: 14px;
  border: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.nav-cta:hover { background: var(--terracotta-dark); }
.nav-cta .arrow { transition: transform .15s ease; }
.nav-cta:hover .arrow { transform: translateX(3px); }

/* ====== Buttons ====== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-radius: 999px; font-weight: 500; font-size: 14.5px; cursor: pointer;
  border: 1px solid var(--fg); background: var(--fg); color: var(--bg);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--deep); }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-clay { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.btn-clay:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
.btn-sage { background: var(--sage); color: #fff; border-color: var(--sage); }
.btn-sage:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* Tag */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px; color: var(--fg-soft);
  background: color-mix(in oklab, var(--bg), white 18%);
}
.tag .tdot { width: 6px; height: 6px; border-radius: 999px; background: var(--terracotta); }
.tag.tag-sage .tdot { background: var(--sage); }
.tag.tag-ochre .tdot { background: var(--ochre); }

/* ====== Hero ====== */
.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,19,12,.45) 0%, rgba(26,19,12,.15) 30%, rgba(26,19,12,.05) 55%, rgba(26,19,12,.6) 100%);
}
.hero-inner {
  position: relative;
  max-width: 1480px; margin: 0 auto;
  padding: 80px var(--gutter) 60px;
  display: grid; grid-template-rows: auto 1fr auto; min-height: 92vh; gap: 24px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: rgba(255,255,255,.85); }
.hero-headline { align-self: end; }
.hero-headline .pre { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; margin-bottom: 24px; }
.hero-headline h1 { color: #fff; font-weight: 400; letter-spacing: -0.02em; }
.hero-headline h1 em { font-style: italic; color: #F2EBDD; font-weight: 300; }
.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero-meta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,.75);
  display: flex; gap: 28px; flex-wrap: wrap;
}
.hero-actions { display: flex; gap: 12px; }
.hero-actions .btn { background: #fff; color: var(--fg); border-color: #fff; }
.hero-actions .btn:hover { background: var(--bg); }
.hero-actions .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ====== Cards & Grids ====== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: color-mix(in oklab, var(--bg), white 30%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.card-img { aspect-ratio: 16/11; overflow: hidden; border-radius: 12px; background: var(--bg-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.04); }

.card-flat { background: transparent; border: none; padding: 0; }
.card-clay { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.card-clay h3, .card-clay h2 { color: #fff; }
.card-deep { background: var(--deep); color: #fff; border-color: var(--deep); }
.card-deep h3, .card-deep h2 { color: #fff; }
.card-sage { background: var(--sage); color: #fff; border-color: var(--sage); }
.card-sage h3, .card-sage h2 { color: #fff; }

/* Section header */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.sec-head .sh-left { max-width: 740px; }
.sec-head h2 { margin: 12px 0 0; }
.sec-head .sh-lede { margin-top: 18px; }

/* Marquee */
.marquee {
  display: flex; gap: 56px; align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--fg-soft);
}
.marquee .mar-track { display: flex; gap: 56px; animation: scrollx 36s linear infinite; }
.marquee .mar-track span.dot { color: var(--terracotta); }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Page header (interior) */
.page-head {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 88px 0 64px;
}
.page-head .ph-trail { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 22px; }
.page-head h1 { font-size: clamp(48px, 7vw, 96px); }

/* image full-bleed */
.full-img { position: relative; overflow: hidden; }
.full-img img { width: 100%; height: 60vh; object-fit: cover; }

/* Footer */
.footer { background: var(--deep); color: rgba(255,255,255,.8); padding: 80px 0 32px; }
.footer h4 { color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; margin: 0 0 18px; }
.footer a { display: block; padding: 6px 0; font-size: 14px; color: rgba(255,255,255,.7); cursor: pointer; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-base { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 24px; font-size: 12.5px; color: rgba(255,255,255,.5); flex-wrap: wrap; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 56px; height: 56px; border-radius: 999px; }
.footer-brand h3 { color: #fff; font-size: 22px; margin: 0; line-height: 1.1; }
.footer-brand .fbsub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,.55); }

/* Numbered list (milestones) */
.milestone {
  display: grid; grid-template-columns: 120px 1fr 1.4fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.milestone:last-of-type { border-bottom: 1px solid var(--line); }
.milestone .ms-year { font-family: var(--font-display); font-size: 36px; line-height: 1; }
.milestone .ms-title { font-family: var(--font-display); font-size: 24px; }

/* People grid */
.person { display: flex; flex-direction: column; gap: 14px; }
.person-img { aspect-ratio: 4/5; background: var(--bg-2); border-radius: 14px; overflow: hidden; }
.person-img img { width: 100%; height: 100%; object-fit: cover; }
.person .p-name { font-family: var(--font-display); font-size: 22px; }
.person .p-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); }
.field input, .field textarea, .field select {
  font: inherit; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: color-mix(in oklab, var(--bg), white 20%);
  color: var(--fg);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--fg); }

/* Stat */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .stat-num { font-family: var(--font-display); font-size: clamp(48px, 5vw, 76px); line-height: 1; }
.stat .stat-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); }

/* Quote */
.quote { font-family: var(--font-display); font-style: italic; font-size: clamp(26px, 3vw, 42px); line-height: 1.2; color: var(--fg); }
.quote .qmark { color: var(--terracotta); }
.quote-attr { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); margin-top: 18px; }

/* Pill nav (sub-page tabs) */
.subnav { display: flex; gap: 6px; padding: 6px; background: var(--bg-2); border-radius: 999px; border: 1px solid var(--line); overflow-x: auto; }
.subnav button {
  padding: 10px 16px; border-radius: 999px; border: none; background: transparent;
  font-size: 13.5px; color: var(--fg-soft); cursor: pointer; white-space: nowrap;
}
.subnav button.active { background: var(--fg); color: var(--bg); }

/* Bullet list with sage dots */
.bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bullets li { position: relative; padding-left: 22px; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--terracotta); }

/* Login form */
.auth-card { max-width: 460px; margin: 0 auto; background: color-mix(in oklab, var(--bg), white 25%); border: 1px solid var(--line); border-radius: 18px; padding: 36px; display: flex; flex-direction: column; gap: 18px; }

/* Calendar event row */
.event-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 28px; padding: 24px 0; border-top: 1px solid var(--line); }
.event-row:last-child { border-bottom: 1px solid var(--line); }
.event-date { font-family: var(--font-display); }
.event-date .ed-day { font-size: 40px; line-height: 1; }
.event-date .ed-mo { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); margin-top: 4px; }
.event-title { font-family: var(--font-display); font-size: 24px; }
.event-meta { color: var(--fg-mute); font-size: 13px; margin-top: 4px; display: flex; gap: 14px; }

/* News */
.news-card { display: flex; flex-direction: column; gap: 14px; }
.news-card .nc-img { aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.news-card .nc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .nc-img img { transform: scale(1.05); }
.news-card .nc-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta); }
.news-card .nc-title { font-family: var(--font-display); font-size: 26px; line-height: 1.15; }

/* Donate cards */
.donate-card { padding: 32px; border-radius: 18px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.donate-card.featured { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.donate-card .dc-amt { font-family: var(--font-display); font-size: 56px; line-height: 1; }

/* Partner logo placeholder */
.partner-card {
  aspect-ratio: 16/9;
  background: color-mix(in oklab, var(--bg), white 22%);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  font-family: var(--font-display);
  font-size: 18px; color: var(--fg-soft);
}

/* Texture placeholder for missing imagery */
.ph {
  background:
    repeating-linear-gradient( 45deg, transparent 0 8px, rgba(42,31,22,.04) 8px 9px),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-mute);
  text-align: center; padding: 16px;
}

/* Announcement banner */
.announce {
  background: var(--deep); color: var(--bg);
  padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: 22px;
  font-size: 13px;
  text-align: center;
}
.announce .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--terracotta); }
.announce a { color: var(--ochre); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Two-up split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Land acknowledgement card */
.ack {
  background: var(--deep); color: var(--bg);
  border-radius: 22px; padding: clamp(40px, 5vw, 72px);
  position: relative; overflow: hidden;
}
.ack .glyph {
  position: absolute; right: -40px; bottom: -40px;
  width: 320px; height: 320px;
  border: 1px solid rgba(242,235,221,0.12);
  border-radius: 999px;
}
.ack .glyph::after {
  content: ""; position: absolute; inset: 60px; border: 1px solid rgba(242,235,221,0.18); border-radius: 999px;
}

/* Number index */
.idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--fg-mute); }

/* Mobile nav */
@media (max-width: 1000px) {
  .nav-links { display: none; }
}

/* Animation - subtle fade in on route change */
.route-enter { animation: fadeUp .5s cubic-bezier(.2,.6,.2,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Selection */
::selection { background: var(--terracotta); color: #fff; }
