/*
 * Public pages. Light only, by the owner's call: the site is the calm, sunlit
 * side of the app. Colours are AppColors (lib/core/design/app_colors.dart)
 * verbatim; the rose appears only where type needs it (links, focus).
 * Playfair Display (w500) sets headings, Inter sets everything read or
 * tapped, as in AppTextStyles — both the app's own OFL files, subset to
 * Latin + Turkish and served from this origin.
 *
 * Images are the app's own owner-attested photography, real app screens and
 * the approved movement posters (site/assets/img). Motion is CSS only — the
 * CSP admits no script — and every animation stops under reduced motion.
 * Scroll-linked reveals only run where the browser supports view timelines;
 * elsewhere the content is simply there.
 */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* AppColors */
  --canvas: #faf5ef;
  --surface: #fffbf7;
  --elevated: #f5e9e1;
  --ink: #2e2b28;
  --muted: #6b5c52;
  --tertiary: #8f7e73;
  --line: #e6d8cd;
  --soft-line: #f1e7df;
  --accent-dark: #8a4e5a;
  --accent-bright: #c78d97;
  --blush: #f4e2de;
  --gold: #d4af37;
  --danger: #b0433b;
  --warning-wash: #f7eeda;

  --link: var(--accent-dark);
  --shadow-soft: 0 1px 2px rgba(46, 43, 40, 0.04), 0 12px 32px rgba(46, 43, 40, 0.07);
  --shadow-phone: 0 2px 4px rgba(46, 43, 40, 0.05), 0 28px 60px rgba(46, 43, 40, 0.14);

  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --page: 72rem;
  --measure: 40rem;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

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

.wrap {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-thickness 200ms ease;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

strong { font-weight: 600; }

::selection { background: var(--blush); color: var(--ink); }

/* ── Header ───────────────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
}

header.site .wrap {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 22px;
}

.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1875rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}

nav.lang {
  display: flex;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
nav.lang a {
  padding: 2px 0 2px 12px;
  color: var(--muted);
  text-decoration: none;
}
nav.lang a + a {
  margin-left: 12px;
  border-left: 1px solid var(--line);
}
nav.lang a:hover { color: var(--ink); }
nav.lang a[aria-current] { color: var(--ink); font-weight: 600; }

body:not(.page-home) header.site .wrap { border-bottom: 1px solid var(--line); }

/* ── Type ─────────────────────────────────────────────────────────────── */

main { padding: 56px 0 96px; }
.page-home main { padding-top: 8px; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
}

/* Playfair's default figures are old-style; counts and dates read as
   figures, so the serif settings use lining ones. */
h1, h2, .brand, .footer-brand, .figures dt, .points dt, .index-title {
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 56px 0 14px;
}

h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 32px 0 6px;
}

p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 8px; }
li::marker { color: var(--tertiary); }

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

/* ── Legal pages ──────────────────────────────────────────────────────── */

body:not(.page-home) article > * { max-width: var(--measure); }

nav.toc { margin: 0 0 48px; }
.toc-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
nav.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
nav.toc li {
  margin: 0;
  border-bottom: 1px solid var(--soft-line);
}
nav.toc a {
  display: block;
  padding: 9px 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 200ms ease, padding-left 300ms var(--ease);
}
nav.toc a:hover { color: var(--link); padding-left: 6px; }

/* Wide screens: the contents sit in a quiet left column and stay in view. */
@media (min-width: 1000px) {
  body:not(.page-home) article {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure));
    column-gap: 4.5rem;
    align-items: start;
  }
  body:not(.page-home) article > * { grid-column: 2; }
  body:not(.page-home) article > nav.toc {
    grid-column: 1;
    grid-row: 1 / span 400;
    position: sticky;
    top: 32px;
    margin: 8px 0 0;
  }
  nav.toc a { font-size: 14px; padding: 7px 0; }
}

h2:target { color: var(--link); }

.notice {
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--danger);
}
.notice p:last-child { margin-bottom: 0; }

.preview-banner {
  margin: 0 0 40px;
  padding: 12px 16px;
  background: var(--warning-wash);
  color: var(--ink);
  border: 1px solid var(--gold);
  font-size: 14px;
  line-height: 1.5;
}

