/* Amberville Chronicles — landing page.
   Palette: prompts/COLOR_PALETTE.md. Type pairing: the app's (serif story,
   rounded UI). Flat print surfaces: no gradients, blur or glow; the only
   "shadow" is a hard off-register slate plate, as in the art. */

:root {
  --cream: #DDD6BC;          /* paper */
  --cream-light: #ECE6D2;    /* page */
  --cream-ink: #F6F1E1;      /* text on night */
  --night: #30383A;          /* charcoal blue-black */
  --ink: #30383A;
  --ink-soft: #55595A;
  --fox: #DB471B;            /* identity colour — CTAs and the fox only */
  --fox-dark: #B93A14;
  --brick: #C33829;
  --rose: #CA5A5C;
  --slate: #517889;
  --dusty: #7F94A5;
  --sky: #9AB1B9;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --round: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 6px;
  --plate: 8px 8px 0 var(--slate);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--cream-light);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
.narrow { max-width: 760px; }
.center { text-align: center; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--night); color: var(--cream-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--fox); outline-offset: 3px; }

.kicker {
  font: 700 .8rem/1.2 var(--round);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: .9em;
}
.section--night .kicker { color: var(--sky); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 52px; padding: .7em 1.4em;
  font: 700 1.15rem/1.1 var(--round);
  color: var(--cream-ink); background: var(--fox);
  border: 2px solid var(--fox); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--fox-dark); border-color: var(--fox-dark); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream-ink); border-color: var(--ink); }
.section--night .btn--ghost { color: var(--cream-ink); border-color: var(--cream-ink); }
.section--night .btn--ghost:hover { background: var(--cream-ink); color: var(--night); }
.btn--small { min-height: 42px; padding: .5em 1.1em; font-size: 1rem; }
.top .btn { white-space: nowrap; flex-shrink: 0; }
section[id] { scroll-margin-top: 64px; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: default; background: var(--slate); border-color: var(--slate); }
.btn[hidden] { display: none; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--night); color: var(--cream-ink); }
.top__row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.1rem/1 var(--serif); }
.brand img { border-radius: 10px; }
.top__nav { display: none; margin-left: auto; gap: 24px; font: 600 .95rem/1 var(--round); }
.top__nav a { text-decoration: none; opacity: .85; }
.top__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.top .btn { margin-left: auto; }
@media (min-width: 860px) {
  .top__nav { display: flex; }
  .top .btn { margin-left: 8px; }
}
@media (max-width: 380px) { .brand span { font-size: .95rem; } }

/* ---------- hero ---------- */
.hero { padding: 48px 0 24px; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
  .hero { padding: 80px 0 40px; }
  .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
}
.lede { font-size: 1.2rem; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; font: 600 .9rem/1 var(--round); }
.trust li { padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 999px; }
.hero__art { display: flex; justify-content: center; padding: 8px 16px 16px 0; }
.book { border-radius: 3px 6px 6px 3px; box-shadow: var(--plate); max-width: min(420px, 84%); }
.book--tilt { transform: rotate(-3deg); }

.ornament { text-align: center; color: var(--brick); font-size: 1.5rem; letter-spacing: .3em; margin: 16px 0; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
@media (min-width: 860px) { .section { padding: 96px 0; } }
.section--paper { background: var(--cream); }
.section--night { background: var(--night); color: var(--cream-ink); }
.section__head { max-width: 760px; margin-bottom: 40px; }
.section__head p:last-child { font-size: 1.15rem; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split--reverse > :first-child { order: 2; }
}
.prose { max-width: 36em; }
.prose h3 { margin-top: 1.4em; }
.plate { margin: 0; justify-self: center; max-width: 460px; width: 100%; padding-right: 8px; }
.plate img { border-radius: var(--radius); box-shadow: var(--plate); }

.pull {
  margin: 1.4em 0; padding: .2em 0 .2em 1em;
  border-left: 4px solid var(--fox);
  font-size: 1.2rem; font-style: italic;
}

/* ---------- shelf ---------- */
.shelf { display: grid; gap: 32px; }
@media (min-width: 720px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--cream-light); border-radius: 10px; padding: 20px 20px 24px; border: 2px solid var(--ink); }
.card__cover { position: relative; margin-bottom: 18px; }
.card__cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px 5px 5px 3px; box-shadow: 6px 6px 0 var(--slate); }
.card h3 { font-size: 1.35rem; }
.card__tag { font: 700 .78rem/1 var(--round); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: .6em; }
.card__meta { font: 600 .9rem/1.3 var(--round); color: var(--ink-soft); margin-top: auto; padding-top: .4em; }
.card .btn { margin-top: 8px; }
.sticker {
  position: absolute; top: -10px; right: -10px;
  transform: rotate(8deg);
  background: var(--fox); color: var(--cream-ink);
  font: 800 .95rem/1 var(--round); text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 14px; border-radius: 4px;
  box-shadow: 3px 3px 0 var(--night);
}
.sticker--soon { background: var(--slate); }

/* ---------- invisible ink ---------- */
.ink { max-width: 460px; width: 100%; justify-self: center; text-align: center; }
.ink__paper {
  background: #E9E1C8; color: var(--night);
  padding: 28px 24px 30px; border-radius: 4px;
  transform: rotate(1.5deg);
  box-shadow: 8px 8px 0 var(--brick);
  text-align: left;
}
.ink__headline { font: 800 1.5rem/1.1 var(--serif); letter-spacing: .02em; border-bottom: 2px solid var(--night); padding-bottom: .4em; }
.ink__body { font-size: .98rem; columns: 2 10em; column-gap: 1.2em; color: #4a4a44; }
.ink__secret { margin: 1em 0 0; min-height: 1.6em; text-align: center; font: 800 1.6rem/1 var(--serif); letter-spacing: .08em; color: #8E665F; }
.ink__secret span { opacity: 0; filter: blur(2px); transition: opacity 2.4s ease, filter 2.4s ease; }
.ink.is-warm .ink__secret span { opacity: 1; filter: none; }
.ink__button { margin-top: 28px; }
.ink__hint { margin-top: 16px; opacity: 0; transition: opacity .8s 2s; font-style: italic; }
.ink.is-warm .ink__hint { opacity: 1; }

/* ---------- gallery ---------- */
.gallery { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { font: 600 .88rem/1.35 var(--round); color: var(--ink-soft); margin-top: 10px; }

/* ---------- promises ---------- */
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .promises { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .promises { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.promises li { border: 1.5px solid rgba(246, 241, 225, .35); border-radius: 10px; padding: 22px 22px 8px; }
.promises h3 { color: var(--cream-ink); }
.promises h3::before { content: "✦ "; color: var(--fox); }
.promises p { color: #C9CBC3; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.6em; margin-bottom: .75em; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--fox); }

/* ---------- faq ---------- */
.faq details { border-bottom: 1.5px solid rgba(48, 56, 58, .3); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 36px 18px 0; position: relative;
  font: 700 1.15rem/1.3 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 600 1.6rem/1 var(--round); color: var(--fox); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; max-width: 40em; }

/* ---------- final + footer ---------- */
.final__mark { margin: 0 auto 24px; border-radius: 22px; }
.final p { font: 600 1rem/1.4 var(--round); color: #C9CBC3; margin-bottom: 28px; }
.foot { background: #262D2F; color: #C9CBC3; padding: 28px 0; font: 500 .9rem/1.4 var(--round); }
.foot__row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
