/* Propbase teaser (D142). Tokens are copied from app/_styles/tokens.css, the
   generated design tokens; test/teaser-site.test.ts fails if they drift. */

@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url("fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }

/* Tokens: tokens.css, loaded first. */

/* Page-only values, derived from the tokens above. The film's lower edge
   dissolves into the page ground, so the overlay words sit on --color-bg in
   either theme and keep their contrast whatever frame is behind them. */
:root {
  --gutter: max(var(--space-4), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--space-4), env(safe-area-inset-right, 0px));
  --measure: 34rem;
  --wide: 72rem;
  /* The words on the film are always light on a soft dark shade from the corner
     they sit in, so they read on any frame in either theme. The theme shows in
     the short fade where the film meets the page. */
  --film-shade:
    linear-gradient(to top,
      var(--color-bg) 0%,
      color-mix(in srgb, var(--color-bg) 0%, transparent) 9%),
    radial-gradient(120% 80% at 0% 100%,
      var(--color-scrim) 0%,
      color-mix(in srgb, var(--color-scrim) 70%, transparent) 40%,
      color-mix(in srgb, var(--color-scrim) 0%, transparent) 75%);
  --film-shadow: rgb(0 0 0 / 0.35);
  --film-dim: rgb(255 255 255 / 0.78);
  --film-sweep: linear-gradient(100deg,
    var(--film-dim) 0%, var(--film-dim) 40%,
    var(--color-on-primary) 48%, var(--color-accent-border) 52%,
    var(--film-dim) 60%, var(--film-dim) 100%);
  --film-text-glow: 0 1px 2px var(--film-shadow), 0 4px 32px var(--film-shadow);
  --film-top-shade: rgb(0 0 0 / 0.42);
  --film-top: linear-gradient(to bottom, var(--film-top-shade), transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-inline-size: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; font-weight: var(--weight-display); }
.figures { font-family: var(--font-figures); font-variant-numeric: tabular-nums; }

.wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--wide) + var(--space-16));
  margin-inline: auto;
  padding-inline-start: var(--gutter);
  padding-inline-end: var(--gutter-r);
}

/* ---------- The film ---------- */
.film {
  position: relative;
  min-block-size: 560px;
  block-size: min(100svh, 980px);
  overflow: hidden;
  isolation: isolate;
  background: var(--color-bg);
}
.film__media, .film__media img, .film__media video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}
.film__media video { opacity: 0; transition: opacity var(--duration-reveal) var(--ease-out); }
.film__media video.is-ready { opacity: 1; }
.film::before, .film::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  z-index: 1;
  pointer-events: none;
}
.film::before { inset-block-start: 0; block-size: 9rem; background: var(--film-top); }
.film::after { inset-block-end: 0; block-size: 100%; background: var(--film-shade); }

.film__top {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  inset-block-start: max(var(--space-5), env(safe-area-inset-top, 0px));
}
/* The bar keeps the button's height from the first paint, so nothing moves
   when the button appears after the film starts. */
.film__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-block-size: 44px; }
.film__brand { color: var(--color-on-primary); line-height: 0; }
.film__brand svg { block-size: 28px; inline-size: auto; }

.film__words {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  /* Well clear of the bottom edge on every screen, never hugging it. */
  inset-block-end: max(clamp(var(--space-20), 16svh, 11rem), env(safe-area-inset-bottom, 0px));
}
.film__words .wrap { display: grid; gap: var(--space-5); color: var(--color-on-primary); }
/* "Coming Soon": wide-tracked capitals with one soft light sweep across them
   every few seconds (Akarsh's pick, option B). Still under reduced motion. */
