/* scaledecom shared styles: tokens, header, type, glass, sections and click FX.
   Page-specific layout lives in each page's own <style>. */
:root {
  --bg: #09070f;
  --text: #f2eefa;
  --muted: #9d94b0;
  --line: rgba(196, 174, 255, .16);
  --violet: #8b5cf6;
  --violet-hi: #b69cff;
  --glow: rgba(139, 92, 246, .55);
  --up: #5ee38b;
  --down: #ff7d8e;
  --glass: linear-gradient(180deg, rgba(42, 33, 62, .82), rgba(17, 13, 27, .9));
  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Geist", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Rising columns backdrop: the columns are the bars, the line reads them ---------- */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url(columns.jpg) 100% 50% / cover no-repeat; opacity: .5; }
html.fxbg body::before { display: none; }
.bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; contain: strict; }
.bgfx video, .bgfx svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bgfx video { object-fit: cover; object-position: 100% 50%; opacity: .5; }
.bgfx svg { opacity: .8; }
.bggrid { fill: none; stroke: rgba(196, 174, 255, .08); stroke-width: 1; }
.bgline { fill: none; stroke: url(#bgl); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; }
.bgline.halo { stroke-width: 9; opacity: .16; }
.bgdot { fill: #eee7ff; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .bgline { animation: bgdraw 3.4s cubic-bezier(.3, .1, .3, 1) .3s backwards; }
  .bgdot { animation: bgdot .5s ease-out backwards; animation-delay: calc(1.5s + var(--i) * .46s); }
  @keyframes bgdraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes bgdot { 0% { scale: 0; } 60% { scale: 1.5; } 100% { scale: 1; } }
}
header, main { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.nav { position: sticky; top: 14px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: min(680px, calc(100% - 24px)); margin: 14px auto 0; padding: 8px 10px 8px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(17, 13, 27, .94); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .8); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.nav ul a { position: relative; text-decoration: none; transition: color .2s; }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1.5px; background: var(--violet-hi); transition: right .3s; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--text); }
.nav ul a:hover::after, .nav ul a[aria-current]::after { right: 0; }
.navr { display: flex; align-items: center; gap: 10px; }
.snd { width: 40px; height: 40px; flex: none; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.snd:hover { color: var(--text); border-color: rgba(196, 174, 255, .32); }
.snd[aria-pressed="true"] { color: var(--violet-hi); }
.snd svg { width: 18px; height: 18px; }
.snd .off, .snd[aria-pressed="false"] .on { display: none; }
.snd[aria-pressed="false"] .off { display: block; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  font: 500 14px/1 var(--font-ui); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  transition: background .2s, border-color .2s, transform .2s, translate .3s cubic-bezier(.2, .8, .2, 1);
}
.btn::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .25) 50%, transparent 58%);
  translate: -130% 0; }
.btn:hover::after { translate: 130% 0; transition: translate .55s ease; }
.btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(196, 174, 255, .32); }
.btn-primary { background: var(--violet); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 4px 0 #4b2bb3, 0 12px 30px -8px var(--glow); }
.btn-client { border-color: rgba(182, 156, 255, .55); }
.btn-primary:hover { background: #9a70ff; border-color: transparent; transform: translateY(-1px); }

/* ---------- Type ---------- */
.eyebrow { font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--violet-hi); margin: 0 0 18px; }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em;
  margin: 0; text-wrap: balance; max-width: 14ch;
}
h1 em { font-style: normal; color: var(--violet-hi); }
h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 17px; max-width: 42ch; margin: 0 0 22px; text-wrap: pretty; }
.sub { color: var(--muted); font-size: 17px; margin: 0; max-width: 52ch; text-wrap: pretty; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.num { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font: 400 12px/1.5 var(--font-mono); letter-spacing: .02em; margin-top: 18px; }
.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font: 500 13px/1 var(--font-mono); color: var(--up); font-variant-numeric: tabular-nums; }
.chip svg { width: 9px; height: 9px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 30px 70px rgba(0, 0, 0, .55);
}

/* ---------- Sections ---------- */
/* content-visibility skips layout/paint of below-fold sections until needed */
.sec, .cta { content-visibility: auto; contain-intrinsic-size: auto 760px; }
.sec { padding-block: 110px 20px; scroll-margin-top: 70px; }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.reveal { opacity: 0; translate: 0 24px;
  transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * .13s); }
.reveal.vis { opacity: 1; translate: 0 0; }

