/* ==========================================================================
   CCH Solutions
   ========================================================================== */

:root {
  --bg: #06080c;
  --bg-2: #0a0d13;
  --surface: #0e121a;
  --surface-2: #131926;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e9eef6;
  --muted: #8d98ab;
  --dim: #5b6576;
  --brand: #2f8cff;
  --brand-2: #5cd6ff;
  --brand-deep: #0071bc;
  --ok: #3ddc97;
  --warn: #ffb547;
  --err: #ff5d6c;

  --grad: linear-gradient(100deg, #2f8cff 0%, #5cd6ff 60%, #a6f0ff 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: rgba(47, 140, 255, 0.35); }

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

.mono { font-family: var(--mono); }
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  transition: top 0.2s;
}
.skip:focus { top: 16px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 18px;
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  line-height: 1.55;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(47, 140, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn--primary:hover { background: #449aff; transform: translateY(-1px); box-shadow: 0 12px 40px -8px rgba(47, 140, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: transform 0.45s var(--ease), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 8, 12, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { flex: none; width: 72px; height: 27px; max-width: none; fill: var(--brand); }
.brand__word {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
  line-height: 1.2;
}

.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--muted); transition: color 0.2s; position: relative; }
.nav__links a:not(.btn):hover,
.nav__links a.is-current { color: var(--text); }
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--brand-2);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav__links a.is-current::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: transparent;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav.is-open .nav__toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: block; z-index: 2; }
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    font-size: 26px;
    font-weight: 600;
    background: rgba(6, 8, 12, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
  }
  .nav__links a:not(.btn) { color: var(--text); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }
  .nav.is-open { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__cta { margin-top: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero__glow {
  position: absolute;
  z-index: -2;
  width: 900px; height: 900px;
  right: -200px; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(47, 140, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.hero::after {
  /* faint grid */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 20%, transparent 75%);
  opacity: 0.5;
}
.hero__content { position: relative; will-change: transform, opacity; }
.hero__eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: ping 2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); }
}
.hero__title {
  font-size: clamp(44px, 5.8vw, 88px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero__title .line { display: block; }
.hero__sub {
  margin-top: 28px;
  max-width: 540px;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--muted);
}
.hero__type {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 18, 26, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 14px;
  color: var(--muted);
  max-width: 100%;
}
.hero__type .prompt { color: var(--ok); }
.hero__type .typed { color: var(--text); }
.caret {
  width: 8px; height: 18px;
  background: var(--brand-2);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity 0.3s;
}
.hero__scroll:hover { opacity: 1; }
.mouse {
  display: block;
  width: 24px; height: 38px;
  border: 1.5px solid var(--muted);
  border-radius: 14px;
  position: relative;
}
.mouse span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Hero intro animation */
.js .hero__eyebrow,
.js .hero__title .line,
.js .hero__sub,
.js .hero__type,
.js .hero__actions {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}
.is-loaded .hero__eyebrow,
.is-loaded .hero__title .line,
.is-loaded .hero__sub,
.is-loaded .hero__type,
.is-loaded .hero__actions { opacity: 1; transform: none; filter: none; }
.is-loaded .hero__title .line:nth-child(1) { transition-delay: 0.1s; }
.is-loaded .hero__title .line:nth-child(2) { transition-delay: 0.22s; }
.is-loaded .hero__sub { transition-delay: 0.4s; }
.is-loaded .hero__type { transition-delay: 0.5s; }
.is-loaded .hero__actions { transition-delay: 0.6s; }

@media (max-width: 900px) {
  .hero { align-items: flex-start; padding: calc(92px + min(62vw, 340px) * 0.375 + 36px) 0 100px; }
  .hero__glow { right: auto; left: 50%; top: 0; transform: translate(-50%, -40%); width: 600px; height: 600px; }
  .hero__scroll { display: none; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .hero { align-items: center; }
}
@media (max-width: 560px) {
  .hero__title { font-size: clamp(38px, 11vw, 52px); }
  .hero__title .line { display: inline; }
}

/* ---------- Story (pinned) ---------- */
.story { position: relative; height: 420vh; }
.story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.story__steps { display: grid; gap: 8px; }
.story__step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 16px 0;
  opacity: 0.28;
  transition: opacity 0.5s var(--ease);
}
.story__step.is-active { opacity: 1; }
.story__step h3 { font-size: clamp(20px, 2vw, 26px); margin-bottom: 6px; }
.story__step p { color: var(--muted); font-size: 16px; max-width: 420px; }
.story__num { color: var(--brand-2); font-size: 13px; padding-top: 6px; }
.story__bar {
  margin-top: 24px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.story__bar span {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}
.story__note { margin-top: 12px; text-align: right; font-size: 12px; color: var(--dim); }

/* Window mock */
.window {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0f141e, #0a0e15);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 80px -20px rgba(47, 140, 255, 0.25);
  overflow: hidden;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3140; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.window__title { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window__body { position: relative; height: clamp(340px, 46vh, 420px); }

.panel {
  position: absolute;
  inset: 0;
  padding: 22px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.panel.is-active { opacity: 1; transform: none; filter: none; }
.panel.is-past { transform: translateY(-24px) scale(0.98); }

/* elements revealed by scroll progress inside a panel */
.panel [data-at] { opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s var(--ease); }
.panel [data-at].on { opacity: 1; transform: none; }

/* Panel 0: sheet */
.sheet { font-size: 13px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sheet__row {
  display: grid;
  grid-template-columns: 28px 1.3fr 1fr 1fr 0.9fr;
  border-bottom: 1px solid var(--line);
}
.sheet__row:last-child { border-bottom: 0; }
.sheet__row span {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet__row span:first-child { color: var(--dim); text-align: center; padding: 8px 0; }
.sheet__row span:last-child { border-right: 0; }
.sheet__head { background: rgba(255, 255, 255, 0.03); color: var(--muted); font-weight: 600; }
.sheet .warn { color: var(--warn); }
.sheet .err { color: var(--err); }
.clock {
  position: absolute;
  right: 22px; bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 93, 108, 0.35);
  border-radius: 14px;
  background: rgba(20, 12, 16, 0.92);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(255, 93, 108, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.clock__label { font-size: 12px; color: var(--muted); }
.clock__value { font-size: clamp(28px, 3vw, 40px); font-weight: 500; color: var(--err); letter-spacing: -0.02em; }

/* Panel 1: flow */
.panel--flow { padding: 22px; }
.flow { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); }
.flow__edge {
  fill: none;
  stroke: url(#edge);
  stroke-width: 2;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  opacity: 1 !important;
  transform: none !important;
  transition: stroke-dashoffset 0.9s var(--ease) !important;
}
.flow__edge.on { stroke-dashoffset: 0; }
.flow__pulse { fill: var(--brand-2); filter: drop-shadow(0 0 6px var(--brand-2)); opacity: 0; transition: opacity 0.4s; }
.panel--flow.is-live .flow__pulse { opacity: 1; }
.node {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 19%;
  min-width: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.node b { font-size: 14px; font-weight: 600; }
.node small { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.node--core {
  width: 20%;
  border-color: rgba(47, 140, 255, 0.6);
  background: linear-gradient(180deg, rgba(47, 140, 255, 0.18), rgba(47, 140, 255, 0.05));
  box-shadow: 0 0 40px -6px rgba(47, 140, 255, 0.5);
}

/* Panel 2: code */
.code {
  margin: 0;
  font-size: clamp(11px, 1.05vw, 13.5px);
  line-height: 1.75;
  color: #c9d3e3;
  white-space: pre;
  overflow: hidden;
}
.code .ln { display: block; min-height: 1.75em; }
.code code { display: block; }
.code .ln::before {
  content: attr(data-n);
  display: inline-block;
  width: 2.2em;
  color: var(--dim);
}
.code i { font-style: normal; }
.c-k { color: #c792ea; }
.c-f { color: #82aaff; }
.c-s { color: #c3e88d; }
.c-d { color: #ffcb6b; }
.c-c { color: var(--ok); }

/* Panel 3: terminal + result */
.term { font-size: clamp(11px, 1.05vw, 13px); line-height: 1.9; }
.term .muted { color: var(--dim); }
.term .ok { color: var(--ok); }
.result {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.result > div { display: flex; flex-direction: column; }
.result__big { font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -0.03em; color: var(--err); text-decoration: line-through; text-decoration-thickness: 2px; }
.result__big--good { color: var(--ok); text-decoration: none; }
.result__lbl { font-size: 12px; color: var(--muted); }
.result__arrow { font-size: 26px; color: var(--muted); }

@media (max-width: 900px) {
  .story { height: 400vh; }
  .story__grid { grid-template-columns: 1fr; gap: 20px; }
  .story__text .eyebrow { margin-bottom: 8px; }
  .story__steps { display: block; position: relative; min-height: 150px; }
  .story__step { position: absolute; inset: 0 0 auto 0; opacity: 0; padding: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.4s var(--ease); }
  .story__step.is-active { opacity: 1; transform: none; }
  .story__step p { font-size: 15px; }
  .story__bar { margin-top: 0; }
  .window__body { height: clamp(300px, 44svh, 380px); }
  .story__note { display: none; }
}
@media (max-width: 520px) {
  .sheet__row { grid-template-columns: 22px 1.4fr 1fr 0.9fr; }
  .sheet__row span:nth-child(3) { display: none; }
  .panel { padding: 14px; }
  .clock { right: 14px; bottom: 14px; }
  .result { left: 14px; right: 14px; bottom: 14px; padding: 14px; }
  .node { padding: 8px; min-width: 80px; width: 22%; }
  .node b { font-size: 12px; }
  .node small { font-size: 9.5px; }
  .code { font-size: 10.5px; }
  .code .ln::before { width: 1.8em; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 13vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(70px, 10vw, 120px) 0; }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 70px); }
.section__head h2,
.calc__intro h2,
.about__text h2,
.contact__lead h2,
.hscroll__head h2 {
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.04em;
}
.section__head .lead { margin-top: 20px; }

/* Reveal on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  --mx: 50%; --my: 0%;
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(47, 140, 255, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover { border-color: rgba(47, 140, 255, 0.35); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(47, 140, 255, 0.16), rgba(47, 140, 255, 0.02));
  margin-bottom: 24px;
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tags li {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } .card { padding: 24px; } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 14px; padding-right: 14px; }
.marquee li {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Ideas ---------- */
.ideas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.idea {
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.idea:hover { background: rgba(255, 255, 255, 0.02); }
.idea__who { display: block; font-size: 12px; color: var(--brand-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.idea p { font-size: 18px; line-height: 1.45; }
@media (max-width: 980px) { .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ideas { grid-template-columns: 1fr; } .idea { padding: 24px; } }

/* ---------- Horizontal process ---------- */
.hscroll { position: relative; }
.hscroll__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hscroll__head { margin-bottom: 50px; }
.hscroll__track {
  display: flex;
  gap: 22px;
  padding: 0 var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
  will-change: transform;
}
.step {
  flex: 0 0 clamp(300px, 34vw, 420px);
  min-height: 340px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.step::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 2px; width: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.8s var(--ease);
}
.step.is-on::after { transform: scaleX(1); }
.step__num {
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.05));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: auto;
  padding-bottom: 40px;
}
.step h3 { font-size: 26px; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 16px; }
.step__meta { margin-top: 22px; font-size: 12px; color: var(--brand-2); }

@media (max-width: 900px) {
  .hscroll { height: auto !important; padding: 90px 0; }
  .hscroll__sticky { position: static; height: auto; overflow: visible; }
  .hscroll__head { margin-bottom: 36px; }
  .hscroll__track { flex-direction: column; padding: 0 var(--gutter); transform: none !important; gap: 14px; }
  .step { flex: none; min-height: 0; padding: 26px; }
  .step__num { font-size: 40px; padding-bottom: 20px; }
  .step::after { transform: scaleX(1); }
}

/* ---------- Calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.calc__intro .lead { margin-top: 20px; }
.calc__panel {
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.field { margin-bottom: 28px; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}
.field output { font-family: var(--mono); font-size: 18px; color: var(--text); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--fill), var(--line-2) var(--fill));
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--fill), var(--line-2) var(--fill));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 6px rgba(47, 140, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 6px rgba(47, 140, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5);
}
input[type="range"]:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(47, 140, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.5); }

.calc__out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__val { font-size: clamp(24px, 3vw, 36px); font-weight: 500; letter-spacing: -0.03em; }
.stat__lbl { font-size: 13px; color: var(--muted); }
.stat--accent .stat__val { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc__fine { margin-top: 20px; font-size: 12px; color: var(--dim); }

@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .calc__out { grid-template-columns: 1fr 1fr; }
  .stat--accent { grid-column: 1 / -1; }
}

/* ---------- Why ---------- */
.why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 50px;
}
.why__item { padding-top: 22px; border-top: 1px solid var(--line-2); }
.why__item h3 { font-size: 20px; margin-bottom: 8px; }
.why__item p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; } }
@media (max-width: 560px) { .why { grid-template-columns: 1fr; } }


/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.about__photo img,
.avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.avatar {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 140, 255, 0.3), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-2));
}
.avatar svg { width: 55%; fill: var(--brand); opacity: 0.9; }
.about__photo { position: relative; margin: 0; max-width: 420px; }
.about__tag {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(6, 8, 12, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.about__tag svg { width: 52px; height: 20px; flex: none; fill: var(--brand); }
.about__tag span { display: flex; flex-direction: column; line-height: 1.3; }
.about__tag b { font-size: 15px; }
.about__tag small { font-size: 13px; color: var(--muted); }
.about__text .lead { margin: 20px 0 18px; color: var(--text); }
.about__text p:not(.lead):not(.eyebrow) { color: var(--muted); margin-bottom: 14px; }
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 340px; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq__list { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 44px 24px 0;
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 600;
  position: relative;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand-2); }
.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 14px; height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0deg); }
.faq__a { overflow: hidden; }
.faq__a p { padding: 0 40px 26px 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: clamp(90px, 13vw, 160px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.contact__glow {
  position: absolute;
  left: 50%; top: 0;
  width: 1200px; height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(47, 140, 255, 0.22), transparent);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.contact__lead .lead { margin-top: 20px; }
.email {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.email__link {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 2px solid rgba(47, 140, 255, 0.5);
  transition: border-color 0.3s, color 0.3s;
  word-break: break-all;
}
.email__link:hover { border-color: var(--brand-2); color: var(--brand-2); }
.email__copy {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.email__copy:hover { border-color: var(--brand-2); color: var(--text); }
.email__copy.is-done { border-color: var(--ok); color: var(--ok); }

.assure { margin-top: 36px; display: grid; gap: 12px; }
.assure li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.assure li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 12px;
  color: var(--ok);
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid rgba(61, 220, 151, 0.3);
}

.brief {
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(14, 18, 26, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 18px;
}
.brief__title { font-weight: 600; font-size: 18px; }
.brief__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.brief label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.brief input[type="text"],
.brief textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.brief input[type="text"]:focus,
.brief textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 140, 255, 0.18); }
.brief .is-invalid { border-color: var(--err) !important; }
.brief textarea::placeholder { color: var(--dim); }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 14px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.chips label { display: block; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.chips input:checked + span { background: rgba(47, 140, 255, 0.15); border-color: var(--brand); color: var(--text); }
.chips input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.brief__fine { font-size: 12px; color: var(--dim); text-align: center; }

@media (max-width: 900px) { .contact__inner { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .brief__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 50px 0 34px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}
.footer__tag { color: var(--muted); font-size: 15px; flex: 1; min-width: 220px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__legal {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
  font-size: 13px;
  color: var(--dim);
}

/* ---------- Reduced motion ---------- */
@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;
    transition-delay: 0s !important;
  }
  .marquee__track { animation: none; }
}
