/* Tap Studios — shared styles. Brand colours match the TapTV app theme. */
:root {
  --electric: #1E5EFF;
  --electric-hi: #5B8BFF;
  --electric-dim: #1746BF;
  --ink: #0F1115;
  --surface-1: #181B22;
  --surface-2: #22262F;
  --line: #2C313C;
  --on-ink: #F2F4F8;
  --muted: #9AA3B2;
  --go: #3DDC84;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 20px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--electric-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--electric-hi); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--electric); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--on-ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em;
}
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--on-ink); background: var(--surface-1); }
.nav a.cta { color: #fff; background: var(--electric); }
.nav a.cta:hover { background: var(--electric-dim); }
@media (max-width: 560px) {
  .nav a:not(.cta) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--electric); color: #fff; box-shadow: 0 8px 30px -8px rgba(30, 94, 255, .7); }
.btn-primary:hover { background: var(--electric-dim); color: #fff; }
.btn-ghost { color: var(--on-ink); border: 1px solid var(--line); background: var(--surface-1); }
.btn-ghost:hover { border-color: var(--muted); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px); overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.ripples {
  position: absolute; z-index: 0; pointer-events: none;
  right: -220px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%);
}
.ripples span {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1.5px solid var(--electric);
  animation: ripple 6s cubic-bezier(.2, .6, .3, 1) infinite;
  opacity: 0;
}
.ripples span:nth-child(2) { animation-delay: 1.5s; }
.ripples span:nth-child(3) { animation-delay: 3s; }
.ripples span:nth-child(4) { animation-delay: 4.5s; }
.ripples::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%;
  background: var(--electric); box-shadow: 0 0 80px 30px rgba(30, 94, 255, .45);
}
@keyframes ripple {
  0%   { width: 56px; height: 56px; opacity: .9; }
  100% { width: 760px; height: 760px; opacity: 0; }
}
@media (max-width: 860px) {
  .ripples { right: -420px; opacity: .3; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--electric-hi);
  padding: 6px 12px; border: 1px solid rgba(91, 139, 255, .3); border-radius: 999px;
  background: rgba(30, 94, 255, .08);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--go); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(44px, 8vw, 88px); font-weight: 800; margin: 22px 0 22px; max-width: 12ch; }
h1 em { font-style: normal; color: var(--electric-hi); white-space: nowrap; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34rem; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section-head { max-width: 40rem; margin-bottom: 48px; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--electric-hi); margin: 0 0 12px; }
h2 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 18px; margin: 16px 0 0; }

