/* =========================================================================
   SiteViza — stylesheet
   Design system: deep near-black background, single electric-blue accent,
   Manrope (display) + Inter (body) + JetBrains Mono (data/numbers).
   Mobile-first: base styles target ~360-430px phones, breakpoints scale up.
   ========================================================================= */

/* ---------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg: #06080b;
  --bg-elevated: #0d1218;
  --bg-card: #10161d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #f3f5f7;
  --text-dim: #9aa7b3;
  --text-faint: #7a8794; /* kept >= 4.5:1 contrast on --bg and --bg-card for AA */

  /* Accent: Electric Ice Blue */
  --accent: #3a8dff;
  --accent-2: #7fc4ff;
  --accent-contrast: #04121f;

  /* Semantic */
  --up: #4fd68a;
  --down: #ff6b6b;

  /* Type */
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --container-w: 1160px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --gutter: clamp(20px, 6vw, 32px);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* ---------------------------------------------------------------------
   2. Reset
   --------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle film-grain wash for a premium editorial finish. Fixed, non
   interactive, sits above backgrounds but below nothing that needs
   interaction (pointer-events: none). Skipped entirely for users who
   asked for reduced motion/transparency-sensitive setups is unnecessary
   since it is static, but kept extremely low-opacity regardless. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, p, blockquote, figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------------
   3. Typography helpers
   --------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
  display: block;
}

.eyebrow.center {
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.section__lede {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: clamp(15px, 2vw, 17px);
  max-width: 56ch;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 3px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.link-arrow span {
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover span {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------------
   4. Reveal-on-scroll
   --------------------------------------------------------------------- */
/* Safe by default: content is fully visible without JavaScript. The
   fade-in/slide-up treatment is only switched on once script.js confirms
   IntersectionObserver support and adds "js-reveal" to <html> — see
   setupScrollReveal() in script.js. This keeps the page fully readable
   for no-JS browsers, crawlers and any script failure. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

html.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-2);
}

.btn--accent:active {
  transform: scale(0.98);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-2);
}

.btn--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------------------------------------------------------------------
   6. Header / Nav
   --------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: rgba(6, 8, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
}

.main-nav {
  display: none;
  gap: 28px;
  margin-inline: auto;
  font-size: 14px;
  color: var(--text-dim);
}

.main-nav a {
  transition: color 0.2s var(--ease);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

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

@media (min-width: 860px) {
  .main-nav {
    display: flex;
  }
  .nav-cta {
    margin-left: 0;
  }
}

/* ---------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(96px, 14vh, 140px) clamp(64px, 10vh, 96px);
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100svh;
}

.hero__field {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
}

/* A thin, quiet strip of market symbols — dosed market-data texture at
   the very top of the first screen, styled as interface typography
   (mono, faint), not as a trading-terminal widget. Purely decorative
   (aria-hidden): illustrative of "a market is open somewhere", not a
   live feed. Scrolls at a slow, barely-there pace; the marquee content
   is duplicated once so translateX(-50%) loops seamlessly. */
.market-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.market-strip__track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 9px var(--gutter);
  animation: market-scroll 42s linear infinite;
  will-change: transform;
}

.market-strip__item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.market-strip__sym {
  color: var(--text-faint);
}

.market-strip__val {
  color: var(--text-dim);
}

.market-strip__val.is-up {
  color: var(--up);
}

.market-strip__val.is-down {
  color: var(--down);
}

@keyframes market-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-strip__track {
    animation: none;
  }
}

@media (min-width: 860px) {
  .market-strip__item {
    font-size: 11px;
  }
}

/* Atmosphere: soft drifting colour blooms standing in for real photography
   (night-city bokeh / screen glow) — pure CSS, no images. Sits behind the
   grid so the grid still reads as a crisp technical layer on top. */
.hero__atmosphere {
  position: absolute;
  inset: -10%;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.7;
  background:
    radial-gradient(220px 220px at 15% 22%, rgba(58, 141, 255, 0.35), transparent 70%),
    radial-gradient(280px 280px at 88% 12%, rgba(127, 196, 255, 0.22), transparent 70%),
    radial-gradient(320px 320px at 72% 82%, rgba(58, 141, 255, 0.18), transparent 70%),
    radial-gradient(200px 200px at 22% 88%, rgba(255, 255, 255, 0.05), transparent 70%);
  animation: atmosphere-drift 26s ease-in-out infinite alternate;
}

@keyframes atmosphere-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__atmosphere {
    animation: none;
  }
}

.hero__grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 78% 22%, black 5%, transparent 62%);
  -webkit-mask-image: radial-gradient(ellipse at 78% 22%, black 5%, transparent 62%);
}

