/* The story page: the promo film told as a scroll story (from marketing/landing-drafts/c, draft C).
   Loaded after styles.css. Tokens follow the film's Daylight frame (marketing/usagescope-promo/frame.md).
   Korean display type is "UsageScope Display KR", an OFL subset of Pretendard ExtraBold (fonts/). */

/* ---------- The film player ---------- */

/* The promo film: a white card with the landing's hairline and the film's green-grey shadow. */
.film {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: #eef3f0;
  box-shadow:
    0 40px 90px -30px rgba(25, 61, 43, 0.35),
    0 0 0 1px #e3e8e5;
  isolation: isolate;
}

.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f7f8fa;
}

.film-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.film-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(218, 231, 223, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #202724;
  font: 700 13px/1 var(--font-sans);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px -12px rgba(20, 55, 35, 0.45);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.film-button:hover {
  background: #ffffff;
}

.film-button:active {
  transform: scale(0.97);
}

.film-button:focus-visible {
  outline: 2px solid #087e59;
  outline-offset: 2px;
}

.film-button .film-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

/* The play and sound buttons draw their own icons from data-state. */
.film-button[data-promo-play] .film-icon::before,
.film-button[data-promo-sound] .film-icon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--film-icon) center / contain no-repeat;
  mask: var(--film-icon) center / contain no-repeat;
}

.film-button[data-promo-play][data-state="playing"] {
  --film-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='2' y='1.5' width='3.4' height='11' rx='1'/><rect x='8.6' y='1.5' width='3.4' height='11' rx='1'/></svg>");
}

.film-button[data-promo-play][data-state="paused"] {
  --film-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 1.6v10.8a.8.8 0 0 0 1.2.7l8.6-5.4a.8.8 0 0 0 0-1.4L4.2.9A.8.8 0 0 0 3 1.6Z'/></svg>");
}

.film-button[data-promo-sound][data-state="muted"] {
  --film-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M1 5h2.6L7 2v10L3.6 9H1z'/><path d='m9 5 4 4m0-4-4 4' stroke='black' stroke-width='1.4' stroke-linecap='round'/></svg>");
}

.film-button[data-promo-sound][data-state="sound"] {
  --film-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M1 5h2.6L7 2v10L3.6 9H1z'/><path d='M9.2 4.6a3.4 3.4 0 0 1 0 4.8M11 3a5.6 5.6 0 0 1 0 8' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round'/></svg>");
}

/* Button labels come from the locales (film.play/pause/soundOn/soundOff); story.js only sets data-state. */
.film-button [data-when] {
  display: none;
}

.film-button[data-state="playing"] [data-when="playing"],
.film-button[data-state="paused"] [data-when="paused"],
.film-button[data-state="muted"] [data-when="muted"],
.film-button[data-state="sound"] [data-when="sound"] {
  display: inline;
}

@media (prefers-reduced-motion: reduce) {
  .film-button {
    transition: none;
  }
}

/* ---------- The story ---------- */

/* Old links to #experience (the previous hero demo) land on the notch beat. */
.c-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  scroll-margin-top: 90px;
}

@font-face {
  font-family: "UsageScope Display KR";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/usagescope-display-kr-extrabold.woff2") format("woff2");
}