mark.owner-input {
  padding: 0 4px;
  background: var(--warning-wash);
  color: var(--ink);
  outline: 1px solid var(--gold);
}

.page-list { padding-left: 20px; }

/* ── Home: hero ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  margin: 0 0 72px;
}

.hero-media {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 4 / 3;
  background: var(--elevated);
}
/* Two frames that slowly cross-fade, each drifting in a little as it
   shows (16 s round, 8 s a frame). Without motion only the first shows. */
.hero-media {
  position: relative;
  animation: fade-in 1.6s var(--ease) both;
}
.hero-media .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  opacity: 0;
  animation: slides 16s linear infinite, kenburns 16s linear infinite;
}
.hero-media .slide:nth-child(1) { opacity: 1; }
.hero-media .slide:nth-child(2) { animation-delay: -8s; object-position: 50% 45%; }

.hero-text { padding: 36px 0 0; }

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.hero .lead {
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 32px;
}
.hero .lead strong { color: var(--ink); font-weight: 500; }

.hero-text > * { animation: rise 1s var(--ease) both; }
/* The headline comes up line by line from behind its own baseline. */
.hero-text > h1 { animation: none; }
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero h1 .line > span {
  display: inline-block;
  animation: line-up 1.1s var(--ease) both;
}
.hero h1 .line:nth-child(1) > span { animation-delay: 220ms; }
.hero h1 .line:nth-child(2) > span { animation-delay: 360ms; }
.hero-text > :nth-child(1) { animation-delay: 150ms; }
.hero-text > :nth-child(2) { animation-delay: 250ms; }
.hero-text > :nth-child(3) { animation-delay: 380ms; }
.hero-text > :nth-child(4) { animation-delay: 500ms; }

/* Wide screens: the photograph fills the hero and the words sit on its
   bright, curtained left half behind a soft wash of the canvas colour. */
@media (min-width: 860px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: clamp(520px, 74vh, 760px);
    margin-bottom: 96px;
  }
  .hero-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 28px;
  }
  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
      rgba(250, 245, 239, 0.94) 0%,
      rgba(250, 245, 239, 0.82) 34%,
      rgba(250, 245, 239, 0.18) 62%,
      rgba(250, 245, 239, 0) 80%);
  }
  .hero-text {
    position: relative;
    max-width: 36rem;
    padding: 56px clamp(32px, 5vw, 72px);
  }
}

.store { margin: 0; }

.button {
  display: inline-block;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 300ms var(--ease), background 200ms ease;
}
a.button:hover { background: var(--accent-dark); transform: translateY(-2px); }
/* Until the App Store listing exists the button is a placeholder: outlined
   on a light glass, so it does not read as something to press. */
.button.is-placeholder {
  background: rgba(255, 251, 247, 0.7);
  color: var(--muted);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ── Home: figures ────────────────────────────────────────────────────── */

.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--ink);
}
.figures div { padding: 20px 16px 0 0; }
.figures div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.figures dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.figures dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ── Home: mosaic ─────────────────────────────────────────────────────── */

.mosaic { margin: 112px 0 0; }
.mosaic-text {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}
.mosaic h2 { margin: 0; }
.mosaic-text p { margin: 0; color: var(--muted); max-width: 30rem; }
@media (min-width: 860px) {
  .mosaic-text {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 40px;
  }
}

.credits {
  max-width: var(--measure);
  margin: 72px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ── Home: inside the app ─────────────────────────────────────────────── */

.inside {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin: 96px 0 0;
  padding: 48px 24px 56px;
  border-radius: 28px;
  background: var(--elevated);
  overflow: hidden;
}
.inside h2 { margin-top: 0; }
.inside-text p { color: var(--muted); max-width: 26rem; }

.phones {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
}
.phone {
  margin: 0;
  width: min(44%, 260px);
}
.phone-frame {
  padding: 7px;
  border-radius: 40px;
  background: var(--surface);
  box-shadow: var(--shadow-phone), 0 0 0 1px rgba(46, 43, 40, 0.06);
  animation: float 7s ease-in-out infinite;
}
.phone-frame img {
  width: 100%;
  border-radius: 33px;
}
.phone-offset { margin-top: 56px; }
.phone-offset .phone-frame { animation-delay: -3.5s; }
.phone figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 860px) {
  .inside {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    padding: 72px clamp(40px, 6vw, 88px);
  }
}

