/* ===== Tokens =====
   Oq + sariq palitra. Primitives are referenced only by the semantic layer.
   Contrast (computed): ink on yellow 11.1:1 · ink-soft on yellow 7.59:1 ·
   muted on white 7.56:1 · muted on cream 6.98:1 · amber-800 on white 7.42:1 ·
   white on ink 17.96:1. Bright yellow on white is 1.62:1, so yellow never
   carries text on white and yellow fills on white always get an ink edge. */
:root {
  --ink-900: #0E1726;
  --ink-800: #18233A;
  --ink-soft: #3D3420;
  --gray-600: #4A5565;
  --gray-200: #E4E7EC;
  --white: #FFFFFF;
  --yellow-400: #FFC20E;
  --yellow-300: #FFD54F;
  --cream: #FFF6D6;
  --amber-800: #6B5200;
  --cyan-500: #00A3D9;
  --magenta-600: #C8175D;

  --color-bg: var(--white);
  --color-surface: var(--white);
  --color-cream: var(--cream);
  --color-yellow: var(--yellow-400);
  --color-text: var(--ink-900);
  --color-text-muted: var(--gray-600);
  --color-on-yellow: var(--ink-900);
  --color-on-yellow-muted: var(--ink-soft);
  --color-accent-text: var(--amber-800);
  --color-outline: var(--gray-200);
  --color-edge: var(--ink-900);
  --color-input-border: var(--gray-600);
  --color-primary: var(--ink-900);
  --color-primary-hover: var(--ink-800);
  --color-on-primary: var(--white);
  --color-error: #B42318;

  --font-display: Unbounded, "Onest", system-ui, sans-serif;
  --font-body: Onest, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-hard: 6px 6px 0 var(--color-edge);
  --container: 1240px;
  --gutter: 16px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  color: var(--color-text); background: var(--color-bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.03em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); font-weight: 900; line-height: .98; }
h2 { font-size: clamp(1.75rem, 3.8vw, 3.1rem); font-weight: 800; line-height: 1.08; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--color-yellow); color: var(--color-on-yellow); }
:focus-visible { outline: 3px solid var(--color-edge); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--color-primary); color: var(--color-on-primary); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ===== Text helpers ===== */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent-text); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: currentColor; }
.section--yellow .eyebrow { color: var(--color-on-yellow); }

/* marker highlight — sweeps in when its parent becomes visible */
.mark { padding: 0 .1em; margin: 0 -.05em; background: linear-gradient(var(--yellow-400), var(--yellow-400)) no-repeat 0 92% / 0% 46%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .9s .25s var(--ease-out); }
.is-in .mark, .mark.is-in { background-size: 100% 46%; }
.section--yellow .mark { background-image: linear-gradient(var(--white), var(--white)); }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: var(--white); border: 2px solid var(--color-edge); font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } }

/* ===== Buttons ===== */
.btn {
  --tx: 0px; --ty: 0px; --lift: 0px;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transform: translate(var(--tx), calc(var(--ty) + var(--lift)));
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .35s var(--ease-out), box-shadow .2s var(--ease), border-color .2s;
}
.btn svg { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.btn:hover { --lift: -2px; }
.btn:hover svg { transform: translateX(4px); }
.btn:active { --lift: 1px; }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); box-shadow: 0 14px 28px rgba(14, 23, 38, .28); }
/* yellow fill rises from the bottom on hover */
.btn--primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow-400); border-radius: inherit; transform: translateY(101%); transition: transform .45s var(--ease-out); }
.btn--primary:hover::before { transform: none; }
.btn--primary:hover { color: var(--ink-900); border-color: var(--ink-900); }
.btn--outline { border-color: var(--color-edge); color: var(--color-text); background: var(--color-surface); }
.btn--outline:hover { box-shadow: 4px 4px 0 var(--color-edge); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .92rem; }
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 2px solid transparent; transition: border-color .25s, transform .4s var(--ease-out);
}
.header.is-scrolled { border-bottom-color: var(--color-edge); }
.header.is-hidden { transform: translateY(-100%); }
.header__row { height: 100%; display: flex; align-items: center; gap: 28px; }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header__phone { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; display: none; }
@media (min-width: 1140px) { .header__phone { display: inline; } }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -.03em; }
.logo__text { font-weight: 500; }
.logo__text b { font-weight: 900; }
.logo__mark { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; transition: transform .6s var(--spring); }
.logo:hover .logo__mark { transform: rotate(180deg); }
.logo__mark i, .preloader__mark i { border-radius: 3px; }
.logo__mark i { width: 11px; height: 11px; }
.logo__mark i:nth-child(1), .preloader__mark i:nth-child(1) { background: var(--cyan-500); }
.logo__mark i:nth-child(2), .preloader__mark i:nth-child(2) { background: var(--magenta-600); }
.logo__mark i:nth-child(3), .preloader__mark i:nth-child(3) { background: var(--yellow-400); }
.logo__mark i:nth-child(4), .preloader__mark i:nth-child(4) { background: var(--ink-900); }

