/* Feltlife — the night scriptorium
   One committed theme: the product's own artwork is dark-ground, so the page is too. */

:root {
  --desk:        #211710;
  --desk-raised: #2c2016;
  --desk-deep:   #180f0a;
  --parchment:   #ece0c6;
  --parchment-2: #ded0b2;
  --gild:        #cfa85e;
  --gild-lit:    #e9cd93;
  --seal:        #a3302a;
  --seal-lit:    #c04238;
  --ink:         #efe4cd;
  --ink-quiet:   #a58e73;
  --ink-faint:   #7d6952;
  --rule:        rgba(207, 168, 94, 0.22);
  --rule-soft:   rgba(207, 168, 94, 0.12);

  --measure: 62ch;
  --plate:  1120px;

  --display: "Cormorant Garamond", "Hoefler Text", Garamond, "Times New Roman", serif;
  --body:    "Spectral", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--desk);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(207,168,94,0.09) 0%, rgba(207,168,94,0) 60%),
    radial-gradient(90% 50% at 50% 108%, rgba(163,48,42,0.10) 0%, rgba(163,48,42,0) 65%),
    repeating-linear-gradient(92deg, rgba(0,0,0,0.16) 0 2px, rgba(255,255,255,0.012) 2px 5px);
  background-attachment: fixed, fixed, scroll;
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem);
  line-height: 1.72;
  font-weight: 400;
}

/* ---------- shared primitives ---------- */

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

.label {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gild);
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gild-lit);
  text-wrap: balance;
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.6rem, 1.7rem + 4.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.35rem; color: var(--parchment); }

p { margin: 0; }

a { color: var(--gild-lit); text-decoration-color: var(--rule); text-underline-offset: 0.22em; }
a:hover { color: var(--parchment); text-decoration-color: var(--gild); }
a:focus-visible {
  outline: 2px solid var(--gild-lit);
  outline-offset: 3px;
  border-radius: 1px;
}

.lede { font-size: 1.15em; color: var(--ink); }
.quiet { color: var(--ink-quiet); }

/* the product's own ornament, reused as the section break */
.ornament {
  display: flex; align-items: center; gap: 1rem;
  width: min(100%, 30rem); margin: 0 auto;
  color: var(--gild);
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}
.ornament span { font-size: 0.6rem; line-height: 1; opacity: 0.85; }

/* ---------- masthead ---------- */

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 1rem 2rem;
  padding: 1.9rem 0 0;
}
.wordmark {
  font-family: var(--body);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--parchment); text-decoration: none;
}
.wordmark:hover { color: var(--gild-lit); }
.masthead nav { display: flex; gap: 1.6rem; }
.masthead nav a {
  font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-quiet); text-decoration: none;
}
.masthead nav a:hover { color: var(--gild-lit); }

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

.hero { padding: clamp(4.5rem, 2.5rem + 8vw, 8.5rem) 0 0; text-align: center; }
.hero .stack { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }



.etymology {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.42rem);
  font-style: italic;
  line-height: 1.6;
  color: var(--parchment-2);
  max-width: 38ch;
}
.etymology b { font-style: normal; font-weight: 600; color: var(--gild-lit); }

.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--body); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px;
  background: var(--seal); color: #fdf3e2;
  border: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.16) inset, 0 8px 22px -12px rgba(0,0,0,0.9);
  transition: background 160ms ease, transform 160ms ease;
}
.btn:hover { background: var(--seal-lit); color: #fff8ec; transform: translateY(-1px); }
.btn .wax { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(255,235,205,0.75); flex: none; }

.btn-quiet {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-quiet); text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.2rem;
}
.btn-quiet:hover { color: var(--gild-lit); border-color: var(--gild); }

.facts {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--ink-faint);
}

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

.plate { margin: 0; }
.plate img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--desk-deep);
  box-shadow: 0 30px 70px -34px rgba(0,0,0,0.95), 0 2px 0 rgba(233,205,147,0.06) inset;
}
.plate figcaption {
  margin-top: 0.9rem;
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); text-align: center;
}

/* ---------- feature sections ---------- */

.feature { display: flex; flex-direction: column; gap: clamp(1.8rem, 1rem + 2vw, 2.8rem); }

/* Body sections run on a left axis aligned to the plate edge; only the hero,
   the parchment leaf and the closing call are centred. Two centred moments,
   not a centred page. */
.feature .text {
  display: flex; flex-direction: column; gap: 0.9rem;
  text-align: left; margin-inline: 0;
  max-width: 56ch;
}

main > section { padding-block: clamp(3rem, 1.8rem + 5vw, 5.5rem); }
main > section.tight { padding-top: clamp(2rem, 1rem + 3vw, 3.5rem); }

.section-head { display: flex; flex-direction: column; gap: 0.9rem; text-align: center; align-items: center; }
.section-head.left { text-align: left; align-items: flex-start; margin-inline: 0; }

code { font-family: var(--mono); font-size: 0.88em; color: var(--gild-lit); }

/* the one tonal turn: parchment on the desk */
.leaf {
  background: linear-gradient(178deg, var(--parchment) 0%, var(--parchment-2) 100%);
  color: #3a2a1c;
  border-radius: 2px;
  padding: clamp(2.6rem, 1.5rem + 4vw, 4.5rem) clamp(1.6rem, 1rem + 3vw, 4rem);
  box-shadow: 0 34px 80px -40px rgba(0,0,0,0.95);
  position: relative;
}
.leaf::after {
  content: ""; position: absolute; inset: 0.55rem;
  border: 1px solid rgba(58,42,28,0.22); border-radius: 1px; pointer-events: none;
}
.leaf h2 { color: #6d2420; }
.leaf .label { color: #8a6a3a; }
.leaf p { color: #4a3726; }
.leaf a { color: #8c2a24; text-decoration-color: rgba(140,42,36,0.4); }
.leaf a:hover { color: #6d2420; }
.leaf .inner { display: flex; flex-direction: column; gap: 1.1rem; align-items: center; text-align: center; }

/* ---------- studio ---------- */

.studio {
  display: flex; flex-direction: column; gap: 1.1rem;
  margin-inline: 0; max-width: 56ch; align-items: flex-start;
}

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

footer {
  border-top: 1px solid var(--rule-soft);
  padding: 2.6rem 0 3.2rem;
  display: flex; flex-direction: column; gap: 1rem;
  text-align: center;
}
.legal {
  font-family: var(--mono); font-size: 0.7rem; line-height: 1.9;
  color: var(--ink-faint); letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.legal .pending { color: var(--seal-lit); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; justify-content: center; }
.footer-links a {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-quiet); text-decoration: none;
}
.footer-links a:hover { color: var(--gild-lit); }

/* ---------- legal pages ---------- */

.doc { display: flex; flex-direction: column; gap: 1.5rem; padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.doc h2 { font-size: 1.6rem; margin-top: 1.4rem; }
.doc ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.doc li::marker { color: var(--gild); }
.doc .updated { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.06em; }
.doc code { font-family: var(--mono); font-size: 0.88em; color: var(--gild-lit); }

/* ---------- motion ---------- */

.rise { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms ease; }
.rise.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