/* ── Home: movements ──────────────────────────────────────────────────── */

.moves { margin: 112px 0 0; }
.moves-text {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}
.moves h2 { margin: 0; }
.moves-text p { margin: 0; color: var(--muted); max-width: 30rem; }
@media (min-width: 860px) {
  .moves-text {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 40px;
  }
}

/* An endless, slow strip: two identical tracks side by side, both moving
   one track-width to the left, so the second takes the first's place. */
.marquee {
  display: flex;
  overflow: hidden;
  margin: 0 calc(-1 * var(--gutter));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex: none;
  gap: 16px;
  margin: 0;
  padding: 0 8px 0 8px;
  list-style: none;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { margin: 0; }
.marquee-track figure {
  margin: 0;
  width: clamp(150px, 18vw, 210px);
}
.marquee-track img {
  width: 100%;
  aspect-ratio: 400 / 723;
  object-fit: cover;
  border-radius: 18px;
  background: var(--elevated);
  transition: transform 600ms var(--ease);
}
.marquee-track figure:hover img { transform: scale(1.03); }
.marquee-track figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.moves-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ── Home: label / text sections ──────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 40px 0 0;
  margin-top: 96px;
  border-top: 1px solid var(--line);
}
.split h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}
.split > div,
.split > ul { max-width: var(--measure); }

@media (min-width: 760px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.85fr);
    gap: 40px;
  }
}

.who {
  border-top: 0;
  padding-top: 0;
  align-items: center;
}
.who-media {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  background: var(--elevated);
}
.who-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transition: transform 1.2s var(--ease);
}
.who-media:hover img { transform: scale(1.03); }
.who h2 { margin-bottom: 14px; }
@media (min-width: 760px) {
  .who {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(40px, 6vw, 88px);
  }
}

.points { margin: 0; }
.points dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: 0 0 6px;
}
.points dd {
  margin: 0 0 28px;
  color: var(--muted);
}
.points dd:last-child { margin-bottom: 0; }

.disclaimer {
  margin: 36px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.index {
  list-style: none;
  margin: 0;
  padding: 0;
}
.index li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.index li:first-child a { padding-top: 0; }
.index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  padding: 16px 0;
  color: var(--ink);
  text-decoration: none;
}
.index a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--tertiary);
  transition: transform 300ms var(--ease), color 200ms ease;
}
.index a:hover::after {
  color: var(--link);
  transform: translateX(4px);
}
.index-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1875rem;
  line-height: 1.3;
  transition: color 200ms ease;
}
.index-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.index a:hover .index-title { color: var(--link); }

/* ── Footer ───────────────────────────────────────────────────────────── */

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-brand {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink);
}
nav.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}
nav.pages a {
  color: var(--muted);
  text-decoration: none;
}
nav.pages a:hover { color: var(--ink); }
nav.pages a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
}

/* ── Motion ───────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The 28 counts up from 0 as it scrolls in, where the browser can animate
   a registered integer; everywhere else it simply reads 28. The real "28"
   is in the sr-only span beside it. */
@property --n {
  syntax: "<integer>";
  initial-value: 28;
  inherits: false;
}
.count { counter-reset: n var(--n); }
.count::after { content: counter(n); }

/* Moving between pages cross-fades, with the new page rising a little. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 280ms ease both page-out; }
::view-transition-new(root) { animation: 520ms var(--ease) both page-in; }

/* A second strip runs the other way, a touch slower. */
.marquee-reverse { margin-top: 16px; }
.marquee-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 75s;
}

.phones { perspective: 1400px; }