.film__soon {
  justify-self: start;
  color: var(--color-on-primary);
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.film__soon-text {
  background: var(--film-sweep);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: soon-sweep 5s ease-in-out 1.2s infinite;
}
@keyframes soon-sweep { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0% 0; } }
@media (min-width: 768px) {
  .film__soon { font-size: var(--text-lg); line-height: var(--leading-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .film__soon-text { animation: none; }
}

.film__lines { position: relative; display: grid; text-shadow: var(--film-text-glow); }
.film__line {
  grid-area: 1 / 1;
  font-size: var(--text-m-display);
  line-height: var(--leading-m-display);
  letter-spacing: var(--tracking-m-display);
  font-weight: var(--weight-display);
  max-inline-size: 16ch;
}
/* Without the script every line is visible, stacked as plain text. */
html:not(.js) .film__lines { grid-auto-flow: row; gap: var(--space-2); }
html:not(.js) .film__line { grid-area: auto; }
.js .film__line {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-emphasized);
}
.js .film__line.is-on { opacity: 1; transform: none; }
/* Reduced motion or Save-Data: the poster holds, with the closing line shown;
   the other lines stay in the heading for screen readers. */
.js.still .film__line { transition: none; }
.js.still .film__line:last-child { opacity: 1; transform: none; }

.film__control {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-glass-border);
  background: var(--color-glass);
  color: var(--color-text);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.film__control svg { inline-size: 18px; block-size: 18px; }
.film__control:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.film__control[hidden] { display: none; }

@media (min-width: 768px) {
  .film__line { font-size: var(--text-5xl); line-height: var(--leading-5xl); letter-spacing: var(--tracking-5xl); }
  .film__brand svg { block-size: 32px; }
}
@media (min-width: 1280px) {
  .film__line { font-size: var(--text-6xl); line-height: var(--leading-6xl); letter-spacing: var(--tracking-6xl); }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space-16); }
@media (min-width: 1024px) { .section { padding-block: var(--space-20); } }
.section + .section { border-block-start: 1px solid var(--color-border); }
.section__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  font-weight: var(--weight-medium);
}
.section__head {
  font-size: var(--text-m-title);
  line-height: var(--leading-m-title);
  letter-spacing: var(--tracking-m-title);
  max-inline-size: 22ch;
}
.section__body {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  letter-spacing: var(--tracking-lg);
  color: var(--color-text-2);
  max-inline-size: var(--measure);
}
.stack { display: grid; gap: var(--space-5); }

/* Text and picture side by side, both columns full; the second split mirrors
   the first so the page has a rhythm. Phones stack text above picture. */
.split { display: grid; gap: var(--space-8); align-items: center; }
.split__text { min-inline-size: 0; }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); }
  .split--mirror .split__text { order: 2; }
  .section__head { font-size: var(--text-4xl); line-height: var(--leading-4xl); letter-spacing: var(--tracking-4xl); }
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.pillar {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  min-inline-size: 0;
}
.pillar__mark { inline-size: 40px; block-size: 40px; color: var(--color-primary); }
.pillar__name {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  letter-spacing: var(--tracking-xl);
  font-weight: var(--weight-display);
}
.pillar__text { color: var(--color-text-2); }

.soon {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-5);
  padding-block: var(--space-24);
  background: var(--color-hero-wash);
}
.soon__logo { color: var(--color-text); }
.soon__logo svg { block-size: 40px; inline-size: auto; }
.soon__head {
  font-size: var(--text-m-display);
  line-height: var(--leading-m-display);
  letter-spacing: var(--tracking-m-display);
}
.soon__line { color: var(--color-text-2); font-size: var(--text-lg); line-height: var(--leading-lg); }
@media (min-width: 768px) {
  .soon__head { font-size: var(--text-5xl); line-height: var(--leading-5xl); letter-spacing: var(--tracking-5xl); }
  .soon__logo svg { block-size: 48px; }
}

/* Picture slides: three pictures drift past on a slow loop, no controls. The
   film's pause button stops them too, and they rest on the first picture under
   reduced motion. The set is in the track twice, so -50% lands on a seam. */
.reel {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-inline-size: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.reel__track {
  display: flex;
  block-size: 100%;
  inline-size: max-content;
  animation: reel-slide 36s linear infinite;
}
.reel__track img { block-size: 100%; inline-size: auto; aspect-ratio: 16 / 10; object-fit: cover; flex: none; }
@keyframes reel-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.split--mirror .reel__track { animation-direction: reverse; }
.is-paused .reel__track, .reel:not(.is-visible) .reel__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .reel__track { animation: none; }
}

/* ---------- Footer ---------- */
.foot { padding-block: var(--space-12); border-block-start: 1px solid var(--color-border); }
.foot__grid { display: grid; gap: var(--space-8); }
.foot__brand { display: grid; gap: var(--space-3); }
.foot__brand svg { block-size: 24px; inline-size: auto; color: var(--color-text); }
.foot__tagline { color: var(--color-text-2); }
.foot__notes { display: grid; gap: var(--space-3); color: var(--color-text-3); font-size: var(--text-sm); line-height: var(--leading-sm); max-inline-size: 40rem; }
@media (min-width: 1024px) {
  .foot__grid { grid-template-columns: 1fr 2fr; align-items: end; }
  .foot__notes { justify-self: end; text-align: end; }
}

@media (prefers-reduced-motion: reduce) {
  .film__media video { display: none; }
  .js .film__line { transition: none; }
}
