@font-face {
  font-family: "Bricolage";
  src: url("bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #0a0b12;
  --bg2: #10121c;
  --ink: #f5f3ee;
  --muted: #a3a8ba;
  --line: rgba(255, 255, 255, 0.1);
  --teal: #1ec8c4;
  --lime: #8fd650;
  --orange: #ff9b2f;
  --red: #ff5b4f;
  --magenta: #e5398f;
  --purple: #8a5cff;
  --brand: linear-gradient(90deg, var(--teal), var(--lime) 30%, var(--orange) 60%, var(--magenta));
  --display: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.05; margin: 0; }

em {
  font-style: normal;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(10, 11, 18, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--display); letter-spacing: -0.02em; }
.logo img { width: auto; height: 40px; }
.logo span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.nav { display: flex; gap: 30px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.pill {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s;
}
.pill:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25); }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font: 600 16px/1 var(--body); text-decoration: none;
  padding: 16px 26px; border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-light { background: var(--ink); color: var(--bg); }
.btn-light:hover { box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15); }
.btn-ghost { color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.25); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Hero stage */
.stage {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  --x: 50%; --y: 40%;
  cursor: crosshair;
}
.stage-words { position: absolute; inset: 0; }
.stage-words span {
  position: absolute; white-space: nowrap; user-select: none;
  font: 800 var(--s, 28px)/1 var(--display); letter-spacing: -0.03em;
  color: var(--c); opacity: 0.9;
  transform: rotate(var(--r, 0deg));
}
.stage-dark {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 240px at var(--x) var(--y), rgba(255, 236, 200, 0.10), transparent 70%),
    radial-gradient(circle 300px at var(--x) var(--y), transparent 0, transparent 35%, rgba(10, 11, 18, 0.96) 100%);
}
.stage-content { position: relative; z-index: 2; text-align: center; pointer-events: none; }
.stage-content::before {
  content: ""; position: absolute; inset: -60px -40px; z-index: -1;
  background: radial-gradient(ellipse closest-side, rgba(10, 11, 18, 0.88), rgba(10, 11, 18, 0.6) 60%, transparent);
}
.stage-content a { pointer-events: auto; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.stage h1 { font-size: clamp(48px, 9vw, 112px); max-width: 980px; margin: 0 auto; text-shadow: 0 4px 40px rgba(10, 11, 18, 0.8); }
.lead { margin: 24px auto 36px; max-width: 600px; color: #cfd2de; font-size: 19px; text-shadow: 0 2px 20px rgba(10, 11, 18, 0.9); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hint { margin-top: 44px; color: var(--muted); font-size: 14px; }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

/* Marquee */
.marquee { border-block: 1px solid var(--line); background: var(--bg2); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: slide 38s linear infinite; }
.marquee span { font: 700 24px/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.marquee i { font-style: normal; color: var(--orange); font-size: 18px; align-self: center; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.block { padding: 120px 0; }
.kicker { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
h2 { font-size: clamp(36px, 5.5vw, 64px); max-width: 860px; }
.sub { color: var(--muted); font-size: 19px; max-width: 620px; margin: 20px 0 0; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; perspective: 900px; }
.card {
  position: relative; padding: 28px 24px 24px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, border-color 0.25s;
}
.card:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
  opacity: 0; transition: opacity 0.25s;
}
.card:hover::after { opacity: 1; }
.card h3 { font-size: 24px; margin: 22px 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #d6d9e4; }

.card-icon { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, transparent); position: relative; }
.icon-play::before { content: ""; position: absolute; left: 19px; top: 15px; border-left: 14px solid var(--c); border-block: 9px solid transparent; }
.icon-frame::before { content: ""; position: absolute; inset: 13px; border: 3px solid var(--c); border-radius: 4px; }
.icon-frame::after { content: ""; position: absolute; left: 19px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.icon-dial::before { content: ""; position: absolute; inset: 12px; border: 3px solid var(--c); border-radius: 50%; border-right-color: transparent; transform: rotate(45deg); }
.icon-dial::after { content: ""; position: absolute; left: 22px; top: 14px; width: 4px; height: 12px; border-radius: 2px; background: var(--c); transform-origin: 2px 10px; transform: rotate(40deg); }
.icon-target::before { content: ""; position: absolute; inset: 11px; border: 3px solid var(--c); border-radius: 50%; }
.icon-target::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: var(--c); }

/* Ad Lab */
.lab { background: var(--bg2); border-block: 1px solid var(--line); }
.lab-box { margin-top: 48px; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); padding: 24px; }
.lab-head { display: flex; align-items: center; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.lab-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lab-head strong { font: 800 30px/1 var(--display); }
.lab-status { flex: 1; margin: 0; color: var(--muted); }
.lanes { list-style: none; margin: 0; padding: 0; }
.lane {
  display: grid; grid-template-columns: 44px 170px 1fr 120px; align-items: center; gap: 16px;
  padding: 14px 8px; border-bottom: 1px solid var(--line);
  transition: opacity 0.4s, background 0.4s;
}
.lane:last-child { border-bottom: 0; }
.lane-thumb {
  width: 44px; height: 56px; border-radius: 9px;
  background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 35%, #000));
  display: grid; place-items: center; font: 800 18px/1 var(--display); color: rgba(0, 0, 0, 0.55);
}
.lane-name { font-weight: 600; }
.lane-new { display: block; font-size: 12px; color: var(--teal); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.lane-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.lane-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 0.12s linear; }
.lane-out { text-align: right; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane.lost { opacity: 0.38; }
.lane.won { background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 14px; }
.lane.won .lane-out { color: var(--ink); font-weight: 700; }
.lane.fresh { animation: pop 0.5s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* Loop */
.loop { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.loop li {
  padding: 26px 22px; border-radius: 20px; border: 1px solid var(--line);
  animation: glow 8s infinite; animation-delay: calc(var(--i, 0) * 2s);
}
.loop li:nth-child(2) { --i: 1; }
.loop li:nth-child(3) { --i: 2; }
.loop li:nth-child(4) { --i: 3; }
.loop-n { font: 800 14px/1 var(--display); color: var(--c); letter-spacing: 0.08em; }
.loop h3 { font-size: 30px; margin: 12px 0 8px; }
.loop p { margin: 0; color: var(--muted); font-size: 15.5px; }
@keyframes glow {
  0%, 25%, 100% { border-color: var(--line); box-shadow: none; }
  6%, 19% { border-color: var(--c); box-shadow: 0 0 40px -10px var(--c); }
}
.loop-track { position: relative; height: 2px; margin-top: 28px; background: var(--line); border-radius: 2px; }
.loop-track span {
  position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.4);
  animation: travel 8s linear infinite;
}
@keyframes travel { from { left: 0; } to { left: calc(100% - 12px); } }

/* Why */
.why { padding-top: 0; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why-item { padding: 34px 28px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); transition: transform 0.25s; }
.why-item:hover { transform: translateY(-4px) rotate(-0.6deg); }
.why-item h3 { font-size: 28px; margin-bottom: 10px; }
.why-item p { margin: 0; color: var(--muted); }

/* Contact */
.contact { position: relative; overflow: hidden; text-align: center; padding: 140px 0; border-top: 1px solid var(--line); }
.contact-glow {
  position: absolute; left: 50%; top: -30%; width: 900px; height: 900px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 236, 200, 0.12), transparent);
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact h2 { margin: 0 auto; font-size: clamp(44px, 7vw, 88px); }
.contact .sub { margin: 22px auto 40px; }
.btn-big { background: var(--brand); color: #0a0b12; font-size: 20px; padding: 20px 34px; }
.btn-big:hover { box-shadow: 0 14px 40px rgba(229, 57, 143, 0.35); }
.where { margin-top: 22px; color: var(--muted); font-size: 15px; }

.confetti { position: fixed; top: 0; left: 0; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; z-index: 100; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Policy page */
.doc { padding: 140px 24px 100px; max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 8px; }
.doc .date { margin: 0 0 40px; color: var(--muted); }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc p { color: #cfd2de; }

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .loop { grid-template-columns: repeat(2, 1fr); }
  .loop-track { display: none; }
  .nav { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .block { padding: 84px 0; }
  .cards, .loop, .why-grid { grid-template-columns: 1fr; }
  .lab-box { padding: 16px; }
  .lab-head { flex-wrap: wrap; gap: 12px 20px; }
  .lab-status { flex-basis: 100%; order: 3; }
  .lab-head .btn { margin-left: auto; }
  .lane { grid-template-columns: 36px 1fr 74px; gap: 12px; }
  .lane-thumb { width: 36px; height: 46px; font-size: 15px; }
  .lane-bar { grid-column: 2 / 4; grid-row: 2; }
  .lane-out { grid-column: 3; grid-row: 1; }
  .doc { padding: 120px 16px 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .loop li, .loop-track span { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
