/* ==========================================================================
   SOLVRWORK — Piensa menos. Resuelve más.
   ========================================================================== */

:root {
  --bg: #0B0B0F;
  --bg-2: #101016;
  --fg: #FFFFFF;
  --fg-2: #E5E7EB;
  --muted: rgba(229, 231, 235, 0.56);
  --faint: rgba(229, 231, 235, 0.32);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --blue: #2563EB;
  --violet: #8B5CF6;
  --grad: linear-gradient(90deg, #2563EB 0%, #8B5CF6 100%);
  --grad-d: linear-gradient(135deg, #2563EB 0%, #8B5CF6 100%);

  --f-display: "Sora", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 200ms;
  --t-med: 350ms;
  --t-slow: 500ms;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --nav-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }
:focus-visible { outline: 1px solid var(--violet); outline-offset: 4px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.arrow { display: inline-block; transition: transform var(--t-med) var(--ease); }

/* ---------- Labels / titles ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted);
  margin-bottom: 28px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad-d);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
  animation: dotPulse 2.4s var(--ease-io) infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.section-title.center { margin-left: auto; margin-right: auto; }
.lead {
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 300;
  line-height: 1.35;
  margin-top: 28px;
  color: var(--fg-2);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex; align-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}
.wordmark .vmark { height: 0.74em; width: auto; margin: 0 0.03em 0 0.02em; }
.wordmark-lg { font-size: clamp(28px, 4vw, 44px); }
.wordmark-xl { font-size: clamp(36px, 9vw, 120px); letter-spacing: 0.02em; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform var(--t-med) var(--ease), background var(--t-med) var(--ease), border-color var(--t-med) var(--ease), color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  will-change: transform;
}
.btn-lg { height: 56px; padding: 0 28px; font-size: 15px; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: var(--grad); opacity: 0; filter: blur(14px);
  transition: opacity var(--t-slow) var(--ease);
}
.btn-primary:hover::before { opacity: 0.55; }

.btn-ghost { color: var(--fg-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

.btn-outline {
  color: #fff;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(139, 92, 246, 0.9)) border-box;
}
.btn-outline:hover { background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; box-shadow: 0 0 24px rgba(99, 102, 241, 0.25); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--bg);
  transition: opacity 600ms var(--ease), visibility 600ms;
}
.loader-v { width: 88px; height: auto; overflow: visible; }
.lv {
  fill: transparent; stroke-width: 3; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: lvDraw 900ms var(--ease-io) forwards, lvFill 500ms var(--ease) 750ms forwards;
}
.lv-l { stroke: var(--blue); }
.lv-r { stroke: var(--violet); animation-delay: 120ms, 850ms; }
@keyframes lvDraw { to { stroke-dashoffset: 0; } }
@keyframes lvFill { to { fill: currentColor; stroke-opacity: 0; } }
.lv-l { color: var(--blue); }
.lv-r { color: #6D5DF4; }
.loader-bar { width: 88px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); animation: lbar 1100ms var(--ease-io) forwards; }
@keyframes lbar { to { transform: scaleX(1); } }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader.is-done .loader-v { transform: scale(1.12); transition: transform 600ms var(--ease); }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width var(--t-med) var(--ease), height var(--t-med) var(--ease), margin var(--t-med) var(--ease), opacity var(--t-med) var(--ease), background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  display: grid; place-items: center;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; border-color: #fff; }
.cursor.is-text { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; }
.cursor-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity var(--t-fast); }
.cursor.has-label .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  transition: background var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 11, 15, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-logo { margin-right: auto; display: inline-flex; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-links a.is-active { color: #fff; }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--violet);
}
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; transition: transform var(--t-med) var(--ease); }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(11, 11, 15, 0.97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility var(--t-med);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--f-display); font-size: 30px; font-weight: 500; letter-spacing: -0.02em;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  transform: translateY(16px); opacity: 0;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}
.mobile-menu nav a .mono { color: var(--faint); }
.mobile-menu.is-open nav a { transform: none; opacity: 1; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 50ms; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 100ms; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 150ms; }
.mobile-menu .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 70% 50%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 60% at 70% 50%, #000 0%, transparent 75%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-content { position: relative; }
.eyebrow { color: var(--muted); margin-bottom: 28px; display: inline-block; min-height: 1em; }
.hero-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1100ms var(--ease); }
.hero-title .line:nth-child(2) > span { transition-delay: 120ms; }
.is-ready .hero-title .line > span { transform: none; }
.hero-sub {
  max-width: 34ch;
  margin-top: 32px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--fg-2);
  line-height: 1.5;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }
.hero-sub, .hero-ctas, .eyebrow, .hero-foot { opacity: 0; transform: translateY(14px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.is-ready .eyebrow { opacity: 1; transform: none; }
.is-ready .hero-sub { opacity: 1; transform: none; transition-delay: 300ms; }
.is-ready .hero-ctas { opacity: 1; transform: none; transition-delay: 420ms; }
.is-ready .hero-foot { opacity: 1; transform: none; transition-delay: 600ms; }

.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 32px;
  display: flex; justify-content: space-between; align-items: flex-end;
  max-width: none;
}
.hero-promise { font-size: 14px; color: var(--muted); line-height: 1.5; }
.hero-promise span { color: #fff; }
.scroll-cue { display: flex; align-items: center; gap: 12px; color: var(--faint); }
.scroll-line { width: 1px; height: 40px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--grad-d); animation: scrollCue 2.2s var(--ease-io) infinite; }
@keyframes scrollCue { to { top: 100%; } }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-word > span { display: inline-block; transform: translateY(110%); transition: transform 900ms var(--ease); }
[data-split].is-in .split-word > span { transform: none; }

/* ---------- AI Prompt ---------- */
.prompt { border-top: 1px solid var(--line); }
.prompt::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(900px, 90vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.14), rgba(139, 92, 246, 0.06) 40%, transparent 70%);
  pointer-events: none;
}
.prompt-inner { display: flex; flex-direction: column; align-items: center; max-width: 880px; }
.prompt .section-title { max-width: 18ch; }
.chat { width: 100%; margin-top: clamp(40px, 6vw, 64px); }
.chat-log { display: flex; flex-direction: column; gap: 18px; }
.chat-log:not(:empty) { margin-bottom: 24px; }
.msg { display: flex; gap: 14px; align-items: flex-start; animation: msgIn 450ms var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 18px 18px 4px 18px; padding: 12px 18px; max-width: 80%; color: #fff; }
.msg-ai .avatar {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
}
.msg-ai .avatar svg { width: 16px; height: auto; }
.msg-ai .avatar::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6); animation: avatarPulse 2s var(--ease-io) infinite; }
@keyframes avatarPulse { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); } }
.msg-ai .ai-body { padding-top: 4px; min-width: 0; flex: 1; }
.ai-text { font-family: var(--f-display); font-size: clamp(1.1rem, 2.4vw, 1.45rem); line-height: 1.4; letter-spacing: -0.01em; color: #fff; }
.ai-text .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--violet); animation: caret 900ms steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ai-sub { margin-top: 8px; color: var(--muted); font-size: 15px; }
.ai-thinking { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ai-thinking .shimmer {
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.35) 0%, #fff 50%, rgba(229, 231, 235, 0.35) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.ai-steps { margin: 2px 0 14px; display: grid; gap: 6px; font-family: var(--f-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }
.ai-steps span { opacity: 0; transform: translateX(-6px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.ai-steps span.on { opacity: 1; transform: none; }
.ai-steps span.done::before { content: "✓ "; color: var(--violet); }
.ai-cta { margin-top: 22px; opacity: 0; transform: translateY(8px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.ai-cta.on { opacity: 1; transform: none; }

.chat-box {
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(var(--line-2), var(--line-2));
  transition: background var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
}
.chat-box:focus-within, .chat-box.is-active {
  background: var(--grad);
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.08), 0 20px 80px -20px rgba(99, 102, 241, 0.35);
}
.chat-box-inner {
  display: flex; align-items: flex-end; gap: 12px;
  background: #0E0E14;
  border-radius: 21px 21px 0 0;
  padding: 18px 14px 14px 22px;
}
.chat-box textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: #fff;
  font-family: var(--f-display); font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.45; font-weight: 400;
  min-height: 72px; max-height: 220px; padding: 4px 0;
}
.chat-box textarea::placeholder { color: rgba(229, 231, 235, 0.38); }
.chat-send {
  flex: none; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: #fff; color: var(--bg);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), background var(--t-med) var(--ease);
}
.chat-send:hover { transform: translateY(-2px); }
.chat-send:active { transform: scale(0.94); }
.chat-send[disabled] { opacity: 0.25; cursor: default; transform: none; }
.chat-meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 22px 12px; color: var(--faint); font-size: 10.5px; background: #0E0E14; border-radius: 0 0 21px 21px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 14px; color: var(--fg-2);
  transition: border-color var(--t-med) var(--ease), color var(--t-med) var(--ease), background var(--t-med) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:hover { border-color: rgba(139, 92, 246, 0.6); color: #fff; background: rgba(139, 92, 246, 0.08); }
.chip:active { transform: scale(0.96); }
.chip.is-selected { border-color: transparent; background: linear-gradient(#15151d, #15151d) padding-box, var(--grad) border-box; border: 1px solid transparent; color: #fff; }

/* ---------- Horizontal capabilities ---------- */
.hscroll { position: relative; border-top: 1px solid var(--line); }
.hscroll-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hscroll-track { display: flex; align-items: stretch; height: min(64vh, 540px); will-change: transform; padding-left: var(--gutter); }
.hpanel { flex: none; position: relative; }
.hpanel-intro { width: min(560px, 80vw); padding-right: 64px; display: flex; flex-direction: column; justify-content: center; }
.hpanel-intro .section-title { font-size: clamp(2.2rem, 5vw, 4.25rem); }
.hint { margin-top: 48px; color: var(--faint); }
.cap {
  width: clamp(320px, 34vw, 480px);
  border-left: 1px solid var(--line);
  padding: 0 clamp(28px, 3vw, 48px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cap::before {
  content: ""; position: absolute; left: -1px; top: 0; width: 1px; height: 0; background: var(--grad-d);
  transition: height 900ms var(--ease);
}
.cap.is-active::before { height: 100%; }
.cap-num {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(5rem, 12vw, 11rem); line-height: 0.85; letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  transition: -webkit-text-stroke-color var(--t-slow) var(--ease);
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  background-size: 100% 0%; background-repeat: no-repeat; background-position: bottom;
}
.cap.is-active .cap-num { background-size: 100% 100%; -webkit-text-stroke-color: transparent; transition: background-size 900ms var(--ease), -webkit-text-stroke-color var(--t-slow) var(--ease); }
.cap h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.cap p { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.125rem); max-width: 30ch; transition: color var(--t-slow) var(--ease); }
.cap.is-active p { color: var(--fg-2); }
.hscroll-progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 48px; height: 1px; background: var(--line); }
.hscroll-progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- Process ---------- */
.process { border-top: 1px solid var(--line); }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: start; }
.process-head { position: sticky; top: calc(var(--nav-h) + 64px); }
.steps { position: relative; padding-left: 56px; }
.steps-line { position: absolute; left: 11px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.steps-line-fill { position: absolute; inset: 0; background: linear-gradient(180deg, #2563EB, #8B5CF6); transform-origin: top; transform: scaleY(0); }
.steps-signal { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 3px rgba(139, 92, 246, 0.9), 0 0 32px 8px rgba(37, 99, 235, 0.5); opacity: 0; transition: opacity var(--t-med); }
.steps.is-tracking .steps-signal { opacity: 1; }
.step { position: relative; display: flex; gap: 20px; padding: 28px 0 56px; }
.step-node {
  position: absolute; left: -51px; top: 34px; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg);
  transition: border-color var(--t-slow) var(--ease), background var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
}
.step-num { color: var(--faint); padding-top: 8px; transition: color var(--t-slow) var(--ease); }
.step h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; color: rgba(255, 255, 255, 0.22); transition: color var(--t-slow) var(--ease); }
.step p { color: var(--muted); margin-top: 10px; max-width: 34ch; opacity: 0; transform: translateY(8px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.step.is-active h3 { color: #fff; }
.step.is-active p { opacity: 1; transform: none; }
.step.is-active .step-num { color: var(--violet); }
.step.is-active .step-node { border-color: transparent; background: var(--grad-d); box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.12), 0 0 18px rgba(139, 92, 246, 0.6); }

/* ---------- Statement ---------- */
.statement { padding: clamp(110px, 16vw, 220px) 0 clamp(90px, 12vw, 160px); overflow: hidden; border-top: 1px solid var(--line); position: relative; }
.statement::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 40% at 50% 60%, rgba(37, 99, 235, 0.08), transparent 70%); pointer-events: none; }
.statement-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
.st-line {
  display: block; white-space: nowrap;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.5rem, 5.9vw, 6.6rem); line-height: 1; letter-spacing: -0.045em;
  will-change: transform;
}
.st-dim { color: rgba(255, 255, 255, 0.18); }
.statement-foot { margin-top: clamp(56px, 8vw, 96px); text-align: center; position: relative; z-index: 1; }
.statement-foot p { font-family: var(--f-display); font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 300; line-height: 1.3; color: var(--muted); }
.statement-foot strong { font-weight: 600; color: #fff; }

/* ---------- Problems ---------- */
.problems { border-top: 1px solid var(--line); }
.problems-title { max-width: 20ch; }
.problems-sub { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.1rem, 6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; margin-top: 4px; display: inline-block; }
.plist { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.pitem { border-bottom: 1px solid var(--line); position: relative; }
.pitem::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease); }
.pq { width: 100%; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding: clamp(24px, 3.4vw, 40px) 0; text-align: left; }
.pidx { color: var(--faint); flex: none; width: 24px; transition: color var(--t-med) var(--ease); }
.ptext { flex: 1; font-family: var(--f-display); font-size: clamp(1.25rem, 3.4vw, 2.6rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; color: rgba(255, 255, 255, 0.5); transition: color var(--t-med) var(--ease), transform var(--t-slow) var(--ease); }
.pplus { flex: none; width: 18px; height: 18px; position: relative; }
.pplus::before, .pplus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--muted); transition: transform var(--t-med) var(--ease), background var(--t-med); }
.pplus::after { transform: rotate(90deg); }
.pa { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease); }
.pa > p { overflow: hidden; padding-left: calc(24px + clamp(16px, 3vw, 40px)); font-size: clamp(1.05rem, 1.8vw, 1.35rem); color: var(--fg-2); opacity: 0; transform: translateY(-6px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.pa .arrow { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: 6px; }
.pitem.is-open .pa { grid-template-rows: 1fr; }
.pitem.is-open .pa > p { opacity: 1; transform: none; padding-bottom: clamp(24px, 3vw, 36px); }
.pitem.is-open .ptext { color: #fff; transform: translateX(6px); }
.pitem.is-open .pidx { color: var(--violet); }
.pitem.is-open .pplus::after { transform: rotate(0deg); }
.pitem.is-open .pplus::before, .pitem.is-open .pplus::after { background: #fff; }
.pitem.is-open::before { transform: scaleX(1); }
.problems-cta { margin-top: clamp(48px, 7vw, 80px); }

/* ---------- Light section: Cases ---------- */
.light { background: #fff; color: var(--bg); color-scheme: light; }
.light .label { color: rgba(11, 11, 15, 0.55); }
.light .muted { color: rgba(11, 11, 15, 0.55); }
.cases .section-title { max-width: 14ch; }
.cases-note { color: rgba(11, 11, 15, 0.45); margin-top: 24px; font-size: 11px; }
.case { margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid rgba(11, 11, 15, 0.12); position: relative; }
.case::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1200ms var(--ease) 200ms; }
.case.is-in::before { transform: scaleX(1); }
.case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px 0 32px; }
.case-id { color: var(--blue); }
.case-tag { font-family: var(--f-display); font-weight: 500; font-size: clamp(1rem, 1.6vw, 1.2rem); letter-spacing: -0.01em; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px clamp(24px, 3vw, 48px); }
.case-col .mono { display: block; color: rgba(11, 11, 15, 0.45); margin-bottom: 12px; font-size: 11px; }
.case-col p { font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.5; color: rgba(11, 11, 15, 0.82); }
.case-result p { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--bg); }
.case-result .mono { color: var(--violet); }

/* ---------- Services ---------- */
.services .section-title { max-width: 18ch; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc {
  position: relative; padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px) clamp(32px, 4vw, 48px);
  display: flex; flex-direction: column; min-height: 440px;
  border-left: 1px solid var(--line);
  overflow: hidden;
  --mx: 50%; --my: 0%;
}
.svc:first-child { border-left: 0; }
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(99, 102, 241, 0.13), transparent 60%);
  transition: opacity var(--t-slow) var(--ease);
}
.svc:hover::before { opacity: 1; }
.svc-idx { color: var(--faint); }
.svc h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: 0.01em; margin-top: auto; padding-top: 72px; line-height: 1.05; }
.svc h3 span { display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.svc-claim { font-family: var(--f-display); font-size: clamp(1.1rem, 1.6vw, 1.3rem); margin-top: 20px; color: #fff; }
.svc-desc { color: var(--muted); margin-top: 10px; max-width: 30ch; }
.svc-cta { margin-top: 36px; display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; padding: 12px 0; border-top: 1px solid var(--line); transition: color var(--t-med), border-color var(--t-med); }
.svc-cta:hover { border-color: rgba(139, 92, 246, 0.6); }
.svc-cta:hover .arrow { transform: translateX(6px); }

/* ---------- Manifesto ---------- */
.manifesto { position: relative; border-top: 1px solid var(--line); }
.manifesto-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.manifesto-meta { display: flex; justify-content: space-between; padding: calc(var(--nav-h) + 24px) var(--gutter) 0; color: var(--faint); }
.manifesto-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.manifesto-stage { flex: 1; position: relative; }
.mf {
  position: absolute; left: 50%; top: 50%;
  width: min(1100px, calc(100% - 2 * var(--gutter)));
  transform: translate(-50%, calc(-50% + 40px));
  text-align: center;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2rem, 6.2vw, 5.6rem); line-height: 1.04; letter-spacing: -0.04em;
  opacity: 0; filter: blur(8px);
  transition: opacity 600ms var(--ease), transform 700ms var(--ease), filter 600ms var(--ease);
}
.mf.is-active { opacity: 1; transform: translate(-50%, -50%); filter: none; }
.mf.is-past { opacity: 0; transform: translate(-50%, calc(-50% - 40px)); }
.mf-final { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.mf-tag { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; color: var(--fg-2); }
.manifesto-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; height: 1px; background: var(--line); }
.manifesto-bar span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- Diagnostic ---------- */
.diag { border-top: 1px solid var(--line); }
.diag::before {
  content: ""; position: absolute; left: 50%; bottom: 0; width: min(1100px, 100vw); height: 60%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.1), rgba(37, 99, 235, 0.05) 40%, transparent 70%);
  pointer-events: none;
}
.diag-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 7vw, 100px); align-items: start; position: relative; }
.diag-head .muted { margin-top: 24px; }
.diag-app {
  border: 1px solid var(--line-2); border-radius: 24px;
  background: rgba(14, 14, 20, 0.7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: clamp(24px, 4vw, 44px);
  min-height: 520px;
  display: flex; flex-direction: column;
}
.diag-top { display: flex; align-items: center; gap: 16px; }
.diag-step { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.diag-progress { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.diag-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width var(--t-slow) var(--ease); }
.diag-back { color: var(--muted); padding: 8px 0 8px 8px; transition: color var(--t-fast), opacity var(--t-fast); }
.diag-back:hover { color: #fff; }
.diag-back[hidden] { display: inline; visibility: hidden; }
.diag-screen { flex: 1; display: flex; flex-direction: column; margin-top: clamp(32px, 5vw, 56px); }
.diag-screen.is-leaving { animation: qOut 260ms var(--ease) forwards; }
.diag-screen.is-entering { animation: qIn 450ms var(--ease) both; }
@keyframes qOut { to { opacity: 0; transform: translateY(-14px); } }
@keyframes qIn { from { opacity: 0; transform: translateY(18px); } }
.q-from { display: flex; align-items: center; gap: 10px; color: var(--faint); margin-bottom: 16px; }
.q-from svg { width: 14px; height: auto; }
.q-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.12; }
.q-help { color: var(--muted); margin-top: 10px; font-size: 15px; }
.q-fields { margin-top: 32px; display: grid; gap: 14px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; color: #fff;
  border: 0; border-bottom: 1px solid var(--line-2);
  font-family: var(--f-display); font-size: clamp(1.1rem, 2vw, 1.35rem);
  padding: 14px 0; outline: none; border-radius: 0;
  transition: border-color var(--t-med) var(--ease);
  resize: none;
}
.field textarea { min-height: 96px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: rgba(229, 231, 235, 0.3); }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform var(--t-slow) var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.field.has-error input, .field.has-error textarea { border-color: rgba(248, 113, 113, 0.7); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.opts + .q-fields { margin-top: 20px; }
.opt { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--fg-2); transition: all var(--t-med) var(--ease); }
.opt:hover { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.opt.is-selected { border-color: transparent; background: linear-gradient(#17171f, #17171f) padding-box, var(--grad) border-box; border: 1px solid transparent; color: #fff; }
.q-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 36px; }
.q-hint { color: var(--faint); font-size: 10.5px; }
.q-error { color: #FCA5A5; font-size: 14px; margin-top: 12px; min-height: 1.4em; }
.diag-done { text-align: left; }
.diag-done .done-mark { width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--line-2); display: grid; place-items: center; margin-bottom: 32px; position: relative; }
.diag-done .done-mark svg { width: 26px; }
.diag-done .done-mark::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; animation: avatarPulse 2s var(--ease-io) infinite; }
.diag-done h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.02; }
.diag-done p { color: var(--muted); margin-top: 20px; max-width: 42ch; }
.diag-note { margin-top: 16px; color: var(--fg-2); font-size: 15px; min-height: 1.5em; text-align: right; }
.diag-note.is-error { color: #FCA5A5; }
.btn[disabled] { opacity: 0.85; cursor: default; transform: none; }
.summary { margin-top: 28px; border-top: 1px solid var(--line); display: grid; }
.summary div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary dt, .summary .k { color: var(--faint); font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.summary .v { color: var(--fg-2); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(72px, 10vw, 120px) 0 32px; position: relative; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.footer-brand p { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; margin-top: 24px; color: var(--fg-2); }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-top: clamp(64px, 9vw, 112px); padding-top: 32px; border-top: 1px solid var(--line); }
.footer-pillars { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); }
.footer-pillars li { display: flex; align-items: center; gap: 28px; }
.footer-links { display: grid; gap: 10px; font-size: 15px; }
.footer-links a { color: var(--fg-2); position: relative; transition: color var(--t-fast); }
.footer-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-links a:hover::after { transform: scaleX(1); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; color: var(--faint); font-size: 10.5px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav { gap: 12px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-cta { display: none; }

  .hero { justify-content: flex-end; padding-bottom: 32px; }
  .hero-content { padding-top: 32vh; padding-top: 32svh; }
  .hero-grid { -webkit-mask-image: radial-gradient(ellipse 80% 40% at 50% 28%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 80% 40% at 50% 28%, #000 0%, transparent 75%); }
  .hero-ctas .btn { flex: 1 1 100%; }
  .scroll-cue { display: none; }
  .hero-foot { position: relative; bottom: auto; margin-top: 40px; }

  .chat-meta span:first-child { display: none; }
  .chips { justify-content: flex-start; }

  /* horizontal → vertical progressive list */
  .hscroll { height: auto !important; }
  .hscroll-pin { position: static; height: auto; overflow: visible; padding: 112px 0 64px; }
  .hscroll-track { flex-direction: column; height: auto; transform: none !important; padding: 0 var(--gutter); }
  .hpanel-intro { width: auto; padding: 0 0 48px; }
  .hide-mobile { display: none; }
  .cap { width: auto; border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 36px; flex-direction: row; gap: 24px; align-items: flex-start; }
  .cap::before { left: 0; top: -1px; height: 1px; width: 0; transition: width 900ms var(--ease); }
  .cap.is-active::before { width: 100%; height: 1px; }
  .cap-num { font-size: 3.4rem; flex: none; width: 2.2ch; }
  .cap-body { padding-top: 6px; }
  .hscroll-progress { display: none; }

  .process-grid { grid-template-columns: 1fr; }
  .process-head { position: static; }
  .steps { padding-left: 44px; }
  .step-node { left: -39px; }
  .step { padding: 20px 0 40px; }

  .svc-grid { grid-template-columns: 1fr; border-bottom: 0; }
  .svc { border-left: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .svc h3 { padding-top: 40px; }

  .diag-inner { grid-template-columns: 1fr; }
  .diag-app { min-height: 480px; border-radius: 20px; }
  .summary div { grid-template-columns: 96px 1fr; }

  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-pillars { grid-column: 1 / -1; }
  .footer-cta { width: 100%; }
}

@media (max-width: 480px) {
  .btn-lg { height: 54px; }
  .case-head { flex-direction: column; gap: 6px; }
  .ptext { font-size: 1.2rem; }
  .st-line { font-size: 5.5vw; }
  .pplus { width: 14px; }
  .opt { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  [data-reveal], .split-word > span, .hero-title .line > span { opacity: 1 !important; transform: none !important; }
}
