/* Chronology landing site — antique-engraving-on-parchment theme, mirroring
   the app's palette (see mobile/lib/theme/palette.dart). */
:root {
  --parchment: #f4ead6;
  --parchment-soft: #e9dcc1;
  --ink: #2a2118;
  --ink-soft: #6b5d49;
  --burgundy: #7a2e39;
  --burgundy-deep: #5e222b;
  --amber: #c2873a;
  --night: #211b14;
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--parchment);
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; }
a { color: var(--burgundy); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--parchment);
  overflow: hidden;
  background: linear-gradient(160deg, #3a2c1f, var(--night));
}
/* Animated still ("Ken Burns") background — a slow zoom/pan on hero-poster.jpg
   so the hero looks alive from a single image, no video needed. If hero.mp4 is
   present it plays on top; otherwise this layer shows. */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  animation: kenburns 32s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, -1.5%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
}

/* Rotating hero slides (built by app.js when 2+ are configured). Each slide
   cross-fades; the active one's poster gets the Ken Burns zoom, with its
   optional video layered on top. */
.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img, .hero-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide video { z-index: 1; } /* video over its own poster */
.hero-slide.active img {
  animation: kenburns 32s ease-in-out infinite alternate;
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide.active img { animation: none; }
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero::after { /* readability scrim over the background */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33,27,20,0.55), rgba(33,27,20,0.78));
  z-index: 2;
}
.hero-content { position: relative; z-index: 3; padding: 40px 20px; }
.hero .eyebrow {
  letter-spacing: 4px; font-size: 12px; text-transform: uppercase;
  color: var(--amber); margin: 0 0 12px;
}
.hero h1 { font-size: clamp(40px, 9vw, 88px); margin: 0; letter-spacing: 2px; }
.hero .tagline { font-size: clamp(18px, 3vw, 24px); margin: 14px auto 0; max-width: 32ch; opacity: 0.92; }

/* Store CTA + QR */
.cta { margin-top: 32px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.store {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 12px; text-decoration: none;
  background: var(--parchment); color: var(--ink); font-weight: 600;
  border: 1px solid rgba(0,0,0,0.15); min-width: 200px; justify-content: center;
}
.badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.badge small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
.badge .big { font-size: 16px; }
.qr {
  background: var(--parchment); padding: 10px; border-radius: 12px;
  width: 160px; height: 160px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px; text-align: center;
}
.qr img, .qr canvas { width: 140px; height: 140px; }

/* Sections */
section { padding: 72px 0; }
section h2 { font-size: clamp(26px, 4vw, 38px); text-align: center; margin: 0 0 8px; }
section .lead { text-align: center; color: var(--ink-soft); max-width: 60ch; margin: 0 auto 40px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.feature {
  background: var(--parchment-soft); border-radius: 14px; padding: 22px;
  border: 1px solid rgba(0,0,0,0.06);
}
.feature h3 { margin: 0 0 6px; font-size: 18px; color: var(--burgundy-deep); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.alt { background: var(--parchment-soft); }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.shots img {
  width: 100%; border-radius: 16px; border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); background: var(--night);
  aspect-ratio: 9 / 16; object-fit: cover;
}

/* Footer */
footer { background: var(--night); color: var(--parchment); padding: 40px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer a { color: var(--amber); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Privacy / document pages */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.doc h1 { font-size: 34px; }
.doc h2 { font-size: 22px; margin-top: 32px; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.doc th, .doc td { border: 1px solid rgba(0,0,0,0.15); padding: 8px 10px; text-align: left; font-size: 15px; }
.doc th { background: var(--parchment-soft); }
.doc .updated { color: var(--ink-soft); font-style: italic; }
.doc .back { display: inline-block; margin-bottom: 24px; }
