/* =========================================================================
   THE FACE-KEEPER — site styles
   Warm seaside-lido palette: sun-bleached cream, faded Art Deco teal, the
   warm coral of an old swimming-gala rosette. Elegant, responsive, no
   frameworks. Light-only by design (this is a bright, warm book).
   ========================================================================= */

:root {
  /* paper & ink */
  --paper:      #fbf4e6;   /* sun-warmed cream, the colour of an old postcard */
  --paper-2:    #f4ead4;   /* a shade deeper, for panels */
  --ink:        #2a2622;   /* warm near-black */
  --ink-soft:   #5c5249;   /* muted text */
  --rule:       #e0d2b6;   /* hairlines */

  /* the lido */
  --teal:       #1f6f78;   /* faded Deco pool-tile teal */
  --teal-deep:  #154e55;
  --aqua:       #58b0ae;   /* warm chlorinated green-blue */
  --aqua-pale:  #cfe7e0;
  --coral:      #e0633f;   /* gala-rosette coral, the warm accent */
  --coral-soft: #f2a085;
  --gold:       #d9a441;   /* bunting / sun */

  --shadow:     0 14px 40px -22px rgba(21, 78, 85, 0.55);
  --shadow-sm:  0 6px 20px -14px rgba(21, 78, 85, 0.5);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  "Spline Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1080px;
  --readw: 38rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* a soft sun-on-water wash behind everything */
  background-image:
    radial-gradient(1200px 520px at 78% -8%, rgba(217, 164, 65, 0.18), transparent 60%),
    radial-gradient(1000px 620px at 8% 4%, rgba(88, 176, 174, 0.16), transparent 58%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper) 70%, var(--paper-2) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--teal-deep); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 50;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- shared bits ---------- */

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: #d2552f; }
.btn--ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--teal);
}
.btn--ghost:hover { transform: translateY(-2px); background: rgba(31, 111, 120, 0.08); }

/* decorative scene break — a little sun on the water */
.scene-break {
  text-align: center;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.5em;
  margin: 2.4rem 0;
  user-select: none;
}

/* =========================================================================
   LANDING (index.html)
   ========================================================================= */

/* --- top bar --- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 244, 230, 0.82);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--coral); }
.site-head__nav { display: flex; gap: 1.4rem; align-items: center; }
.site-head__nav a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-head__nav a:hover { color: var(--teal-deep); }
.site-head__nav .nav-cta {
  color: var(--teal-deep);
  font-weight: 600;
}

/* --- hero --- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__series {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 1rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.hero__title .amp { color: var(--coral); font-style: italic; }
.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--teal-deep);
  margin: 0.6rem 0 1.6rem;
  max-width: 32ch;
}
.hero__pitch {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 1.9rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* the "book cover" panel */
.cover {
  position: relative;
  aspect-ratio: 3 / 4.2;
  border-radius: 14px;
  padding: 2rem 1.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f7efe0;
  background:
    linear-gradient(165deg, var(--teal) 0%, var(--teal-deep) 60%, #0f3a40 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
/* Deco sunrays + waterline */
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-conic-gradient(from 200deg at 50% 118%,
      rgba(217, 164, 65, 0.22) 0deg 8deg,
      transparent 8deg 16deg);
  opacity: 0.7;
}
.cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(88, 176, 174, 0.5), transparent),
    repeating-linear-gradient(100deg,
      rgba(255,255,255,0.06) 0 10px, transparent 10px 22px);
}
.cover__top { display: flex; justify-content: space-between; align-items: baseline; }
.cover__pelican {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--coral-soft);
}
.cover__bookno {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(247, 239, 224, 0.8);
}
.cover__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0,0,0,0.25);
}
.cover__rule {
  width: 48px; height: 3px; background: var(--coral);
  margin: 0.9rem 0; border-radius: 2px;
}
.cover__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: rgba(247, 239, 224, 0.92);
  margin: 0;
}
.cover__foot {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.62rem;
  color: rgba(247, 239, 224, 0.7);
}

/* --- section scaffolding --- */
.section { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.section--tint {
  background: linear-gradient(180deg, transparent, rgba(207, 231, 224, 0.45) 12%, rgba(207, 231, 224, 0.45) 88%, transparent);
}
.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--ink);
  margin: 0.2rem 0 1.4rem;
}

/* --- pitch / blurb --- */
.blurb { max-width: var(--readw); }
.blurb p {
  font-size: 1.12rem;
  color: var(--ink);
  margin: 0 0 1.15rem;
}
.blurb p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4rem;
  float: left;
  line-height: 0.78;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--coral);
}
.blurb .blurb__turn {
  font-family: var(--serif);
  font-style: italic;
  color: var(--teal-deep);
}

