/* Color Circuit's own look (the game's Bauhaus wooden toy): deep blue field,
   cream sheets, walnut blocks, red/yellow/blue paint, Jost. Not shared with
   the studio pages. Motion respects prefers-reduced-motion. */
@font-face {
  font-family: "Jost";
  src: url("/colorcircuit/assets/Jost.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --field: #2638A8;
  --field-deep: #121C5E;
  --field-ink: #0B1240;
  --sheet: #F4EFE4;
  --sheet-2: #EAE2D1;
  --ink: #1B1A2E;
  --ink-2: #5A566B;
  --wood: #4A3428;
  --wood-hi: #6B4C3B;
  --wood-lo: #2E2019;
  --cream: #F1ECE0;
  --red: #E8463A;
  --yellow: #F7C33A;
  --blue: #5A82F2;
  --orange: #F28C28;
  --line: #D9CFBB;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--field); color: var(--cream); overflow-x: hidden;
  font: 18px/1.6 "Jost", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav.scrolled { background: rgba(18, 28, 94, .78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a { text-decoration: none; font-size: 16px; opacity: .78; transition: opacity .2s; }
.nav nav a:hover { opacity: 1; }
.nav .cta { opacity: 1; padding: 9px 18px; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .nav nav a:not(.cta) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 112px 0 72px; overflow: hidden;
  background: radial-gradient(1200px 700px at 78% 30%, #3047C4 0%, var(--field) 45%, var(--field-deep) 100%); }
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; width: 100%; }
.pipes { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.pipes path { fill: none; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.pipes .track { stroke: rgba(11, 18, 64, .55); stroke-width: 22; }
.pipes .flow { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: flow 5.5s var(--ease) forwards; }
.pipes .flow.r { stroke: var(--red); animation-delay: .4s; }
.pipes .flow.y { stroke: var(--yellow); animation-delay: 1.1s; }
.pipes .flow.b { stroke: var(--blue); animation-delay: 1.8s; }
@keyframes flow { to { stroke-dashoffset: 0; } }

.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 15px; margin-bottom: 26px; animation: fade 1s var(--ease) both; }
.kicker b { background: var(--yellow); color: var(--ink); border-radius: 99px; padding: 2px 10px; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.hero h1 { font-size: clamp(52px, 8.6vw, 112px); line-height: .92; margin: 0 0 24px; font-weight: 600; letter-spacing: -.025em; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: rise .9s var(--ease) forwards; }
.hero h1 .w:nth-child(2) { animation-delay: .12s; }
.hero h1 .w:nth-child(3) { animation-delay: .24s; }
.hero h1 .r { color: var(--red); } .hero h1 .y { color: var(--yellow); } .hero h1 .b { color: var(--blue); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero .lead { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; opacity: .86; max-width: 34ch; margin: 0 0 34px; animation: fade 1s .45s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stores { display: flex; flex-wrap: wrap; gap: 14px; animation: fade 1s .6s var(--ease) both; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px 11px 16px; border-radius: 16px; background: #0A0A12; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.16); min-width: 196px; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store small { font-size: 12px; opacity: .7; letter-spacing: .02em; }
.store strong { font-size: 19px; font-weight: 600; }
.note { font-size: 14px; opacity: .6; margin-top: 16px; animation: fade 1s .7s var(--ease) both; }

/* phone */
.phone-stage { position: relative; justify-self: center; animation: fade 1.2s .3s var(--ease) both; }
.phone { position: relative; width: min(340px, 74vw); aspect-ratio: 402 / 874; border-radius: 52px; padding: 12px; background: linear-gradient(145deg, #2A2A36, #08080E 60%); box-shadow: 0 50px 100px -20px rgba(4, 8, 40, .7), 0 30px 60px -30px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.08); }
.phone::before { content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 30%; height: 26px; border-radius: 20px; background: #000; z-index: 3; }
.phone video, .phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 41px; background: #0F3B2A; }
.phone.tilt { transform: perspective(1400px) rotateY(-14deg) rotateX(4deg) rotateZ(2deg); transition: transform .8s var(--ease); }
.phone.tilt:hover { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.float { position: absolute; z-index: 4; animation: bob 6s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); }
.float.f1 { left: -46px; top: 18%; width: 64px; height: 64px; background: var(--red); border-radius: 10px; rotate: -12deg; }
.float.f2 { right: -38px; top: 8%; width: 0; height: 0; border-left: 34px solid transparent; border-right: 34px solid transparent; border-bottom: 60px solid var(--yellow); animation-delay: -2s; }
.float.f3 { right: -30px; bottom: 16%; width: 58px; height: 58px; background: var(--blue); border-radius: 50%; animation-delay: -4s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 2; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; }
.scroll-hint::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 56px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .stores { justify-content: center; }
  .phone.tilt, .phone.tilt:hover { transform: none; }
  .float.f1 { left: -18px; } .float.f2 { right: -14px; } .float.f3 { right: -10px; }
  .scroll-hint { display: none; }
  .pipes { display: none; }
}

/* ---------- stats ---------- */
.stats { background: var(--field-ink); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.08); }
.stat .n { font-size: clamp(36px, 5vw, 54px); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { opacity: .65; font-size: 15px; margin-top: 8px; }
@media (max-width: 640px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); } }

/* ---------- sections ---------- */
.sheet { background: var(--sheet); color: var(--ink); }
.section { padding: 120px 0; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .6; margin: 0 0 14px; }
.title { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.02; margin: 0 0 18px; font-weight: 600; letter-spacing: -.02em; max-width: 18ch; }
.intro { font-size: 20px; color: var(--ink-2); max-width: 46ch; margin: 0; }
.dark .intro { color: rgba(241, 236, 224, .75); }
@media (max-width: 640px) { .section { padding: 84px 0; } }

/* how it plays */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 64px; }
.step { background: #fff; border-radius: 28px; padding: 30px 28px 32px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(27, 26, 46, .35); }
.step .art { height: 190px; border-radius: 20px; background: var(--field); display: grid; place-items: center; margin-bottom: 26px; overflow: hidden; position: relative; }
.step .num { font-size: 14px; font-weight: 600; color: var(--field); letter-spacing: .1em; }
.step h3 { font-size: 26px; margin: 4px 0 8px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); font-size: 17px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* step art: a wooden tile that turns, a mixer, a filling shape */
.tile { width: 92px; height: 92px; border-radius: 16px; background: linear-gradient(160deg, var(--wood-hi), var(--wood)); box-shadow: 0 6px 0 var(--wood-lo), inset 0 1px 0 rgba(255,255,255,.12); position: relative; }
.tile .pipe { position: absolute; background: #1A120D; overflow: hidden; }
.tile.turn { animation: turn 3.2s var(--ease) infinite; }
.tile.turn .h { left: 0; top: 40px; width: 52px; height: 12px; }
.tile.turn .v { left: 40px; top: 40px; width: 12px; height: 52px; }
.tile.turn .pipe::after { content: ""; position: absolute; inset: 0; background: var(--red); animation: paint 3.2s var(--ease) infinite; }
.tile.turn .h::after { transform-origin: left; --s: scaleX(0); }
.tile.turn .v::after { transform-origin: top; animation-name: painty; }
@keyframes turn { 0%, 15% { transform: rotate(0); } 30%, 100% { transform: rotate(90deg); } }
@keyframes paint { 0%, 35% { transform: scaleX(0); } 55%, 90% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes painty { 0%, 50% { transform: scaleY(0); } 68%, 90% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.lead-in { position: absolute; left: 0; top: calc(50% - 6px); width: calc(50% - 46px); height: 12px; background: var(--red); border-radius: 0 6px 6px 0; }
.tap { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); left: calc(50% - 4px); top: calc(50% - 4px); animation: tap 3.2s ease-out infinite; }
@keyframes tap { 0% { transform: scale(.4); opacity: 0; } 8% { opacity: 1; } 22% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }

.mixer { position: relative; width: 220px; height: 120px; }
.mixer .in { position: absolute; top: 52px; height: 14px; width: 86px; border-radius: 7px; background: #1A120D; overflow: hidden; }
.mixer .in.l { left: 0; } .mixer .in.r { right: 0; }
.mixer .in::after { content: ""; position: absolute; inset: 0; animation: paintin 3.6s var(--ease) infinite; }
.mixer .in.l::after { background: var(--red); transform-origin: left; }
.mixer .in.r::after { background: var(--yellow); transform-origin: right; }
.mixer .out { position: absolute; left: 103px; top: 66px; width: 14px; height: 54px; border-radius: 7px; background: #1A120D; overflow: hidden; }
.mixer .out::after { content: ""; position: absolute; inset: 0; background: var(--orange); transform-origin: top; animation: paintout 3.6s var(--ease) infinite; }
.mixer .hub { position: absolute; left: 88px; top: 37px; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3A2A20, #160F0B); border: 3px solid #0E0907; }
.mixer .hub::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--orange); transform: scale(0); animation: hub 3.6s var(--ease) infinite; }
@keyframes paintin { 0% { transform: scaleX(0); } 30%, 92% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes hub { 0%, 30% { transform: scale(0); } 42%, 92% { transform: scale(1); } 100% { opacity: 0; } }
@keyframes paintout { 0%, 42% { transform: scaleY(0); } 64%, 92% { transform: scaleY(1); } 100% { opacity: 0; } }

.fill { display: flex; gap: 22px; align-items: center; }
.fill i { display: block; position: relative; }
.fill .sq { width: 60px; height: 60px; border: 6px solid var(--red); border-radius: 8px; }
.fill .ci { width: 64px; height: 64px; border: 6px solid var(--blue); border-radius: 50%; }
.fill .sq::after, .fill .ci::after { content: ""; position: absolute; inset: 5px; border-radius: 3px; transform: scale(0); animation: pop 3.6s var(--ease) infinite; }
.fill .sq::after { background: var(--red); }
.fill .ci::after { background: var(--blue); border-radius: 50%; animation-delay: .7s; }
.fill .tr { width: 0; height: 0; border-left: 36px solid transparent; border-right: 36px solid transparent; border-bottom: 62px solid var(--yellow); opacity: .35; animation: glow 3.6s var(--ease) infinite 1.4s; }
@keyframes pop { 0%, 20% { transform: scale(0); } 34%, 88% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes glow { 0%, 20% { opacity: .35; } 34%, 88% { opacity: 1; } 100% { opacity: .35; } }

/* showcase rows */
.dark { background: var(--field-deep); color: var(--cream); }
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.show + .show { margin-top: 140px; }
.show.flip .text { order: 2; }
.show .text h3 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.05; margin: 0 0 16px; font-weight: 600; letter-spacing: -.02em; }
.show .text p { font-size: 19px; opacity: .8; margin: 0 0 22px; max-width: 40ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 6px; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231B1A2E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.show .media { display: flex; justify-content: center; position: relative; }
.show .media::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; top: 50%; left: 50%; translate: -50% -50%; background: radial-gradient(circle, rgba(90, 130, 242, .45), transparent 65%); filter: blur(10px); }
.show .phone { width: min(320px, 76vw); }
.chip { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; margin-bottom: 18px; }
.chip.r { background: rgba(232, 70, 58, .18); color: #FF8A7F; }
.chip.y { background: rgba(247, 195, 58, .16); color: var(--yellow); }
.chip.b { background: rgba(90, 130, 242, .2); color: #9DB5FF; }
@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; gap: 48px; }
  .show.flip .text { order: 0; }
  .show + .show { margin-top: 96px; }
}

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 60px; }
.feature { background: linear-gradient(160deg, var(--wood-hi), var(--wood) 55%); color: var(--cream); border-radius: 24px; padding: 28px; box-shadow: 0 8px 0 var(--wood-lo), inset 0 1px 0 rgba(255,255,255,.1); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: 0 12px 0 var(--wood-lo), inset 0 1px 0 rgba(255,255,255,.1); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.feature p { margin: 0; opacity: .78; font-size: 16px; line-height: 1.5; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* languages marquee */
.langs { position: relative; overflow: hidden; padding: 34px 0; background: var(--sheet-2); color: var(--ink); }
.langs::before, .langs::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.langs::before { left: 0; background: linear-gradient(90deg, var(--sheet-2), transparent); }
.langs::after { right: 0; background: linear-gradient(-90deg, var(--sheet-2), transparent); }
.langs .track { display: flex; gap: 46px; width: max-content; animation: marquee 48s linear infinite; font-size: 26px; font-weight: 500; white-space: nowrap; }
.langs .track span { opacity: .78; }
.langs .track span::before { display: inline-block; margin-right: 14px; font-size: 15px; vertical-align: 3px; }
.langs .track span:nth-child(3n+1)::before { content: "■"; color: var(--red); }
.langs .track span:nth-child(3n+2)::before { content: "▲"; color: #D9A21B; }
.langs .track span:nth-child(3n)::before { content: "●"; color: var(--blue); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* faq */
.faq { max-width: 820px; margin: 56px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 44px 24px 0; font-size: 21px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); transition: transform .3s var(--ease), margin .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { margin: -8px 0 24px; color: var(--ink-2); font-size: 18px; max-width: 64ch; }
.faq a { color: var(--field); }
.center { text-align: center; }
.center .title, .center .intro { margin-left: auto; margin-right: auto; }

/* final cta */
.final { position: relative; overflow: hidden; padding: 130px 0; text-align: center; background: radial-gradient(900px 500px at 50% 0%, #3047C4, var(--field) 50%, var(--field-deep)); }
.final .title { margin: 0 auto 18px; max-width: 16ch; }
.final .intro { color: rgba(241, 236, 224, .78); margin: 0 auto; }
.final .stores { justify-content: center; animation: none; margin-top: 36px; }
.final img.icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 20px 40px rgba(0,0,0,.35); margin-bottom: 28px; }

/* footer */
.foot { background: var(--field-ink); color: rgba(241, 236, 224, .62); font-size: 15px; padding: 40px 0 48px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot a { color: rgba(241, 236, 224, .85); text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .links { display: flex; flex-wrap: wrap; gap: 22px; }

/* scroll reveal (only when JS runs; content stays visible without it) */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .1s; } .js .reveal.d2 { transition-delay: .2s; } .js .reveal.d3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .w, .js .reveal { opacity: 1 !important; transform: none !important; }
  .pipes .flow { stroke-dashoffset: 0; }
}

/* ---------- privacy / support: a cream sheet over the field ---------- */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top .home { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 19px; }
.top .home img { width: 36px; height: 36px; border-radius: 9px; }
.top nav a { text-decoration: none; margin-left: 18px; font-size: 16px; opacity: .8; }
.top nav a:hover { opacity: 1; }
.page { background: var(--sheet); color: var(--ink); border-radius: 36px; margin: 8px auto 48px; padding: 48px clamp(20px, 5vw, 64px) 56px; max-width: 860px; }
.page h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 600; margin: 0 0 6px; line-height: 1.1; }
.page .meta { color: var(--ink-2); margin: 0 0 28px; font-size: 16px; }
.page h2 { font-size: 24px; font-weight: 600; margin: 36px 0 8px; }
.page h3 { font-size: 19px; font-weight: 600; margin: 22px 0 4px; }
.page p, .page li { font-size: 17px; }
.page a { color: var(--field); }
.mail { display: inline-block; margin-top: 6px; padding: 12px 22px; border-radius: 99px; background: var(--field); color: var(--cream) !important; text-decoration: none; font-weight: 500; }
.small { font-size: 15px; color: var(--ink-2); }
