/* ============================================================
   1ST NATION FOUNDATION — 1stnation.us
   Design system: INK / PARCHMENT / OXBLOOD / BRASS
   The Ledger motif: ruled lines, struck reclassifications,
   reclaimed identity set in brass.
   ============================================================ */

:root {
  --ink: #0e0a0c;
  --ink-soft: #1a1316;
  --oxblood: #5e1a24;
  --oxblood-light: #8c2f3d;
  --brass: #c99b3f;
  --brass-light: #e2c277;
  --parchment: #f1e8d8;
  --bone: #fbf7ee;
  --rule: rgba(94, 26, 36, 0.25);
  --rule-dark: rgba(201, 155, 63, 0.28);

  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --max-w: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--oxblood); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); }

.em { font-style: italic; }
.brass { color: var(--brass); }
.oxblood { color: var(--oxblood); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
  display: block;
  margin-bottom: 1rem;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--brass); }

.lead { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.6; }

/* ---------- The Ledger rule (signature structural device) ---------- */
.ledger-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}
.ledger-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--oxblood);
  margin-bottom: 2rem;
}
.ledger-head .no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--brass);
  white-space: nowrap;
}

/* Struck reclassification words */
.struck {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  color: rgba(241, 232, 216, 0.55);
  white-space: nowrap;
}
.struck::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  top: 54%;
  height: 2px;
  background: var(--oxblood-light);
  transform: rotate(-1.2deg);
}
.light .struck { color: rgba(14, 10, 12, 0.45); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--rule-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}
.brand .logo-plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  width: 72px;
  border-radius: 50%;
  background: var(--ink);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(201, 155, 63, 0.55),  /* inner brass hairline against ink */
    0 0 0 2px var(--brass),                     /* brass ring */
    0 0 0 3px rgba(94, 26, 36, 0.9),            /* thin oxblood outline */
    0 6px 18px rgba(0, 0, 0, 0.55);             /* lift */
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.brand:hover .logo-plate,
.brand:focus-visible .logo-plate {
  box-shadow:
    inset 0 0 0 1px rgba(201, 155, 63, 0.85),
    0 0 0 2px var(--brass),
    0 0 0 3px rgba(94, 26, 36, 1),
    0 0 14px rgba(201, 155, 63, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}
.brand img {
  height: 72px;
  width: 72px;
  object-fit: cover;
  /* Boost the strokes so oxblood + brass read crisply at small size */
  filter: brightness(1.45) contrast(1.25) saturate(1.35);
}
.brand span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--bone);
}
.brand b { color: var(--brass); font-weight: 400; }

.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--parchment);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brass-light); }
.site-nav a[aria-current="page"] {
  color: var(--brass);
  border-bottom-color: var(--brass);
}
.site-nav .nav-cta {
  background: var(--oxblood);
  color: var(--bone);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  border-bottom: none;
}
.site-nav .nav-cta:hover { background: var(--oxblood-light); color: var(--bone); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-dark);
  color: var(--parchment);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--rule-dark);
    padding: 0.5rem var(--pad) 1.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.85rem 0; border-bottom: 1px solid rgba(241,232,216,0.08); }
  .site-nav .nav-cta { margin-top: 0.9rem; text-align: center; }
}

/* ---------- Sections ---------- */
.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band.dark { background: var(--ink); color: var(--parchment); }
.band.parchment { background: var(--parchment); }
.band.bone { background: var(--bone); }
.band.oxblood-band { background: var(--oxblood); color: var(--bone); }

.band.dark h1, .band.dark h2, .band.dark h3 { color: var(--bone); }
/* Inline links on dark bands — exclude .btn so buttons keep their own palette */
.band.dark a:not(.btn) { color: var(--brass-light); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin: 1.2rem 0 1.6rem; }
.hero .lead { color: rgba(241, 232, 216, 0.88); max-width: 56ch; }

/* Right column wraps the feature medallion + family photo */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

/* Large feature medallion above the family photo (same palette as header) */
.hero-medallion {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0 0.25rem;
}
.hero-medallion-plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(180px, 22vw, 240px);
  width: clamp(180px, 22vw, 240px);
  border-radius: 50%;
  background: var(--ink);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(201, 155, 63, 0.6),
    0 0 0 3px var(--brass),
    0 0 0 5px rgba(94, 26, 36, 0.95),
    0 0 28px rgba(201, 155, 63, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.6);
}
.hero-medallion-plate::before {
  /* faint inner ring detail, brass hairline */
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(201, 155, 63, 0.18);
  pointer-events: none;
}
.hero-medallion-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.4) contrast(1.2) saturate(1.3);
}
@media (max-width: 900px) {
  .hero-medallion-plate {
    height: clamp(160px, 50vw, 220px);
    width: clamp(160px, 50vw, 220px);
  }
}

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%;
  border: 1px solid var(--rule-dark);
  filter: grayscale(15%) contrast(1.02);
}
.hero-figure figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(241,232,216,0.6);
  margin-top: 0.6rem;
}

/* Ledger strike sequence in hero */
.ledger-lines { margin: 2rem 0 0; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.ledger-lines .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(241,232,216,0.14);
}
.ledger-lines .label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(241,232,216,0.45);
}
.ledger-lines .row.reclaimed { border-bottom: 2px solid var(--brass); }
.ledger-lines .row.reclaimed .value {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35em;
  color: var(--brass);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  padding: 0.95rem 1.8rem;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-light); }