.nav { display: flex; gap: 2px; }
.nav a { position: relative; padding: 8px 12px; text-decoration: none; font-weight: 600; color: var(--color-text-muted); transition: color .15s; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 8px; z-index: -1; background: var(--yellow-400); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease-out); }
.nav a:hover, .nav a.is-active { color: var(--color-text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.burger { display: none; width: 46px; height: 46px; border: 2px solid var(--color-edge); background: var(--white); cursor: pointer; padding: 11px 10px; border-radius: 50%; color: var(--color-text); }
.burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; margin: 4px 0; transition: transform .3s var(--ease-out), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 919px) {
  .burger { display: block; }
  .header__actions .btn { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100dvh - var(--header-h));
    flex-direction: column; justify-content: center; gap: 4px;
    background: var(--yellow-400); padding: 24px var(--gutter);
    clip-path: circle(0 at calc(100% - 40px) 0); visibility: hidden;
    transition: clip-path .6s var(--ease-out), visibility .6s;
  }
  .nav.is-open { clip-path: circle(150% at calc(100% - 40px) 0); visibility: visible; }
  .nav a { font-family: var(--font-display); font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 800; color: var(--ink-900); padding: 6px 0; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .5s var(--ease-out); }
  .nav.is-open a { opacity: 1; transform: none; }
  .nav.is-open a:nth-child(2) { transition-delay: .05s; }
  .nav.is-open a:nth-child(3) { transition-delay: .1s; }
  .nav.is-open a:nth-child(4) { transition-delay: .15s; }
  .nav.is-open a:nth-child(5) { transition-delay: .2s; }
  .nav.is-open a:nth-child(6) { transition-delay: .25s; }
  .nav a::after { display: none; }
}

/* ===== Cards & forms ===== */
.card { background: var(--color-surface); border: 2px solid var(--color-edge); border-radius: var(--radius); box-shadow: var(--shadow-hard); padding: 30px; }

.field { display: grid; gap: 8px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: .9rem; font-weight: 700; padding: 0; margin-bottom: 8px; }
.field > span { margin-bottom: 0; }
.field em { font-style: normal; color: var(--color-text-muted); font-weight: 400; }
.field__hint { color: var(--color-text-muted); font-size: .82rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 2px solid var(--color-input-border); background: var(--color-surface); color: var(--color-text);
  font: inherit; transition: border-color .15s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-edge); box-shadow: 0 0 0 4px var(--yellow-400); }
.field input[aria-invalid="true"] { border-color: var(--color-error); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.field-row { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 12px; }

/* segmented radio group */
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 46px; padding: 0 10px; border-radius: var(--radius-sm); border: 2px solid var(--color-edge); font-weight: 700; font-size: .92rem; text-align: center; background: var(--white); transition: background-color .15s, transform .25s var(--spring), box-shadow .2s; }
.seg label:hover span { transform: translateY(-2px); }
.seg input:checked + span { background: var(--yellow-400); box-shadow: 3px 3px 0 var(--color-edge); transform: translate(-2px, -2px); }
.seg input:focus-visible + span { outline: 3px solid var(--color-edge); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch span { position: absolute; inset: 0; border-radius: 50%; background: var(--sw); border: 2px solid var(--color-edge); transition: transform .3s var(--spring), box-shadow .2s; }
.swatch:hover span { transform: scale(1.1); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--color-edge); transform: scale(1.05); }
.swatch input:focus-visible + span { outline: 3px solid var(--color-edge); outline-offset: 5px; }

.toggles { border: 0; padding: 0; margin: 4px 0 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--color-edge); font-weight: 700; background: var(--white); transition: background-color .15s; }
.toggle span::before { content: ""; width: 16px; height: 16px; border-radius: 4px; border: 2px solid currentColor; transition: background-color .15s; }
.toggle input:checked + span { background: var(--yellow-400); }
.toggle input:checked + span::before { background: var(--ink-900); box-shadow: inset 0 0 0 2px var(--yellow-400); }
.toggle input:focus-visible + span { outline: 3px solid var(--color-edge); outline-offset: 2px; }

