/* TeamX portfolio. Original palette: near-black base, brand blue, cyan, emerald. Archivo (extended for headlines) + JetBrains Mono. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #07080a;
  --panel: #0f1117;
  --surface: #141722;
  --line: #1c202c;
  --line2: #2b3550;
  --blue: #2563eb;
  --blue2: #3b82f6;
  --sky: #60a5fa;
  --cyan: #38bdf8;
  --cyan-l: #7dd3fc;
  --mint: #34d399;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --ui: "Archivo", system-ui, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --wrap: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--ui); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: #fff; color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 1rem; }

h2 { font-size: clamp(2.5rem, 5.5vw, 4.75rem); font-weight: 800; font-stretch: 110%; line-height: .95; letter-spacing: -.035em; color: #fff; text-wrap: balance; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: #fff; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3rem; padding: .7rem 1.5rem; font-weight: 800; font-size: 1rem; border: 2px solid transparent; border-radius: 999px; transition: transform .2s, box-shadow .2s, background-color .2s, color .2s; }
.btn-lg { min-height: 3.75rem; padding: 1rem 2rem; font-size: 1.15rem; }
.btn-cyan { background: var(--cyan); color: var(--ink); box-shadow: 0 14px 30px -14px rgba(56, 189, 248, .9); }
.btn-cyan:hover { background: #7dd3fc; transform: translateY(-2px); }
.btn-line { border-color: rgba(255, 255, 255, .9); color: #fff; }
.btn-line:hover { background: #fff; color: var(--blue); }
.btn-ink { background: var(--ink); color: #fff; border-radius: 12px; }
.btn-ink:hover { background: #111827; }

/* ---------- header ---------- */
.bar { position: fixed; z-index: 100; top: 0; left: 0; right: 0; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.bar.scrolled { background: rgba(7, 8, 10, .86); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bar-in { display: flex; align-items: center; gap: 2rem; height: 4.75rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.7rem; font-weight: 800; font-stretch: 112%; letter-spacing: -.03em; color: #fff; }
.brand svg { width: 2.3rem; height: 2.3rem; }
.nav { display: flex; gap: 2.2rem; margin-left: auto; font-weight: 600; font-size: 1.05rem; color: #fff; }
.nav a { padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="true"] { border-bottom-color: var(--cyan); }
.bar-cta { min-height: 2.8rem; padding: .5rem 1.5rem; }
.menu-btn { display: none; margin-left: auto; width: 2.9rem; height: 2.9rem; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(7, 8, 10, .35); color: #fff; border-radius: 12px; align-items: center; justify-content: center; }
.menu-btn svg { width: 1.4rem; height: 1.4rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 8.5rem 0 0;
  background-color: var(--blue);
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.tick { position: absolute; width: 22px; height: 22px; top: 6rem; border: 2px solid rgba(255, 255, 255, .7); }
.tick.tl { left: 1.5rem; border-right: 0; border-bottom: 0; }
.tick.tr { right: 1.5rem; border-left: 0; border-bottom: 0; }
.h1 { font-size: clamp(2.7rem, 6.2vw, 6.1rem); line-height: .94; font-weight: 800; font-stretch: 112%; letter-spacing: -.035em; }
.ln { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.ln > span { display: inline-block; transform: translateY(108%); animation: lnup 1s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--n) * 110ms + 120ms); }
.sky { color: #7dd3fc; }
@keyframes lnup { to { transform: none; } }

.dim { position: relative; max-width: 560px; height: 44px; margin-top: 1.6rem; color: #bfe3ff; }
.dim svg { width: 100%; height: 44px; stroke: currentColor; stroke-width: 1.6; fill: none; transform-origin: left center; animation: growx 1.1s .8s cubic-bezier(.2, .8, .2, 1) both; }
.dim span { position: absolute; left: 50%; top: 0; transform: translateX(-50%); background: var(--blue); padding: 0 1rem; font-family: var(--mono); font-size: 1.05rem; font-weight: 500; color: #fff; line-height: 44px; white-space: nowrap; animation: fadein .6s 1.4s both; }
@keyframes growx { from { transform: scaleX(0); } }
@keyframes fadein { from { opacity: 0; } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 3rem; align-items: start; }
.hero-copy { padding-bottom: 4.5rem; }
.lede, .hero-actions, .titleblock { animation: fadeup .9s .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(24px); } }
.lede { margin-top: 1.7rem; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.5; max-width: 34rem; color: #e0ebff; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }
.titleblock { margin-top: 2.4rem; max-width: 34rem; display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid rgba(255, 255, 255, .75); background: rgba(7, 8, 10, .18); font-family: var(--mono); font-size: .85rem; }
.titleblock div { display: flex; gap: .8rem; padding: .6rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.titleblock div:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, .45); }
.titleblock div:nth-last-child(-n+2) { border-bottom: 0; }
.titleblock dt { color: #bfd6ff; min-width: 4.4rem; }
.titleblock dd { color: #fff; }

/* ---------- 3D collage ---------- */
.collage {
  --rx: 0deg; --ry: 0deg;
  position: relative; transform-style: preserve-3d;
  transform: perspective(1700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  padding-bottom: 6.2rem;
}
.sheet-back { position: absolute; width: min(450px, 92%); border-radius: 22px; }
.b-cyan { right: 14px; top: 44px; bottom: 6px; background: var(--cyan); transform: translateZ(-70px) rotate(7deg); animation: deal 1s .35s cubic-bezier(.2, .8, .2, 1) both; }
.b-dark { right: 30px; top: 24px; bottom: 26px; background: var(--panel); border: 1.5px solid var(--line2); transform: translateZ(-34px) rotate(3deg); animation: deal 1s .25s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes deal { from { opacity: 0; translate: 0 60px; } }

.sheet { position: relative; width: min(450px, 92%); margin: 0 48px 0 auto; background: #fff; color: var(--ink); border-radius: 22px; box-shadow: 0 60px 90px -36px rgba(2, 6, 60, .9); transform: rotate(-2.5deg); animation: dealsheet 1s .1s cubic-bezier(.2, .8, .2, 1) both; line-height: 1.35; }
@keyframes dealsheet { from { opacity: 0; translate: 0 70px; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.5rem .9rem; }
.sheet-top > div:first-child { min-width: 0; }
.seg { flex: none; }
.sheet-top h2 { font-size: 1.3rem; font-stretch: 100%; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); font-weight: 800; }
.sheet-top p { font-size: .84rem; color: #64748b; margin-top: .2rem; }
.seg { display: inline-flex; border: 1.5px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: .4rem .65rem; font-weight: 700; font-size: .8rem; color: #64748b; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sheet fieldset { border: 0; margin: 0; padding: .3rem 1.5rem 0; min-width: 0; }
.sheet legend { float: left; width: 100%; padding: 0; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.sheet legend + * { clear: both; }
.sheet fieldset + fieldset { padding-top: .9rem; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .6rem .8rem; margin-inline: -.8rem; border-radius: 12px; cursor: pointer; transition: background-color .15s; }
.choice:hover { background: #f1f5f9; }
.choice:has(input:checked):not(.check) { background: #eff6ff; box-shadow: 0 0 0 2px var(--blue); }
.addons { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .55rem; }
.addons legend { grid-column: 1 / -1; }
.addons .choice { grid-template-columns: auto 1fr; margin-inline: 0; padding: .55rem .65rem; border: 1.5px solid #e2e8f0; align-items: start; gap: .5rem .55rem; }
.addons .choice .mark { margin-top: .15rem; }
.addons .choice-name { font-size: .84rem; line-height: 1.2; }
.addons .choice-h { grid-column: 2; font-size: .74rem; }
.addons .choice:has(input:checked) { border-color: var(--blue); background: #eff6ff; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.mark { width: 1.15rem; height: 1.15rem; border: 2px solid #94a3b8; border-radius: 50%; display: grid; place-items: center; transition: border-color .15s, background-color .15s; }
.choice.check .mark { border-radius: 5px; }
.choice input:checked + .mark { border-color: var(--blue); background: var(--blue); }
.choice input:checked + .mark::after { content: ""; width: .42rem; height: .42rem; background: #fff; border-radius: 50%; }
.choice.check input:checked + .mark::after { border-radius: 1px; }
.choice input:focus-visible + .mark { outline: 3px solid var(--cyan); outline-offset: 2px; }
.choice-name { font-weight: 650; line-height: 1.2; }
.choice-desc { display: block; font-size: .8rem; color: #64748b; font-weight: 400; margin-top: .1rem; }
.choice-h { font-family: var(--mono); font-size: .82rem; color: #64748b; }
.choice input:checked ~ .choice-h { color: var(--blue); font-weight: 700; }
.tear { margin: 1.2rem 1.6rem 0; border-top: 2px dashed #cbd5e1; }
.lines { padding: 1rem 1.6rem 0; display: grid; gap: .15rem; min-height: 4rem; }
.line { display: flex; align-items: baseline; gap: .5rem; font-size: .92rem; animation: slip .35s ease-out both; }
.line .fill { flex: 1; border-bottom: 2px dotted #cbd5e1; transform: translateY(-.28em); min-width: 1rem; }
.line .hrs { color: #64748b; font-family: var(--mono); font-size: .85rem; }
.total { padding: .9rem 1.6rem 1.6rem; display: grid; gap: .9rem; }
.total-row { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; font-size: .92rem; color: #64748b; }
.total-row strong { color: var(--ink); font-weight: 700; }
.cost { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; font-stretch: 108%; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.cost-wrap { background: linear-gradient(transparent 62%, #bae6fd 62%); display: inline-block; }
.sheet .btn { width: 100%; }
.sheet .small { font-size: .8rem; color: #64748b; line-height: 1.45; }
@keyframes slip { from { opacity: 0; transform: translateY(-6px); } }

.pipe { position: absolute; left: -30px; right: 70px; bottom: 0; background: var(--ink); border: 1.5px solid var(--line2); border-radius: 18px; padding: 1rem 1.2rem 1.1rem; box-shadow: 0 40px 70px -30px rgba(2, 6, 60, .9); transform: translateZ(70px) rotate(-2deg); animation: dealpipe 1s .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dealpipe { from { opacity: 0; translate: -40px 40px; } }
.pipe-top { display: flex; justify-content: space-between; align-items: baseline; color: #fff; }
.pipe-top b { font-size: 1rem; font-weight: 800; }
.pipe-top span { font-family: var(--mono); font-size: .72rem; color: var(--cyan-l); }
.funnel { display: flex; gap: 4px; margin-top: .7rem; height: 12px; }
.funnel u { display: block; width: var(--w); background: var(--c); border-radius: 6px; transform-origin: left; animation: growx 1.2s 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .7rem; font-size: .78rem; color: #cbd5e1; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; }
.legend .hl { color: var(--cyan-l); font-weight: 700; }
.chip-ok { position: absolute; right: -8px; bottom: 4.6rem; display: flex; align-items: center; gap: .6rem; background: #fff; color: var(--ink); border-radius: 999px; padding: .7rem 1.2rem .7rem .8rem; font-weight: 700; font-size: .92rem; box-shadow: 0 24px 40px -20px rgba(2, 6, 60, .8); transform: translateZ(100px) rotate(3deg); animation: dealchip 1s .95s cubic-bezier(.2, .8, .2, 1) both; }
.chip-ok svg { width: 1.6rem; height: 1.6rem; }
@keyframes dealchip { from { opacity: 0; translate: 30px 30px; } }

/* ---------- sections ---------- */
.sec { padding-block: var(--section) 0; }
.sec.flush { padding-bottom: var(--section); }
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.sec-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }
.sec-head p { margin-top: 1.1rem; color: var(--muted); font-size: 1.2rem; line-height: 1.5; max-width: 38rem; }
.sec-head.split p { margin: 0; max-width: 24rem; }

/* ---------- work ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 1.75rem; }
.case { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(1.6rem, 3vw, 2.5rem); display: grid; gap: 1.75rem; align-content: space-between; min-height: 600px; }
.case-dark { background: var(--panel); border: 1.5px solid var(--line); }
.case-blue { background: linear-gradient(160deg, #2563eb, #1e40af); }
.glow { position: absolute; right: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgba(56, 189, 248, .3), transparent); pointer-events: none; }
.case-copy { position: relative; }
.case-meta { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.case-blue .case-meta { color: #bfd6ff; }
.tag { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--cyan); color: var(--cyan-l); padding: .2rem .7rem; border-radius: 6px; }
.tag.light { border-color: #fff; color: #fff; }
.case h3 { margin-top: 1.1rem; font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-stretch: 104%; line-height: 1.05; letter-spacing: -.03em; max-width: 31rem; }
.case-copy p { margin-top: .9rem; font-size: 1.1rem; line-height: 1.55; color: var(--muted); max-width: 32rem; text-wrap: pretty; }
.case-blue .case-copy p { color: #dbe7ff; }
.mock { --mx: 6deg; --my: -6deg; position: relative; border-radius: 18px; padding: 1.4rem; transform: perspective(900px) rotateX(var(--mx)) rotateY(var(--my)); transition: transform .35s cubic-bezier(.2, .7, .2, 1); box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .9); will-change: transform; }
.case-blue .mock { --my: 6deg; }
.mock-white { background: #fff; color: var(--ink); display: grid; gap: .9rem; }
.mock-ink { background: var(--ink); border: 1.5px solid var(--line2); }
.mock-top { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.mock-top strong { font-size: 1.1rem; }
.mock-top span { font-size: .8rem; color: #64748b; font-family: var(--mono); }
.mock-top.light { color: #fff; margin-bottom: .6rem; }
.mock-top.light span { color: var(--cyan-l); }
.mock-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; font-size: .9rem; }
.mock-facts small { display: block; color: #64748b; font-size: .75rem; }
.mock-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.mb { border: 1.5px solid #cbd5e1; font-weight: 700; font-size: .85rem; padding: .55rem 1.2rem; border-radius: 10px; }
.mb.ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.mb.bad { color: #b91c1c; }
.mock svg { width: 100%; height: auto; }
.chart-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .case:not(.in) .chart-line { stroke-dashoffset: 1; }
.js .case .chart-line { transition: stroke-dashoffset 1.8s cubic-bezier(.3, .7, .2, 1); }
.stack-line { position: relative; font-family: var(--mono); font-size: .86rem; color: var(--cyan-l); }
.stack-line.light { color: #dbe7ff; }

/* ---------- services explorer ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.rows { border-top: 1px solid var(--line2); }
.row { padding: 1.6rem 1.2rem; margin-inline: -1.2rem; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background-color .25s, box-shadow .25s; cursor: default; }
.row h3 { font-size: 1.65rem; }
.row p { margin-top: .5rem; color: var(--muted); max-width: 31rem; }
.stack { display: block; margin-top: .55rem; font-family: var(--mono); font-size: .84rem; color: var(--cyan-l); }
.explorer[data-active="0"] .row[data-layer="0"], .explorer[data-active="1"] .row[data-layer="1"],
.explorer[data-active="2"] .row[data-layer="2"], .explorer[data-active="3"] .row[data-layer="3"] { background: var(--panel); box-shadow: inset 3px 0 0 var(--cyan); }
.drawing { border: 1px solid var(--line); border-radius: 22px; padding: .6rem; background-color: #0a0c12; background-image: linear-gradient(rgba(96, 165, 250, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(96, 165, 250, .10) 1px, transparent 1px); background-size: 32px 32px; --mx: 0px; }
.drawing svg { width: 100%; height: auto; max-width: 640px; margin-inline: auto; overflow: visible; }
.layer { transform: translateY(var(--c)); translate: calc(var(--mx) * var(--k)) 0; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), translate .35s ease-out, opacity .35s; }
.explorer.in .layer { transform: translateY(var(--e)); }
.layer .leader, .layer text { opacity: 0; transition: opacity .6s .6s; }
.explorer.in .layer .leader, .explorer.in .layer text { opacity: 1; }
.assembly { opacity: 0; transition: opacity .8s .5s; }
.explorer.in .assembly { opacity: .55; }
.lab { font: 700 18px var(--ui); fill: #fff; }
.sub { font: 400 14px var(--mono); fill: #93c5fd; }
.explorer[data-active] .layer { opacity: .38; }
.explorer[data-active="0"] .layer[data-layer="0"], .explorer[data-active="1"] .layer[data-layer="1"],
.explorer[data-active="2"] .layer[data-layer="2"], .explorer[data-active="3"] .layer[data-layer="3"] { opacity: 1; transform: translateY(calc(var(--e) - 26px)); filter: drop-shadow(0 18px 18px rgba(56, 189, 248, .35)); }

/* ---------- rates ---------- */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--line2); }
.term { padding: 2.1rem 2.1rem 2.1rem 0; }
.term + .term { padding-left: 2.1rem; border-left: 1px solid var(--line); }
.term h3 { font-size: 1.25rem; }
.term .price { margin: .8rem 0; font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1; font-weight: 800; font-stretch: 108%; letter-spacing: -.04em; color: var(--cyan-l); }
.term p { color: var(--muted); }
.rates-note { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem 2rem; color: var(--muted); font-size: .98rem; }

/* ---------- process ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 25px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue2)); transform-origin: left; }
.step { position: relative; }
.node { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); border: 2px solid var(--cyan); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: var(--cyan-l); position: relative; }
.step.last .node { background: var(--cyan); color: var(--ink); }
.step h3 { margin: 1.3rem 0 .5rem; font-size: 1.5rem; }
.step p { color: var(--muted); }

/* ---------- faq ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3.5rem; align-items: start; }
.faq { border-top: 1px solid var(--line2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 2rem; line-height: 1; color: var(--cyan-l); transition: transform .25s; flex: none; font-weight: 400; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 3rem 1.5rem 0; color: var(--muted); max-width: 40rem; }

/* ---------- contact ---------- */
.contact { border-radius: 32px; padding: clamp(1.6rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; background-color: var(--blue); background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 48px 48px; }
.contact h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.contact .lede { margin-top: 1.2rem; color: #dbe7ff; font-size: 1.25rem; }
.direct { margin-top: 2rem; display: grid; gap: .8rem; max-width: 26rem; }
.direct a { display: block; padding: 1rem 1.3rem; background: rgba(7, 8, 10, .35); border: 1px solid rgba(255, 255, 255, .4); border-radius: 14px; transition: transform .2s, background-color .2s; }
.direct a:hover { transform: translateY(-3px); background: rgba(7, 8, 10, .5); }
.direct b { display: block; font-size: .82rem; font-weight: 500; color: #bfd6ff; }
.direct span { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; color: #fff; }
.form { display: grid; gap: 1.1rem; background: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.25rem, 3vw, 1.9rem); box-shadow: 0 40px 70px -30px rgba(0, 0, 40, .8); }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; font-size: .92rem; }
.field input, .field textarea { width: 100%; padding: .85rem 1rem; background: var(--panel); border: 1.5px solid var(--line2); border-radius: 12px; color: #fff; font-size: 1rem; }
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 189, 248, .3); }
.form-note { font-size: .86rem; color: var(--muted); }
.form-msg { padding: .8rem 1rem; border-radius: 10px; background: rgba(52, 211, 153, .15); color: #6ee7b7; font-weight: 600; }

/* ---------- footer + floating contact ---------- */
.foot { margin-top: 0; border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .95rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot nav { display: flex; gap: 1.5rem; }
.foot a:hover { color: #fff; text-decoration: underline; }
.wa-float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: .55rem; padding: .75rem 1.15rem; background: var(--blue); color: #fff; border-radius: 999px; font-weight: 700; font-size: .95rem; box-shadow: 0 12px 28px -10px rgba(37, 99, 235, .9); transition: background-color .15s, opacity .25s, transform .25s; }
.wa-float:hover { background: var(--blue2); }
.wa-float svg { width: 1.2rem; height: 1.2rem; }
.wa-float.away { opacity: 0; transform: translateY(10px); pointer-events: none; }

/* ---------- scroll-driven 3D reveals (progressive enhancement) ---------- */
@supports (animation-timeline: view()) {
  .case, .term { animation: tilt-in linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  .row { animation: row-in linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  .steps::before { animation: growx linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
  .node { animation: pop linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
  .sec-head h2 { animation: h2-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
}
@keyframes tilt-in { from { opacity: 0; transform: perspective(1000px) rotateX(16deg) translateY(40px); transform-origin: 50% 100%; } to { opacity: 1; transform: none; } }
@keyframes row-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
@keyframes h2-in { from { opacity: 0; transform: translateY(26px); letter-spacing: -.06em; } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .explorer, .faq-grid, .contact { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.6rem; }
  .steps::before { display: none; }
  .nav { display: none; }
  .bar-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.open { display: grid; position: absolute; left: 0; right: 0; top: 100%; gap: 0; margin: 0; padding: .5rem var(--gutter) 1rem; background: rgba(7, 8, 10, .96); border-bottom: 1px solid var(--line); }
  .nav.open a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
  .bar { background: rgba(7, 8, 10, .0); }
  .explorer .drawing { order: -1; position: sticky; top: 4.75rem; z-index: 5; }
}
@media (max-width: 760px) {
  .hero { padding-top: 7rem; }
  .collage { transform: none; padding-bottom: 0; display: grid; gap: 1rem; }
  .sheet-back { display: none; }
  .sheet { width: 100%; margin: 0; transform: none; }
  .pipe, .chip-ok { position: static; transform: none; width: auto; justify-self: start; }
  .tick { display: none; }
  .titleblock { grid-template-columns: 1fr; }
  .titleblock div:nth-child(odd) { border-right: 0; }
  .titleblock div:nth-last-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .45); }
  .titleblock div:last-child { border-bottom: 0; }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .term, .term + .term { padding: 1.6rem 0; border-left: 0; }
  .term + .term { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .wa-float span { display: none; }
  .wa-float { padding: .85rem; }
  .case { min-height: 0; }
  .explorer .drawing { padding: .2rem; max-height: 17rem; overflow: hidden; }
  .faq details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .ln > span { transform: none; }
}

/* ---------- adaptive performance ----------
   html.touch  = phone/tablet (set before first paint): same look, with the expensive paint effects made cheap.
   html.lite   = this device measured slow, or asked to save data/power: also drops motion and 3D.   (see the inline script in index.html) */
html.touch .sheet { box-shadow: 0 16px 26px -16px rgba(2, 6, 60, .75); }
html.touch .pipe { box-shadow: 0 14px 24px -14px rgba(2, 6, 60, .75); }
html.touch .chip-ok { box-shadow: 0 10px 18px -10px rgba(2, 6, 60, .65); }
html.touch .mock { box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .8); }
html.touch .form { box-shadow: 0 14px 26px -16px rgba(0, 0, 40, .7); }
html.touch .btn-cyan { box-shadow: 0 6px 14px -8px rgba(56, 189, 248, .8); }
html.touch .wa-float { box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .85); }
html.touch .bar.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 8, 10, .96); }
html.touch .glow { display: none; }
html.touch .explorer .layer { filter: none !important; }

html.lite *, html.lite *::before, html.lite *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-timeline: auto !important; transition-duration: .01ms !important; }
html.lite { scroll-behavior: auto; }
html.lite .ln > span { transform: none; }
html.lite .collage, html.lite .mock { transform: none !important; transform-style: flat; }
html.lite .sheet-back, html.lite .b-cyan, html.lite .b-dark { display: none; }
html.lite .explorer .drawing { position: static; }
html.lite .sheet, html.lite .pipe, html.lite .chip-ok, html.lite .mock, html.lite .form, html.lite .btn-cyan, html.lite .wa-float { box-shadow: none; }
