/* ==========================================================================
   Morphsy.app — Direction 02 (Editorial · Darkroom · Gallery)

   Tokens are lifted verbatim from the app's own design system
   (morphsy/lib/app/styles/colors.dart + typography.dart) so web and app stay
   in step. Sharp corners, hairline ledgers, crop marks, one cobalt accent.

   Sections follow the Claude Design artboards Nº 01–14.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Faces — the same files the Flutter app bundles, subset to Latin.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Variable.woff2') format('woff2-variations'),
       url('../fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bone: #EDE8DE;
  --paper: #E7E1D5;
  --raised: #F7F4EE;
  --clay: #C4B9A7;
  /* Ink & darkroom */
  --ink: #191510;
  --ink-deep: #0B0A08;
  --darkroom: #14110C;
  --darkroom-warm: #221D16;
  --sheet: #17130D;
  /* Accent */
  --cobalt: #2438E0;
  --cobalt-soft: #8EA0FF;
  --cobalt-hover: #1B2BB4;
  /* Ink text ramp (on bone) */
  --ink-2: #5C5347;
  --ink-3: #6E6459;
  --ink-4: #8A8074;
  /* Bone text ramp (on ink) */
  --bone-2: rgba(237, 232, 222, .70);
  --bone-3: rgba(237, 232, 222, .50);
  /* Hairlines */
  --hair: rgba(25, 21, 16, .16);
  --hair-soft: rgba(25, 21, 16, .10);
  --hair-strong: rgba(25, 21, 16, .28);
  --hair-ink: rgba(237, 232, 222, .14);

  /* Per-surface aliases. Dark sections re-point these, so every component
     below can be written once and simply inherit the surface it sits on. */
  --surface: var(--bone);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --fg-4: var(--ink-4);
  --rule: var(--hair);
  --rule-soft: var(--hair-soft);
  --rule-strong: var(--hair-strong);
  --accent: var(--cobalt);

  /* Families */
  --serif: 'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --sans: 'Space Grotesk', ui-sans-serif, system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Fluid type — interpolated between the 390 / 834 / 1440 artboards */
  --t-display-xl: clamp(2.75rem, 1.425rem + 8vw, 8.625rem);      /* 44 → 138 */
  --t-display-l:  clamp(2.375rem, 1.269rem + 5.81vw, 6.5rem);    /* 38 → 104 */
  --t-display-m:  clamp(2rem, 1.238rem + 3.9vw, 4.75rem);        /* 32 → 76  */
  --t-display-s:  clamp(1.75rem, 1.281rem + 2.19vw, 3.25rem);    /* 28 → 52  */
  --t-display-xs: clamp(1.375rem, 1.181rem + 1.05vw, 2.125rem);  /* 22 → 34  */
  --t-lead:       clamp(1.0625rem, 1.016rem + .19vw, 1.1875rem); /* 17 → 19  */
  --t-body:       clamp(.9375rem, .916rem + .095vw, 1rem);       /* 15 → 16  */
  --t-small:      .8125rem;
  --t-xs:         .6875rem;
  --t-overline:   clamp(.625rem, .603rem + .095vw, .6875rem);    /* 10 → 11  */

  /* Rhythm */
  --gutter: 22px;
  --section-y: clamp(4.5rem, 2.7rem + 7.7vw, 8.25rem);           /* 72 → 132 */
  --wrap: 1200px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --reveal-shift: 14px;
  --reveal-dur: 620ms;

  color-scheme: light;
}

@media (min-width: 834px)  { :root { --gutter: 56px; } }
@media (min-width: 1200px) { :root { --gutter: 120px; } }

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;              /* full-bleed strips must never scroll the page */
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--cobalt-hover); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dark :where(a, button, [tabindex]):focus-visible { outline-color: var(--cobalt-soft); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--ink); color: var(--bone);
  padding: 12px 18px; font-size: .8125rem; font-weight: 600;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 12px; color: var(--bone); }

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

/* --------------------------------------------------------------------------
   4. Type scale
   -------------------------------------------------------------------------- */
.display-xl, .display-l, .display-m, .display-s, .display-xs {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}
.display-xl { font-size: var(--t-display-xl); line-height: .9;  letter-spacing: -.025em; }
.display-l  { font-size: var(--t-display-l);  line-height: .92; letter-spacing: -.02em; }
.display-m  { font-size: var(--t-display-m);  line-height: .96; letter-spacing: -.015em; }
.display-s  { font-size: var(--t-display-s);  line-height: 1.02; letter-spacing: -.01em; }
.display-xs { font-size: var(--t-display-xs); line-height: 1.12; }
.it { font-style: italic; }