/* Soft vignette for depth — grounds the grid texture at the edges. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 0%, var(--bg) 96%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 56px;
  }
}

.hero__copy {
  max-width: 620px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.hero__meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  animation: window-blink 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero__meta-dot {
    animation: none;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 8.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero__subtitle {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--text-dim);
  max-width: 52ch;
  margin-bottom: 28px;
}

/* ---------------------------------------------------------------------
   7b. Hero visual — an editorial figure/caption, not app or terminal
   chrome. The same .figure component is reused for the results panel
   further down the page, tying the visual system together without
   reading as trading software.
   --------------------------------------------------------------------- */
.hero__signature {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 17px);
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.hero__signature-underline {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 2px;
  overflow: visible;
}

.hero__signature-underline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}

.figure {
  margin: 0;
}

.figure__frame {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.65);
}

.figure__caption {
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.figure__index {
  color: var(--accent-2);
  flex: 0 0 auto;
}

.hero__frame {
  padding: 20px;
  aspect-ratio: 16 / 11;
}

.hero__visual {
  position: relative;
  perspective: 1200px;
  /* Its own composition on mobile: the visual leads, copy follows —
     not just a shrunk desktop layout. Reset to source order on desktop
     where the two-column grid already places it on the right. */
  order: -1;
}

@media (min-width: 960px) {
  .hero__visual {
    order: 0;
  }
}

/* Soft glow behind the card, as if the "screen" is lighting the dark
   room around it. */
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(58, 141, 255, 0.28), transparent 70%);
  filter: blur(40px);
}

.hero__visual .figure__frame {
  transition: transform 0.35s var(--ease);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.hero-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-chart__grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.candle {
  fill: none;
  stroke: none;
}

rect.candle {
  fill: currentColor;
}

line.candle {
  stroke: currentColor;
  stroke-width: 1.5;
}

.candle--up {
  color: var(--up);
}

.candle--down {
  color: var(--down);
}

.hero-chart__now-line {
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.hero-chart__now circle {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(58, 141, 255, 0.8));
  transform-origin: 486px 100px;
  animation: chart-now-pulse 2.4s ease-in-out infinite;
}

@keyframes chart-now-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-chart__now circle {
    animation: none;
  }
}

.hero-chart__now-pill {
  fill: var(--accent);
}

.hero-chart__now-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  fill: var(--accent-contrast);
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   8. Subscribe form
   --------------------------------------------------------------------- */
.subscribe-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 6px;
  border-radius: var(--radius-m);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

/* Branded, terminal-style input rather than a generic HTML field: a
   mono "prompt" prefix and a focus glow instead of the default outline. */
.subscribe-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(58, 141, 255, 0.16);
}

.subscribe-form__prefix {
  flex: 0 0 auto;
  padding-left: 10px;
  font-family: var(--font-mono);
  color: var(--accent-2);
}

.subscribe-form--center {
  margin-inline: auto;
}

.subscribe-form__input {
  flex: 1 1 200px;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 12px 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
}

.subscribe-form__input:focus {
  outline: none;
}

.subscribe-form__input::placeholder {
  color: var(--text-faint);
  font-family: var(--font-body);
}

.subscribe-form__submit {
  flex: 0 0 auto;
  position: relative;
}

.subscribe-form.is-loading .btn__label {
  visibility: hidden;
}

.btn__spinner {
  display: none;
}

.subscribe-form.is-loading .btn__spinner {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 18, 31, 0.35);
  border-top-color: var(--accent-contrast);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.subscribe-form__status {
  flex-basis: 100%;
  margin: 2px 8px 4px;
  font-size: 13px;
  min-height: 0;
}

.subscribe-form__status[data-state="success"] {
  color: var(--up);
}

.subscribe-form__status[data-state="error"] {
  color: var(--down);
}