.form-error { color: var(--color-error); font-weight: 600; font-size: .92rem; margin-bottom: 12px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow-400); border: 2px solid var(--color-edge); color: var(--ink-900); font-size: .7rem; font-weight: 900; }

/* ===== Effects layer ===== */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60; background: var(--yellow-400); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); box-shadow: 0 1px 0 var(--ink-900); }

/* film-grain texture for a printed, tactile feel */
.grain { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .05; 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }

/* highlighter cursor: a yellow disc multiplied onto the page */
.cursor { position: fixed; left: 0; top: 0; z-index: 150; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none; background: var(--yellow-400); mix-blend-mode: multiply; transform: translate(var(--cx, -100px), var(--cy, -100px)) scale(var(--cs, 1)); transition: transform .18s var(--ease-out), opacity .2s; opacity: 0; display: grid; place-items: center; }
.cursor.is-on { opacity: 1; }
.cursor.is-hover { --cs: 3.2; }
.cursor.is-label { --cs: 1; width: 96px; height: 96px; margin: -48px 0 0 -48px; mix-blend-mode: normal; background: var(--ink-900); }
.cursor { transition: transform .18s var(--ease-out), opacity .2s, width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), background-color .2s; }
.cursor__label { font-size: .72rem; font-weight: 800; color: var(--yellow-400); white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; opacity: 0; transition: opacity .2s; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (pointer: coarse) { .cursor { display: none; } }

/* preloader (first visit only) */
.preloader { display: none; }
.js.preload .preloader { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--yellow-400); animation: curtain .8s 1.25s var(--ease-out) forwards; }
.preloader__mark { display: grid; grid-template-columns: repeat(2, 34px); gap: 8px; }
.preloader__mark i { width: 34px; height: 34px; border: 2px solid var(--ink-900); animation: tile .6s var(--spring) both; }
.preloader__mark i:nth-child(1) { --fx: -60px; --fy: -60px; }
.preloader__mark i:nth-child(2) { --fx: 60px; --fy: -60px; animation-delay: .08s; }
.preloader__mark i:nth-child(3) { --fx: -60px; --fy: 60px; animation-delay: .16s; }
.preloader__mark i:nth-child(4) { --fx: 60px; --fy: 60px; animation-delay: .24s; }
.preloader__word { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.03em; overflow: hidden; }
.preloader__word span, .preloader__word b { display: inline-block; animation: wordUp .6s .45s var(--ease-out) both; }
.preloader__word b { font-weight: 900; animation-delay: .55s; }
@keyframes tile { from { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(90deg) scale(.4); } }
@keyframes wordUp { from { transform: translateY(110%); } }
@keyframes curtain { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.preloader { clip-path: inset(0 0 0 0); }

/* reveal on scroll — JS adds .reveal and sets --d for stagger */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease-out) var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* masked word-by-word headline reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .02em .1em; margin: -.04em -.02em -.1em; }
.w > span { display: inline-block; }
.js .w > span { transform: translateY(115%) rotate(4deg); transition: transform 1s var(--ease-out) calc(var(--i, 0) * .09s); }
.js .is-ready .w > span, .js .w.is-in > span, .js .is-in .w > span { transform: none; }
.w--mark > span { background: linear-gradient(var(--white), var(--white)) no-repeat 0 90% / 0% 78%; padding: 0 .08em; transition: transform 1s var(--ease-out) calc(var(--i, 0) * .09s), background-size .8s var(--ease-out) calc(var(--i, 0) * .09s + .6s); }
.is-ready .w--mark > span, .is-in .w--mark > span, .w--mark.is-in > span { background-size: 100% 78%; }
html:not(.js) .w--mark > span { background-size: 100% 78%; }

/* floating call button (phones only) */
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow-400); color: var(--ink-900); border: 2px solid var(--color-edge); box-shadow: 3px 3px 0 var(--color-edge); animation: ring 4s 3s infinite; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-14deg); } 90% { transform: rotate(14deg); } 92% { transform: rotate(-10deg); } 94% { transform: rotate(8deg); } }
@media (min-width: 920px) { .fab { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .js .w > span { opacity: 1; transform: none; }
  .mark, .w--mark > span { background-size: 100% 46%; }
  .w--mark > span { background-size: 100% 78%; }
  .js.preload .preloader, .grain, .cursor { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:last-child { grid-column: span 2; }
}
