/* ============================================================================
   The Weight of Birds — styles.css
   Elegant, maritime / period. Responsive. No frameworks, no JS.
   Serves both index.html (landing) and manuscript.html (reader).
   ========================================================================== */

:root {
  /* Palette: weathered paper, ink, deep sea, oxidized brass, guano-white */
  --paper:      #f4efe4;  /* aged page */
  --paper-deep: #ece3d2;  /* panel paper */
  --ink:        #211c16;  /* near-black brown ink */
  --ink-soft:   #4a4136;  /* body text */
  --ink-faint:  #6f6353;  /* captions */
  --sea:        #1d2a30;  /* deep cold Humboldt */
  --sea-2:      #2c3d44;
  --sea-3:      #3a4f56;
  --brass:      #9a7b3f;  /* oxidized brass / rule */
  --brass-lit:  #c6a05a;  /* lit brass / accent */
  --rust:       #8a4b32;  /* the red rock beneath the white */
  --line:       #d8cdb8;  /* hairline rule on paper */
  --white-bird: #f7f4ec;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;

  --measure: 34rem;       /* reading measure */
  --wrap: 70rem;
  --wrap-narrow: 44rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.72;
  font-feature-settings: "liga" 1, "onum" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

::selection { background: var(--brass-lit); color: var(--sea); }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }
.narrow { width: min(var(--wrap-narrow), 92vw); }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: .6rem; left: .6rem; z-index: 100;
  background: var(--sea); color: var(--paper);
  padding: .5rem .9rem; border-radius: 3px; font-size: .9rem;
}

/* ============================================================== buttons === */
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .02em;
  padding: .72rem 1.5rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--brass);
  color: #1a140b;
  border: 1px solid var(--brass);
}
.btn-primary:hover { background: var(--brass-lit); border-color: var(--brass-lit); color: #160f06; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(244, 239, 228, .45);
}
.btn-ghost:hover { border-color: var(--paper); color: #fff; transform: translateY(-1px); }

/* ================================================================= hero === */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(198,160,90,.16), transparent 55%),
    linear-gradient(180deg, var(--sea) 0%, var(--sea-2) 58%, var(--sea-3) 100%);
  color: var(--paper);
  text-align: center;
  padding: clamp(4.5rem, 13vh, 9rem) 0 clamp(3.5rem, 9vh, 6rem);
  isolation: isolate;
}
/* faint salt / dust texture over the sea */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(247,244,236,.12), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(247,244,236,.10), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(247,244,236,.08), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(247,244,236,.10), transparent);
  opacity: .8;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .72rem;
  margin: 0 0 1.4rem;
  color: var(--brass-lit);
  padding-left: .42em; /* optical, for the tracking */
}

.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: .96;
  letter-spacing: .01em;
  margin: 0;
  color: var(--white-bird);
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}

.hero-rule { color: var(--brass-lit); font-size: 1.1rem; margin: 1.5rem 0 1.2rem; letter-spacing: .3em; }

.hero-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(244, 239, 228, .92);
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

