/* ==========================================================================
   Fairywren Studios — field guide design system
   Replaces the previous Tailwind/Flowbite theme entirely.
   ========================================================================== */

:root {
  --cream:        #f7f3ea;
  --cream-2:      #f1ebdd;
  --ink:          #211e18;
  --ink-2:        #37332a;
  --body:         #55503f;
  --muted:        #6e6555;
  --dim:          #8d867a;
  --rule:         #d8d0bf;
  --cobalt:       #2b52c4;
  --cobalt-dark:  #1c3a94;
  --cobalt-light: #92abf0;
  --live:         #3e7d4d;
  --on-dark-mute: #a39b8a;
  --dark-rule:    #4a4436;

  --serif: 'Spectral', Georgia, serif;
  --sans:  'Archivo', Helvetica, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --pad: 36px;
  --wrap: 1160px;

  /* Per-product accent; overridden on product pages. */
  --accent: var(--cobalt);
  --accent-tint: var(--cream-2);
  --accent-inner: var(--cream);
  --accent-inner-rule: var(--rule);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--cream); }

body {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-dark); }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--cobalt); color: var(--cream); }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* --------------------------------------------------------------- helpers */

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

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.serif { font-family: var(--serif); }

.rule-b { border-bottom: 1px solid var(--ink); }

.pad { padding: 56px var(--pad); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.status-live { color: var(--live); }

/* ------------------------------------------------------------ top strip */

.topbar {
  border-bottom: 1px solid var(--ink);
  padding: 8px var(--pad);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- nav */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand em { font-weight: 400; font-style: italic; color: var(--muted); }
.brand svg { width: 26px; height: 26px; flex: none; }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--cobalt); }
.nav-links a.is-current { color: var(--cobalt); }

.nav-links a.nav-cta {
  color: var(--cream);
  background: var(--ink);
  padding: 9px 18px;
  border-radius: 999px;
  letter-spacing: 0.1em;
}
.nav-links a.nav-cta:hover { background: var(--cobalt); color: var(--cream); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 72px var(--pad) 56px; border-bottom: 1px solid var(--ink); }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6.5vw, 76px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: pretty;
}
.hero h1 em { font-style: italic; color: var(--cobalt); }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-foot p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  max-width: 54ch;
  text-wrap: pretty;
}

.underlink {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 5px;
  white-space: nowrap;
  text-transform: uppercase;
}
.underlink:hover { color: var(--cobalt); border-bottom-color: var(--cobalt); }

/* ---------------------------------------------------------------- plates */

.plates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--ink);
}

.plate {
  border-right: 1px solid var(--ink);
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
}
.plate:last-child { border-right: 0; }
.plate:hover { background: var(--cream-2); color: var(--ink); }