/* ---------- Calculator / estimator ---------- */
.calc { border-radius: 26px; padding: 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
.cfield { margin-bottom: 28px; }
.cfield label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.cfield output { font: 600 19px/1 var(--font-display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.calc input[type="range"] { width: 100%; height: 32px; accent-color: var(--violet); cursor: pointer; }
.cout { display: grid; gap: 16px; align-content: center; }
.crow { border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); padding: 16px 22px; transition: border-color .3s; }
.crow .lbl { font-size: 13.5px; color: var(--muted); }
.crow .val { font: 600 clamp(24px, 2.4vw, 32px)/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.crow .sub2 { font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.crow.gain .val { color: var(--up); }
.crow.loss { border-color: rgba(255, 125, 142, .35); }
.crow.loss .val { color: var(--down); }
.calc .btn-primary { justify-self: start; margin-top: 4px; }

/* ---------- Plan atoms (home pricing cards + pricing pages) ---------- */
.ptag { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--violet-hi); }
.pprice { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pprice .num { font-size: clamp(40px, 4.4vw, 56px); line-height: 1; }
.pprice .per, .pprice .pfrom { color: var(--muted); font-size: 16px; }
.pplus { font: 600 17px/1.3 var(--font-ui); color: var(--up); }
.pgo { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font-ui); color: var(--violet-hi); }
.pgo svg { width: 14px; height: 14px; flex: none; transition: translate .3s; }
a:hover .pgo svg, .pgo:hover svg { translate: 4px 0; }

/* ---------- CTA + footer ---------- */
.cta { text-align: center; padding-block: 150px 130px; }
.cta h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 16px; }
.cta .sub { margin: 0 auto 30px; }
.cta .mail { margin-top: 22px; color: var(--muted); font: 400 14px/1 var(--font-mono); }
.cta .mail b { color: var(--text); font-weight: 500; user-select: all; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 26px 40px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------- Click FX, tilt ---------- */
.spark { position: fixed; z-index: 999; width: 3px; height: 13px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(#fff, var(--violet-hi)); rotate: var(--sa, 0deg);
  animation: sparkfly .45s cubic-bezier(.2, .8, .4, 1) forwards; }
@keyframes sparkfly { to { opacity: 0; translate: var(--dx, 0) var(--dy, 20px); scale: .3; } }
.plus1 { position: fixed; z-index: 999; pointer-events: none; font: 600 13px var(--font-mono); color: var(--up); text-shadow: 0 0 8px rgba(94, 227, 139, .6); animation: p1 .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes p1 { from { opacity: 1; translate: 0 0; scale: .7; } to { opacity: 0; translate: 8px -36px; scale: 1.2; } }
.plus1.touch { font-size: 18px; }
/* iOS Safari only fires click on "clickable" elements; mark the page so every tap counts */
@media (hover: none) { header, main { cursor: pointer; -webkit-tap-highlight-color: transparent; } }
.t3d { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; will-change: transform; }
.t3d::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(182, 156, 255, .13), transparent 46%);
  opacity: var(--go, 0); transition: opacity .3s; }
.w { display: inline-block; }
.wnb { white-space: nowrap; }
.sprog { position: fixed; left: 0; top: 0; width: 100%; height: 2px; z-index: 998; pointer-events: none;
  transform-origin: 0 50%; scale: 0 1; background: linear-gradient(90deg, var(--violet), var(--violet-hi));
  box-shadow: 0 0 12px var(--glow); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cpop { display: inline-block; animation: cpop .45s cubic-bezier(.2, .8, .2, 1); }
  @keyframes cpop { 30% { scale: 1.12; } }
  h1 .w { animation: wordup .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.08s + var(--wi, 0) * 70ms); }
  .reveal h2 .w { opacity: 0; }
  .reveal.vis h2 .w { animation: wordup .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--wi, 0) * 55ms); }
  @keyframes wordup { from { opacity: 0; translate: 0 .4em; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  .sec { padding-block: 72px 10px; }
  .calc { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 26px; }
}
.navmenu { display: grid; width: 38px; height: 38px; flex: none; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; place-content: center; gap: 6px; }
.navmenu span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: translate .2s, rotate .2s; }
.nav.open .navmenu span:first-child { translate: 0 4px; rotate: 45deg; }
.nav.open .navmenu span:last-child { translate: 0 -4px; rotate: -45deg; }
.nav nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: #120d1e; box-shadow: 0 24px 50px -18px #000; }
.nav.open nav { display: block; }
.nav ul { flex-direction: column; gap: 16px; font-size: 16px; color: var(--text); }
@media (max-width: 860px) {
  .nav { padding: 6px 6px 6px 16px; gap: 8px; }
  .navr { gap: 6px; }
  .navr .btn { min-height: 36px; padding: 8px 12px; font-size: 13px; }
  .snd { width: 36px; height: 36px; }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .brand { font-size: 0; }
}
@media (max-width: 350px) {
  .snd { display: none; }
}
@media (max-width: 480px) {
  .lede { font-size: 16px; }
}