.scroll-cue {
  position: relative; z-index: 2;
  margin: 3rem 0 0; color: rgba(244,239,228,.5);
  font-size: 1.3rem; animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* drifting birds (pure CSS specks) */
.hero-sea { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bird {
  position: absolute;
  width: 14px; height: 14px;
  background:
    linear-gradient(45deg, transparent 46%, rgba(247,244,236,.55) 46%, rgba(247,244,236,.55) 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(247,244,236,.55) 46%, rgba(247,244,236,.55) 54%, transparent 54%);
  background-size: 100% 50%, 100% 50%;
  background-position: top, bottom;
  background-repeat: no-repeat;
  opacity: .55;
  animation: drift linear infinite;
}
.bird.b1 { top: 16%; left: -5%;  transform: scale(.7); animation-duration: 34s; }
.bird.b2 { top: 24%; left: -5%;  transform: scale(1);  animation-duration: 46s; animation-delay: -8s; }
.bird.b3 { top: 12%; left: -5%;  transform: scale(.5); animation-duration: 40s; animation-delay: -22s; opacity: .4; }
.bird.b4 { top: 33%; left: -5%;  transform: scale(.85);animation-duration: 52s; animation-delay: -14s; }
.bird.b5 { top: 20%; left: -5%;  transform: scale(.6); animation-duration: 38s; animation-delay: -30s; opacity: .45; }
.bird.b6 { top: 9%;  left: -5%;  transform: scale(.4); animation-duration: 44s; animation-delay: -5s; opacity: .35; }
.bird.b7 { top: 29%; left: -5%;  transform: scale(.72);animation-duration: 49s; animation-delay: -38s; }
@keyframes drift {
  from { transform: translateX(0)   translateY(0); }
  50%  {                            translate: 0 -14px; }
  to   { transform: translateX(112vw) translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .bird, .scroll-cue { animation: none; }
  .bird { opacity: .3; }
}

/* ========================================================= section base == */
section { padding: clamp(3.2rem, 8vh, 5.5rem) 0; }

.section-eyebrow {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .76rem;
  color: var(--brass);
  margin: 0 0 1.8rem;
  padding-left: .32em;
}
.section-eyebrow.center { text-align: center; }
.section-eyebrow.center::after {
  content: "";
  display: block;
  width: 2.4rem; height: 1px;
  background: var(--brass);
  margin: .9rem auto 0;
  opacity: .6;
}

.center { text-align: center; }

/* =========================================================== shelf-talker = */
.shelf {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
  text-align: center;
}
.shelf-quote { margin: 0; }
.shelf-quote p {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
}
.shelf-fact {
  margin: 1.6rem 0 0;
  font-style: italic;
  color: var(--ink-faint);
  letter-spacing: .02em;
}

/* ================================================================ gauges == */
.gauges { background: var(--paper); }
.gauges-lede {
  max-width: 40rem;
  font-style: italic;
  color: var(--ink-faint);
  margin: 0 0 2.6rem;
}
.gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.6rem;
}
.gauge {
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  background: #faf6ec;
  padding: 1.8rem 1.6rem;
  border-radius: 2px;
}
.gauge-figure {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--rust);
  margin: 0 0 .3rem;
  letter-spacing: .01em;
}
.gauge-figure span { color: var(--ink-faint); font-size: 1.1rem; padding: 0 .15em; }
.gauge-name {
  font-variant: small-caps;
  letter-spacing: .08em;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 .7rem;
}
.gauge-note { margin: 0; font-size: .98rem; color: var(--ink-soft); }

/* ================================================================= blurb == */
.blurb { background: var(--paper-deep); border-block: 1px solid var(--line); }
.blurb p { margin: 0 0 1.3rem; }
.blurb p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 600;
  float: left;
  font-size: 3.6rem;
  line-height: .72;
  padding: .3rem .55rem .2rem 0;
  color: var(--rust);
}
.blurb strong { color: var(--ink); font-weight: 600; }
.blurb-cta { text-align: center; margin-top: 2.2rem; }

/* ================================================================= comps == */
.comps { background: var(--paper); }
.comps-line {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--ink);
  margin: 0 0 2.6rem;
}
.comp-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}
.comp {
  border-left: 2px solid var(--brass);
  padding: .2rem 0 .2rem 1.2rem;
}
.comp-title {
  font-family: var(--display);
  font-weight: 600;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0;
}
.comp-author {
  font-variant: small-caps;
  letter-spacing: .06em;
  color: var(--brass);
  margin: .1rem 0 .7rem;
  font-size: .95rem;
}
.comp-why { margin: 0; font-size: .98rem; color: var(--ink-soft); }

/* ================================================================= facts == */
.facts { background: var(--sea); color: var(--paper); }
.facts .section-eyebrow { color: var(--brass-lit); }
.facts .section-eyebrow.center::after { background: var(--brass-lit); }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.4rem 2rem;
  max-width: 52rem;
  margin: 0 auto;
}
.fact { border-bottom: 1px solid rgba(244,239,228,.16); padding-bottom: 1rem; }
.fact dt {
  font-variant: small-caps;
  letter-spacing: .1em;
  font-size: .82rem;
  color: var(--brass-lit);
  margin-bottom: .25rem;
}
.fact dd { margin: 0; font-size: 1.08rem; color: var(--paper); }

/* =========================================================== prod note ==== */
.prodnote { background: var(--paper-deep); border-top: 1px solid var(--line); }
.prodnote-card {
  background: #faf6ec;
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 2px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.prodnote-card p { margin: 0 0 1.1rem; }
.prodnote-card strong { color: var(--ink); }
.prodnote-list {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
}
.prodnote-list li { margin-bottom: .7rem; }
.prodnote-fine {
  font-size: .96rem;
  font-style: italic;
  color: var(--ink-faint);
  margin-bottom: 0 !important;
}

/* ================================================================ footer == */
.site-foot {
  background: var(--sea);
  color: rgba(244,239,228,.78);
  text-align: center;
  padding: 3rem 0;
  border-top: 3px solid var(--brass);
}
.foot-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--white-bird);
  margin: 0 0 .4rem;
}
.foot-line { margin: 0 0 1.4rem; color: rgba(244,239,228,.7); }
.foot-fine {
  font-size: .85rem;
  color: rgba(244,239,228,.5);
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   READER — manuscript.html
   ========================================================================== */
body.reader { background: var(--paper); }

.reader-masthead {
  background: var(--sea);
  color: var(--paper);
  border-bottom: 3px solid var(--brass);
  position: sticky; top: 0; z-index: 20;
}
.reader-masthead .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: .85rem 0; flex-wrap: wrap;
}
.reader-home {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--white-bird);
  text-decoration: none;
}
.reader-home:hover { color: var(--brass-lit); }
.reader-tag {
  margin: 0;
  font-variant: small-caps;
  letter-spacing: .14em;
  font-size: .8rem;
  color: var(--brass-lit);
}