.plate-head {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plate-fig {
  width: 100%;
  aspect-ratio: 200 / 110;
  border: 1px solid var(--rule);
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.plate-fig img { height: 86px; width: 86px; object-fit: contain; }
.plate-fig svg { width: 58%; height: 58%; }
.plate-fig.is-empty {
  background: repeating-linear-gradient(-45deg, #efe9db 0 6px, var(--cream) 6px 12px);
}
.plate-fig .fig-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.plate-name { font-family: var(--serif); font-size: 26px; font-weight: 600; }

.plate-habitat {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plate p { font-size: 14px; line-height: 1.55; color: var(--body); flex: 1; }

.plate-more { font-size: 13px; font-weight: 600; color: var(--cobalt); }

/* ------------------------------------------------------------- catalogue */

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cat-row {
  display: grid;
  grid-template-columns: 70px 1.2fr 1.8fr 1.2fr 90px;
  gap: 18px;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.cat-row.is-head {
  padding: 10px 8px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
a.cat-row:hover { background: var(--cream-2); color: var(--ink); }
.cat-row .c-no  { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cat-row .c-name { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.cat-row .c-job { font-size: 14px; color: var(--body); }
.cat-row .c-hab { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cat-row .c-status { font-family: var(--mono); font-size: 11px; color: var(--live); text-transform: uppercase; }
.cat-row.is-pending { color: var(--dim); }
.cat-row.is-pending .c-no,
.cat-row.is-pending .c-hab,
.cat-row.is-pending .c-job,
.cat-row.is-pending .c-status { color: var(--dim); }

.cat-note {
  padding: 16px 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ------------------------------------------------------------- dark band */

.band {
  background: var(--ink);
  color: var(--cream);
  padding: 72px var(--pad);
  border-bottom: 1px solid var(--ink);
}
.band .eyebrow { color: var(--on-dark-mute); }
.band h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.band h2 em { font-style: italic; color: var(--cobalt-light); }
.band p { font-size: 15.5px; line-height: 1.65; color: #cdc5b4; max-width: 52ch; }

.band-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.ledger {
  border: 1px solid var(--dark-rule);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
}
.ledger-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--dark-rule);
  color: var(--on-dark-mute);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ledger-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--dark-rule);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row span:last-child { color: var(--on-dark-mute); }
.ledger-row.is-pending span { color: var(--on-dark-mute); }

/* ----------------------------------------------------------- field notes */

.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.note {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
}
.note:hover { color: var(--cobalt); }
.note-meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.note-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.25; }
.note-desc { font-size: 14px; line-height: 1.55; color: var(--body); }

/* ---------------------------------------------------------------- footer */

/* The border keeps the footer readable as its own block when the section
   above it is also dark (the taxonomy band). */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid var(--dark-rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 56px var(--pad) 36px;
}
.footer-grid .brand { color: var(--cream); }
.footer-grid .brand em { color: var(--on-dark-mute); }
.footer-grid p { font-size: 13.5px; line-height: 1.6; color: var(--on-dark-mute); max-width: 38ch; }

.footer-col { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer-col a { color: var(--cream); }
.footer-col a:hover { color: var(--cobalt-light); }
.footer-col a.is-dim { color: var(--on-dark-mute); }
.footer-col .mono { color: var(--on-dark-mute); }

.footer-base {
  padding: 0 var(--pad) 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--on-dark-mute);
  text-transform: uppercase;
}
.footer-base a { color: var(--on-dark-mute); }
.footer-base a:hover { color: var(--cobalt-light); }
/* The brand keeps its own casing even inside the uppercased mono strip. */
.footer-base .brand { text-transform: none; letter-spacing: 0.01em; }
.footer-base a.brand { color: var(--cream); }

.footer-slim {
  border-top: 1px solid var(--dark-rule);
  padding: 28px var(--pad);
}
.footer-slim .footer-base { padding: 0; }

/* =========================================================== product page */

.breadcrumb {
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cobalt); }
.breadcrumb .is-here { color: var(--ink); }

.prod-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  padding: 64px var(--pad);
  align-items: center;
}
.prod-hero .eyebrow { color: var(--accent); display: block; margin-bottom: 18px; }
.prod-hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.prod-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.4;
  color: var(--body);
  margin-bottom: 22px;
  max-width: 28ch;
  text-wrap: pretty;
}
.prod-blurb {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 50ch;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.cta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn {
  background: var(--accent);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.cta-note { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; }

.fig-card {
  border: 1px solid var(--ink);
  background: var(--accent-tint);
  padding: 20px;
}
.fig-card-head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.fig-card-body {
  width: 100%;
  aspect-ratio: 320 / 220;
  border: 1px solid var(--accent-inner-rule);
  background: var(--accent-inner);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fig-card-body img { width: 42%; height: auto; }
.fig-card-body svg { width: 40%; height: 40%; }

.shot {
  border: 1px solid var(--ink);
  overflow: hidden;
  background: var(--cream-2);
}
.shot img { display: block; width: 100%; height: auto; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); }
.step { border-right: 1px solid var(--ink); padding: 36px 28px 42px; }
.step:last-child { border-right: 0; }
.step .eyebrow { color: var(--accent); display: block; margin-bottom: 12px; }
.step-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 14px; line-height: 1.55; color: var(--body); }

.split {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
}
.split > h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.trait {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.trait:last-child { border-bottom: 0; }
.trait-id { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.trait-title { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.trait p { font-size: 14.5px; line-height: 1.6; color: var(--body); }
.trait.is-bare { padding: 18px 0; }
.trait.is-bare .trait-title { font-size: 16px; margin-bottom: 0; }

.pricing { display: grid; grid-template-columns: repeat(2, 1fr); }
.price { border-right: 1px solid var(--ink); padding: 48px var(--pad); }
.price:last-child { border-right: 0; }
.price .mono { display: block; margin-bottom: 16px; }
.price-amount { font-family: var(--serif); font-size: 40px; font-weight: 600; }
.price-amount span { font-size: 18px; color: var(--muted); font-weight: 400; }
.price p { font-size: 14.5px; line-height: 1.6; color: var(--body); margin-top: 12px; max-width: 40ch; }

.faq { display: flex; flex-direction: column; gap: 28px; }
.faq-q { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.faq p { font-size: 14.5px; line-height: 1.65; color: var(--body); }

.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.related-card {
  border: 1px solid var(--ink);
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: var(--ink);
}
.related-card:hover { background: var(--cream-2); color: var(--ink); }
.related-card .r-name { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.related-card .r-desc { font-size: 14px; color: var(--body); }
.related-card .r-no { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ about page */

.prose {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 62ch;
}

.principles { display: grid; grid-template-columns: repeat(3, 1fr); }
.principle { border-right: 1px solid var(--ink); padding: 40px 32px 48px; }
.principle:last-child { border-right: 0; }
.principle .eyebrow { color: var(--cobalt); display: block; margin-bottom: 14px; }
.principle-title { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.principle p { font-size: 14.5px; line-height: 1.6; color: var(--body); }

.contact-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.contact-band .headline {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 500;
  max-width: 24ch;
  line-height: 1.2;
  text-wrap: pretty;
}
.contact-band .headline em { font-style: italic; color: var(--cobalt-light); }
.contact-btn {
  background: var(--cream);
  color: var(--ink);
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.contact-btn:hover { background: var(--cobalt-light); color: var(--ink); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root { --pad: 22px; }

  .nav { flex-wrap: wrap; }
  .nav-links { gap: 18px; font-size: 11.5px; flex-wrap: wrap; }

  .plates,
  .steps,
  .principles,
  .notes,
  .related { grid-template-columns: 1fr; }

  .plate,
  .step,
  .principle {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }
  .plate:last-child,
  .step:last-child,
  .principle:last-child { border-bottom: 0; }

  .band-split,
  .split,
  .prod-hero { grid-template-columns: 1fr; gap: 32px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .pricing { grid-template-columns: 1fr; }
  .price { border-right: 0; border-bottom: 1px solid var(--ink); }
  .price:last-child { border-bottom: 0; }

  .hero { padding: 48px var(--pad) 40px; }
  .pad { padding: 40px var(--pad); }
  .band { padding: 48px var(--pad); }
  .prod-hero { padding: 44px var(--pad); }

  /* Catalogue table collapses to stacked records. */
  .cat-row { grid-template-columns: 60px 1fr; gap: 6px 14px; }
  .cat-row.is-head { display: none; }
  .cat-row .c-no { grid-row: span 3; }
  .cat-row .c-hab::before { content: 'Habitat: '; }
}

@media (max-width: 560px) {
  .hero-foot { gap: 24px; }
  .prose { font-size: 17px; }
  .related-card { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media print {
  .nav-cta, .topbar { display: none; }
  body { background: #fff; }
}