.c-page {
  --c-text: #202724;
  --c-muted: #59695f;
  --c-accent: #10b981;
  --c-accent-dark: #087e59;
  --c-amber: #f59e0b;
  --c-blue: #3884ff;
  --c-red: #e5484d;
  --c-border: #e3e8e5;
  --c-card: 0 40px 90px -30px rgba(25, 61, 43, 0.35), 0 0 0 1px #e3e8e5;
  --c-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --c-spring: cubic-bezier(0.34, 1.5, 0.64, 1);
  background: linear-gradient(180deg, #fafbfb 0%, #f7f8fa 40%, #f2f6f4 100%);
}

/* ---------- Type ---------- */

.c-display {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.04;
  color: var(--c-text);
  text-wrap: balance;
}

html[lang="ko"] .c-display,
html[lang="ko"] .c-wordmark {
  font-family: "UsageScope Display KR", var(--font-sans);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

/* One mask per line: the line rises out of its own box, like the film's type. */
.c-line {
  display: block;
  overflow: hidden;
  padding: 0.08em 0.06em 0.16em;
  margin: -0.08em -0.06em -0.16em;
}

.c-line-in {
  display: inline-block;
  vertical-align: top;
  transition: transform 1s var(--c-ease);
  transition-delay: calc(var(--i, 0) * 90ms + var(--c-delay, 0ms));
}

.c-muted {
  color: var(--c-muted);
}

.c-accent {
  color: var(--c-accent-dark);
}

.c-warm {
  background: linear-gradient(92deg, #ea580c 0%, #e0452f 50%, #dc2626 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.c-title {
  font-size: clamp(42px, 5.8vw, 88px);
}

.c-lead {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.75;
  color: var(--c-muted);
  max-width: 34em;
}

.c-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid #dae7df;
  border-radius: 12px;
  background: rgba(248, 252, 250, 0.9);
  color: #4f6c5d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.c-pill .live-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.c-play-dot {
  width: 0;
  height: 0;
  border-left: 9px solid var(--c-accent);
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
}

/* ---------- Beats and their stage ---------- */

.c-beat {
  position: relative;
  padding: clamp(96px, 11vw, 168px) 0;
  /* Clip sideways only: light and rings may drift into the next beat, so no hard seams. */
  overflow-x: clip;
  overflow-y: visible;
}

.c-beat > .container {
  position: relative;
  z-index: 1;
}

/* Beats may bleed into each other, but nothing may stretch the page past the footer. */
.c-page main {
  overflow: clip;
}

.c-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.c-pool {
  position: absolute;
  border-radius: 50%;
}

.c-pool-rose {
  width: 980px;
  height: 760px;
  right: -160px;
  top: -140px;
  background: radial-gradient(closest-side, rgba(255, 219, 222, 0.8), rgba(255, 219, 222, 0) 72%);
}

.c-pool-mint {
  width: 1100px;
  height: 820px;
  left: calc(50% - 150px);
  top: -60px;
  background: radial-gradient(closest-side, rgba(221, 241, 234, 0.95), rgba(221, 241, 234, 0) 72%);
}

.c-pool-blue {
  width: 820px;
  height: 680px;
  left: -260px;
  bottom: -80px;
  background: radial-gradient(closest-side, rgba(219, 232, 252, 0.75), rgba(219, 232, 252, 0) 72%);
}

.c-pool-violet {
  width: 760px;
  height: 620px;
  right: -60px;
  top: 18%;
  background: radial-gradient(closest-side, rgba(221, 214, 254, 0.7), rgba(207, 250, 254, 0.3) 50%, rgba(255, 255, 255, 0) 74%);
}

.c-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(32, 39, 36, 0.055) 1.3px, transparent 1.5px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, #000 20%, transparent 78%);
  mask-image: radial-gradient(60% 60% at 50% 45%, #000 20%, transparent 78%);
}

.c-orbits {
  position: absolute;
  width: 1240px;
  height: 1240px;
  left: calc(50% - 620px);
  top: -300px;
  transform: rotate(-18deg);
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(to bottom, transparent 16%, #000 44%);
  mask-image: linear-gradient(to bottom, transparent 16%, #000 44%);
}

.c-orbits i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(160, 190, 175, 0.34);
  border-radius: 50%;
}

.c-orbits i:nth-child(2) {
  inset: 100px;
}

.c-orbits i:nth-child(3) {
  inset: 200px;
}

.c-orbits i:nth-child(4) {
  inset: 300px;
}

/* ---------- Entrance states (only before a beat plays, never when settled) ---------- */

.c-rise {
  transition:
    opacity 0.8s var(--c-ease),
    transform 0.9s var(--c-ease);
  transition-delay: calc(var(--i, 0) * 90ms + var(--c-delay, 0ms));
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-line-in {
  transform: translateY(115%);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-rise,
.js:not(.c-settled) .c-rise[data-beat]:not(.is-in) {
  opacity: 0;
  transform: translateY(28px);
}

.c-settled *,
.c-settled *::before,
.c-settled *::after {
  transition: none !important;
  animation: none !important;
}

/* ---------- Beat 1 — Pain ---------- */

.c-pain {
  min-height: calc(100svh - 82px);
  display: flex;
  align-items: center;
  padding: clamp(32px, 4vw, 56px) 0 clamp(88px, 8vw, 104px);
}

.c-pain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "ask terms"
    "title title";
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.c-pain-copy {
  display: contents;
}

.c-ask {
  grid-area: ask;
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.c-pain-title {
  grid-area: title;
  font-size: clamp(46px, 6.8vw, 100px);
}

.c-terminals {
  grid-area: terms;
  position: relative;
  height: clamp(280px, 26vw, 370px);
  perspective: 1400px;
}

.c-term {
  position: absolute;
  width: 88%;
  height: 30%;
  min-height: 96px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #16201c, #0c1310);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 80px -28px rgba(20, 45, 34, 0.5),
    0 10px 24px -12px rgba(20, 45, 34, 0.35);
  transform: rotateY(-12deg) rotateX(4deg);
  transform-origin: 80% 50%;
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.7s var(--c-ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}

.c-term-claude {
  top: 2%;
  left: 7%;
  color: #ff8a4c;
}

.c-term-codex {
  top: 36%;
  left: 12%;
  color: #6aa6ff;
}

.c-term-gemini {
  top: 70%;
  left: 0;
  color: #7cc4ff;
}

.c-term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36%;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.c-term-bar > i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.c-term-logo {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.c-term-claude .c-term-logo {
  --logo: url("providers/claude.svg");
}

.c-term-codex .c-term-logo {
  --logo: url("providers/codex.svg");
}

.c-term-gemini .c-term-logo {
  --logo: url("providers/gemini.svg");
}

.c-term-name {
  font: 500 15px/1 var(--font-mono);
  color: #93a79c;
}

.c-term-line {
  display: flex;
  align-items: center;
  height: 64%;
  padding: 0 26px;
  font: 600 clamp(22px, 2.3vw, 34px) / 1 var(--font-mono);
  color: #eef6f1;
  white-space: nowrap;
}

.c-term-prompt {
  color: #34d399;
  margin-right: 14px;
}

/* Typed one character at a time; the caret follows because the box grows. */
.c-cmd {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: calc(var(--n, 6) * 1ch);
  transition: width 0.5s steps(var(--n, 6), end);
  transition-delay: calc(0.45s + var(--i, 0) * 0.28s);
}

.c-caret {
  display: inline-block;
  width: 0.42em;
  height: 1.05em;
  margin-left: 6px;
  border-radius: 3px;
  background: #6ee7b7;
}

.c-caret-blink {
  animation: c-blink 1.1s steps(1) infinite;
}

.c-badge {
  position: absolute;
  top: -4%;
  right: 3%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: var(--c-red);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow:
    0 0 0 6px rgba(229, 72, 77, 0.14),
    0 18px 40px -12px rgba(229, 72, 77, 0.55);
  transform: rotate(-4deg);
  transition:
    transform 0.6s var(--c-spring),
    opacity 0.3s ease;
  transition-delay: 1.35s;
}

.c-badge svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-term {
  opacity: 0;
  transform: translateX(90px) rotateY(-30deg) rotateX(4deg);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-cmd {
  width: 0;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-badge {
  opacity: 0;
  transform: scale(0.35) rotate(-16deg);
}

.c-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 26px;
  height: 40px;
  margin-left: -13px;
  border: 2px solid #c6d4cb;
  border-radius: 14px;
  z-index: 1;
}

.c-scroll-cue i {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--c-accent-dark);
  animation: c-cue 1.8s var(--c-ease) infinite;
}

/* ---------- Beat 2 — Brand ---------- */

.c-brand {
  padding-top: clamp(88px, 9vw, 140px);
  padding-bottom: clamp(40px, 5vw, 72px);
  text-align: center;
}

.c-brand-inner,
.c-film-inner,
.c-end-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.c-emblem {
  position: relative;
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
}

.c-gauges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.c-gauges circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.c-gauges .c-track {
  stroke: rgba(32, 39, 36, 0.07);
}

.c-arc {
  stroke-dasharray: 100px 100px;
  transition: stroke-dashoffset 1.6s var(--c-ease) 0.25s;
}

.c-arc-green {
  stroke: var(--c-accent);
  stroke-dashoffset: 12px;
}

.c-arc-amber {
  stroke: var(--c-amber);
  stroke-dashoffset: 23px;
  transition-delay: 0.38s;
}

.c-arc-blue {
  stroke: var(--c-blue);
  stroke-dashoffset: 6px;
  transition-delay: 0.51s;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-arc {
  stroke-dashoffset: 100px;
}

.c-emblem-icon {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  border-radius: 30px;
  filter: drop-shadow(0 22px 34px rgba(20, 55, 35, 0.3)) drop-shadow(0 0 40px rgba(16, 185, 129, 0.22));
  transition:
    transform 0.9s var(--c-spring),
    opacity 0.5s ease;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-emblem-icon {
  opacity: 0;
  transform: scale(0.55);
}

.c-shock {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 3px solid var(--c-accent);
  opacity: 0;
  pointer-events: none;
}

.c-shock-amber {
  border-color: var(--c-amber);
}

.c-shock-blue {
  border-color: var(--c-blue);
}

.is-in .c-shock {
  animation: c-shock 1.3s var(--c-ease) forwards;
  animation-delay: calc(0.12s + var(--k, 0) * 0.12s);
}

.c-sparks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.7;
  transform: translate(var(--x), var(--y));
  transition:
    transform 1.3s var(--c-ease) 0.2s,
    opacity 0.9s ease 0.2s;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-sparks i {
  opacity: 0;
  transform: translate(0, 0) scale(0.2);
}

.c-hero-title {
  font-size: clamp(54px, 8.4vw, 132px);
  margin-bottom: 26px;
}

.c-brand .c-lead {
  margin-inline: auto;
}

/* Store buttons: the live markup, a little larger, as on the film's end card. */
.c-stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.c-stores-left {
  justify-content: flex-start;
}

.c-page .c-stores .store-button {
  min-height: 58px;
  padding: 10px 20px 10px 16px;
  gap: 12px;
  border-radius: 13px;
}

.c-page .c-stores .store-button-microsoft {
  background: #ffffff;
  border-color: #d8dfdb;
  box-shadow: 0 14px 30px -18px rgba(20, 55, 35, 0.35);
}

.c-page .c-stores .store-copy {
  text-align: left;
}

.c-page .c-stores .store-copy small {
  font-size: 10.5px;
}

.c-page .c-stores .store-copy strong {
  font-size: 15.5px;
}

.c-page .c-stores .apple-mark {
  font-size: 30px;
}

.c-page .c-stores .windows-mark {
  width: 22px;
  height: 22px;
}

/* The Google Play triangle reads lighter than the Apple and Microsoft marks at the same size. */
.c-page .c-stores .play-mark {
  width: 25px;
  height: 25px;
}

/* ---------- The film ---------- */

.c-film-beat {
  padding-top: 8px;
  padding-bottom: clamp(96px, 10vw, 150px);
}

.c-film-frame {
  position: relative;
  width: min(1120px, 100%);
}

.c-film-frame .film {
  position: relative;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-film-frame {
  transform: translateY(64px) scale(0.96);
}

/* ---------- Beat 3 — Notch ---------- */

.c-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.c-copy .c-title {
  margin-bottom: 26px;
}

.c-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--c-muted);
}

.c-desk-wrap {
  perspective: 1600px;
}

.c-desk {
  position: relative;
  aspect-ratio: 1050 / 780;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 25% 85%, rgba(16, 185, 129, 0.16), rgba(255, 255, 255, 0) 70%),
    radial-gradient(60% 50% at 85% 15%, rgba(56, 132, 255, 0.1), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #f1f8f4 0%, #e8f3ed 55%, #e1eee7 100%);
  border: 1px solid #dfe7e2;
  box-shadow:
    0 40px 90px -30px rgba(25, 61, 43, 0.35),
    0 12px 30px -16px rgba(25, 61, 43, 0.2);
  transform-origin: 50% 0;
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.8s var(--c-ease);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-desk {
  opacity: 0;
  transform: rotateX(16deg) translateY(60px) scale(0.96);
}

.c-menubar {
  position: absolute;
  inset: 0 0 auto;
  height: 5.2%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 3%;
  background: rgba(255, 255, 255, 0.62);
  color: var(--c-text);
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 700;
}

.c-menubar-apple {
  width: 1.05em;
  height: 1.05em;
}

.c-menubar-bars {
  display: flex;
  gap: 10px;
}

.c-menubar-bars b {
  display: block;
  width: 3.2em;
  height: 0.55em;
  border-radius: 4px;
  background: rgba(32, 39, 36, 0.14);
}

.c-menubar-bars b:first-child {
  width: 4.4em;
  background: rgba(32, 39, 36, 0.3);
}

.c-menubar-clock {
  margin-left: auto;
  color: #3d4a43;
}

.c-notch-cut {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 3;
  width: 17%;
  height: 3%;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: #0b0f0d;
}

.c-railbox {
  position: absolute;
  left: 15%;
  top: 0;
  z-index: 2;
  width: 70%;
  aspect-ratio: 624 / 130;
  transition: transform 0.8s var(--c-ease) 0.35s;
}

.c-rail {
  width: 100%;
  height: auto;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-railbox {
  transform: translateY(-104%);
}

.c-pulse {
  position: absolute;
  left: calc(var(--x) - 5.3%);
  top: 13%;
  width: 10.6%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--c);
  opacity: 0;
}

.is-in .c-pulse {
  animation: c-pulse 1.1s var(--c-ease) forwards;
  animation-delay: calc(1.25s + var(--k, 0) * 0.16s);
}

.c-detail {
  position: absolute;
  left: 16.8%;
  top: 23.3%;
  z-index: 1;
  width: 66.3%;
  height: auto;
  filter: drop-shadow(0 26px 40px rgba(25, 61, 43, 0.22));
  transform-origin: 50% 0;
  transition:
    transform 0.8s var(--c-ease) 0.85s,
    opacity 0.5s ease 0.85s;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-detail {
  opacity: 0;
  transform: translateY(-4%) scale(0.94);
}

/* ---------- Beat 4 — Skins ---------- */

.c-skins {
  text-align: center;
}

.c-skins-title {
  margin: 0 auto clamp(44px, 5vw, 76px);
}

.c-skins-grad {
  background: linear-gradient(92deg, #202724 0%, #202724 42%, #7c3aed 74%, #0e7490 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.c-fan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 40px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  perspective: 1800px;
}

.c-skin {
  position: relative;
  margin: 0;
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.7s var(--c-ease);
  transition-delay: calc(0.2s + var(--i, 0) * 110ms);
}

.c-skin img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--c-card);
}

.c-skin-classic {
  transform: rotate(-3deg) translateY(30px);
}

.c-skin-calm {
  z-index: 2;
  transform: translateY(-6px);
}

.c-skin-vivid {
  transform: rotate(3deg) translateY(30px);
}

.c-skin-vivid img {
  box-shadow:
    0 40px 90px -30px rgba(76, 29, 149, 0.35),
    0 0 0 1px rgba(196, 181, 253, 0.7),
    0 0 70px -10px rgba(139, 92, 246, 0.45);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-skin-classic {
  opacity: 0;
  transform: translateX(70%) scale(0.9);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-skin-calm {
  opacity: 0;
  transform: translateY(50px) scale(0.94);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-skin-vivid {
  opacity: 0;
  transform: translateX(-70%) scale(0.9);
}

.c-skin-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px 18px;
  border: 1px solid #dae7df;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(20, 55, 35, 0.25);
  color: var(--c-text);
  font-size: 16px;
  font-weight: 800;
}

.c-skin-name i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

.c-skin-name .c-dot-vivid {
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
}

/* ---------- Beat 5 — Analytics ---------- */

.c-split-analytics {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.c-count {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 30px;
}

.c-count-tag {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(32, 39, 36, 0.06);
  color: var(--c-muted);
  font: 800 20px/1 var(--font-sans);
}

.c-count-num {
  color: var(--c-text);
  font: 800 clamp(64px, 7vw, 112px) / 1 var(--font-sans);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.c-many {
  display: inline-flex;
  margin-top: 26px;
  padding: 8px 16px;
  border: 1px solid #bfe3cf;
  border-radius: 999px;
  background: #e8f5ee;
  color: var(--c-accent-dark);
  font-size: 15px;
  font-weight: 800;
}

.c-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(8, 52px);
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
}

.c-tiles li {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--c-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 10px 22px -12px rgba(20, 55, 35, 0.3);
  transition:
    transform 0.7s var(--c-spring),
    opacity 0.5s ease;
  transition-delay: calc(0.75s + var(--i, 0) * 45ms);
}

.c-tiles img {
  width: 26px;
  height: 26px;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-tiles li {
  opacity: 0;
  transform: translate(60px, -30px) scale(0.3) rotate(-70deg);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-tiles li:nth-child(even) {
  transform: translate(60px, -30px) scale(0.3) rotate(70deg);
}

.c-dash-wrap {
  perspective: 1800px;
}

.c-dash {
  max-width: 500px;
  margin: 0 0 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 40px 90px -30px rgba(25, 61, 43, 0.38),
    0 0 0 1px var(--c-border);
  transform: rotateY(-7deg) rotateX(2deg);
  transition:
    transform 1.2s var(--c-ease),
    opacity 0.8s var(--c-ease);
}

.c-dash img {
  width: 100%;
  height: auto;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-dash {
  opacity: 0;
  transform: translateY(80px) rotateY(-22deg) rotateX(14deg);
}

.c-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  margin-top: clamp(64px, 8vw, 112px);
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: 28px;
  background: #ffffff;
  box-shadow:
    0 40px 90px -34px rgba(25, 61, 43, 0.25),
    0 0 0 1px var(--c-border);
}

.c-rank .c-pill {
  margin-bottom: 18px;
}

.c-rank-title {
  font-size: clamp(30px, 3.3vw, 48px);
}

.c-rank-body {
  max-width: 30em;
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1.8;
}

/* ---------- Beat 6 — Mobile ---------- */

.c-split-mobile {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.c-features {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.c-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--c-text);
  font-size: 16px;
  font-weight: 700;
}

.c-features li > span:first-child {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e8f5ee;
  color: var(--c-accent-dark);
  font-weight: 800;
}

.c-phones {
  position: relative;
  height: clamp(440px, 44vw, 640px);
  perspective: 1800px;
}

.c-phones-glow,
.c-lock-glow {
  position: absolute;
  inset: 4% -6% -6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.18), rgba(56, 132, 255, 0.07) 55%, rgba(255, 255, 255, 0) 78%);
}

.c-phone {
  position: absolute;
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.8s var(--c-ease);
}

.c-phone-iphone {
  left: 4%;
  top: 0;
  width: 44%;
  height: auto;
  filter: drop-shadow(0 34px 44px rgba(25, 61, 43, 0.28));
  transform: rotateY(8deg);
  transition-delay: 0.15s;
}

.c-phone-android {
  right: 0;
  top: 22%;
  width: 52%;
  filter: drop-shadow(0 30px 40px rgba(25, 61, 43, 0.24));
  transform: rotateY(-8deg);
  transition-delay: 0.32s;
}

.c-phone-android img {
  width: 100%;
  height: auto;
  clip-path: inset(1% 4.2% 0 3.5% round 9.5% 9.5% 0 0);
  -webkit-mask-image: linear-gradient(#000 76%, transparent 100%);
  mask-image: linear-gradient(#000 76%, transparent 100%);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-phone-iphone {
  opacity: 0;
  transform: translateY(140px) rotateX(24deg) rotateY(18deg);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-phone-android {
  opacity: 0;
  transform: translateY(140px) rotateX(24deg) rotateY(-18deg);
}

.c-split-lock {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  margin-top: clamp(96px, 11vw, 160px);
}

.c-split-lock .c-title {
  font-size: clamp(40px, 5vw, 72px);
}

.c-lock {
  position: relative;
  width: min(400px, 100%);
  margin: 0 auto;
  transition:
    transform 1s var(--c-spring),
    opacity 0.6s ease;
}

.c-lock img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 40px 50px rgba(25, 61, 43, 0.32));
}

.c-la-ring {
  position: absolute;
  left: 0.2%;
  top: 37.8%;
  width: 99.4%;
  height: 33.3%;
  border: 3px solid var(--c-accent);
  border-radius: 22px;
  box-shadow:
    0 0 0 6px rgba(16, 185, 129, 0.14),
    0 16px 40px -12px rgba(16, 185, 129, 0.5);
  transition:
    transform 0.6s var(--c-ease) 0.7s,
    opacity 0.5s ease 0.7s;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-lock {
  opacity: 0;
  transform: translateY(50px) scale(0.84);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-la-ring {
  opacity: 0;
  transform: scale(1.08);
}

/* ---------- Windows — tray dashboard and desktop widgets ---------- */

.c-split-windows {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.c-win {
  position: relative;
  min-height: clamp(460px, 46vw, 660px);
  perspective: 1800px;
}

.c-win figure {
  margin: 0;
}

.c-win img {
  display: block;
  width: 100%;
  height: auto;
}

.c-win-panel {
  position: absolute;
  top: 0;
  left: 6%;
  width: 62%;
  border-radius: 18px;
  overflow: hidden;
  background: #f3f3f3;
  box-shadow:
    0 40px 90px -30px rgba(25, 61, 43, 0.38),
    0 0 0 1px var(--c-border);
  transform: rotateY(7deg);
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.8s var(--c-ease);
}

.c-win-panel img {
  -webkit-mask-image: linear-gradient(#000 82%, transparent 100%);
  mask-image: linear-gradient(#000 82%, transparent 100%);
}

/* Widgets are shown on the dark desktop they were captured on. */
.c-win-chip {
  position: absolute;
  right: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow:
    0 30px 60px -24px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  transition:
    transform 1.1s var(--c-ease),
    opacity 0.8s var(--c-ease);
}

.c-win-circles {
  top: 16%;
  width: 46%;
  transition-delay: 0.18s;
}

.c-win-bars {
  top: 50%;
  width: 50%;
  background: #0c0c0c;
  transition-delay: 0.32s;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-win-panel {
  opacity: 0;
  transform: translateY(100px) rotateX(18deg) rotateY(16deg);
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-win-chip {
  opacity: 0;
  transform: translateX(60px) translateY(40px) scale(0.9);
}

/* ---------- Beat 7 — Privacy and the end card ---------- */

.c-privacy {
  padding: clamp(40px, 5vw, 72px) 0;
}

.c-privacy-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 28px;
  background: #ffffff;
  box-shadow:
    0 40px 90px -34px rgba(25, 61, 43, 0.22),
    0 0 0 1px var(--c-border);
}

.c-privacy-title {
  font-size: clamp(34px, 4vw, 58px);
}

.c-privacy-body > p {
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1.8;
}

.c-ledger {
  margin: 22px 0 24px;
  font-size: 15px;
}

.c-ledger > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
}

.c-ledger > div > span {
  color: var(--c-muted);
}

.c-ledger strong {
  display: flex;
  gap: 8px;
  color: #355244;
  font-weight: 700;
  text-align: right;
}

.c-privacy .text-link {
  font-size: 14px;
}

.c-end {
  padding: clamp(104px, 12vw, 180px) 0 clamp(96px, 11vw, 160px);
  text-align: center;
}

.c-pool-end {
  width: 1240px;
  height: 1000px;
  left: calc(50% - 620px);
  top: -160px;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.2), rgba(221, 241, 234, 0.7) 45%, rgba(255, 255, 255, 0) 78%);
}

.c-orbits-end {
  top: -330px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 16%, #000 42%, #000 60%, transparent 86%);
  mask-image: linear-gradient(to bottom, transparent 16%, #000 42%, #000 60%, transparent 86%);
}

.c-end-emblem {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 20px;
}

.c-end-emblem img {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  border-radius: 29px;
  filter: drop-shadow(0 22px 34px rgba(20, 55, 35, 0.28)) drop-shadow(0 0 40px rgba(16, 185, 129, 0.2));
  transition:
    transform 0.8s var(--c-ease),
    opacity 0.5s ease;
}

.c-end-emblem .c-shock {
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
}

.js:not(.c-settled) [data-beat]:not(.is-in) .c-end-emblem img {
  opacity: 0;
  transform: scale(1.7);
}

.c-wordmark {
  margin-bottom: 26px;
  color: var(--c-text);
  font: 800 30px/1.1 var(--font-sans);
  letter-spacing: -0.03em;
}

.c-end-title {
  font-size: clamp(46px, 7.2vw, 116px);
}

.c-end .c-stores {
  margin-top: 40px;
}

.c-site {
  margin-top: 28px;
  color: var(--c-accent-dark);
  font-size: 20px;
  font-weight: 700;
}

.c-site:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Motion loops ---------- */

@keyframes c-blink {
  50% {
    opacity: 0;
  }
}

@keyframes c-cue {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 0;
  }
}

@keyframes c-shock {
  0% {
    opacity: 0.9;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(2.8);
  }
}

@keyframes c-pulse {
  0% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

/* ---------- Layout breakpoints ---------- */

@media (max-width: 1100px) {
  .c-tiles {
    grid-template-columns: repeat(8, 46px);
    gap: 10px;
  }

  .c-tiles li {
    width: 46px;
    height: 46px;
  }
}

/* Six section links no longer fit beside the language picker and Download button below about
   1000px in longer languages (Ukrainian, German). Use the narrow header from that width. */
@media (max-width: 1000px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 850px) {
  .c-pain-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "ask"
      "title"
      "terms";
  }

  .c-split,
  .c-split-analytics,
  .c-split-mobile,
  .c-split-windows,
  .c-split-lock,
  .c-rank,
  .c-privacy-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .c-split-lock .c-copy {
    order: -1;
  }

  .c-dash {
    margin: 0 auto;
    transform: none;
  }

  .c-rank {
    align-items: start;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .c-beat {
    padding: 76px 0;
  }

  .c-pain {
    min-height: calc(100svh - 68px);
    padding: 28px 0 88px;
  }

  .c-ask {
    font-size: 27px;
  }

  .c-pain-title {
    font-size: 48px;
  }

  .c-terminals {
    height: 272px;
    margin-top: 8px;
  }

  .c-term {
    width: 90%;
    min-height: 0;
    border-radius: 16px;
  }

  .c-term-claude {
    left: 0;
  }

  .c-term-codex {
    left: 9%;
  }

  .c-term-gemini {
    left: 3%;
  }

  .c-term-bar {
    padding: 0 12px;
    gap: 6px;
  }

  .c-term-bar > i {
    width: 8px;
    height: 8px;
  }

  .c-term-name {
    font-size: 12px;
  }

  .c-term-line {
    padding: 0 16px;
    font-size: 22px;
  }

  .c-badge {
    top: -7%;
    right: 0;
    height: 40px;
    padding: 0 14px 0 11px;
    gap: 7px;
    font-size: 15px;
  }

  .c-badge svg {
    width: 18px;
    height: 18px;
  }

  .c-emblem {
    width: 200px;
    height: 200px;
  }

  .c-emblem-icon {
    width: 108px;
    height: 108px;
    border-radius: 25px;
  }

  .c-hero-title {
    font-size: 54px;
  }

  .c-title {
    font-size: 42px;
  }

  .c-lead {
    font-size: 17px;
  }

  .c-pill {
    font-size: 13px;
  }

  .c-stores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
  }

  .c-page .c-stores .store-button {
    justify-content: flex-start;
    min-height: 56px;
    padding: 9px 12px;
    gap: 10px;
  }

  .c-page .c-stores .store-copy strong {
    font-size: 14px;
  }

  .c-film-beat {
    padding-top: 0;
  }

  .film {
    border-radius: 18px;
  }

  .film-controls {
    right: 10px;
    bottom: 10px;
  }

  .film-button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  .c-desk {
    border-radius: 16px;
  }

  .c-fan {
    display: flex;
    justify-content: center;
    gap: 0;
  }

  .c-skin {
    flex: 0 0 50%;
    margin: 0 -12%;
  }

  .c-skin-classic {
    transform: rotate(-6deg) translateY(26px);
  }

  .c-skin-vivid {
    transform: rotate(6deg) translateY(26px);
  }

  .c-skin img {
    border-radius: 14px;
  }

  .c-skin-name {
    margin-top: 16px;
    padding: 6px 10px;
    gap: 6px;
    font-size: 12px;
  }

  .c-skin-name i {
    width: 8px;
    height: 8px;
  }

  .c-count-num {
    font-size: 64px;
  }

  .c-tiles {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 10px;
  }

  .c-tiles li {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 13px;
  }

  .c-tiles img {
    width: 22px;
    height: 22px;
  }

  .c-phones {
    height: 470px;
  }

  .c-win {
    min-height: 0;
    height: 400px;
  }

  .c-win-panel {
    left: 0;
    width: 70%;
  }

  .c-win-circles {
    width: 52%;
  }

  .c-win-bars {
    width: 58%;
  }

  .c-phone-iphone {
    width: 56%;
    left: 0;
  }

  .c-phone-android {
    width: 58%;
    top: 26%;
  }

  .c-lock {
    width: 86%;
  }

  .c-la-ring {
    border-radius: 16px;
  }

  .c-rank,
  .c-privacy-card {
    border-radius: 22px;
  }

  .c-ledger > div {
    flex-direction: column;
    gap: 6px;
  }

  .c-ledger strong {
    text-align: left;
  }

  .c-end-title {
    font-size: 46px;
  }

  .c-wordmark {
    font-size: 26px;
  }
}
