:root {
  color-scheme: dark;
  --film: #0c0c0c;
  --paper: #f7f7f4;
  --ink: #0c0c0c;
  --gold: #c5a974;
  --muted-dark: #c5c2bf;
  --muted-paper: #625f5b;
  --cinematic-ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { background: var(--film); scrollbar-color: var(--gold) var(--film); }
.home-cinematic { margin: 0; background: var(--film); color: var(--paper); font-family: Inter, system-ui, sans-serif; }
.home-cinematic ::selection { background: var(--gold); color: var(--ink); }
.home-cinematic .site-header {
  position: relative;
  width: 100%;
  margin-inline: 0;
  background: var(--film);
}
.home-cinematic .site-header .header-create { color: var(--ink); }
.home-cinematic .site-header .header-create:hover { background: transparent; color: var(--paper); }

.home-film { --film-progress: 0; --scene-progress: 0; --seam-position: 50%; --seam-beat: 50%; background: var(--film); }
.home-film__stage { position: relative; overflow: hidden; background: var(--film); }
.home-scenes { margin: 0; padding: 0; list-style: none; }
.home-scene { position: relative; min-height: 100svh; padding: clamp(110px, 14vw, 190px) var(--page-gutter) clamp(80px, 10vw, 140px); overflow: hidden; background: var(--film); color: var(--paper); }
.home-scene:nth-child(2n):not(.home-scene--closing) { background: var(--paper); color: var(--ink); }
.home-atmosphere { position: absolute; inset: 0; margin: 0; }
.home-atmosphere img { width: 100%; height: 100%; object-fit: cover; }
.home-opening-copy,
.home-closing-copy { position: relative; z-index: 4; max-width: 980px; margin: auto; }
.home-opening-copy h1,
.home-closing-copy h2,
.home-side-copy h2 { margin: 0; font-family: Alexandria, Inter, sans-serif; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.home-opening-copy h1 { max-width: 12em; font-size: clamp(48px, 7vw, 96px); line-height: 1.02; }
.home-opening-copy p,
.home-closing-copy p,
.home-side-copy p { max-width: 38em; color: var(--muted-dark); font-size: clamp(17px, 1.35vw, 21px); line-height: 1.6; }
.split-title > span:nth-child(2),
.split-summary > span:nth-child(2) { display: none; }
.home-opening-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button--dark { background: var(--ink); color: var(--paper); }
.home-cinematic .button--light { background: var(--paper); color: var(--ink); }
.home-side-copy { position: relative; z-index: 4; max-width: 560px; }
.home-side-copy h2 { max-width: 10em; font-size: clamp(42px, 5vw, 76px); line-height: 1.02; }
.home-scene:nth-child(2n) .home-side-copy p { color: var(--muted-paper); }
.home-product { position: relative; z-index: 3; width: min(440px, 70vw); margin: 48px auto 0; }
.home-product img { display: block; width: 100%; height: auto; }
.home-product--phone { max-width: 360px; padding: 10px; border-radius: 44px; background: #0b0b0b; box-shadow: 20px 34px 80px rgba(0,0,0,.32); }
.home-product--phone img { border-radius: 34px; }
.home-product--watch,
.home-product--wear { max-width: 420px; }
.home-product--dashboard { width: min(980px, 100%); max-width: none; padding: 7px; background: #1b1916; box-shadow: 26px 42px 100px rgba(0,0,0,.42); }
.home-product figcaption { margin-top: 16px; color: currentColor; font-size: 13px; line-height: 1.5; opacity: .68; }
.home-closing-copy { display: grid; place-items: center; min-height: 70svh; text-align: center; }
.home-closing-copy h2 { max-width: 12em; font-size: clamp(52px, 7vw, 96px); line-height: 1; }
.home-closing-copy > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.home-seam,
.home-playheads,
.film-progress,
.capture-disclaimer { display: none; }
[data-media-error="true"] img { visibility: hidden; }
[data-media-error="true"] figcaption { display: block; }
.home-secondary-frames { display: none; }

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .home-cinematic .site-header {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin-inline: 0;
    --header-field: transparent;
    --header-text: var(--paper);
    background: var(--film);
  }
  .home-cinematic .site-brand { color: var(--paper); }
  html[data-film-ready] .home-film { min-height: 720svh; }
  html[data-film-ready] .home-film .home-film__stage { position: sticky; top: 0; height: 100svh; min-height: 720px; background: linear-gradient(90deg, var(--paper) 0 var(--seam-position), var(--film) var(--seam-position) 100%); isolation: isolate; }
  .home-scenes,
  .home-scene,
  .home-scene:nth-child(2n):not(.home-scene--closing) { position: absolute; inset: 0; min-height: 0; padding: 0; background: transparent; color: inherit; }
  .home-scene { visibility: hidden; opacity: 0; transition: opacity 420ms var(--cinematic-ease), visibility 0s linear 420ms; }
  .home-scene.is-active { z-index: 4; visibility: visible; opacity: 1; transition-delay: 0s; }
  .home-seam { position: absolute; z-index: 14; top: 84px; bottom: 0; left: var(--seam-position); display: block; width: 1px; background: rgba(197,194,191,.45); transition: left 700ms var(--cinematic-ease); }
  .home-seam span { position: absolute; top: var(--seam-beat); left: 50%; width: 13px; height: 13px; border: 1px solid var(--gold); border-radius: 50%; background: var(--film); transform: translate(-50%,-50%); box-shadow: 0 8px 24px rgba(0,0,0,.38); }
  .home-film[data-scene="4"] { --seam-position: 56%; }
  .home-film[data-scene="5"] { --seam-position: 52%; }
  .home-film[data-scene="6"] { --seam-position: 44%; }
  .home-film[data-scene="7"] { --seam-position: 100%; }
  html[data-film-ready] .home-film[data-scene="7"] .home-film__stage { background: var(--film); }
  .home-film[data-scene="7"] .home-seam { opacity: 0; }

  .home-atmosphere { z-index: 0; clip-path: inset(0 0 0 50%); opacity: .16; }
  .home-atmosphere img { object-position: center; }
  .home-opening-copy { position: absolute; z-index: 12; inset: 11.5svh 0 auto; max-width: none; margin: 0; pointer-events: none; }
  .split-title { position: relative; height: 148px; }
  .home-opening-copy h1.split-title { width: 100%; max-width: none; }
  .split-title > span { position: absolute; top: 0; left: 50%; display: block; width: min(1100px, 92vw); max-width: none; margin: 0; transform: translateX(-50%); text-align: center; }
  .split-title > span:first-child { color: var(--ink); clip-path: inset(0 50% 0 0); }
  .split-title > span:nth-child(2) { display: block; color: var(--paper); clip-path: inset(0 0 0 50%); }
  .home-opening-copy h1 { font-size: clamp(46px, 3.8vw, 62px); line-height: .96; }
  .split-summary { position: relative; height: 64px; margin: 8px auto 0; }
  .split-summary > span { position: absolute; inset: 0; display: block; max-width: 790px; margin: auto; text-align: center; }
  .split-summary > span:first-child { color: #38352b; clip-path: inset(0 50% 0 0); }
  .split-summary > span:nth-child(2) { display: block; color: var(--muted-dark); clip-path: inset(0 0 0 50%); }
  .home-opening-actions { position: fixed; top: auto; bottom: 8.5svh; left: 0; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; pointer-events: auto; }
  .home-cinematic .button--dark { background: var(--ink); color: var(--paper); }
  .home-cinematic .button--light { border-color: var(--paper); background: var(--paper); color: var(--ink); }
  .home-opening-actions a:first-child { justify-self: center; margin-left: 5vw; }
  .home-opening-actions a:last-child { justify-self: center; margin-right: 5vw; }

  .home-product { position: absolute; margin: 0; transition: transform 780ms var(--cinematic-ease), filter 500ms var(--cinematic-ease), opacity 420ms ease-out; }
  .home-product--phone { left: 17%; top: 36%; width: min(20vw, 320px); height: 48svh; padding: 7px; overflow: hidden; }
  .home-product--phone img { height: 100%; object-fit: contain; object-position: center top; background: var(--paper); }
  .home-product--phone { border: 1px solid rgba(197,169,116,.42); box-shadow: 24px 38px 90px rgba(0,0,0,.38), 0 0 0 14px rgba(197,169,116,.035); }
  .home-product--dashboard { left: 55%; top: 37%; width: 36%; max-height: 44svh; overflow: hidden; border: 1px solid rgba(197,169,116,.35); background: #090806; box-shadow: 26px 42px 100px rgba(0,0,0,.62); }
  .home-product--dashboard img { height: 42svh; object-fit: cover; object-position: top; }
  .home-product--watch,
  .home-product--wear { left: 22%; top: 32%; width: min(25vw, 420px); padding: 14px; border: 1px solid rgba(197,169,116,.48); border-radius: 30px; background: radial-gradient(circle at 50% 30%, rgba(197,169,116,.18), rgba(12,12,12,.94) 64%); box-shadow: 24px 34px 80px rgba(0,0,0,.38), 0 0 0 12px rgba(197,169,116,.04); }
  .home-product--watch img,
  .home-product--wear img { border-radius: 18px; }
  .home-side-copy { position: absolute; z-index: 8; top: 34%; left: 5.2%; width: min(24%, 300px); color: var(--ink); }
  .home-side-copy--company { top: 15%; left: 56%; right: auto; width: min(36%, 470px); color: var(--paper); }
  .home-side-copy--handoff { top: 34%; left: auto; right: 5.2%; width: min(31%, 390px); color: var(--paper); }
  .home-side-copy h2 { font-size: clamp(32px, 3.4vw, 58px); }
  .home-side-copy p { color: inherit; font-size: clamp(15px, 1.15vw, 18px); opacity: .72; }
  .home-product figcaption { display: none; }

  .home-secondary-frames { position: absolute; z-index: 2; display: flex; align-items: center; gap: 14px; pointer-events: none; opacity: .78; }
  .home-secondary-frames img { display: block; width: clamp(92px, 10vw, 150px); height: clamp(170px, 26svh, 240px); object-fit: cover; border: 1px solid rgba(197,169,116,.46); border-radius: 18px; background: #0b0b0b; box-shadow: 18px 26px 50px rgba(0,0,0,.3); filter: saturate(.86) contrast(1.04); }
  .home-secondary-frames img:first-child { transform: translateY(calc(var(--scene-progress) * -20px)) rotate(-5deg); }
  .home-secondary-frames img:last-child { transform: translateY(calc(var(--scene-progress) * 16px)) rotate(4deg); opacity: .64; }
  .home-secondary-frames--share,
  .home-secondary-frames--watch,
  .home-secondary-frames--record { top: 21%; right: 4.4%; }
  .home-secondary-frames--handoff,
  .home-secondary-frames--followup { top: 18%; left: 4.4%; }
  .home-secondary-frames--company { top: 28%; left: 4.4%; }
  .home-secondary-frames--company img:first-child,
  .home-secondary-frames--record img:first-child { width: clamp(150px, 16vw, 250px); height: clamp(120px, 22svh, 190px); border-radius: 12px; }
  .home-secondary-frames--company img:last-child,
  .home-secondary-frames--record img:last-child { width: clamp(92px, 10vw, 150px); height: clamp(170px, 26svh, 240px); }

  .home-film[data-scene="0"] [data-media-id="home-h02-share-ready"],
  .home-film[data-scene="0"] [data-media-id="home-h07-company-continuity"] { z-index: 3; visibility: visible; opacity: 1; }
  .home-film[data-scene="0"] [data-media-id="home-h02-share-ready"] .home-side-copy,
  .home-film[data-scene="0"] [data-media-id="home-h07-company-continuity"] .home-side-copy { display: none; }
  .home-film[data-scene="0"] .home-secondary-frames { display: none; }
  .home-film[data-scene="0"] [data-media-id="home-h02-share-ready"] .home-product { transform: perspective(1200px) rotateY(6deg); }
  .home-film[data-scene="0"] [data-media-id="home-h07-company-continuity"] .home-product { transform: perspective(1500px) rotateY(-4deg); }
  .home-film[data-scene="0"] .home-product--phone { top: 44%; height: 40svh; }
  .home-film[data-scene="0"] .home-product--dashboard { top: 44%; max-height: 38svh; }
  .home-film[data-scene="0"] .home-product--dashboard img { height: 36svh; }
  .home-film[data-scene="1"] .home-opening-copy,
  .home-film[data-scene="2"] .home-opening-copy,
  .home-film[data-scene="3"] .home-opening-copy,
  .home-film[data-scene="4"] .home-opening-copy,
  .home-film[data-scene="5"] .home-opening-copy,
  .home-film[data-scene="6"] .home-opening-copy { opacity: 0; }
  .home-film[data-scene="1"] .home-product--phone,
  .home-film[data-scene="5"] .home-product--phone { left: 46%; top: 16%; height: 72svh; transform: translateX(-50%) perspective(1200px) rotateY(4deg); }
  .home-film[data-scene="2"] .home-product--watch,
  .home-film[data-scene="3"] .home-product--watch { left: 46%; top: 24%; transform: translateX(-50%) scale(1.18); filter: drop-shadow(0 28px 50px rgba(0,0,0,.28)); }
  .home-film[data-scene="4"] .home-product--wear { left: 43%; top: 25%; transform: translateX(-50%) scale(1.08); filter: drop-shadow(0 30px 55px rgba(0,0,0,.3)); }
  .home-film[data-scene="6"] .home-product--dashboard { left: auto; right: 4.5%; top: 39%; width: 42%; max-height: 48svh; transform: perspective(1500px) rotateY(-2deg); }
  .home-film[data-scene="6"] .home-product--dashboard img { height: 44svh; }
  .home-scene--closing { color: var(--paper); }
  .home-atmosphere--closing { clip-path: none; opacity: .68; }
  .home-closing-copy { position: absolute; inset: 0; z-index: 5; min-height: 0; padding: 18svh var(--page-gutter) 12svh; background: rgba(12,12,12,.26); }
  .home-closing-copy p { text-align: center; }

  .home-playheads { position: absolute; z-index: 16; left: 4.8%; right: 4.8%; bottom: 4.5%; display: flex; justify-content: space-between; color: var(--muted-dark); font-size: 11px; letter-spacing: .18em; }
  .home-playheads span:first-child { color: var(--muted-paper); }
  .film-progress { position: absolute; z-index: 16; left: 5%; right: 5%; bottom: 2.5%; display: block; height: 1px; margin: 0; overflow: hidden; background: rgba(197,194,191,.28); }
  .film-progress span { display: block; width: 100%; height: 100%; background: var(--gold); transform: scaleX(var(--film-progress)); transform-origin: left; }
  .capture-disclaimer { position: absolute; z-index: 16; right: 4.8%; bottom: 7.5%; display: block; margin: 0; color: var(--muted-dark); font-size: 11px; letter-spacing: .04em; }
}

@media (max-width: 1250px) {
  .home-cinematic .site-header { background: var(--film); }
  .home-cinematic .site-brand { color: var(--paper); }
}

@media (min-width: 901px) {
  .home-cinematic .site-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; min-height: 84px; }
  .home-cinematic .site-brand { grid-column: 1; grid-row: 1; }
  .home-cinematic .site-nav { grid-column: 2; grid-row: 1; display: flex !important; justify-content: flex-end; gap: clamp(12px, 1.35vw, 24px); width: auto; padding: 0; border: 0; background: transparent; }
  .home-cinematic .header-actions { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: clamp(8px, 1vw, 18px); }
  .home-cinematic .language-switch,
  .home-cinematic .header-sign-in,
  .home-cinematic .header-create { grid-column: auto; grid-row: auto; margin: 0; }
  .home-cinematic .header-sign-in,
  .home-cinematic .header-create { display: inline-flex !important; }
  .home-cinematic .nav__toggle { display: none !important; }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .home-cinematic .site-header { gap: 10px; }
  .home-cinematic .site-nav { gap: 8px; }
  .home-cinematic .site-nav a,
  .home-cinematic .header-sign-in,
  .home-cinematic .header-create { min-width: auto; font-size: 12px; }
  .home-cinematic .site-nav a { padding-inline: 3px; }
  .home-cinematic .header-actions { gap: 7px; }
  .home-cinematic .language-switch button { min-width: 28px; }
  .home-cinematic .site-header .header-create { padding: 8px 12px; }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .home-cinematic .site-header { position: relative; }
  .home-film__stage { overflow: visible; }
  .home-scene { display: grid; align-content: center; gap: 30px; min-height: auto; padding-block: 96px; }
  .home-scene--opening,
  .home-scene--closing { min-height: 86svh; }
  .home-atmosphere { opacity: .42; }
  .home-opening-copy,
  .home-closing-copy { text-align: left; }
  .home-opening-copy h1,
  .home-closing-copy h2 { font-size: clamp(43px, 11vw, 72px); }
  .home-closing-copy { place-items: start; }
  .home-closing-copy > div { justify-content: flex-start; }
  .home-side-copy { order: 1; }
  .home-product { order: 2; }
  .home-opening-actions { position: relative; }
  .home-cinematic .home-opening-actions .button--dark { background: var(--paper); color: var(--ink); }
  .home-product--dashboard { width: 100%; }
  .home-product--dashboard img { max-height: 72svh; object-fit: contain; }
  .home-secondary-frames { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-scene,
  .home-product { transition: none; }
}

/* Homepage evidence pass: the trailer uses compact real captures instead of tall phone screenshots. */
.home-opening-evidence { display: none; }

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .home-opening-evidence {
    position: absolute;
    z-index: 9;
    right: 4.5%;
    bottom: 9%;
    left: 4.5%;
    display: block;
    height: 198px;
    pointer-events: none;
  }
  .home-opening-actions {
    top: 42svh;
    bottom: auto;
  }
  .home-opening-frame {
    position: absolute;
    display: block;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(197,169,116,.42);
    background: #10100f;
    box-shadow: 0 22px 48px rgba(0,0,0,.28);
  }
  .home-opening-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, transparent 70%, rgba(12,12,12,.16));
  }
  .home-opening-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .home-opening-frame--card {
    left: 7%;
    bottom: 0;
    width: clamp(96px, 10vw, 138px);
    height: 176px;
    border-radius: 22px;
    transform: rotate(-7deg);
  }
  .home-opening-frame--today {
    bottom: 18px;
    left: 20%;
    width: clamp(88px, 9vw, 122px);
    height: 158px;
    border-radius: 20px;
    transform: rotate(4deg);
    opacity: .82;
  }
  .home-opening-frame--overview {
    right: 5%;
    bottom: 0;
    width: min(28vw, 360px);
    height: 142px;
    border-radius: 5px;
    transform: rotate(2deg);
  }
  .home-opening-frame--usage {
    right: 25%;
    bottom: 24px;
    width: min(23vw, 296px);
    height: 132px;
    border-radius: 5px;
    transform: rotate(-2deg);
    opacity: .84;
  }

  /* The opening now has its own lower evidence rail; do not expose the old tall phone/dashboard pair. */
  .home-film[data-scene="0"] [data-media-id="home-h02-share-ready"],
  .home-film[data-scene="0"] [data-media-id="home-h07-company-continuity"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .home-film[data-scene="0"] .home-opening-copy { pointer-events: none; }

  .home-product--phone {
    top: 27%;
    width: min(22vw, 320px);
    height: min(52svh, 430px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(197,169,116,.42);
    border-radius: 24px;
    box-shadow: 22px 32px 74px rgba(0,0,0,.34), 0 0 0 10px rgba(197,169,116,.035);
  }
  .home-product--phone img {
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 22px;
  }
  .home-film[data-scene="1"] .home-product--phone,
  .home-film[data-scene="5"] .home-product--phone {
    top: 27%;
    height: min(52svh, 430px);
    transform: translateX(-50%) perspective(1200px) rotateY(4deg);
  }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .home-opening-evidence {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 12px;
    width: min(100%, 440px);
    height: 234px;
    margin: 4px auto 0;
  }
  .home-opening-frame {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(197,169,116,.42);
    border-radius: 18px;
    background: #10100f;
    box-shadow: 0 16px 32px rgba(0,0,0,.22);
  }
  .home-opening-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .home-opening-frame--card,
  .home-opening-frame--today { width: 100%; height: 170px; }
  .home-opening-frame--overview,
  .home-opening-frame--usage { width: 100%; height: 112px; }
  .home-opening-frame--card { transform: rotate(-3deg); }
  .home-opening-frame--today { transform: rotate(3deg); }
  .home-opening-frame--overview { transform: rotate(-1deg); }
  .home-opening-frame--usage { transform: rotate(2deg); }
  .home-product--phone {
    width: min(300px, 82vw);
    height: min(54svh, 500px);
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
  }
  .home-product--phone img {
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
  }
}