.subscribe-form__hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-faint);
}

.final-cta .subscribe-form__hint {
  text-align: center;
}

/* ---------------------------------------------------------------------
   9. Scroll cue
   --------------------------------------------------------------------- */
.scroll-cue {
  position: absolute;
  bottom: clamp(14px, 3vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent-2);
  border-radius: 2px;
  animation: cue-move 1.8s ease-in-out infinite;
}

@keyframes cue-move {
  0%, 100% { top: 6px; opacity: 1; }
  60% { top: 18px; opacity: 0.3; }
}

@media (max-width: 640px) {
  .scroll-cue {
    display: none;
  }
}

/* ---------------------------------------------------------------------
   10. Sections
   --------------------------------------------------------------------- */
.section {
  position: relative;
  padding-block: clamp(56px, 10vh, 108px);
}

.section--muted {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02) 10%, rgba(255, 255, 255, 0.02) 90%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--compact {
  padding-block: clamp(40px, 6vh, 64px);
}

/* Manifesto — an atmospheric full-bleed statement between the hero and
   the content sections. Deliberately quiet: no cards, no data, just one
   confident line of type and a soft glow. */
.section--manifesto {
  padding-block: clamp(88px, 16vh, 160px);
  overflow: hidden;
  text-align: center;
}

.manifesto__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(480px 320px at 50% 40%, rgba(58, 141, 255, 0.14), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.manifesto__inner {
  max-width: 760px;
}

.manifesto__statement {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4.6vw, 46px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}

.manifesto__accent {
  color: var(--text);
  display: inline-block;
}

.manifesto__sub {
  margin-top: 24px;
  color: var(--text-faint);
  font-size: 15px;
  max-width: 52ch;
  margin-inline: auto;
}

/* Oversized faint index numeral — an editorial-magazine "feature number"
   used to give the page dramaturgy (01 Манифест, 02 Видео, 03 Доказательство,
   04 Автор). Purely decorative, sits behind the section content. */
.section > .container {
  position: relative;
  z-index: 1;
}

.section__index {
  position: absolute;
  top: -0.06em;
  right: var(--gutter);
  z-index: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(72px, 16vw, 200px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

@keyframes window-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ---------------------------------------------------------------------
   11. YouTube — a "latest video" invitation card, not a real embed.
   No video ID, no thumbnail fetch, no fabricated content: just an
   honest, well-designed placeholder that sends visitors to the channel.
   --------------------------------------------------------------------- */
.media-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .media-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: 56px;
  }
}

.media-grid__tagline {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.video-card {
  display: block;
  margin-top: 0;
  border-radius: var(--radius-l);
  padding: 8px;
  background: linear-gradient(155deg, rgba(58, 141, 255, 0.28), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-strong);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

.video-card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-l) - 6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 22%, rgba(58, 141, 255, 0.22), transparent 55%),
    linear-gradient(160deg, var(--bg-elevated), var(--bg-card));
}

/* Faint scanlines — reads as "screen", ties into the media/terminal
   language used elsewhere on the page. */
.video-card__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
}

.video-card__icon {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__icon::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: video-icon-pulse 2.6s var(--ease) infinite;
}

@keyframes video-icon-pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  70%, 100% { transform: scale(1.18); opacity: 0; }
}

.video-card__icon svg {
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .video-card__icon::before {
    animation: none;
    display: none;
  }
}

/* ---------------------------------------------------------------------
   12. Results
   --------------------------------------------------------------------- */
.proof-highlight {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.proof-highlight__number {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.proof-highlight__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent-2);
}

.proof-highlight__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  line-height: 1.5;
}

.proof-spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 44px;
  padding-bottom: 2px;
}

.proof-spark__bar {
  width: 6px;
  border-radius: 2px 2px 0 0;
  background: var(--text-faint);
  opacity: 0.4;
}

.proof-spark__bar--up {
  background: var(--up);
  opacity: 0.85;
}

.proof-spark__bar--down {
  background: var(--down);
  opacity: 0.85;
}