.reader-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vh, 3.5rem) 0 4rem;
}

.reader-nav {
  position: sticky; top: 5rem;
  border-right: 1px solid var(--line);
  padding-right: 1.4rem;
}
.reader-nav-title {
  font-variant: small-caps;
  letter-spacing: .16em;
  font-size: .82rem;
  color: var(--brass);
  margin: 0 0 .9rem;
}
.reader-nav-list { list-style: none; margin: 0 0 1.6rem; padding: 0; counter-reset: none; }
.reader-nav-list li { margin: 0 0 .65rem; }
.reader-nav-list a {
  text-decoration: none;
  color: var(--ink);
  font-size: 1.02rem;
  display: block;
  border-left: 2px solid transparent;
  padding-left: .7rem;
  margin-left: -.7rem;
  transition: border-color .2s, color .2s;
}
.reader-nav-list a:hover { color: var(--rust); border-left-color: var(--brass); }
.nav-pov {
  display: block;
  font-style: italic;
  font-size: .86rem;
  color: var(--ink-faint);
}
.reader-nav-note {
  font-size: .86rem;
  font-style: italic;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.reader-main { min-width: 0; }

.reader-frontispiece {
  text-align: center;
  padding: 1rem 0 3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}
.fp-rule { color: var(--brass); letter-spacing: .3em; margin: 0 0 1rem; }
.fp-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  margin: 0;
}
.fp-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  margin: .8rem 0 .3rem;
  font-size: 1.15rem;
}
.fp-note {
  font-variant: small-caps;
  letter-spacing: .12em;
  font-size: .82rem;
  color: var(--brass);
  margin: .4rem 0 0;
}

/* a chapter */
.chapter { max-width: var(--measure); margin: 0 auto; }
.chapter + .chapter { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--line); }

.chapter-head { text-align: center; margin-bottom: 2.4rem; }
.chapter-kicker {
  font-variant: small-caps;
  letter-spacing: .18em;
  font-size: .78rem;
  color: var(--brass);
  margin: 0 0 .8rem;
}
.chapter-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.chapter-pov {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--ink-faint);
  margin-top: .3rem;
  letter-spacing: 0;
}
.chapter-dateline {
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-faint);
  margin: 1rem 0 0;
}

.chapter p {
  margin: 0;
  text-align: justify;
  hyphens: auto;
}
/* indent successive paragraphs; first after a head/break runs full */
.chapter > p + p { text-indent: 1.4em; }
.chapter-head + p,
.section-break + p { text-indent: 0; }
.chapter-head + p::first-letter {
  font-family: var(--display);
  font-weight: 600;
  float: left;
  font-size: 3.4rem;
  line-height: .72;
  padding: .35rem .5rem .1rem 0;
  color: var(--rust);
}

.section-break {
  text-align: center;
  color: var(--brass);
  letter-spacing: .3em;
  margin: 1.8rem 0 !important;
  text-indent: 0 !important;
  font-size: 1rem;
}

.chapter em { font-style: italic; }

.reader-end {
  max-width: var(--measure);
  margin: 4rem auto 0;
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}
.reader-end-note {
  font-variant: small-caps;
  letter-spacing: .14em;
  color: var(--brass);
  margin: 1rem 0 .6rem;
}
.reader-end-sub { font-style: italic; color: var(--ink-faint); margin: 0 0 1.6rem; }
.reader-back { font-style: italic; }

/* ============================================================== responsive */
@media (max-width: 56rem) {
  .reader-layout { grid-template-columns: 1fr; }
  .reader-nav {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 1.4rem;
    margin-bottom: 1.5rem;
  }
  .reader-nav-list { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: 1rem; }
  .reader-nav-list li { margin: 0; }
  .nav-pov { display: inline; font-size: .82rem; }
  .reader-nav-list a { border-left: none; padding-left: 0; margin-left: 0; }
}

@media (max-width: 40rem) {
  body { font-size: 1.06rem; }
  .chapter p { text-align: left; }
  .hero-actions .btn { width: 100%; max-width: 22rem; }
}

@media print {
  .hero-sea, .scroll-cue, .reader-masthead, .reader-nav, .site-foot,
  .skip-link, .hero-actions, .blurb-cta, .reader-back { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .chapter { max-width: none; }
}
