/* ==========================================================================
   Nagules Gobi — portfolio
   Brand: N-mark radial gradient (orange, red, magenta) on near-black and soft white; Barlow Semi Condensed / Barlow
   ========================================================================== */

:root {
  /* Brand: the N-mark's radial gradient, on near-black and soft white */
  --orange: #FF9124;
  --red: #FF2440;
  --magenta: #FF008E;

  --bg: #F3EFE7;            /* warm paper, not white */
  --bg-alt: #ECE7DD;
  --card: #FBF9F4;
  --raise: #E6E0D4;
  --text: #15130F;          /* warm ink, not black */
  --muted: #5F5A51;
  --faint: #8D877C;
  --line: #DCD5C8;
  --accent: #D6143A;
  --btn: #15130F;
  --btn-ink: #F3EFE7;
  --logo-ink: #15130F;
  --g0: #FF4A2C;            /* gradient text starts at red-orange on light for contrast */
  --g1: #FF008E;
  --grad: linear-gradient(120deg, #FF9124, #FF4A2C 30%, #FF2440 55%, #FF008E);
  --grad-text: linear-gradient(120deg, #FF4A2C, #FF2440 45%, #FF008E);
  --shadow: 0 30px 70px -34px rgba(40, 32, 20, .35);
  --xp: #13896A; --xp-2: #0B5E4A;   /* Xpense green */
  --tb: #F2545B; --tb-2: #FBB829;   /* Tockbee red and honey */

  --radius: 22px;
  --wrap: 1240px;
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12110F; --bg-alt: #181715; --card: #1C1B18; --raise: #24221F; --text: #F1ECE2; --muted: #A29C91; --faint: #6F6A62; --line: #2A2825;
    --accent: #FF5C6E; --btn: #F1ECE2; --btn-ink: #12110F; --logo-ink: #F1ECE2; --g0: #FF9124; --g1: #FF008E;
    --grad-text: linear-gradient(120deg, #FF9124, #FF4A2C 30%, #FF2440 55%, #FF008E);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110F; --bg-alt: #181715; --card: #1C1B18; --raise: #24221F; --text: #F1ECE2; --muted: #A29C91; --faint: #6F6A62; --line: #2A2825;
    --accent: #FF5C6E; --btn: #F1ECE2; --btn-ink: #12110F; --logo-ink: #F1ECE2; --g0: #FF9124; --g1: #FF008E;
    --grad-text: linear-gradient(120deg, #FF9124, #FF4A2C 30%, #FF2440 55%, #FF008E);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1; margin: 0; }
p { margin: 0; }
::selection { background: var(--red); color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) { .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } body { font-size: 17px; } }

.skip { position: fixed; left: -999px; top: 10px; z-index: 300; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.kicker { font: 600 13px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; display: inline-flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--grad); border-radius: 2px; }

/* Film grain: a single SVG noise tile, composited above everything */
.grain { position: fixed; inset: -50%; z-index: 200; 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) } 40% { transform: translate(2%,-4%) } 60% { transform: translate(-4%,-2%) } 80% { transform: translate(3%,4%) } }

/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Intro ---------- */
.intro-screen { display: none; }
.intro .intro-screen { display: grid; position: fixed; inset: 0; z-index: 250; background: #15130F; color: #F3EFE7; place-items: center; clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-in-out); }
.intro-mark { width: min(28vw, 180px); overflow: visible; }
.intro-mark path { fill: transparent; stroke: #FF4A2C; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--ease-in-out) forwards; }
.intro.intro-fill .intro-mark path { fill: url(#ngi); stroke: transparent; transition: stroke .3s ease; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.intro-count { position: absolute; right: 32px; bottom: 24px; font: 600 clamp(64px, 14vw, 180px)/.8 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.intro-count i { font-style: normal; font-size: .35em; color: #A3A3A3; margin-left: 4px; }
.intro-name { position: absolute; left: 32px; bottom: 32px; font: 500 14px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: #A3A3A3; }
.intro.intro-out .intro-screen { clip-path: inset(0 0 100% 0); }
.intro body { overflow: hidden; }

/* ---------- Custom cursor (fine pointers only, enabled by JS) ---------- */
.cursor { display: none; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary { cursor: none; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 260; pointer-events: none; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--text); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid var(--text); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s, opacity .3s; }
.cursor-label { font: 600 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .2s; }
.cursor.is-link .cursor-ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cursor.is-label .cursor-ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; border-color: transparent; background: var(--grad); }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-label .cursor-dot, .cursor.is-hidden { opacity: 0; }
.cursor.is-down .cursor-ring { transform-origin: center; scale: .8; }

/* ---------- Header ---------- */
.head { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: transform .5s var(--ease), background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.head.scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--line); }
.head.hide { transform: translateY(-100%); }
.head-row { display: flex; align-items: center; gap: 20px; height: 76px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-svg { height: 30px; width: auto; }
.logo-svg .wm { fill: var(--logo-ink); transition: fill .3s; }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 16px; font-weight: 500; }
/* Rolling text: the label slides up and a copy slides in from below */
[data-text] { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
[data-text]::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--text); }
[data-text], [data-text]::after { transition: transform .5s var(--ease); }
a:hover > [data-text], a:focus-visible > [data-text] { transform: translateY(-100%); }
a:hover > [data-text]::after { transform: translateY(0); }
.theme-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); display: grid; place-items: center; padding: 0; cursor: pointer; }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; overflow: visible; }
.theme-btn .sun { fill: currentColor; stroke: none; transition: r .5s var(--ease); }
.theme-btn .rays { transition: transform .6s var(--ease), opacity .3s; transform-origin: 12px 12px; }
.theme-btn .moon-cut { fill: var(--bg); stroke: none; transform: translate(10px, -10px); transition: transform .5s var(--ease), fill .3s; }
.is-dark .theme-btn .sun { r: 8; }
.is-dark .theme-btn .rays { transform: rotate(90deg) scale(.4); opacity: 0; }
.is-dark .theme-btn .moon-cut { transform: none; }
@media (max-width: 820px) { .nav { display: none; } .theme-btn { margin-left: auto; } }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font: 600 17px/1 var(--body); text-decoration: none; border: 1.5px solid var(--btn); transition: color .4s var(--ease), border-color .4s; }
.btn::before { content: ""; position: absolute; inset: -2px; z-index: -1; background: var(--grad); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover { color: #fff; border-color: transparent; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn > span, .btn > svg { pointer-events: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn, .btn-sm { white-space: nowrap; }
@media (max-width: 480px) { .head .btn-sm { display: none; } .logo-svg { height: 26px; } .head-row { height: 64px; } }
[data-magnetic] { will-change: transform; }

/* ---------- Reveal primitives ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* Split headlines: each word rises out of its own mask */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i) * 45ms); }
.in .wi { transform: none; }
[data-split] em { font-style: normal; }
[data-split] em .wi, h1 em, h2 em { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 40px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.hero-inner { position: relative; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); border-radius: 999px; padding: 7px 16px; margin-bottom: 30px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22B35E; position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22B35E; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7 } 100% { transform: scale(3.2); opacity: 0 } }
.hero h1 { font-size: clamp(52px, 7vw, 118px); line-height: .92; max-width: 12ch; letter-spacing: -.02em; }
.lede { margin: 32px 0 40px; max-width: 54ch; font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); }
.hero-foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; padding-top: 48px; font-size: 14px; color: var(--muted); }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.scroll-cue i { width: 1px; height: 42px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--grad); animation: cue 1.8s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(-100%) } 100% { transform: translateY(260%) } }
.clock time { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; margin-left: 6px; }
.hint { opacity: .8; }
@media (max-width: 820px) { .hint { display: none; } .hero { padding-top: 110px; } }

