/* ============================================================
   UNBOUND LABS — Unbound Workspace
   Design system + layout. Dark, warm-coral / cyan-mesh palette.
   ============================================================ */

:root {
  /* Palette — warm near-black, Claude-coral primary, data-cyan + indigo mesh */
  --bg:        #0a090f;
  --bg-2:      #0d0c14;
  --bg-3:      #110f19;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.14);

  --text:      #edeef4;
  --text-2:    #b6bacb;
  --text-3:    #777c92;

  --coral:     #ff8a5b;
  --coral-2:   #ff6b3d;
  --coral-deep:#e2532a;
  --cyan:      #4fe3d4;
  --indigo:    #7d78ff;
  --gold:      #ffce6b;

  --grad-warm: linear-gradient(120deg, #ff9d6b 0%, #ff6b3d 100%);
  --grad-mesh: linear-gradient(120deg, #ff8a5b 0%, #7d78ff 55%, #4fe3d4 100%);
  --glow-coral: 0 0 40px rgba(255, 122, 77, 0.35);

  --radius:   18px;
  --radius-sm:12px;
  --radius-lg:28px;

  --maxw: 1200px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Code", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(255, 138, 91, 0.3); color: #fff; }

/* ambient page glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 80% -5%, rgba(125, 120, 255, 0.10), transparent 60%),
    radial-gradient(800px 700px at -5% 15%, rgba(255, 122, 77, 0.10), transparent 55%),
    radial-gradient(700px 600px at 50% 110%, rgba(79, 227, 212, 0.07), transparent 60%);
  z-index: -2;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 110px 0; }
.section-tight { padding: 80px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--coral);
  padding: 6px 14px;
  border: 1px solid rgba(255, 122, 77, 0.3);
  border-radius: 100px;
  background: rgba(255, 122, 77, 0.06);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px var(--coral); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
.h-section { font-size: clamp(30px, 4.4vw, 52px); margin-bottom: 18px; }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--text-2); max-width: 720px; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin: 0 auto; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-warm); color: #1a0d06; box-shadow: 0 8px 30px rgba(255, 107, 61, 0.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(255, 107, 61, 0.45); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); backdrop-filter: blur(8px); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-2); border-color: var(--coral); }
.btn-lg { padding: 17px 34px; font-size: 16px; }

/* ---------- Nav ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: rgba(10, 9, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none; box-shadow: var(--glow-coral);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231a0d06' stroke-width='2.3' stroke-linecap='round'%3E%3Cpath d='M12 12V5'/%3E%3Cpath d='M12 12L18 16'/%3E%3Cpath d='M12 12L6 16'/%3E%3C/g%3E%3Cg fill='%231a0d06'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='18' cy='16' r='2'/%3E%3Ccircle cx='6' cy='16' r='2'/%3E%3C/g%3E%3C/svg%3E") center/58% no-repeat, var(--grad-warm);
}
.logo .mark::after { content: none; }
.logo small { color: var(--text-3); font-weight: 500; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--text-2); transition: color .25s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 60px; overflow: hidden; }
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1.4s ease; }
#bg-canvas.ready { opacity: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; width: 100%; }
.hero h1 { font-size: clamp(40px, 6.6vw, 80px); margin-bottom: 24px; }
.hero .lead { font-size: clamp(17px, 1.7vw, 21px); margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust { display: flex; gap: 26px; flex-wrap: wrap; color: var(--text-3); font-size: 13.5px; }
.hero-trust b { color: var(--text); font-family: var(--font-display); }
.hero-visual { position: relative; height: 460px; }

/* floating glass stat chips around hero */
.chip {
  position: absolute; padding: 13px 17px; border-radius: 14px;
  background: rgba(17, 15, 25, 0.6); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.45);
  animation: floaty 7s ease-in-out infinite;
}
.chip .k { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.chip .v { font-size: 12px; color: var(--text-3); }
.chip.c1 { top: 6%; left: -2%; }
.chip.c2 { top: 40%; right: -4%; animation-delay: -2.2s; }
.chip.c3 { bottom: 4%; left: 12%; animation-delay: -4.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.core-ring {
  position: absolute; inset: 0; margin: auto; width: 300px; height: 300px;
  border-radius: 50%; border: 1px dashed rgba(255,255,255,.12);
  display: grid; place-items: center;
}
.core-ring::before { content:""; position:absolute; width: 210px; height: 210px; border-radius: 50%; border: 1px solid rgba(255,138,91,.25); }
.core-orb {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd0a8, #ff6b3d 50%, #b8371a 100%);
  box-shadow: 0 0 70px rgba(255,107,61,.6), inset -10px -10px 30px rgba(120,20,0,.5);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 70px rgba(255,107,61,.55), inset -10px -10px 30px rgba(120,20,0,.5);} 50% { transform: scale(1.05); box-shadow: 0 0 100px rgba(255,107,61,.8), inset -10px -10px 30px rgba(120,20,0,.5);} }

/* ---------- Marquee (logos / integrations strip) ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 22px 0; background: rgba(255,255,255,.012); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll-x 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-mono); color: var(--text-3); font-size: 14px; white-space: nowrap; letter-spacing: .04em; }
.marquee-track span b { color: var(--text-2); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .4s var(--ease), border-color .4s, background .4s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--surface-2); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center; font-size: 22px;
  background: rgba(255,122,77,.1); border: 1px solid rgba(255,122,77,.22); color: var(--coral);
}

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* problem vs solution split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { border-radius: var(--radius-lg); padding: 36px; border: 1px solid var(--border); }
.panel.bad { background: linear-gradient(180deg, rgba(255,80,80,.05), transparent); }
.panel.good { background: linear-gradient(180deg, rgba(79,227,212,.06), transparent); border-color: rgba(79,227,212,.2); }
.panel h3 { font-size: 23px; margin-bottom: 20px; display: flex; align-items: center; gap: 11px; }
.panel ul { list-style: none; display: grid; gap: 14px; }
.panel li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.panel li .b { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; margin-top: 1px; font-weight: 700; }
.panel.bad .b { background: rgba(255,90,90,.14); color: #ff8a8a; }
.panel.good .b { background: rgba(79,227,212,.14); color: var(--cyan); }

/* ---------- Architecture diagram ---------- */
.arch { position: relative; }
.arch-stage {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: radial-gradient(700px 400px at 50% 0%, rgba(125,120,255,.07), transparent 60%), var(--bg-2);
  padding: 30px; overflow: hidden;
}
.arch-svg { width: 100%; height: auto; display: block; }
.arch-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 22px; justify-content: center; font-size: 13px; color: var(--text-3); }
.arch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.arch-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.node-card { cursor: default; }
.arch-node rect { transition: fill .3s, stroke .3s; }
.arch-node:hover rect { stroke: var(--coral); }
.flow-line { stroke-dasharray: 6 7; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }

/* ---------- Integrations grid ---------- */
.intg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.intg .it {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px;
  background: var(--surface); transition: transform .35s var(--ease), border-color .35s;
}
.intg .it:hover { transform: translateY(-4px); border-color: var(--coral); }
.intg .it .nm { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.intg .it .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex: none; }
.intg .it .cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 7px 0 6px; }
.intg .it p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* ---------- Lifecycle (8-stage) ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.flow .step {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px;
  background: var(--surface); position: relative; transition: transform .35s var(--ease), border-color .35s;
}
.flow .step:hover { transform: translateY(-4px); border-color: var(--border-2); }
.flow .step .n { font-family: var(--font-mono); font-size: 12px; color: var(--coral); margin-bottom: 12px; }
.flow .step h4 { font-size: 16px; margin-bottom: 7px; }
.flow .step p { font-size: 13px; color: var(--text-2); }
.flow .step .who { display: inline-block; margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; padding: 3px 9px; border-radius: 100px; letter-spacing: .08em; }
.flow .step .who.AI { background: rgba(255,122,77,.12); color: var(--coral); border: 1px solid rgba(255,122,77,.25); }
.flow .step .who.Human { background: rgba(125,120,255,.12); color: var(--indigo); border: 1px solid rgba(125,120,255,.3); }

/* ---------- Prompt templates ---------- */
.prompts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.prompt {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-2);
  transition: border-color .35s, transform .35s var(--ease);
}
.prompt:hover { border-color: var(--border-2); transform: translateY(-3px); }
.prompt .ph { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prompt .ph .nm { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.prompt .ph .pp { font-size: 12px; color: var(--text-3); }
.prompt .code { font-family: var(--font-mono); font-size: 12.5px; padding: 18px 20px; color: var(--text-2); line-height: 1.7; white-space: pre-wrap; background: rgba(0,0,0,.25); }
.prompt .code .tok { color: var(--coral); }
.prompt .copy { background: var(--surface); border: 1px solid var(--border-2); color: var(--text-2); font-family: var(--font-mono); font-size: 11px; padding: 5px 11px; border-radius: 8px; cursor: pointer; transition: .25s; flex: none; }
.prompt .copy:hover { color: var(--text); border-color: var(--coral); }

/* ---------- Skills chips ---------- */
.skillset { display: grid; gap: 18px; }
.skillrow { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; padding: 18px 0; border-top: 1px solid var(--border); }
.skillrow .grp { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); }
.skillrow .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skillrow .chips span { font-family: var(--font-mono); font-size: 12px; padding: 5px 11px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 28px; align-items: stretch; }
.calc-controls, .calc-out { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.calc-controls { background: var(--bg-2); }
.calc-out { background: radial-gradient(500px 300px at 80% 0, rgba(255,122,77,.08), transparent 60%), var(--bg-2); }
.field { margin-bottom: 28px; }
.field label { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.field label b { font-family: var(--font-display); color: var(--text); font-size: 17px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 100px; background: linear-gradient(90deg, var(--coral), var(--indigo)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.5); border: 3px solid var(--coral); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; cursor: pointer; border: 3px solid var(--coral); }
.seg { display: flex; gap: 8px; background: var(--surface); padding: 5px; border-radius: 12px; border: 1px solid var(--border); }
.seg button { flex: 1; background: none; border: 0; color: var(--text-2); font-family: var(--font-body); font-size: 13.5px; padding: 9px; border-radius: 8px; cursor: pointer; transition: .25s; }
.seg button.active { background: var(--grad-warm); color: #1a0d06; font-weight: 600; }

.bars { display: grid; gap: 16px; margin-bottom: 22px; }
.bar .bl { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; color: var(--text-2); }
.bar .bl b { font-family: var(--font-display); color: var(--text); }
.bar .track { height: 30px; border-radius: 8px; background: var(--surface); overflow: hidden; position: relative; }
.bar .fill { height: 100%; border-radius: 8px; transition: width .8s var(--ease); }
.bar.metered .fill { background: linear-gradient(90deg, #ff5a5a, #ff8a5a); }
.bar.ide .fill { background: linear-gradient(90deg, #d97cff, #7d78ff); }
.bar.unbound .fill { background: linear-gradient(90deg, var(--cyan), #3fb8ac); }
.calc-savings { border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.calc-savings .big { font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); font-weight: 700; background: var(--grad-mesh); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.calc-note { font-size: 12px; color: var(--text-3); margin-top: 16px; line-height: 1.6; }

/* ---------- Comparison table ---------- */
.cmp { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { padding: 16px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmp th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); background: rgba(255,255,255,.02); }
.cmp td b { font-family: var(--font-display); color: var(--text); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp tr.hl td { background: rgba(79,227,212,.05); }
.cmp tr.hl td:first-child b { color: var(--cyan); }
.cmp-wrap { overflow-x: auto; }

/* ---------- Security ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sec-grid .card .ic { background: rgba(79,227,212,.1); border-color: rgba(79,227,212,.22); color: var(--cyan); }
.edge { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 30px; }
.edge .e { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13.5px; color: var(--text-2); }
.edge .e .chk { flex: none; color: var(--cyan); margin-top: 1px; }

/* ---------- Packages ---------- */
.pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.pkg { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; background: var(--bg-2); display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .4s; position: relative; }
.pkg:hover { transform: translateY(-6px); }
.pkg.featured { border-color: var(--coral); background: linear-gradient(180deg, rgba(255,122,77,.08), transparent 40%), var(--bg-2); box-shadow: 0 30px 70px rgba(255,107,61,.15); }
.pkg .tag { position: absolute; top: -13px; left: 32px; background: var(--grad-warm); color: #1a0d06; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 5px 13px; border-radius: 100px; letter-spacing: .06em; }
.pkg h3 { font-size: 22px; }
.pkg .price { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 10px 0 4px; }
.pkg .forwho { color: var(--text-3); font-size: 13px; margin-bottom: 22px; }
.pkg ul { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; flex: 1; }
.pkg li { display: flex; gap: 11px; font-size: 14px; color: var(--text-2); }
.pkg li .chk { color: var(--coral); flex: none; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 16px; padding: 20px 22px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-q .pm { flex: none; color: var(--coral); font-size: 22px; transition: transform .3s; }
.faq-item.open .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a div { padding: 0 22px 20px; color: var(--text-2); font-size: 14.5px; }

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; background: var(--bg-2); }
.stat .v { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; }
.stat .l { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

/* ---------- Case study ---------- */
.case { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; background: radial-gradient(600px 300px at 100% 0, rgba(125,120,255,.07), transparent), var(--bg-2); }
.case .metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 30px; }
.case .metrics .m .v { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--coral); }
.case .metrics .m .l { font-size: 13px; color: var(--text-3); }

/* ---------- CTA / Contact ---------- */
.cta-box { border-radius: var(--radius-lg); padding: 56px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(700px 400px at 50% 120%, rgba(255,122,77,.2), transparent 60%), linear-gradient(160deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--border-2); }
.cta-box h2 { font-size: clamp(30px, 4.6vw, 52px); margin-bottom: 16px; }
.cta-box .lead { margin: 0 auto 30px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--surface); }
.contact-card h4 { font-size: 13px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.contact-line { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.contact-line:last-child { border-bottom: 0; }
.contact-line .ci { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,122,77,.1); border: 1px solid rgba(255,122,77,.22); color: var(--coral); flex: none; }
.contact-line .ct small { display: block; color: var(--text-3); font-size: 12px; }
.contact-line .ct a, .contact-line .ct span { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.contact-line .ct a:hover { color: var(--coral); }

form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form .fg { margin-bottom: 14px; }
form label { font-size: 12.5px; color: var(--text-3); display: block; margin-bottom: 6px; font-family: var(--font-mono); letter-spacing: .04em; }
form input, form textarea, form select { width: 100%; background: var(--bg); border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 14px; transition: border-color .25s; }
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--coral); }
form textarea { resize: vertical; min-height: 90px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 50px 0 36px; color: var(--text-3); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.footer-grid h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--text-3); font-size: 14px; padding: 5px 0; transition: color .25s; }
.footer-grid a:hover { color: var(--coral); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; gap: 12px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .calc, .split { grid-template-columns: 1fr; }
  .hero-visual { height: 320px; order: -1; }
  .g-3, .g-4, .sec-grid, .intg, .flow, .prompts, .pkgs, .stats-band, .case .metrics, .contact-grid, .footer-grid, .edge { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .skillrow { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 620px) {
  section { padding: 70px 0; }
  .g-3, .g-4, .sec-grid, .intg, .flow, .prompts, .pkgs, .stats-band, .case .metrics, .contact-grid, .footer-grid, .edge, form .row { grid-template-columns: 1fr; }
  .cta-box { padding: 32px 22px; }
  .panel, .calc-controls, .calc-out, .case { padding: 24px; }
  .hero-trust { gap: 16px; }
}

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 200; background: rgba(8,7,12,.96); backdrop-filter: blur(14px); display: none; flex-direction: column; padding: 90px 28px; gap: 8px; }
.drawer.open { display: flex; }
.drawer a { font-family: var(--font-display); font-size: 22px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.drawer .close { position: absolute; top: 24px; right: 24px; background: none; border: 0; color: var(--text); font-size: 30px; cursor: pointer; }

/* ============================================================
   POLISH LAYER — motion, glow, depth, micro-interactions
   ============================================================ */

/* animated aurora woven into the ambient glow */
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(0,0,0) scale(1); }
}
body::before { animation: aurora 22s ease-in-out infinite; will-change: transform; }

/* subtle film grain for premium texture */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll progress bar */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 300;
  background: var(--grad-mesh); box-shadow: 0 0 12px rgba(255,122,77,.5);
  transition: width .1s linear;
}

/* cursor spotlight (pointer-following soft light) */
#cursor-glow {
  position: fixed; top: 0; left: 0; width: 480px; height: 480px; z-index: 1;
  margin: -240px 0 0 -240px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,122,77,.10), rgba(125,120,255,.05) 40%, transparent 70%);
  opacity: 0; transition: opacity .4s; mix-blend-mode: screen; will-change: transform;
}
body.has-pointer #cursor-glow { opacity: 1; }

/* shimmer sweep across hero gradient headline */
.shimmer {
  background: linear-gradient(100deg, #ff9d6b 0%, #ff6b3d 25%, #ffce6b 40%, #7d78ff 60%, #4fe3d4 80%, #ff8a5b 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer { to { background-position: 250% 0; } }

/* hero staggered entrance (triggered by body.loaded) */
.hero .he { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
body.loaded .hero .he { opacity: 1; transform: none; }
body.loaded .hero .he.s1 { transition-delay: .05s; }
body.loaded .hero .he.s2 { transition-delay: .18s; }
body.loaded .hero .he.s3 { transition-delay: .31s; }
body.loaded .hero .he.s4 { transition-delay: .44s; }
.hero-visual { opacity: 0; transform: scale(.92); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: .3s; }
body.loaded .hero-visual { opacity: 1; transform: none; }

/* button shine sweep */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease);
}
.btn-primary:hover::after { left: 130%; }

/* card pointer-tracked spotlight + tilt prep */
.card, .pkg, .prompt, .it { transform-style: preserve-3d; will-change: transform; }
.card::before, .pkg::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255,122,77,.14), transparent 45%);
}
.card:hover::before, .pkg:hover::before { opacity: 1; }

/* glowing integration dots */
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 6px var(--cyan); } 50% { box-shadow: 0 0 14px var(--cyan), 0 0 22px rgba(79,227,212,.5); } }
.intg .it .dot { animation: dotpulse 2.6s ease-in-out infinite; }
.intg .it:hover .dot { background: var(--coral); box-shadow: 0 0 14px var(--coral); }

/* hero chips: glow ring */
.chip { box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04), inset 0 0 30px rgba(255,122,77,.04); }

/* reveal direction variants */
.reveal.left  { transform: translateX(-36px); }
.reveal.right { transform: translateX(36px); }
.reveal.scale { transform: scale(.94); }
.reveal.left.in, .reveal.right.in, .reveal.scale.in { transform: none; }

/* gentle float on hero core orb already present; add glow breathing on the ring */
.core-ring::before { animation: ringspin 30s linear infinite; }
@keyframes ringspin { to { transform: rotate(360deg); } }

/* section heading underline accent on reveal */
.h-section { position: relative; }

/* SVG diagram: data-packet dots travel via SMIL (defined inline); pulse the core */
@keyframes corepulse { 0%,100% { opacity:.16; } 50% { opacity:.30; } }

@media (hover: none) { #cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .shimmer { animation: none; }
  body::before { animation: none; }
  .intg .it .dot { animation: none; }
  .hero .he, .hero-visual { opacity: 1 !important; transform: none !important; }
}