.overline {
  font-size: var(--t-overline);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg-4);
  line-height: 1.5;
}
.index {
  white-space: nowrap;
  font-size: var(--t-overline);
  letter-spacing: .13em;
  font-weight: 600;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
}
.lead   { font-size: var(--t-lead); line-height: 1.62; color: var(--fg-2); text-wrap: pretty; }
.body   { font-size: var(--t-body); line-height: 1.66; color: var(--fg-2); text-wrap: pretty; }
.small  { font-size: var(--t-small); line-height: 1.55; color: var(--fg-3); text-wrap: pretty; }
.xs     { font-size: var(--t-xs); line-height: 1.5; color: var(--fg-4); letter-spacing: .02em; }
.accent { color: var(--accent); }
.mono   { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}
.section { position: relative; padding-block: var(--section-y); overflow: hidden; }
.section--paper { background: var(--paper); }
.section--bone  { background: var(--bone); }

/* Dark sections re-point the surface aliases rather than restating colours. */
.dark {
  --surface: var(--darkroom);
  --fg: var(--bone);
  --fg-2: var(--bone-2);
  --fg-3: var(--bone-3);
  --fg-4: var(--bone-3);
  --rule: var(--hair-ink);
  --rule-soft: var(--hair-ink);
  --rule-strong: rgba(237, 232, 222, .28);
  --accent: var(--cobalt-soft);
  background: var(--darkroom);
  color: var(--bone);
}
.dark--deep { background: var(--ink-deep); }

/* The faint 12-column ledger behind editorial sections. */
.section::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right, var(--rule-soft) 0 1px, transparent 1px calc(100% / var(--ledger-cols, 4)));
}
.section--no-ledger::before { content: none; }
@media (min-width: 834px)  { .section { --ledger-cols: 8; } }
@media (min-width: 1200px) { .section { --ledger-cols: 12; } }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* Standard section masthead: overline left, index right, hairline under. */
.masthead {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; padding-bottom: 14px;
}
.masthead + .rule { margin-bottom: clamp(1.875rem, 1.1rem + 3.3vw, 3.375rem); }

.section-head { display: grid; gap: clamp(1.125rem, .6rem + 2.2vw, 5rem); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: end; }
}

.stack   { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------------------
   6. Primitives
   -------------------------------------------------------------------------- */

/* --- Crop marks: 16px arms, 2px stroke, drawn in currentColor ------------- */
.crop {
  --crop-arm: 16px;
  --crop-w: 2px;
  background-image:
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size:
    var(--crop-arm) var(--crop-w), var(--crop-w) var(--crop-arm),
    var(--crop-arm) var(--crop-w), var(--crop-w) var(--crop-arm),
    var(--crop-arm) var(--crop-w), var(--crop-w) var(--crop-arm),
    var(--crop-arm) var(--crop-w), var(--crop-w) var(--crop-arm);
  background-position:
    0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}
.crop--pad { padding: clamp(10px, 1.1vw, 16px); }

/* --- Frame: the aspect-locked photographic slot -------------------------- */
/* The wrapper owns dimensions and crop; the file inside is disposable. */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--darkroom-warm);
  aspect-ratio: var(--ar, 3 / 4);
}
.frame > img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focal, 50% 40%);
  display: block;
}
.frame--fill { aspect-ratio: auto; height: 100%; }
.frame__stamp {
  position: absolute; z-index: 3;
  font-size: clamp(.5rem, .48rem + .1vw, .5625rem);
  letter-spacing: .13em; font-weight: 600;
  color: rgba(237, 232, 222, .74);
  pointer-events: none;
}
.frame__stamp--bl { left: 8px; bottom: 7px; }
.frame__stamp--tr { right: 8px; top: 7px; }
.frame__stamp--br { right: 8px; bottom: 7px; }
.frame__overlay { position: absolute; inset: 0; z-index: 4; }

/* --- Film strip ---------------------------------------------------------- */
.filmstrip { position: relative; background: var(--ink-deep); display: flex; flex-direction: column; }
.filmstrip__frames { display: flex; gap: 3px; padding-inline: 3px; background: var(--ink-deep); flex: 1; min-height: 0; }
.filmstrip__frames > .frame { flex: 1 1 0; aspect-ratio: auto; }
.sprocket { position: relative; height: 20px; background: var(--ink-deep); flex: none; }
.sprocket::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 30%; height: 40%;
  background-image: repeating-linear-gradient(
    to right, rgba(237, 232, 222, .82) 0 12px, transparent 12px 30px);
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: -.01em;
  border: 0; border-radius: 0; cursor: pointer; text-align: center;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.btn--ink   { background: var(--ink); color: var(--bone); }