/* ---------- Marquee ---------- */
.marquee { padding: 34px 0; border-block: 1px solid var(--line); overflow: hidden; }
.marquee-row { display: flex; white-space: nowrap; }
.marquee-row + .marquee-row { margin-top: 8px; }
.marquee-track { display: flex; align-items: center; gap: 40px; padding-right: 40px; flex-shrink: 0; will-change: transform; }
.marquee span { font: 600 clamp(44px, 7vw, 96px)/1.05 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.marquee b { font-size: clamp(22px, 3vw, 40px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee .outline span { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--line); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats-row > div { padding: 36px 0; display: flex; align-items: baseline; gap: 14px; }
.stats-row > div + div { border-left: 1px solid var(--line); padding-left: 32px; }
.stats strong { font: 600 clamp(56px, 8vw, 104px)/.9 var(--display); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 16px; }
@media (max-width: 600px) { .stats-row > div { flex-direction: column; gap: 6px; padding: 24px 0; } .stats-row > div + div { padding-left: 14px; } }

/* ---------- Work: pinned horizontal scroll ---------- */
.work { position: relative; padding: 120px 0 80px; }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 56px; }
.work-head h2 { font-size: clamp(40px, 5.6vw, 80px); max-width: 14ch; }
.work-meter { display: flex; align-items: center; gap: 14px; font: 600 15px/1 var(--display); letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.work-meter i { width: 140px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.work-meter b { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--wp, .25)); }
.work-track { display: grid; gap: 40px; padding: 0 32px; max-width: var(--wrap); margin: 0 auto; }
.panel { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.panel-media { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; transform-style: preserve-3d; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), box-shadow .6s; box-shadow: var(--shadow); }
.panel-media.tilting { transition: transform .12s linear; }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 45%); opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light; }
.panel-media:hover .glare { opacity: 1; }
.panel-body { display: flex; flex-direction: column; gap: 16px; }
.panel-body h3 { font-size: clamp(44px, 5vw, 72px); }
.panel-body p { color: var(--muted); }
.tag { font-size: 14px; font-weight: 600; color: var(--accent) !important; letter-spacing: .04em; display: flex; gap: 14px; align-items: center; }
.tag span { font-family: var(--display); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.link { align-self: flex-start; margin-top: 6px; font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding-bottom: 3px; transition: background-size .5s var(--ease), color .3s; }
.link:hover { background-size: 100% 1.5px; color: var(--accent); }

/* Desktop: the section pins and the track scrolls sideways (JS sets heights) */
.hscroll .work { padding: 0; }
.hscroll .work-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 70px; }
.hscroll .work-head { margin-bottom: 4vh; }
.hscroll .work-head h2 { font-size: clamp(36px, 4.2vw, 64px); max-width: 20ch; }
.hscroll .work-track { display: flex; gap: 6vw; padding: 0 max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); max-width: none; margin: 0; width: max-content; will-change: transform; }
.hscroll .panel { width: min(1080px, 78vw); grid-template-columns: 1.35fr 1fr; flex-shrink: 0; }
.hscroll .panel-media { height: min(54vh, 520px); aspect-ratio: auto; }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; gap: 24px; } .work-head { flex-direction: column; align-items: flex-start; } .work-meter { display: none; } .work-track { gap: 72px; padding: 0 16px; } }

