/* Opening sequence for the JarvQuant 2.0 launch (intro.js) and the 2.0 chip in the hero.
   Only the start page loads this file. Nothing here applies unless the inline script in
   index.html set html.intro-on, which it never does under prefers-reduced-motion. */

/* The 2.0 chip stays in the hero for everyone, with or without the intro. */
.eyebrow { flex-wrap: wrap; }
.v2-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid rgba(51,198,227,.45); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 11px; letter-spacing: .06em; }

/* Curtain from the first paint until intro.js takes over; the header (z-index 50) stays above it.
   The hero's own entrance waits underneath and starts when the curtain lifts. */
html.intro-on body::before { content: ""; position: fixed; inset: 0; z-index: 40; background: var(--bg); }
html.intro-on .split-words .w > span, html.intro-on .fade-in { animation-play-state: paused; }

.intro { --pad: max(20px, calc((100vw - 1200px) / 2 + 28px)); position: fixed; inset: 0; z-index: 41; overflow: hidden; cursor: pointer; }
.intro-stage, .intro-bg { position: absolute; inset: 0; }
.intro-bg { background: var(--bg); }
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro-skip {
  position: absolute; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); height: 38px; padding: 0 16px;
  border: 1px solid #3a4352; border-radius: var(--radius-sm); background: rgba(12,14,18,.8);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); cursor: pointer;
}
.intro-skip:hover { color: var(--text); border-color: #4a5464; }

.ik-pre, .ik-card, .ik-more { position: absolute; inset: 0; opacity: 0; padding: 72px var(--pad) 72px; }
.ik-pre { display: flex; flex-direction: column; justify-content: center; }
.ik-pre .old { position: relative; align-self: flex-start; font-size: min(50vh, 40vw); font-weight: 650; line-height: .86; letter-spacing: -0.05em; color: #2f3743; transform-origin: 0 60%; }
.ik-pre .old i { position: absolute; left: -5%; right: -5%; top: 50%; height: .09em; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.ik-pre p { margin: 3vh 0 0; font-size: clamp(30px, 5.4vw, 80px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.02; }

.ik-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 5vw; }
.ik-text { container-type: inline-size; min-width: 0; }
/* --n is the number of characters, so "16" and "GRATIS" both fill their column. */
.ik-card .big { font-size: min(44vh, calc(46vw / (var(--n) * .72))); font-size: min(46vh, calc(100cqw / (var(--n) * .71))); font-weight: 650; line-height: .86; letter-spacing: -0.055em; color: var(--accent); transform-origin: 0 100%; white-space: nowrap; }
.ik-card .line { margin-top: 1.8vh; font-size: clamp(30px, 5.2vw, 78px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.02; }
.ik-card .punch { margin-top: 2.6vh; display: inline-block; padding: .28em .6em; border-radius: 8px; background: var(--text); color: var(--bg); font-size: clamp(18px, 2.3vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; opacity: 0; }
.ik-art { justify-self: end; width: min(100%, 620px); }
.ik-art svg { width: 100%; height: auto; display: block; padding: 20px; border: 1px solid var(--border-strong); border-radius: 16px; background: rgba(12,14,18,.92); }
.ik-art .s { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ik-art .f { opacity: 0; }
.ik-art .rows { display: grid; gap: 10px; }
.ik-art .row { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; padding: 16px 20px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-family: var(--mono); font-size: clamp(14px, 1.6vw, 21px); color: var(--text-2); }
.ik-art .row b { font-weight: 600; }
.ik-art .pos { color: var(--bull); }
.ik-art .neg { color: var(--bear); }

.ik-more { padding: 0; }
.ik-wall { position: absolute; inset: 0; display: flex; gap: 3vw; padding: 0 var(--pad); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 64px, #000 140px); mask-image: linear-gradient(180deg, transparent 0, transparent 64px, #000 140px); }
.ik-wall .col { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; height: max-content; font-family: var(--mono); font-size: 14px; line-height: 2.6; letter-spacing: .05em; text-transform: uppercase; color: rgba(232,235,240,.34); white-space: nowrap; }
.ik-wall .col:nth-child(even) { color: rgba(51,198,227,.5); }
.ik-more p { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 var(--pad); }
.ik-more p span { padding: .12em .4em .18em; background: var(--bg); box-shadow: 0 0 0 1px var(--border-strong); border-radius: 12px; font-size: clamp(28px, 5.2vw, 78px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.06; }

.ik-fin { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; padding: 0 16px; }
.ik-fin b { display: block; opacity: 0; font-size: clamp(28px, 4.6vw, 60px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.05; }
.ik-fin span { display: block; opacity: 0; margin-top: 12px; font-size: clamp(15px, 1.9vw, 26px); font-weight: 500; color: var(--text); }

.ik-prog { position: absolute; left: 50%; bottom: calc(41px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 6px; width: min(360px, 40vw); }
.ik-prog i { flex: 1; height: 3px; border-radius: 2px; background: var(--border-strong); overflow: hidden; }
.ik-prog b { display: block; height: 100%; background: var(--text); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 700px) {
  .ik-card { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 4vh; }
  .ik-card .big { font-size: min(26vh, calc((100vw - 2 * var(--pad)) / (var(--n) * .7))); font-size: min(26vh, calc(100cqw / (var(--n) * .68))); }
  .ik-art { justify-self: start; width: min(100%, 320px); }
  .ik-art svg { padding: 12px; border-radius: 12px; }
  .ik-art .rows { gap: 6px; }
  .ik-art .row { padding: 9px 12px; }
  .ik-wall .col { font-size: 11px; }
  .ik-pre .old { font-size: min(40vh, 62vw); }
  .ik-prog { left: 16px; transform: none; width: calc(100vw - 236px); min-width: 90px; }
  .intro-skip { right: 16px; }
}
/* Small phones: the text alone, so nothing collides with the controls at the bottom. */
@media (max-width: 700px) and (max-height: 700px) { .ik-art { display: none; } }