/* ---------- TapTV feature ---------- */
.app-card {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center;
  background: linear-gradient(160deg, var(--surface-1), #12151B 70%);
  border: 1px solid var(--line); border-radius: 32px;
  padding: clamp(28px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.app-card::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -220px;
  background: radial-gradient(circle, rgba(30, 94, 255, .35), transparent 65%);
  pointer-events: none;
}
@media (max-width: 860px) { .app-card { grid-template-columns: 1fr; } }

.app-title { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-icon {
  width: 64px; height: 64px; flex: none; border-radius: 16px; background: var(--electric);
  display: grid; place-items: center; box-shadow: 0 10px 30px -10px rgba(30, 94, 255, .8);
}
.app-icon svg { width: 46px; height: 46px; }
.app-title h3 { font-size: 34px; font-weight: 800; }
.app-title p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.app-desc { color: #C9CFDA; font-size: 18px; margin: 0 0 24px; }

.features { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--electric-hi); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.chips li {
  font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--on-ink);
}
.chips-label { font-size: 13px; color: var(--muted); margin: 0 0 10px; }

.badge-soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px; border-radius: 14px;
  background: #000; border: 1px solid #3a3f4a; color: #fff; font-size: 13px; line-height: 1.2;
}
.badge-soon svg { width: 26px; height: 26px; }
.badge-soon strong { display: block; font-size: 17px; font-weight: 600; }

/* Phone mockup with the TapTV remote, drawn in CSS */
.phone {
  justify-self: center; position: relative; z-index: 1;
  width: min(300px, 66vw); aspect-ratio: 9 / 19;
  border-radius: 44px; padding: 12px;
  background: #050608; border: 1px solid #343944;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8), 0 0 0 6px #14171d;
  transform: rotate(-4deg);
}
.screen {
  height: 100%; border-radius: 34px; background: var(--ink); overflow: hidden;
  display: flex; flex-direction: column; padding: 18px 16px 14px; gap: 14px;
}
.scr-top { display: flex; justify-content: space-between; align-items: center; }
.scr-tv { font-size: 12px; font-weight: 600; }
.scr-tv small { display: flex; align-items: center; gap: 5px; color: var(--go); font-weight: 500; font-size: 10px; }
.scr-tv small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--go); }
.scr-power { width: 30px; height: 30px; border-radius: 50%; background: rgba(229, 72, 77, .15); border: 1px solid rgba(229, 72, 77, .5); }
.scr-tabs { display: flex; gap: 4px; background: var(--surface-1); padding: 3px; border-radius: 10px; font-size: 10px; }
.scr-tabs span { flex: 1; text-align: center; padding: 5px 0; border-radius: 8px; color: var(--muted); }
.scr-tabs span.on { background: var(--electric); color: #fff; font-weight: 600; }
.dpad {
  position: relative; align-self: center; width: 74%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line); margin-top: 6px;
}
.dpad i { position: absolute; width: 0; height: 0; border: 7px solid transparent; }
.dpad .u { top: 10%; left: 50%; transform: translateX(-50%); border-bottom-color: var(--muted); }
.dpad .d { bottom: 10%; left: 50%; transform: translateX(-50%); border-top-color: var(--muted); }
.dpad .l { left: 10%; top: 50%; transform: translateY(-50%); border-right-color: var(--muted); }
.dpad .r { right: 10%; top: 50%; transform: translateY(-50%); border-left-color: var(--muted); }
.dpad b {
  position: absolute; inset: 0; margin: auto; width: 38%; height: 38%; border-radius: 50%;
  background: var(--electric); box-shadow: 0 0 0 0 rgba(30, 94, 255, .6);
  animation: press 3.2s ease-in-out infinite;
}
@keyframes press {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(30, 94, 255, .55); transform: scale(1); }
  76% { transform: scale(.92); }
  90% { box-shadow: 0 0 0 22px rgba(30, 94, 255, 0); transform: scale(1); }
}
.scr-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scr-row span {
  height: 34px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: 14px; letter-spacing: -2px;
}
.scr-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: auto; }
.scr-apps span { aspect-ratio: 1.3; border-radius: 9px; }

/* ---------- Principles ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
.tile {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.tile:hover { border-color: #3d4452; transform: translateY(-2px); }
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(30, 94, 255, .12); color: var(--electric-hi); margin-bottom: 18px;
}
.tile-icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Contact ---------- */
.contact {
  text-align: center; border-radius: 32px; padding: clamp(40px, 7vw, 80px) var(--gutter);
  background: radial-gradient(120% 140% at 50% 0%, rgba(30, 94, 255, .28), transparent 60%), var(--surface-1);
  border: 1px solid var(--line);
}
.contact h2 { margin-bottom: 14px; }
.contact p { color: var(--muted); margin: 0 auto 28px; max-width: 30rem; }
.mail {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(22px, 5vw, 40px); color: #fff; text-decoration: none; word-break: break-all;
  border-bottom: 2px solid var(--electric);
}
.mail:hover { color: var(--electric-hi); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--on-ink); }
.fine { width: 100%; font-size: 12px; color: #6B7383; margin: 0; }

/* ---------- Document pages (privacy, support) ---------- */
.doc { padding: clamp(48px, 8vw, 88px) 0 24px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(38px, 6vw, 60px); max-width: none; margin: 14px 0 10px; }
.doc .meta { color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 8px; }
.doc p, .doc li { color: #C9CFDA; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--on-ink); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout {
  background: var(--surface-1); border: 1px solid var(--line); border-left: 3px solid var(--electric);
  border-radius: 12px; padding: 16px 20px; margin: 20px 0;
}
.callout p { margin: 0; }

details {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 16px;
  padding: 0 20px; margin: 12px 0;
}
details[open] { border-color: #3d4452; }
summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font-weight: 600; color: var(--on-ink);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--electric-hi); transition: transform .2s;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details > *:not(summary) { margin-top: 0; }
details > :last-child { padding-bottom: 18px; margin-bottom: 0; }

/* Reveal on scroll (only when JS has run) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