/* Project scenes: CSS-built UI vignettes that stand in for cover images */
.scene { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.scene .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle at 75% 20%, rgba(255,255,255,.35), transparent 40%); transform: translate3d(var(--px, 0), 0, 0); }
.s1 { background: linear-gradient(135deg, #15130F, #4A1A20 55%, #FF4A2C); }
.s2 { background: linear-gradient(135deg, #FF9124, #FF2440); }
.s3 { background: linear-gradient(135deg, #15130F, #52123A 55%, #FF008E); }
.s4 { background: linear-gradient(135deg, #FF2440, #FF008E); }
.scene-title { position: absolute; left: 28px; bottom: 20px; font: 700 clamp(40px, 6vw, 92px)/.85 var(--display); text-transform: uppercase; color: rgba(255,255,255,.14); letter-spacing: -.01em; transform: translate3d(calc(var(--px, 0px) * -1.5), 0, 0); }
.scene > :not(.scene-title):not(.cover) { position: relative; transform: translate3d(var(--px, 0), 0, 40px); transition: transform .2s linear; }

.mock { width: 74%; aspect-ratio: 16 / 10; background: rgba(255,255,255,.96); border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); overflow: hidden; display: flex; flex-direction: column; }
.mock-bar { height: 26px; display: flex; gap: 6px; align-items: center; padding: 0 12px; background: #EEF1F6; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #CBD2DE; }
.mock-body { flex: 1; display: grid; grid-template-columns: 1fr 34%; gap: 10px; padding: 10px; }
.map { position: relative; border-radius: 8px; background-color: #F6F1EF; background-image: repeating-linear-gradient(0deg, transparent 0 22px, rgba(26,26,26,.07) 22px 23px), repeating-linear-gradient(90deg, transparent 0 22px, rgba(26,26,26,.07) 22px 23px); overflow: hidden; }
.route { position: absolute; left: 12%; top: 70%; width: 70%; height: 3px; background: linear-gradient(90deg, #FF9124, #FF008E); transform-origin: 0 50%; transform: rotate(-28deg) scaleX(0); border-radius: 3px; transition: transform 1.4s var(--ease) .3s; }
.pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #FF9124; box-shadow: 0 0 0 5px rgba(255,145,36,.22); }
.pin.p1 { left: 11%; top: 66%; } .pin.p2 { left: 46%; top: 44%; background: #FF2440; box-shadow: 0 0 0 5px rgba(255,36,64,.2); } .pin.p3 { left: 74%; top: 26%; background: #FF008E; box-shadow: 0 0 0 5px rgba(255,0,142,.2); }
.pin.p2 { animation: ping-pin 2s ease-in-out infinite; }
@keyframes ping-pin { 50% { box-shadow: 0 0 0 10px rgba(255,36,64,.05); } }
.side { display: grid; gap: 8px; align-content: start; }
.side b { height: 30px; border-radius: 6px; background: #F0F2F7; position: relative; overflow: hidden; }
.side b::after { content: ""; position: absolute; left: 8px; top: 9px; height: 5px; width: 60%; border-radius: 3px; background: #D5DBE6; }
.side b:first-child { background: linear-gradient(120deg, #FF4A2C, #FF008E); }
.side b:first-child::after { background: rgba(255,255,255,.6); }
.panel.in-view .route { transform: rotate(-28deg) scaleX(1); }

.phone { width: 30%; aspect-ratio: 9 / 18.5; background: #fff; border-radius: 22px; padding: 22px 10px 10px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 8px; position: relative; }
.phone.back { position: absolute !important; transform: translate3d(calc(48% + var(--px, 0px) * .6), 8%, 0) rotate(8deg) !important; opacity: .92; }
.notch { position: absolute; top: 8px; left: 50%; width: 34%; height: 7px; margin-left: -17%; background: #E2E6EE; border-radius: 6px; }
.ph-list, .ph-grid { display: grid; gap: 7px; }
.ph-list b { height: 26px; border-radius: 8px; background: #F5F2F1; position: relative; }
.ph-list b::before { content: ""; position: absolute; left: 7px; top: 7px; width: 12px; height: 12px; border-radius: 4px; border: 2px solid #FF4A2C; }
.ph-list b:nth-child(-n+2)::before { background: #FF4A2C; }
.ph-grid { grid-template-columns: 1fr 1fr; }
.ph-grid b { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg, #FFE9DC, #FFD0D6); }
.ph-cta { margin-top: auto; height: 26px; border-radius: 999px; background: #15130F; }

.dial { width: 42%; aspect-ratio: 1; display: grid; place-items: center; background: rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.dial svg { position: absolute; inset: 10%; width: 80%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke: #F6E6EC; stroke-width: 9; }
.dial .arc { stroke: #FF008E; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.panel.in-view .dial .arc { stroke-dashoffset: 28; }
.dial span { font: 700 clamp(26px, 3.4vw, 48px)/1 var(--display); color: #15130F; }
.dial small { font-size: .45em; margin-left: 2px; }
.scene .chips { position: absolute !important; bottom: 16%; right: 10%; display: flex; gap: 8px; }
.scene .chips b { width: 46px; height: 18px; border-radius: 999px; background: rgba(255,255,255,.85); }
.scene .chips b:first-child { background: #fff; width: 64px; }

.chat { width: 62%; display: flex; flex-direction: column; gap: 10px; }
.bubble { height: 38px; width: 72%; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.95); box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.bubble.out { align-self: flex-end; width: 64%; border-radius: 16px 16px 4px 16px; background: #15130F; transition-delay: .35s; }
.bubble.short { width: 44%; transition-delay: .7s; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 14px; background: rgba(255,255,255,.95); border-radius: 14px; opacity: 0; transition: opacity .4s 1.1s; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA3B5; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { transform: none; opacity: .5 } 30% { transform: translateY(-4px); opacity: 1 } }
.panel.in-view .bubble { opacity: 1; transform: none; }
.panel.in-view .typing { opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 12vw, 160px) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 820px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(40px, 5.6vw, 80px); }
.section-head p:not(.kicker) { margin-top: 22px; color: var(--muted); font-size: 19px; max-width: 60ch; }

/* Services: a spotlight that follows the cursor across the whole grid */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.service { position: relative; background: var(--card); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 12px; min-height: 340px; isolation: isolate; }
.service::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: radial-gradient(420px circle at var(--x, -999px) var(--y, -999px), #FF9124, #FF2440 18%, #FF008E 32%, var(--line) 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: -1; }
.service::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--x, -999px) var(--y, -999px), rgba(255,36,64,.08), transparent 60%); z-index: -1; }
.ico { width: 48px; height: 48px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: auto; }
.ico * { stroke-dasharray: 1; stroke-dashoffset: 0; }
.service:hover .ico * { animation: redraw 1s var(--ease) both; }
.service:hover .ico *:nth-child(2) { animation-delay: .12s; } .service:hover .ico *:nth-child(3) { animation-delay: .24s; } .service:hover .ico *:nth-child(4) { animation-delay: .36s; }
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.service .num { font: 700 15px/1 var(--display); letter-spacing: .08em; color: var(--muted); margin-top: 40px; }
.service h3 { font-size: 30px; }
.service p { color: var(--muted); font-size: 16px; }

/* Brands: direction-aware fill */
.brands { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.brands li { position: relative; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 170px; display: grid; place-items: center; padding: 24px; text-align: center; }
.brands li::before { content: ""; position: absolute; inset: 0; background: var(--grad); transform: translate(var(--tx, 0), var(--ty, 101%)); transition: transform .55s var(--ease); }
.brands li.notrans::before { transition: none; }
.brands li.on::before { transform: none; }
.brands span { position: relative; font: 600 clamp(22px, 2.6vw, 34px)/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); transition: color .4s, transform .55s var(--ease); }
.brands li.on span { color: #fff; transform: scale(1.06); }
.brands img { position: relative; max-height: 72px; width: auto; }
@media (max-width: 600px) { .brands { grid-template-columns: repeat(2, 1fr); } .brands li { min-height: 116px; } }

/* Pitch: words light up with scroll position */
.pitch { background: #15130F; color: #F3EFE7; padding: clamp(110px, 16vw, 220px) 0; position: relative; overflow: hidden; }
.pitch::before { content: ""; position: absolute; width: 70vw; height: 70vw; right: -25vw; top: -30vw; background: radial-gradient(circle, rgba(255,0,142,.28), transparent 60%); filter: blur(20px); }
.pitch::after { content: ""; position: absolute; width: 60vw; height: 60vw; left: -25vw; bottom: -35vw; background: radial-gradient(circle, rgba(255,145,36,.25), transparent 60%); filter: blur(20px); }
.pitch .wrap { position: relative; z-index: 1; }
.pitch .kicker { color: #FF5C6E; }
.scrub { font: 600 clamp(32px, 4.6vw, 68px)/1.12 var(--display); letter-spacing: -.005em; max-width: 24ch; }
.scrub .sw { opacity: .16; transition: opacity .25s linear; }
.scrub .sw.lit { opacity: 1; }
.no-js .scrub .sw, html:not(.js) .scrub .sw { opacity: 1; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 0; } }
.faq details { border-bottom: 1px solid var(--line); overflow: hidden; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 28px 56px 28px 0; position: relative; font: 600 clamp(22px, 2vw, 26px)/1.25 var(--display); transition: color .3s; }
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: absolute; right: 4px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; border: 1px solid var(--line); transition: transform .5s var(--ease), background .3s, border-color .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; margin: -.9px 0 0 -6px; background: currentColor; border-radius: 2px; }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { transform: rotate(135deg); background: var(--grad); border-color: transparent; color: #fff; }
.faq-a p { padding: 0 56px 28px 0; color: var(--muted); }

/* Contact */
.contact { padding: clamp(100px, 13vw, 180px) 0 80px; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.contact h2 { font-size: clamp(44px, 6.4vw, 96px); max-width: 15ch; }
.mail { display: inline-block; margin-top: 40px; font: 600 clamp(22px, 2.6vw, 34px)/1.2 var(--display); text-decoration: none; color: var(--muted); }
.mail [data-text]::after { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.orb { position: relative; width: 220px; height: 220px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--text); }
.orb-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.orb-ring text { font: 600 14px var(--body); letter-spacing: .1em; fill: currentColor; }
.orb:hover .orb-ring { animation-duration: 5s; }
.orb-core { width: 120px; height: 120px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; transition: transform .6s var(--ease); box-shadow: 0 30px 60px -20px rgba(255,36,64,.55); }
.orb:hover .orb-core { transform: scale(1.12); }
.orb-core svg { width: 38px; height: 38px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
.orb:hover .orb-core svg { transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } .orb { width: 170px; height: 170px; } .orb-core { width: 92px; height: 92px; } }

/* Footer */
.foot { padding: 40px 0 28px; font-size: 15px; color: var(--muted); overflow: hidden; }
.giant { width: 100%; height: auto; fill: url(#gw); margin-bottom: 28px; clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-in-out); }
.giant.in { clip-path: inset(0 0 0 0); }
html:not(.js) .giant { clip-path: none; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Theme switch: circular reveal using the View Transitions API */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Reduced motion: keep it calm and static ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .js [data-reveal], .wi { opacity: 1; transform: none; }
  .scrub .sw { opacity: 1; }
  .giant { clip-path: none; }
}