.btn-oxblood { background: var(--oxblood); color: var(--bone); }
.btn-oxblood:hover { background: var(--oxblood-light); }
.btn-outline { border-color: var(--brass); color: var(--brass); background: transparent; }
.btn-outline:hover { background: var(--brass); color: var(--ink); }
.btn-outline-dark { border-color: var(--oxblood); color: var(--oxblood); background: transparent; }
.btn-outline-dark:hover { background: var(--oxblood); color: var(--bone); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Cards / pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--oxblood);
  padding: 1.8rem 1.6rem;
}
.band.dark .pillar {
  background: var(--ink-soft);
  border-color: var(--rule-dark);
  border-top-color: var(--brass);
}
.pillar h3 { margin-bottom: 0.7rem; }
.pillar p { font-size: 0.98rem; }
.pillar .more { display: inline-block; margin-top: 1rem; font-weight: 700; font-size: 0.9rem; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { border: 1px solid var(--rule); width: 100%; }
.split figcaption { font-size: 0.8rem; letter-spacing: 0.05em; opacity: 0.7; margin-top: 0.55rem; }

/* ---------- Timeline (history) ---------- */
.timeline { list-style: none; margin-top: 2.5rem; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--rule);
}
.timeline li {
  position: relative;
  padding: 0 0 1.9rem 2.2rem;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--parchment);
  border: 3px solid var(--oxblood);
}
.timeline li.win::before { background: var(--brass); border-color: var(--brass); }
.timeline .year {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--oxblood);
  display: block;
}
.timeline li.win .year { color: var(--brass); filter: brightness(0.78); }
.timeline p { font-size: 0.98rem; max-width: 62ch; }

/* ---------- Steps (reclaim) ---------- */
.steps { list-style: none; counter-reset: step; margin-top: 2.5rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.4rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.2rem;
  color: var(--brass);
  filter: brightness(0.82);
  line-height: 1;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { font-size: 0.99rem; max-width: 68ch; }
.steps .note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  background: rgba(201, 155, 63, 0.13);
  border-left: 3px solid var(--brass);
  padding: 0.7rem 1rem;
}

/* ---------- Quote block ---------- */
.pull-quote {
  max-width: 52ch;
  margin: 0 auto;
  text-align: center;
}
.pull-quote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.45;
  color: var(--bone);
}
.pull-quote cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---------- Stat band ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--brass);
  display: block;
  line-height: 1.1;
}
.stat .desc { font-size: 0.92rem; max-width: 30ch; margin: 0.6rem auto 0; color: rgba(241,232,216,0.8); }

/* ---------- Gallery strip ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 2.5rem;
}
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
}

/* ---------- Resource list ---------- */
.resource-list { list-style: none; margin-top: 2rem; }
.resource-list li {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.resource-list .src {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oxblood);
  display: block;
  margin-bottom: 0.3rem;
}
.resource-list a {
  font-family: var(--serif);
  font-size: 1.18rem;
  text-decoration: none;
  color: var(--ink);
}
.resource-list a:hover { color: var(--oxblood); text-decoration: underline; }
.resource-list p { font-size: 0.94rem; margin-top: 0.35rem; max-width: 72ch; }

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 760px) { .book-grid { grid-template-columns: 1fr; } }
.book {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brass);
  padding: 1.5rem;
  background: var(--bone);
}
.book h3 { font-style: italic; }
.book .author { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--oxblood); margin: 0.4rem 0 0.7rem; }
.book p { font-size: 0.95rem; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.field input, .field textarea, .field select {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--bone);
  color: var(--ink);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brass); }
.field .err {
  display: none;
  font-size: 0.82rem;
  color: var(--oxblood-light);
  font-weight: 600;
}
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--oxblood-light); }

.form-status { margin-top: 1.5rem; display: none; padding: 1.1rem 1.3rem; border-radius: 2px; font-weight: 600; }
.form-status.success { display: block; background: rgba(201,155,63,0.16); border-left: 4px solid var(--brass); color: var(--ink); }
.form-status.error { display: block; background: rgba(94,26,36,0.1); border-left: 4px solid var(--oxblood); color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 26ch; margin: 0 auto; }
.cta-band p { max-width: 58ch; margin: 1.2rem auto 0; color: rgba(251,247,238,0.92); }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(241,232,216,0.75);
  padding: 3.5rem 0 2.5rem;
  border-top: 3px solid var(--oxblood);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}
.site-footer a { color: var(--parchment); text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.55rem; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.footer-brand img { height: 64px; width: 64px; object-fit: cover; mix-blend-mode: lighten; }
.footer-brand span { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--parchment); }
.footer-legal {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(241,232,216,0.12);
  font-size: 0.8rem;
  color: rgba(241,232,216,0.5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0; }
.page-hero h1 { margin-top: 0.9rem; max-width: 22ch; }
.page-hero .lead { margin-top: 1.3rem; max-width: 60ch; color: rgba(241,232,216,0.88); }

/* ---------- Prose helpers ---------- */
.prose { max-width: 72ch; }
.prose p { margin-bottom: 1.3rem; }
.prose h3 { margin: 2.4rem 0 0.9rem; }
.content-block + .content-block { margin-top: clamp(3rem, 6vw, 4.5rem); }