/* Links underline from left to right. */
.index-title,
nav.pages a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 420ms var(--ease), color 200ms ease;
}
.index a:hover .index-title,
nav.pages a:hover { background-size: 100% 1px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
}
@keyframes slides {
  0%, 44% { opacity: 1; }
  54%, 90% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes kenburns {
  0% { scale: 1; }
  54% { scale: 1.07; }
  55%, 100% { scale: 1; }
}
@keyframes hero-settle {
  from { opacity: 0; scale: 1.08; }
  to { opacity: 1; scale: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes marquee {
  to { transform: translateX(-100%); }
}
@keyframes line-up {
  from { transform: translateY(105%); }
  to { transform: none; }
}
@keyframes page-out {
  to { opacity: 0; }
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes count-up {
  from { --n: 0; }
  to { --n: 28; }
}
@keyframes tilt-in {
  from { opacity: 0; transform: translateY(80px) rotateX(16deg) rotateY(-14deg); }
  to { opacity: 1; transform: none; }
}
@keyframes unveil {
  from { clip-path: inset(10% 8% round 24px); }
  to { clip-path: inset(0 round 24px); }
}
@keyframes zoom-out {
  from { scale: 1.18; }
  to { scale: 1; }
}
@keyframes drift {
  to { translate: 0 14%; }
}
@keyframes fade-away {
  to { opacity: 0; translate: 0 -40px; }
}
@keyframes header-solid {
  to {
    background: rgba(250, 245, 239, 0.86);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 1px 0 var(--line);
  }
}
@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Sections rise into place as they scroll into view — only where the
   browser can tie an animation to the scroll position; nothing is hidden
   anywhere else. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
  .phone.reveal {
    animation-name: tilt-in;
    animation-range: entry 0% cover 40%;
  }
  .phone-offset.reveal { animation-range: entry 15% cover 50%; }

  .count {
    animation: count-up linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 45%;
  }

  /* The header turns to frosted glass once the page moves under it. */
  header.site {
    animation: header-solid linear both;
    animation-timeline: scroll(root);
    animation-range: 0 140px;
  }

  /* A thin rose line at the very top tracks how far down the page you are. */
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    height: 2px;
    background: var(--accent-bright);
    transform-origin: 0 50%;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }

  /* Hero: the photograph drifts slower than the page, the words lift away. */
  .hero-media .slide {
    animation: slides 16s linear infinite, kenburns 16s linear infinite, drift linear both;
    animation-timeline: auto, auto, scroll(root);
    animation-range: normal, normal, 0 100vh;
  }

  @media (min-width: 860px) {
    .hero-text {
      animation: fade-away linear both;
      animation-timeline: scroll(root);
      animation-range: 15vh 75vh;
    }
  }

  /* Framed images open like a curtain and settle from a slight zoom. */
  .who-media,
  .inside {
    animation: unveil linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }
  .who-media img {
    animation: zoom-out linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 0%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  @view-transition { navigation: none; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures div:nth-child(3) { padding-left: 0; border-left: 0; }
  .figures div:nth-child(n + 3) { margin-top: 16px; border-top: 1px solid var(--line); }
}

@media (max-width: 520px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  main { padding-top: 40px; }
  header.site .wrap { padding-top: 20px; padding-bottom: 16px; }
  .brand { font-size: 1.0625rem; }
  h2 { font-size: 1.375rem; margin-top: 44px; }
  .hero-media { border-radius: 20px; }
  .button { display: block; text-align: center; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figures div,
  .figures div + div {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 14px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .figures div:last-child { border-bottom: 0; }
  .figures div:nth-child(n + 3) { margin-top: 0; border-top: 0; }
  .figures dt { min-width: 6.5rem; font-size: 1.375rem; }
  .figures dd { margin: 0; }
  .inside { margin-top: 64px; padding: 36px 18px 44px; border-radius: 22px; }
  .phone-frame { border-radius: 30px; padding: 5px; }
  .phone-frame img { border-radius: 25px; }
  .phone-offset { margin-top: 36px; }
  .moves { margin-top: 80px; }
  .split { margin-top: 72px; }
  .split h2 { font-size: 1.375rem; }
  .who-media { aspect-ratio: 4 / 3; }
}

@media print {
  nav.lang, nav.toc, footer.site nav.pages, .store, .marquee, .phones { display: none; }
  * { animation: none !important; }
  body { background: #fff; color: #000; }
}
