/* Apex Notes: the scrolling ad. Black, gold, Inter. Mobile first: each beat
   is about one phone screen. Motion only decorates: the form is never hidden,
   and without JavaScript or with reduced motion everything is simply shown. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #050505;
  --text: #f4f2ee;
  --grey: #8c8a86;
  --line: #242424;
  --gold: #c9a84c;
  --gold-hi: #e5c36a;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-snap-type: y mandatory; background: var(--bg); }
body { margin: 0; touch-action: pan-y pinch-zoom; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; z-index: 50; background: var(--bg); padding: 8px 12px; }
.gold { color: var(--gold-hi); }

/* The globe: one fixed canvas behind every screen (scripts/notes-ad.js). */
.ad { position: relative; }
.globe { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* Beats */
/* One beat, one screen, edge to edge. One swipe snaps to the next. */
.beat { position: relative; width: 100%; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 36px calc(24px + env(safe-area-inset-bottom)); scroll-snap-align: start; scroll-snap-stop: always; }
.beat > * { max-width: 760px; }
.mark { display: block; width: 72px; height: auto; color: var(--text); }
.mark path, .mark use { fill: currentColor; }
.hero__title { margin: 14px 0 18px; font-size: clamp(50px, 15vw, 116px); font-weight: 700; letter-spacing: 0; line-height: 1; }
@media (min-width: 960px) { .hero__title { white-space: nowrap; } }

/* Split-flap tiles (the headline and the prices). The final letter is in the
   markup; scripts/notes-ad.js flips through letters before landing on it. */
.flap-word { display: inline-block; white-space: nowrap; margin: 0.03em 0; font-size: 0.84em; }
.flap-word .flap { font-size: 0.86em; width: 0.93em; height: 1.3em; }
.flap { position: relative; display: inline-grid; place-items: center; width: 0.8em; height: 1.12em; margin: 0 0.025em; line-height: 1; color: #f4f2ee; background: linear-gradient(#1a1a1a 0 50%, #121212 50% 100%); border-radius: 0.07em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.55); overflow: hidden; transform-style: preserve-3d; }
.flap::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(1px, 0.018em); background: rgba(0, 0, 0, 0.9); }
.flap--gold { color: var(--gold-hi); }
.flaps { display: inline-flex; }
.flaps--price .flap { width: 0.6em; height: 1.18em; margin: 0; border-radius: 3px; background: transparent; box-shadow: none; transition: background-color 0.25s ease-out; }
/* Prices are tiles only while they flip; once landed, clean digits (no split line). */
.flaps--price .flap::after { opacity: 0; transition: opacity 0.25s ease-out; }
.flaps--price.is-flipping .flap { background: linear-gradient(#1a1a1a 0 50%, #121212 50% 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.flaps--price.is-flipping .flap::after { opacity: 1; }
.kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 30px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 999px; border: 0; cursor: pointer; }
.btn--gold { background: var(--gold); color: #0b0b0b; }
.btn--gold:hover { background: var(--gold-hi); }
.btn--block { display: flex; width: 100%; border-radius: 12px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.hero__top { display: flex; flex-direction: column; align-items: center; width: 100%; }  /* centred on the screen by .beat */
.hero__sub { margin: 0; max-width: 26ch; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.8); font-size: 18px; line-height: 1.45; color: #d6d3cd; }
.beat--hero .btn { margin-top: 22px; }

/* Scroll cue: bottom of the hero, gone for good after the first scroll. */
.cue { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--gold-hi); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; transition: opacity 0.3s ease-out; pointer-events: none; }
.cue__chevron { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cue__text--pointer { display: none; }
@media (hover: hover) and (pointer: fine) { .cue__text--touch { display: none; } .cue__text--pointer { display: inline; } }
.cue.is-gone { opacity: 0; }

/* Progress dots: one per beat, right edge, current one in gold. */
.dots { position: fixed; right: 4px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.dots button { display: grid; place-items: center; width: 24px; height: 20px; padding: 0; background: none; border: 0; cursor: pointer; }
.dots button::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #5a5854; transition: background-color 0.2s ease-out, transform 0.2s ease-out; }
.dots button[aria-current='true']::before { background: var(--gold-hi); transform: scale(1.5); }
@media (min-width: 960px) { .dots { right: 16px; } }

.accent { display: block; width: 56px; height: 35px; margin: 0 auto 28px; flex: none; }
.accent path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.big { margin: 0; font-size: clamp(38px, 10.5vw, 84px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; max-width: 13ch; }
.big + .big { margin-top: 0.7em; }
.big--late { color: var(--gold-hi); }
.w { display: inline-block; }

/* Real pages: three sample pages fan out with a slight tilt. */
.fan { position: relative; width: min(50vw, 280px); aspect-ratio: 635 / 898; perspective: 1400px; margin: 0 auto; }
.fan__page { position: absolute; inset: 0; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06); transform-origin: 50% 90%; }
.fan__page--1 { transform: translateX(-30%) rotateZ(-8deg) rotateY(16deg) scale(0.88); }
.fan__page--3 { transform: translateX(30%) rotateZ(8deg) rotateY(-16deg) scale(0.88); }
.fan__page--2 { transform: translateY(-3%); }
.caption { margin: 36px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* Inbox: an email notification slides in. */
.notif { display: flex; align-items: center; gap: 12px; width: min(100%, 360px); margin-top: 36px; padding: 14px 16px; text-align: left; background: rgba(40, 40, 40, 0.72); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.notif__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #0b0b0b; border: 1px solid rgba(201, 168, 76, 0.4); color: var(--gold-hi); }
.notif__icon svg { width: 24px; height: auto; }
.notif__icon use { fill: currentColor; }
.notif__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.notif__from { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; }
.notif__time { font-weight: 400; color: var(--grey); font-size: 13px; }
.notif__subject { font-size: 15px; color: #d6d3cd; }

/* Plans: the form. Always visible, never animated. */
.beat--plans { padding-top: 20px; padding-bottom: 20px; }
.form { width: 100%; max-width: 440px; margin: 16px auto 0; text-align: left; }
.picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
@media (min-width: 640px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick__card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #0b0b0b; transition: border-color 150ms ease-out, background-color 150ms ease-out; }
.pick:hover .pick__card { border-color: #3d3d3d; }
.pick input:checked + .pick__card { border-color: var(--gold); background: rgba(201, 168, 76, 0.09); }
.pick input:focus-visible + .pick__card { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.pick__name { font-size: 16px; font-weight: 600; }
.pick__price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.pick__tag { margin-top: 2px; padding: 3px 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0b0b0b; background: var(--gold-hi); border-radius: 999px; }
.field { display: block; width: 100%; height: 52px; padding: 0 18px; font: inherit; font-size: 16px; color: var(--text); background: #0b0b0b; border: 1px solid var(--line); border-radius: 12px; }
.field::placeholder { color: var(--grey); }
.field:focus-visible { outline: none; border-color: var(--gold); }
.form .btn--block { margin-top: 10px; height: 52px; }
.form__error { margin: 14px 0 0; font-size: 15px; font-weight: 500; text-align: center; }
.already { margin: 14px 0 0; padding: 18px 20px; text-align: center; border: 1px solid var(--gold); border-radius: 12px; background: rgba(201, 168, 76, 0.09); }
.already p { margin: 0; font-size: 15px; }
.already .already__title { margin-bottom: 8px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.small { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: #b9b6b0; text-align: center; }
.small + .small { margin-top: 6px; }

/* End */
.beat--end { height: auto; min-height: 60svh; overflow: visible; padding-top: 48px; padding-bottom: calc(104px + env(safe-area-inset-bottom)); scroll-snap-align: end; }
.member { margin: 0 0 48px; font-size: 15px; font-weight: 500; }
.mark--end { width: 44px; margin-bottom: 24px; }
.risk { margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.company { margin: 0 0 8px; max-width: 46ch; font-size: 12px; line-height: 1.6; color: var(--grey); }
.company a { white-space: nowrap; }

/* Subscribe sheet: slides up over the page; swipe down, X, backdrop or Esc closes it. */
.sheet { position: fixed; inset: 0; z-index: 60; }
.js .sheet:not(.is-visible) { display: none; }
/* Without JavaScript the form is a plain section at the end of the page. */
html:not(.js) .sheet { position: static; }
html:not(.js) .sheet__backdrop, html:not(.js) .sheet__close, html:not(.js) .sheet__grip { display: none; }
html:not(.js) .sheet__panel { position: static; transform: none; margin: 0 auto 120px; border-radius: 22px; border-bottom: 1px solid var(--line); }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s ease-out; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; max-height: 92svh; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; padding: 28px 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; background: #0b0b0b; border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6); transform: translateY(100%); transition: transform 0.32s var(--ease); touch-action: pan-y; }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__panel:focus { outline: none; }
.sheet__grip { position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #3a3a3a; }
.sheet__close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--text); background: none; border: 0; cursor: pointer; }
.sheet__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sheet .form { margin-top: 18px; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .sheet__panel, .sheet__backdrop { transition: none; } }

/* Sticky bar: phones only, until the plans are on screen. */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(5, 5, 5, 0.86); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: translateY(0); transition: transform 250ms var(--ease); }
.stickybar[hidden] { display: block; transform: translateY(110%); visibility: hidden; transition: transform 250ms var(--ease), visibility 0s 250ms; }
.stickybar .btn { height: 48px; }
@media (min-width: 960px) { .stickybar { left: 50%; right: auto; bottom: 20px; width: 360px; margin-left: -180px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; } .stickybar[hidden] { transform: translateY(140%); } }

/* Motion. Only with JavaScript (it adds html.js and .is-in as beats arrive)
   and only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: done in about 0.9s. */
  .beat--hero .kicker, .beat--hero .hero__sub, .beat--hero .btn { opacity: 0; transform: translateY(12px); animation: rise 0.4s var(--ease) forwards; }
  .beat--hero .kicker { animation-delay: 0.1s; }
  .beat--hero .hero__sub { animation-delay: 0.55s; }
  .beat--hero .btn { animation-delay: 0.7s; }
  .cue:not(.is-gone) { animation: cue-in 0.4s ease-out 0.8s both, bob 1.6s ease-in-out 1.2s infinite; }
  .globe { animation: cue-in 0.8s ease-out both; }

  /* Accents draw in as their screen arrives. */
  .js [data-beat] .accent path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.5s var(--ease); }
  .js [data-beat].is-in .accent path { stroke-dashoffset: 0; }

  /* Words: about 0.9s for both lines. */
  .js [data-beat] .w { opacity: 0; transform: translateY(0.3em); transition: opacity 0.3s ease-out, transform 0.35s var(--ease); transition-delay: calc(var(--i) * 40ms); }
  .js [data-beat] .big--late .w { transition-delay: calc(420ms + (var(--i) - 7) * 40ms); }
  .js [data-beat].is-in .w { opacity: 1; transform: none; }

  /* Pages fan out in about 0.8s. */
  .js .fan__page { transition: transform 0.6s var(--ease), opacity 0.35s ease-out; }
  .js .beat--pages:not(.is-in) .fan__page { transform: translateY(10%) scale(0.86); opacity: 0; }
  .js .beat--pages.is-in .fan__page--1 { transition-delay: 0.08s; }
  .js .beat--pages.is-in .fan__page--3 { transition-delay: 0.16s; }
  .js .beat--pages .caption { opacity: 0; transition: opacity 0.3s ease-out 0.5s; }
  .js .beat--pages.is-in .caption { opacity: 1; }

  /* The notification drops in by about 0.9s. */
  .js .beat--inbox .notif { opacity: 0; transform: translateY(-32px) scale(0.96); transition: opacity 0.3s ease-out 0.4s, transform 0.5s cubic-bezier(0.2, 1.3, 0.3, 1) 0.4s; }
  .js .beat--inbox.is-in .notif { opacity: 1; transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes cue-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .stickybar, .stickybar[hidden] { transition: none; } }
/* Short or landscape screens: beats grow to fit and snapping relaxes, so
   nothing is ever cut off. */
@media (max-height: 640px) {
  html { scroll-snap-type: y proximity; }
  .beat { height: auto; min-height: 100svh; overflow: visible; padding-top: 48px; padding-bottom: 48px; }
}