.btn--ink:hover   { background: #241E17; color: var(--bone); }
.btn--bone  { background: var(--bone); color: var(--ink); }
.btn--bone:hover  { background: #fff; color: var(--ink); }
.btn--cobalt { background: var(--cobalt); color: #fff; }
.btn--cobalt:hover { background: var(--cobalt-hover); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bone); }
.dark .btn--outline { color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(237, 232, 222, .3); }
.dark .btn--outline:hover { background: var(--bone); color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .875rem; }
.btn--block { width: 100%; }

/* --- Store badges -------------------------------------------------------- */
.store {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 54px; padding: 0 20px;
  color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  transition: box-shadow 180ms var(--ease), background-color 180ms var(--ease);
}
.store:hover { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
/* Scoped to the final CTA, where the badges are the only action: they take the
   solid weight the primary button used to carry on that ink block. Scoping by
   container, not a class — the hero badges share the same href. */
.cta__stores .store { background: var(--bone); color: var(--ink); box-shadow: none; }
.cta__stores .store:hover { background: #fff; color: var(--ink); box-shadow: none; }
.store svg { flex: none; fill: currentColor; }
.store__text { min-width: 0; }
.store b, .store span { white-space: nowrap; }
.store b { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.store__text > span { display: block; font-size: .5625rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; opacity: .75; line-height: 1.4; }

/* --- Chips / pills ------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 14px;
  font-size: var(--t-overline); letter-spacing: .13em; text-transform: uppercase; font-weight: 600;
  color: var(--fg-3); box-shadow: inset 0 0 0 1px var(--rule);
}
.chip--on { background: var(--ink); color: var(--bone); box-shadow: none; }
.dark .chip--on { background: var(--cobalt); color: #fff; }

/* --- Kicker (rule + label) ----------------------------------------------- */
.kicker { display: flex; align-items: center; gap: 12px; }
.kicker::after { content: ''; height: 1px; width: 44px; background: var(--rule-strong); }
.kicker--rev { flex-direction: row-reverse; }

/* --- Scrubber ------------------------------------------------------------ */
/* Film timeline: one equal-height segment per frame. Cobalt = played,
   bone = the frame you are on, muted = still to come. Never a waveform —
   position is carried entirely by colour, never by height. */
.scrub { display: flex; align-items: stretch; gap: 2px; }
.scrub > i { flex: 1; background: rgba(237, 232, 222, .22); }
.scrub > i.is-played { background: var(--cobalt-soft); }
.scrub > i.is-now { background: var(--bone); }

/* --- Device --------------------------------------------------------------- */
.phone { background: var(--ink-deep); padding: 9px; border-radius: 38px; box-shadow: 0 40px 80px -30px rgba(11, 10, 8, .55); }
.screen { position: relative; overflow: hidden; border-radius: 30px; background: var(--darkroom); display: flex; flex-direction: column; }

/* ==========================================================================
   7. Site chrome — masthead nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 62px;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 1200px) { .nav { min-height: 88px; } }
.nav__brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.nav__brand:hover { color: var(--ink); }
.nav__wordmark { font-size: clamp(.8125rem, .75rem + .3vw, 1rem); font-weight: 700; letter-spacing: .21em; text-transform: uppercase; }
.nav__links { display: none; gap: 38px; }
.nav__links a { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 18px; flex: none; }
.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.nav__panel { display: none; }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* Mobile disclosure panel */
@media (max-width: 899px) {
  .nav__panel[data-open='true'] { display: block; }
  .nav__panel {
    position: fixed; inset: 62px 0 auto; z-index: 49;
    background: var(--bone); border-bottom: 1px solid var(--hair);
    padding: 8px var(--gutter) 24px;
  }
  .nav__panel a {
    display: block; padding: 15px 0;
    border-bottom: 1px solid var(--hair-soft);
    font-family: var(--serif); font-size: 1.5rem; color: var(--ink);
  }
}

/* ==========================================================================
   8. Nº 01 — Hero
   ========================================================================== */
.hero { padding-top: clamp(2.375rem, 1.6rem + 3.3vw, 4.625rem); }
.hero__grid { display: grid; gap: clamp(1.5rem, .5rem + 4.2vw, 5rem); padding-top: clamp(2.125rem, 1.3rem + 3.5vw, 3.625rem); }
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 660px) minmax(0, 1fr); gap: 4.5rem; }
  .hero__support { padding-top: 16px; }
}
.hero__support { display: flex; flex-direction: column; gap: clamp(1.25rem, .9rem + 1.4vw, 1.875rem); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__ctas .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .hero__ctas .btn { flex: 0 0 auto; } }
.hero__stores { display: flex; gap: 10px; }
.hero__stores .store { flex: 1 1 0; min-width: 0; }
@media (min-width: 1000px) { .hero__stores .store { flex: 0 0 auto; } }

/* --- the frames → film apparatus ---------------------------------------- */
.apparatus {
  position: relative;
  margin-top: clamp(2.125rem, 1.5rem + 2.7vw, 3.25rem);
  height: var(--app-h);
  --dev-w: clamp(214px, 12rem + 6.2vw, 302px);
  --strip-h: clamp(150px, 6rem + 11.5vw, 262px);
  --dev-bottom: clamp(34px, 1.5rem + 1.4vw, 52px);
  /* device box = width / screen-ratio + bezel, plus breathing room above */
  --app-h: calc(var(--dev-bottom) + (var(--dev-w) - 18px) / 0.4702 + 18px + 44px);
}
.apparatus__strip { position: absolute; inset-inline: 0; bottom: 0; height: var(--strip-h); }
.apparatus__playhead {
  position: absolute; left: 50%; bottom: 0; z-index: 3;
  width: 1px; height: var(--strip-h); background: var(--cobalt); opacity: .9;
}
.apparatus__device { position: absolute; left: 50%; translate: -50% 0; bottom: var(--dev-bottom); z-index: 5; width: var(--dev-w); }
.apparatus__label { position: absolute; bottom: calc(var(--strip-h) + 30px); z-index: 4; display: none; }
.apparatus__label--l { left: var(--gutter); }
.apparatus__label--r { right: var(--gutter); text-align: right; }
@media (min-width: 1000px) { .apparatus__label { display: block; } }
.hero__caption { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; padding-top: 18px; }

/* ==========================================================================
   9. Nº 02 — Use cases
   ========================================================================== */
/* Featured journeys: a snap rail on phones, a 3-up grid from tablet. */
.rail {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: 0 0 var(--rail-item, 250px); }

.journeys-featured { --rail-item: 250px; padding-bottom: clamp(2.25rem, 1.5rem + 3.2vw, 3.625rem); }
@media (min-width: 700px) {
  .journeys-featured {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, .8rem + 2.6vw, 2.5rem);
    overflow: visible; padding-inline: 0; margin-inline: 0;
  }
  .journeys-featured > * { flex: initial; }
  .journeys-featured > :nth-child(3) { display: none; }   /* tablet shows two */
}
@media (min-width: 1000px) {
  .journeys-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journeys-featured > :nth-child(3) { display: block; }
}
.journey-card__frames { display: flex; gap: 3px; }
.journey-card__frames .frame { flex: 1 1 0; aspect-ratio: 1 / 2.1; }
@media (min-width: 700px) { .journey-card__frames .frame { aspect-ratio: 1 / 2; } }
.journey-card__meta { padding-top: 14px; }
.journey-card__title { margin-bottom: 5px; }

/* The dense category contact sheet */
.usecase-grid {
  display: grid; gap: clamp(1.125rem, .8rem + 1.2vw, 1.25rem) clamp(.875rem, .6rem + 1vw, 1.125rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px)  { .usecase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .usecase-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.usecase { display: flex; flex-direction: column; gap: 10px; }
.usecase .frame { aspect-ratio: 4 / 3; }
.usecase__name { font-size: clamp(.875rem, .84rem + .16vw, .9375rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: 3px; }
.usecase-close { display: flex; align-items: center; gap: 20px; padding-top: clamp(2.125rem, 1.5rem + 2.7vw, 3.25rem); }
.usecase-close .rule { flex: 1; }
.usecase-close p { color: var(--fg-3); text-align: center; }
@media (max-width: 699px) { .usecase-close .rule { display: none; } }

/* ==========================================================================
   10. Nº 03 — How it works
   ========================================================================== */
.steps { display: grid; gap: clamp(2.5rem, 1.6rem + 3.8vw, 2.5rem); }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { display: flex; flex-direction: column; gap: clamp(1.125rem, .8rem + 1.4vw, 1.625rem); }
/* Tablet: the three columns become full-width rows, plate beside copy. */
@media (min-width: 700px) and (max-width: 999px) {
  .steps { gap: 0; }
  .step {
    display: grid; grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px; align-items: center;
    padding-block: 30px; border-top: 1px solid var(--rule);
  }
}
.step__number { font-family: var(--serif); font-size: clamp(2.125rem, 1.7rem + 1.8vw, 2.75rem); line-height: 1; color: var(--accent); }
.step__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.step__plate { color: var(--ink); }
.step__body { margin-bottom: 12px; }

/* The Capture plate is a tall portrait; the other two are short. Give the media
   and the copy a shared row each so all three captions start on the same line. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1000px) {
    .steps { grid-template-rows: auto auto; }
    .step {
      grid-row: span 2;
      display: grid; grid-template-rows: subgrid;
      row-gap: clamp(1.125rem, .8rem + 1.4vw, 1.625rem);
    }
    .step__plate { align-self: end; }
  }
}

/* ==========================================================================
   11. Nº 04 — Capture consistency
   ========================================================================== */
.capture__main { display: grid; gap: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem); align-items: start; }
@media (min-width: 1000px) { .capture__main { grid-template-columns: 322px minmax(0, 1fr); } }
.capture__device { justify-self: center; width: 100%; max-width: 322px; }
.capture__ledger { border-top: 1px solid var(--rule); }
.capture-feature {
  display: grid; gap: 6px 26px; align-items: baseline;
  padding-block: clamp(1rem, .8rem + .8vw, 1.375rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1000px) { .capture-feature { grid-template-columns: 46px 178px minmax(0, 1fr); } }
.capture-feature__title { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
@media (max-width: 999px) {
  .capture-feature__head { display: flex; align-items: baseline; gap: 11px; }
  .capture-feature > .index { display: none; }
}

/* ==========================================================================
   12. Nº 05 — Frames to film
   ========================================================================== */
.beat { padding-block: clamp(2.25rem, 1.4rem + 3.6vw, 4.375rem); }
.beat__a { color: var(--fg-4); max-width: 820px; }
.beat__b { text-align: right; margin-top: 22px; }

.payoff { padding-top: clamp(2.75rem, 1.8rem + 3.9vw, 4.75rem); color: var(--ink); }
.payoff .frame { aspect-ratio: 16 / 9; }
@media (min-width: 1000px) { .payoff .frame { aspect-ratio: 1168 / 520; } }
.payoff__overlay { display: flex; flex-direction: column; padding: clamp(18px, 2.4vw, 34px); }
.payoff__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.payoff__play { margin: auto; }
.payoff__title { font-family: var(--serif); font-size: clamp(1.5rem, 1rem + 2.2vw, 2.5rem); color: var(--bone); line-height: 1; }
.payoff__scrub { height: clamp(20px, 2.6vw, 34px); margin-bottom: 12px; }
.payoff__times { display: flex; justify-content: space-between; gap: 12px; }
.payoff__caption { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: baseline; padding-top: 26px; }

/* --- circular play button ------------------------------------------------ */
.play {
  display: flex; align-items: center; justify-content: center;
  width: var(--play, 56px); height: var(--play, 56px);
  border-radius: 50%; background: rgba(237, 232, 222, .92);
  flex: none;
}
.play svg { fill: var(--ink); margin-left: 8%; }

/* ==========================================================================
   17. Why not the camera roll · Brand moment
   ========================================================================== */
.versus { display: grid; align-items: stretch; }
@media (min-width: 900px) { .versus { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); } }
.versus__col { padding-block: 0; }
@media (min-width: 900px) {
  .versus__col--a { padding-right: 56px; }
  .versus__col--b { padding-left: 56px; }
}
.versus__rule { background: var(--hair-strong); }
@media (max-width: 899px) { .versus__rule { display: none; } .versus__col--b { padding-top: 32px; } }
.versus__item { padding-block: clamp(1rem, .85rem + .7vw, 1.25rem); border-top: 1px solid var(--rule); }
.versus__item h3 { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.versus__col--a h3 { color: var(--fg-3); }
.versus__close { padding-top: clamp(2.125rem, 1.6rem + 2.2vw, 3.625rem); color: var(--fg-3); max-width: 860px; }

.brand { text-align: center; position: relative; }
.brand__ghost {
  position: absolute; inset-inline: 0; bottom: clamp(52px, 5vw, 88px);
  display: flex; gap: 3px; opacity: .16; pointer-events: none; z-index: 0;
}
.brand__ghost .frame { flex: 1 1 0; aspect-ratio: auto; height: clamp(100px, 11vw, 150px); }
.brand__line { font-size: clamp(2.375rem, 1.3rem + 5.3vw, 7.375rem); }
.brand__divider { width: 64px; height: 2px; background: var(--cobalt-soft); margin: clamp(26px, 2.8vw, 44px) auto; }
.brand .lead { max-width: 620px; margin-inline: auto; }
/* Copy that is knowingly unwritten until the deployed rules are verified. */
.is-placeholder-copy { outline: 1px dashed var(--hair-strong); outline-offset: 6px; }

/* ==========================================================================
   18. Nº 13 — Final CTA · Nº 14 footer
   ========================================================================== */
.cta { background: var(--ink); color: var(--bone); text-align: center; }
.cta .lead { color: var(--bone-2); max-width: 560px; margin-inline: auto; }
.cta__frames { display: flex; gap: 5px; justify-content: center; align-items: flex-end; margin-bottom: clamp(2.125rem, 1.6rem + 2.2vw, 3.25rem); }
.cta__first { text-align: center; flex: none; }
.cta__first .frame { width: clamp(118px, 8rem + 3vw, 172px); aspect-ratio: 3 / 4; }
.cta__first .overline { color: var(--cobalt-soft); margin-top: 12px; }
/* The frames still to come. */
.cta__empty { border: 1.5px dashed rgba(237, 232, 222, var(--o)); width: clamp(64px, 5rem + 2.4vw, 118px); height: var(--h); flex: none; }
@media (max-width: 699px) { .cta__empty:nth-of-type(n + 4) { display: none; } }
.cta__stores { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; }
@media (max-width: 480px) { .cta__actions .btn, .cta__stores .store { flex: 1 1 100%; } }

.footer { background: var(--ink-deep); color: var(--bone); padding: clamp(3rem, 2.2rem + 3.4vw, 4.75rem) var(--gutter) clamp(2rem, 1.7rem + 1.3vw, 2.875rem); }
.footer__top { display: grid; gap: clamp(2rem, 1.4rem + 2.6vw, 5rem); padding-bottom: clamp(1.875rem, 1.4rem + 2.1vw, 4rem); }
@media (min-width: 900px) { .footer__top { grid-template-columns: 340px minmax(0, 1fr); } }
.footer__tagline { font-family: var(--serif); font-size: clamp(1.4375rem, 1.3rem + .6vw, 1.625rem); line-height: 1.16; color: var(--bone-2); }
.footer__cols { display: grid; gap: 26px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(28px, 3.5vw, 76px); justify-content: end; } }
.footer__cols .overline { color: var(--bone-3); margin-bottom: clamp(12px, 1.4vw, 18px); }
.footer__cols li + li { margin-top: 11px; }
.footer__cols a { font-size: .875rem; color: var(--bone-2); }
.footer__cols a:hover { color: var(--bone); }
.footer__bar { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; border-top: 1px solid var(--hair-ink); padding-top: clamp(18px, 2vw, 26px); }
.footer__bar .overline { color: var(--bone-3); }

/* ==========================================================================
   19. Phone-screen UI
   The mockups are drawn once and sized in container-query units, so the same
   markup is legible in the hero device and the capture device
   without a second copy for mobile.
   ========================================================================== */
.screen { container-type: inline-size; }
.ui { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ui__bar { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 0 5.4cqw; height: 17cqw; flex: none; }
.ui__bar-label { font-size: 3.1cqw; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--bone); }
.ui__bar-meta { font-size: 3.1cqw; letter-spacing: .11em; font-weight: 600; color: var(--bone-3); }
.ui__icon { width: 5.2cqw; height: 5.2cqw; flex: none; }

/* --- capture surface ------------------------------------------------------ */
.ui__viewport { flex: 1; min-height: 0; position: relative; }
.ui__crop { position: absolute; inset: 5.4cqw; z-index: 5; color: rgba(237, 232, 222, .9); --crop-arm: 5.4cqw; --crop-w: 2px; }
.ui__ghost, .ui__guide {
  position: absolute; z-index: 4; left: 50%; translate: -50% 0;
  border-radius: 50% 50% 12% 12% / 38% 38% 12% 12%;
}
.ui__ghost { top: 16%; width: 45%; height: 29%; border: 1.5px dashed rgba(142, 160, 255, .62); background: rgba(142, 160, 255, .09); margin-left: -2%; }
.ui__guide { top: 15%; width: 47%; height: 30%; border: 1.5px solid rgba(237, 232, 222, .34); }
.ui__tag { position: absolute; z-index: 5; left: 5.4cqw; top: 32%; background: var(--cobalt); color: #fff; font-size: 2.6cqw; letter-spacing: .14em; font-weight: 700; padding: 1.4cqw 2.4cqw; }
.ui__zoom { position: absolute; z-index: 5; inset-inline: 0; bottom: 19%; display: flex; justify-content: center; gap: 2cqw; }
.ui__zoom span { width: 9.8cqw; height: 9.8cqw; border-radius: 50%; background: rgba(11, 10, 8, .36); display: flex; align-items: center; justify-content: center; font-size: 3.3cqw; font-weight: 600; color: var(--bone-3); }
.ui__zoom span[data-on] { background: rgba(11, 10, 8, .5); color: var(--bone); font-weight: 700; }
.ui__datestamp { position: absolute; z-index: 5; left: 5.9cqw; bottom: 5.9cqw; font-size: 3.3cqw; letter-spacing: .16em; font-weight: 600; color: rgba(237, 232, 222, .88); }
.ui__tools { display: flex; gap: 2cqw; justify-content: center; }
.ui__tool { display: flex; align-items: center; gap: 1.6cqw; height: 9.8cqw; padding: 0 4.2cqw; font-size: 2.9cqw; letter-spacing: .14em; font-weight: 600; color: var(--bone-2); box-shadow: inset 0 0 0 1px rgba(237, 232, 222, .22); }
.ui__tool svg { width: 3.6cqw; height: 3.6cqw; stroke: currentColor; fill: none; stroke-width: 1.5; }
.ui__tool[data-on='true'] { background: var(--cobalt); color: #fff; box-shadow: none; font-weight: 700; }
.ui__capture-bar { flex: none; background: var(--sheet); padding: 5.2cqw 5.2cqw 7cqw; display: flex; flex-direction: column; gap: 5.8cqw; }
.ui__shutter-row { display: flex; align-items: center; justify-content: space-between; }
.ui__shutter { width: 22cqw; height: 22cqw; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--bone); display: flex; align-items: center; justify-content: center; }
.ui__shutter i { width: 17.5cqw; height: 17.5cqw; border-radius: 50%; background: var(--bone); display: block; }
.ui__last { width: 13.5cqw; aspect-ratio: 1; }
.ui__flip { width: 7.7cqw; height: 7.7cqw; stroke: rgba(237, 232, 222, .85); fill: none; stroke-width: 1.5; }

/* --- film viewer ---------------------------------------------------------- */
.ui__player { flex: none; background: var(--sheet); padding: 5.6cqw 5.6cqw 7cqw; }
.ui__player .scrub { height: 9cqw; margin-bottom: 3.5cqw; }
.ui__times { display: flex; justify-content: space-between; margin-bottom: 5.6cqw; font-size: 3.5cqw; letter-spacing: .1em; font-weight: 600; }
.ui__times b { color: var(--bone-2); font-weight: 600; }
.ui__times span { color: var(--bone-3); }
.ui__transport { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; }
.ui__transport span { font-size: 3.1cqw; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--bone-3); }
.ui__play { width: 16cqw; height: 16cqw; background: var(--bone); display: flex; align-items: center; justify-content: center; flex: none; }
.ui__play svg { width: 4.9cqw; height: 5.6cqw; fill: var(--ink); }

/* --- develop-controls plate (Nº 03 step 3) -------------------------------- */
.plate-dark { background: var(--sheet); padding: clamp(15px, 1.6vw, 20px); display: flex; flex-direction: column; gap: clamp(12px, 1.2vw, 15px); height: 100%; }
.plate-dark .scrub { height: clamp(24px, 2.4vw, 32px); }
.pill-row { display: flex; gap: 4px; }
.pill {
  flex: 1; min-height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(.5625rem, .54rem + .1vw, .625rem); font-weight: 600; letter-spacing: .04em;
  color: var(--bone-2); box-shadow: inset 0 0 0 1px rgba(237, 232, 222, .2);
}
.pill--on { background: var(--cobalt); color: #fff; font-weight: 700; box-shadow: none; }
.pill--bone { background: var(--bone); color: var(--ink); font-weight: 700; box-shadow: none; }
.plate-dark__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--hair-ink); }
.plate-dark__foot .overline { color: var(--bone-2); }

/* --- create-journey plate (Nº 03 step 1) ---------------------------------- */
.plate-bone { background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair-soft); padding: clamp(16px, 1.8vw, 22px) clamp(15px, 1.6vw, 20px); display: flex; flex-direction: column; gap: clamp(12px, 1.3vw, 16px); height: 100%; }
.field { display: flex; align-items: center; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.field span { font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5625rem); line-height: 1.1; }
.field i { width: 2px; height: 1.4em; background: var(--cobalt); margin-left: 3px; display: block; }
.plate-bone__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plate-bone__chips .chip { min-height: 28px; padding: 0 11px; font-size: .625rem; }
.plate-bone__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid var(--hair-soft); }


/* --- extracted repeats ---------------------------------------------------- */
.section-head { padding-bottom: clamp(2.25rem, 1.5rem + 3.2vw, 4rem); }
.capture-feature p { font-size: .9375rem; }
.pill--compact { flex: 0 0 auto; min-height: 26px; padding: 0 10px; }
.step__plate .plate-bone, .step__plate .plate-dark, .step__frame { min-height: 264px; }
.step__frame { aspect-ratio: auto; }
/* The Day 01 frame is a light room; the viewfinder labels need a short scrim. */
.step__frame::before {
  content: '';
  position: absolute; inset: 0 0 auto; height: 18%;
  background: linear-gradient(180deg, rgba(11, 10, 8, .8) 0%, rgba(11, 10, 8, .55) 40%, rgba(11, 10, 8, 0) 100%);
  z-index: 2; pointer-events: none;
}
/* Cobalt on a pale wall stays weak even under the scrim; back this one label. */
.step__frame .frame__stamp--chip {
  background: rgba(11, 10, 8, .45);
  padding: 3px 7px; margin: -3px -7px;
}
/* The ghost is the previous frame, and it is pinned to the viewport exactly as
   the app holds it — it never moves. */
.step__ghost {
  position: absolute; inset: 0; z-index: 1;
  opacity: .32;
  pointer-events: none;
}
/* The live frame is the one out of position: a shade low and a shade close,
   which is the misalignment the ghost exists to correct. Transforms only, so
   the frame's own height still comes from the photograph. */
.step__live { scale: 1.09; translate: 0 3.4%; }

/* ==========================================================================
   20. Motion — restrained, once, and entirely optional
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  translate: 0 var(--reveal-shift);
  transition: opacity var(--reveal-dur) var(--ease), translate var(--reveal-dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; translate: 0 0; }

/* Contact-sheet and film-strip frames develop in, in capture order. */
.js [data-reveal-frames] .frame { opacity: 0; transition: opacity 520ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal-frames].is-revealed .frame { opacity: 1; }

/* The strip drifts a few pixels as it scrolls past — film through a gate. */
.apparatus__strip .filmstrip__frames { will-change: transform; }
.frame > img { transition: scale 620ms var(--ease); }

.journey-card, .usecase { transition: translate 320ms var(--ease); }
.journey-card:hover, .usecase:hover { translate: 0 -3px; }
.journey-card:hover .frame > img, .usecase:hover .frame > img { scale: 1.04; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js [data-reveal-frames] .frame { opacity: 1; translate: none; }
  .journey-card:hover, .usecase:hover { translate: none; }
  .journey-card:hover .frame > img, .usecase:hover .frame > img, .film:hover .frame > img { scale: 1; }
}

/* ==========================================================================
   21. Print — collapse to a readable document
   ========================================================================== */
@media print {
  .nav, .apparatus, .brand__ghost, .cta__frames { display: none; }
  body { background: #fff; color: #000; }
  .section, .dark, .cta, .footer { background: #fff !important; color: #000 !important; }
}

/* Anchor targets clear the sticky masthead. */
html { scroll-behavior: smooth; }
:target, section[id] { scroll-margin-top: 78px; }
@media (min-width: 1200px) { section[id] { scroll-margin-top: 104px; } }
/* A scrubber whose ticks were never built still reads as a track. */
.scrub:empty { background: repeating-linear-gradient(to right, rgba(237,232,222,.22) 0 2px, transparent 2px 5px); }

/* Narrow phones: tighten the store badges so "Download on the" stays on one line. */
@media (max-width: 480px) {
  .store { padding: 0 13px; gap: 9px; }
  .store__text > span { letter-spacing: .1em; font-size: .5rem; }
  .store b { font-size: .875rem; }
}

/* Inline links in prose must not rely on colour alone. */
p a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
/* A rail that actually scrolls becomes a focus stop (see morphsy.js). */
.rail[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