@media (max-width: 640px) {
  .proof-highlight {
    align-items: flex-start;
  }
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.demo-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.current-week {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.results-window {
  margin-top: 28px;
}

.results-window .figure__frame {
  padding: 4px;
}

.stat {
  background: var(--bg-card);
  padding: 22px 20px;
}

.stat__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  font-variant-numeric: tabular-nums;
}

.stat__value--up {
  color: var(--up);
}

.stat__value--down {
  color: var(--down);
}

@media (min-width: 640px) {
  .current-week {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .current-week {
    grid-template-columns: repeat(6, 1fr);
  }
}

.archive__title {
  margin-top: 56px;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3vw, 22px);
}

/* Deliberately NOT boxed like a spreadsheet: no outer border/background,
   generous row height, a soft accent tick on each row instead of a full
   grid — reads as an editorial ledger, not Excel. */
.archive__scroll {
  margin-top: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.archive__table {
  min-width: 560px;
  font-size: 14px;
}

.archive__table th,
.archive__table td {
  text-align: left;
  padding: 16px 20px;
  white-space: nowrap;
}

.archive__table th:first-child,
.archive__table td:first-child {
  padding-left: 4px;
}

.archive__table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}

.archive__table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s var(--ease);
}

.archive__table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.archive__table tbody tr:last-child {
  border-bottom: 0;
}

.archive__table td {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.archive__table td:first-child {
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: inset 3px 0 0 0 var(--border-strong);
}

.archive__table tbody tr.is-up td:first-child {
  box-shadow: inset 3px 0 0 0 var(--up);
}

.archive__table tbody tr.is-down td:first-child {
  box-shadow: inset 3px 0 0 0 var(--down);
}

.result-cell--up {
  color: var(--up) !important;
}

.result-cell--down {
  color: var(--down) !important;
}

/* ---------------------------------------------------------------------
   13. Process — an editorial numbered list (ghost numerals + a
   connecting hairline), not a grid of equal software-style cards.
   --------------------------------------------------------------------- */
.process-list {
  margin-top: 44px;
}

.process-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 5vw, 48px);
  padding-block: 30px;
  border-top: 1px solid var(--border);
  transition: transform 0.3s var(--ease);
}

.process-item:last-child {
  border-bottom: 1px solid var(--border);
}

.process-item:hover {
  transform: translateX(6px);
}

.process-item__index {
  flex: 0 0 auto;
  width: 64px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1;
  color: var(--text);
  opacity: 0.16;
}

.process-item__body h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 700;
  margin-bottom: 8px;
}

.process-item__body p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 56ch;
}

/* ---------------------------------------------------------------------
   14. About / personal brand
   --------------------------------------------------------------------- */
/* The About section breaks out of the container entirely: the portrait
   bleeds edge-to-edge as a real photographic panel, not a bordered card
   sitting beside a text column. Safe because html has overflow-x:hidden. */
.about {
  padding-block: 0;
}

.about__stage {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  display: grid;
}

.about__content {
  position: relative;
  z-index: 2;
  padding: clamp(64px, 11vh, 108px) var(--gutter);
}

.about__portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
}

@media (min-width: 860px) {
  .about__stage {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 46%);
    align-items: stretch;
  }

  .about__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
    padding-left: max(var(--gutter), calc((100vw - var(--container-w)) / 2 + var(--gutter)));
    padding-right: clamp(40px, 6vw, 80px);
  }

  .about__portrait {
    aspect-ratio: auto;
  }
}

/* Standing in for a real photo: a rim-lit profile silhouette, not a
   "photo missing" box. Deliberately full-bleed and unbordered so it
   reads as photography laid into the page, not a UI avatar card.
   Swapped out automatically for a real <img> once config.js sets
   portraitUrl (script.js replaces this whole <figure>'s contents). */
.portrait-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 82% 22%, rgba(74, 140, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 90%, rgba(127, 196, 255, 0.07), transparent 60%),
    linear-gradient(165deg, var(--bg-elevated), var(--bg-card) 70%);
}

.portrait-silhouette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-silhouette__glow {
  stroke: var(--accent-2);
  stroke-width: 10;
  stroke-opacity: 0.2;
  filter: blur(6px);
}

.portrait-silhouette__rim {
  stroke: #bfe0ff;
  stroke-width: 1.6;
  stroke-opacity: 0.75;
}

