/* VIVARIA — the page is a species card.
   Colours are the product's own (PRD §6: Deep Ocean, Ivory) mapped onto the dealt
   proportions of "Newsprint and brass": paper on a contrasting ground, two colours. */
:root {
  --paper: #e6dfd1;
  --paper-2: #dcd3c2;
  --ink: #122a31;
  --ink-soft: #465a61;
  --deep: #0d1f25;
  --deep-ink: #e6dfd1;
  --deep-soft: #b4c3c7;
  --brass: #c8961f;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.9rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-mid: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --step-head: clamp(2.5rem, 1.3rem + 4.6vw, 5rem);

  --gap: clamp(5rem, 9vw, 9.5rem);
  --margin: clamp(1rem, 3.4vw, 2.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--deep); color: var(--ink);
  font-family: Jost, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-body); line-height: 1.6; letter-spacing: 0.01em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: "Bodoni Moda", Georgia, serif; font-weight: 500; letter-spacing: -0.02em; line-height: 0.95; margin: 0; }
p { margin: 0; }
::selection { background: var(--brass); color: var(--deep); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.wrap { width: min(1240px, 100% - var(--margin) * 2); margin-inline: auto; }

.bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; color: var(--deep-ink); }
.mark { font-family: "Bodoni Moda", Georgia, serif; font-size: 1.25rem; letter-spacing: 0.04em; text-decoration: none; }
.bar nav { display: flex; gap: clamp(1rem, 2.4vw, 2rem); font-size: var(--step-small); }
.bar nav a { text-decoration: none; opacity: 0.85; }
.bar nav a:hover { opacity: 1; }
.buy { display: inline-block; padding: 0.7rem 1.25rem; background: var(--brass); color: var(--deep); text-decoration: none; font-weight: 500; font-size: var(--step-small); border: 0; cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.buy:hover { background: var(--paper); }
.buy:active { transform: translateY(1px); }

.hero { background: var(--deep); }
.card {
  position: relative; background: var(--paper); margin-inline: auto;
  width: min(820px, 100%);
  padding: clamp(2rem, 4.4vw, 3.5rem) clamp(1.5rem, 3.4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
  --notch: 22px;
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%, 0 var(--notch));
}
.card .latin { font-family: "Bodoni Moda", Georgia, serif; font-style: italic; font-size: var(--step-lead); margin-bottom: 1.6rem; text-align: center; }
.card h1 { font-size: var(--step-head); margin-bottom: 1.5rem; text-align: center; padding-top: 0.12em; }
.card .say { max-width: 44ch; margin-inline: auto; margin-bottom: 2rem; text-align: center; }
.plate { margin: 0 0 2rem; background: var(--deep); overflow: hidden; }
.plate img { width: 100%; }
.plate figcaption { font-size: var(--step-small); color: var(--ink-soft); margin-top: 0.75rem; background: var(--paper); }

.dial h2 { font-size: var(--step-mid); margin-bottom: 0.4rem; }
.dial > p { color: var(--ink-soft); max-width: 48ch; margin-bottom: 1.25rem; }
.dial-frame { position: relative; background: var(--deep); overflow: hidden; }
.dial-frame img { width: 100%; }
.dial-frame .night { position: absolute; inset: 0; opacity: 0; transition: opacity 220ms linear; }
.dial-read { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; align-items: baseline; }
.dial-read strong { font-family: "Bodoni Moda", Georgia, serif; font-weight: 500; font-size: var(--step-mid); }
.dial-read span { font-size: var(--step-small); color: var(--ink-soft); text-align: right; max-width: 36ch; }
input[type=range] { width: 100%; margin-top: 0.75rem; accent-color: var(--brass); height: 2.25rem; }

.sheet { background: var(--paper); }
.sheet.dark { background: var(--deep); color: var(--deep-ink); }
.sheet.dark .lede, .sheet.dark .read p, .sheet.dark .facts span, .sheet.dark .line small, .sheet.dark caption, .sheet.dark thead th { color: var(--deep-soft); }
.sheet > .wrap { padding-block: var(--gap); }
.hgroup h2 { font-size: var(--step-head); }
.lede { color: var(--ink-soft); max-width: 42ch; }
.split { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: end; }
@media (min-width: 900px) { .split { grid-template-columns: 1.15fr 0.85fr; } }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: var(--gap); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts b { display: block; font-family: "Bodoni Moda", Georgia, serif; font-weight: 500; font-size: var(--step-mid); line-height: 1; }
.facts span { display: block; font-size: var(--step-small); color: var(--ink-soft); margin-top: 0.5rem; }

.stack { display: grid; }
.leaf { position: sticky; padding-block: clamp(2.5rem, 5vw, 4rem); }
.leaf > .wrap { display: grid; gap: clamp(1.5rem, 3vw, 3rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .leaf > .wrap { grid-template-columns: 1fr 1fr; } }
.leaf h3 { font-size: var(--step-mid); margin-bottom: 1rem; }
.leaf p { max-width: 44ch; }
.leaf img { width: 100%; }
.leaf-a { background: var(--paper); top: 0; }
.leaf-b { background: var(--paper-2); top: 2.5rem; }
.leaf-c { background: var(--deep); color: var(--deep-ink); top: 5rem; }
.leaf-d { background: var(--brass); color: var(--deep); top: 7.5rem; }

table { width: 100%; border-collapse: collapse; font-size: var(--step-body); margin-top: 2rem; }
caption { text-align: left; font-size: var(--step-small); color: var(--ink-soft); padding-bottom: 0.75rem; }
th, td { text-align: left; padding: 0.85rem 0.75rem; vertical-align: top; }
thead th { font-weight: 500; font-size: var(--step-small); color: var(--ink-soft); }
tbody tr:nth-child(odd) { background: var(--paper-2); }
.sheet.dark tbody tr:nth-child(odd) { background: #16323a; }

.menu { margin-top: 2.5rem; display: grid; }
.line { display: flex; align-items: baseline; gap: 0.75rem; padding-block: 0.9rem; }
.line .what { font-size: var(--step-lead); font-family: "Bodoni Moda", Georgia, serif; }
.line .fill { flex: 1; }
.line .cost { font-family: "Bodoni Moda", Georgia, serif; font-size: var(--step-lead); white-space: nowrap; }
.line small { display: block; font-size: var(--step-small); color: var(--ink-soft); font-family: Jost, sans-serif; }

.read { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: 1fr; margin-top: var(--gap); }
@media (min-width: 900px) { .read { grid-template-columns: 1fr 1fr; } }
.read h3 { font-size: var(--step-lead); margin-bottom: 0.5rem; }
.read p { max-width: 50ch; color: var(--ink-soft); }

footer { background: var(--deep); color: var(--deep-ink); }
footer .wrap { padding-block: var(--gap) 3rem; }
.backname { font-family: "Bodoni Moda", Georgia, serif; font-size: clamp(3rem, 15vw, 13rem); line-height: 0.8; letter-spacing: -0.03em; margin: 0 0 2rem; }
.colophon { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: var(--step-small); color: var(--deep-soft); }
.colophon a { text-decoration: underline; text-underline-offset: 3px; }

.rise { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease, transform 620ms cubic-bezier(.2,.7,.3,1); }
.rise.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise, .rise.seen { opacity: 1; transform: none; transition: none; }
  .dial-frame .night { transition: none; }
  .leaf { position: static; }
}

/* ---- the two plain pages ---- */
.doc { background: var(--paper); }
.doc .wrap { padding-block: clamp(3rem, 7vw, 6rem); max-width: 780px; }
.doc h1 { font-size: var(--step-head); margin-bottom: 1.5rem; }
.doc h2 { font-size: var(--step-mid); margin-top: 3rem; margin-bottom: 0.75rem; }
.doc p, .doc li { max-width: 64ch; margin-bottom: 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc .back { display: inline-block; margin-bottom: 2.5rem; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 3px; }

/* The phone keeps the wordmark and the one action; the links live in the page. */
@media (max-width: 760px) {
  .bar nav { display: none; }
  .bar { padding-block: 1rem; }
}

/* The specimen plate breathes, the way a tank does. */
.plate img { animation: drift 11s ease-in-out infinite alternate; transform-origin: 52% 46%; }
@keyframes drift { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.09) translate3d(-1.2%, -1.6%, 0); } }
@media (prefers-reduced-motion: reduce) { .plate img { animation: none; } }

/* The hero's parts arrive in order on load. */
.lift { opacity: 0; transform: translateY(18px); animation: lift 700ms cubic-bezier(.2,.7,.3,1) forwards; }
.lift:nth-of-type(1) { animation-delay: 60ms; }
.card .latin.lift { animation-delay: 60ms; }
.card h1.lift { animation-delay: 150ms; }
.card .say.lift { animation-delay: 240ms; }
.card .plate.lift { animation-delay: 330ms; }
.card .dial.lift { animation-delay: 420ms; }
@keyframes lift { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lift { opacity: 1; transform: none; animation: none; } }

.bar nav a { transition: opacity 160ms ease; }
.line { transition: background 180ms ease; }
.line:hover { background: rgba(230,223,209,0.06); }
.sheet:not(.dark) .line:hover { background: var(--paper-2); }

/* The card sits above the stationery that follows it. */
.card { z-index: 2; }
.stack { position: relative; z-index: 1; }
@media (max-width: 899px) { .leaf { position: static; } }

/* The app's own footage, as the tank really moves. */
.clip { position: relative; background: var(--deep); overflow: hidden; }
.clip video { width: 100%; display: block; }
.leaf img, .sheet img { animation: float 9s ease-in-out infinite alternate; }
@keyframes float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -10px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .leaf img, .sheet img, .plate img { animation: none; }
}