.pullquote {
  border: none;
  margin: 0 0 2.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--paper-2);
  border-left: 5px solid var(--coral);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
}
.pullquote p {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.32;
  font-style: italic;
  color: var(--ink);
  margin: 0;
}
.pullquote cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--teal);
}

/* --- comps --- */
.comps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.comp {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.comp__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.15rem;
  color: var(--teal-deep);
}
.comp__author {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
.comp__note { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }
.comps__line {
  max-width: var(--readw);
  margin: 1.6rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

/* --- "what it is" facts strip --- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.facts li {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
.facts dt {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.3rem;
}
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.04rem; color: var(--ink); }

/* --- series note --- */
.series {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  background:
    linear-gradient(155deg, rgba(31, 111, 120, 0.06), rgba(224, 99, 63, 0.06));
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.series__mark {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-deep);
  color: var(--coral-soft);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.series__body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.series__body p { margin: 0; color: var(--ink-soft); max-width: 62ch; }

/* --- final CTA --- */
.endcta { text-align: center; }
.endcta h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0 0 0.6rem;
}
.endcta p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 1.8rem; }

/* --- the autonomous-team note (honest provenance) --- */
.made {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  border-top: 1px dashed var(--rule);
  padding-top: 1.8rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 70ch;
}
.made__badge {
  flex: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--aqua-pale);
  border: 1px solid var(--aqua);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}
.made p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.made strong { color: var(--ink); }

/* --- footer --- */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.6rem;
  text-align: center;
  background: var(--paper-2);
}
.site-foot p { margin: 0.2rem 0; font-size: 0.9rem; color: var(--ink-soft); }
.site-foot__fine { font-size: 0.8rem; opacity: 0.85; }
.site-foot .wrap { display: block; }

/* =========================================================================
   READER (manuscript.html)
   ========================================================================= */

.reader-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 244, 230, 0.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.reader-top__inner {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.reader-top__home {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}
.reader-top__series {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.reader {
  width: min(100% - 2.5rem, var(--readw));
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4rem) 0 4rem;
}
.reader__intro { text-align: center; margin-bottom: 1.5rem; }
.reader__intro h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 0.8rem;
  color: var(--ink);
}
.reader__note {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 48ch;
  margin: 0 auto;
}

/* chapter nav */
.chapnav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 2rem 0 3rem;
  padding: 1.2rem 1.3rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.chapnav__link {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  text-decoration: none;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.14s ease;
}
.chapnav__link:hover { background: rgba(31, 111, 120, 0.08); }
.chapnav__link span {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--coral);
  white-space: nowrap;
}
.chapnav__link em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}

/* a chapter */
.chapter { margin: 0 0 3.5rem; }
.chapter__head { text-align: center; margin: 2.6rem 0 2rem; }
.chapter__eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 0.5rem;
}
.chapter__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.05rem);
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}
.chapter__head::after {
  content: "";
  display: block;
  width: 54px; height: 3px;
  background: var(--coral);
  border-radius: 2px;
  margin: 1rem auto 0;
}

.chapter p {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.72;
  color: #322c26;
  margin: 0 0 1.25rem;
}
.chapter p:first-of-type::first-letter {
  font-size: 3.1rem;
  float: left;
  line-height: 0.8;
  padding: 0.28rem 0.55rem 0 0;
  color: var(--teal-deep);
  font-weight: 600;
}

/* the Sightings Ledger card */
.ledger {
  margin: 2.2rem 0 0.5rem;
  padding: 1.3rem 1.4rem 1.3rem 1.5rem;
  background: var(--paper-2);
  border-left: 5px solid var(--teal);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.ledger strong { color: var(--ink); }
.ledger em { color: var(--teal-deep); }
.ledger__tag {
  display: block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: 0.6rem;
}

/* end of sample */
.reader-end { text-align: center; margin-top: 2rem; }
.reader-end__line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--teal-deep);
  margin: 0 0 0.6rem;
}
.reader-end__note {
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: 46ch;
  margin: 0 auto 1.6rem;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .cover { max-width: 360px; margin-inline: auto; order: -1; }
  .comps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .site-head__nav { gap: 1rem; }
}

@media (max-width: 540px) {
  .facts { grid-template-columns: 1fr; }
  .series { grid-template-columns: 1fr; text-align: left; }
  .made { flex-direction: column; }
  .site-head__nav .nav-secondary { display: none; }
  .chapnav__link { flex-direction: column; gap: 0.1rem; }
}

@media print {
  .site-head, .reader-top, .site-foot, .hero__cta, .chapnav, .skip-link { display: none; }
  body { background: #fff; }
  .chapter p { font-size: 11pt; }
}

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