/* Fades the full-bleed panel into the section background at the bottom
   so it integrates with the page rather than ending in a hard edge. */
.portrait-scene__vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 8, 11, 0.88) 100%);
  pointer-events: none;
}

@media (min-width: 860px) {
  .portrait-scene__vignette {
    background: linear-gradient(100deg, rgba(6, 8, 11, 0.5) 0%, transparent 22%), linear-gradient(180deg, transparent 70%, rgba(6, 8, 11, 0.7) 100%);
  }
}

.about__portrait-caption {
  position: absolute;
  left: var(--gutter);
  bottom: 20px;
  z-index: 3;
  margin-top: 0;
}

@media (min-width: 860px) {
  .about__portrait-caption {
    left: 28px;
  }
}

.about__bio {
  margin-top: 16px;
  color: var(--text-dim);
  max-width: 60ch;
  font-size: 16px;
}

.about__quote {
  margin-top: 24px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  font-style: normal;
}

.timeline {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.timeline__label {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}

.timeline__value {
  text-align: right;
}

/* ---------------------------------------------------------------------
   15. Social row
   --------------------------------------------------------------------- */
.social-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.social-row a:hover,
.social-row a:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

.social-row svg {
  width: 14px;
  height: 14px;
}

.social-row--footer {
  justify-content: flex-start;
  margin-top: 0;
}

/* ---------------------------------------------------------------------
   16. Final CTA
   --------------------------------------------------------------------- */
.final-cta {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding-block: clamp(80px, 14vh, 150px);
}

.final-cta__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(560px 380px at 50% 30%, rgba(58, 141, 255, 0.16), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* Closing signature: the author's name, huge and almost invisible,
   behind the final call to action — a quiet bookend to the hero. */
.final-cta__watermark {
  position: absolute;
  bottom: -0.12em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 17vw, 220px);
  line-height: 1;
  color: var(--text);
  opacity: 0.035;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.final-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-cta__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 56px);
  max-width: 18ch;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.final-cta__lede {
  margin-top: 14px;
  color: var(--text-dim);
  max-width: 48ch;
}

.final-cta .subscribe-form {
  margin-top: 32px;
}

/* A second, separate purpose within the same final section: not the
   newsletter subscription above, but a direct personal/business
   inquiry. Visually related (same card language, same accent) but
   clearly its own block, split off by a hairline divider. */
.inquiry-divider {
  width: 100%;
  max-width: 460px;
  height: 1px;
  margin-top: clamp(48px, 8vh, 72px);
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.inquiry {
  margin-top: clamp(28px, 5vh, 40px);
  width: 100%;
  max-width: 460px;
}

.inquiry__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.01em;
}

.inquiry__lede {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
}

.inquiry-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.inquiry-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inquiry-form__input,
.inquiry-form__textarea {
  flex: 1 1 180px;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.inquiry-form__textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  font-family: var(--font-body);
  line-height: 1.5;
}

.inquiry-form__input:focus,
.inquiry-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(58, 141, 255, 0.16);
}

.inquiry-form__input::placeholder,
.inquiry-form__textarea::placeholder {
  color: var(--text-faint);
}

.inquiry-form__submit {
  align-self: flex-start;
  position: relative;
  margin-top: 4px;
}

.inquiry-form.is-loading .btn__label {
  visibility: hidden;
}

.inquiry-form.is-loading .btn__spinner {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 18, 31, 0.35);
  border-top-color: var(--accent-contrast);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.inquiry-form__status {
  font-size: 13px;
  min-height: 0;
}

.inquiry-form__status[data-state="success"] {
  color: var(--up);
}

.inquiry-form__status[data-state="error"] {
  color: var(--down);
}

.inquiry-form__hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: left;
}

/* ---------------------------------------------------------------------
   17. Footer
   --------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}

.site-footer__inner {
  display: grid;
  gap: 18px;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.site-footer__disclaimer {
  color: var(--text-faint);
  font-size: 12.5px;
  max-width: 68ch;
  line-height: 1.6;
}

.site-footer__copy {
  color: var(--text-faint);
  font-size: 12px;
}

@media (min-width: 760px) {
  .site-footer__inner {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .site-footer__disclaimer,
  .site-footer__copy {
    grid-column: 1 / -1;
  }
}
