/* PlavioTV — Marketing Website
   Shared design tokens + layout + components
   Extends the PlavioTV app visual language. */

:root {
  --bg-0: #080606;
  --bg-1: #0D0909;
  --bg-2: #130C0C;
  --bg-3: #1A1111;
  --bg-4: #221616;
  --border: rgba(255, 255, 255, 0.06);
  --border-med: rgba(255, 255, 255, 0.10);
  --border-hi: rgba(255, 255, 255, 0.18);
  --t-0: #F2EDED;
  --t-1: #9A8A8A;
  --t-2: #4A3838;
  --accent: #E5281C;
  --accent-hot: #FF3A2B;
  --accent-dim: rgba(229, 40, 28, 0.16);
  --accent-line: rgba(229, 40, 28, 0.45);
  --live: #FF6B2B;
  --gold: #F5A32A;

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-0);
  color: var(--t-0);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body { min-height: 100vh; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ─── Ambient page backdrop ──────────────────────────────── */
.page-backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(229,40,28,0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(68,85,221,0.07), transparent 60%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.35; mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}
.stage { position: relative; z-index: 2; }

/* ─── Logo mark ──────────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  position: relative; width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(180deg, #FF3A2B, #A5140B);
  box-shadow: 0 6px 16px rgba(229,40,28,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.logo-mark::before {
  content: ''; position: absolute; left: 6px; top: 5px; width: 4.5px; height: 18px;
  background: #fff; border-radius: 1.5px;
}
.logo-mark::after {
  content: ''; position: absolute; left: 10px; top: 5px; width: 11px; height: 11px;
  background: #fff; border-top-right-radius: 999px; border-bottom-right-radius: 999px;
  box-shadow: inset -3.5px 0 0 #E5281C, inset 0 3px 0 transparent;
}
.logo-mark .hole {
  position: absolute; left: 10px; top: 8px; width: 7px; height: 5px;
  background: linear-gradient(180deg, #E5281C, #A5140B); border-top-right-radius: 999px; border-bottom-right-radius: 999px;
}
.logo-word {
  font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: -0.04em;
  line-height: 1; color: var(--t-0);
}
.logo-word .tv { color: var(--accent); }

/* ─── Header / nav ───────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(8,6,6,0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 32px;
  display: flex; align-items: center; gap: 40px;
}
.nav { display: flex; gap: 28px; margin-left: 12px; flex: 1; }
.nav a {
  font-size: 14px; color: var(--t-1); font-weight: 500;
  transition: color 0.2s var(--ease); position: relative;
}
.nav a:hover { color: var(--t-0); }
.nav a.active { color: var(--t-0); }
.nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent);
  border-radius: 2px;
}
.header-ctas { display: flex; gap: 10px; align-items: center; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em; transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(229,40,28,0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--accent-hot); }
.btn-ghost { color: var(--t-0); border: 1px solid var(--border-med); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--border-hi); background: rgba(255,255,255,0.04); }
.btn-lg { padding: 16px 28px; font-size: 15px; border-radius: 12px; }

/* ─── Section scaffolding ────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--t-1); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.section-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section-label .dot.live { background: var(--live); box-shadow: 0 0 0 4px rgba(255,107,43,0.12); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.h1 { font-family: var(--font-display); font-size: clamp(44px, 6vw, 84px); font-weight: 900; letter-spacing: -0.035em; line-height: 0.98; color: #fff; }
.h2 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 54px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; color: #fff; }
.h3 { font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.h4 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--t-0); }
.lede { font-size: clamp(16px, 1.3vw, 19px); color: var(--t-1); line-height: 1.6; max-width: 58ch; }
.caption { font-family: var(--font-mono); font-size: 12px; color: var(--t-2); letter-spacing: 0.06em; }
.red-accent { color: var(--accent); }
.hair { height: 1px; background: var(--border); border: 0; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { border-color: var(--border-med); }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: rgba(229,40,28,0.08); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 20px;
}

/* ─── Chips ──────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--t-1);
}
.chip.accent { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent); }
.chip.live { background: rgba(255,107,43,0.14); border-color: rgba(255,107,43,0.45); color: var(--live); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 72px 0 40px; border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-0), rgba(26,4,4,0.4));
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px;
}
.footer h5 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--t-1); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--t-0); font-size: 14px; opacity: 0.8; transition: opacity 0.2s var(--ease), color 0.2s var(--ease); }
.footer a:hover { opacity: 1; color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--t-2);
}
.footer-bottom .caption-sm { font-family: var(--font-mono); letter-spacing: 0.08em; }

/* ─── Page hero ─────────────────────────────────────────── */
.page-hero {
  padding: 84px 0 56px; position: relative; text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 18px;
}
.page-hero .h1 { font-size: clamp(42px, 5vw, 68px); margin-bottom: 18px; }
.page-hero .lede { margin: 0 auto; max-width: 62ch; font-size: 18px; }

/* ─── Device frame (phone) ───────────────────────────────── */
.phone-frame {
  width: 320px; aspect-ratio: 9/19; border-radius: 40px;
  background: #000; padding: 10px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative;
}
.phone-frame .screen { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: var(--bg-0); position: relative; }
.phone-frame::before {
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 20px; background: #000; border-radius: 12px; z-index: 2;
}

/* ─── TV frame (landscape) ───────────────────────────────── */
.tv-frame {
  width: 100%; aspect-ratio: 16/10; border-radius: 16px;
  background: #000; padding: 10px;
  box-shadow: 0 50px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08) inset;
  position: relative;
}
.tv-frame .screen { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; background: var(--bg-0); position: relative; }

/* ─── Poster ─────────────────────────────────────────────── */
.poster {
  aspect-ratio: 2/3; border-radius: 10px; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease);
}
.poster::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%);
}
.poster .label {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  font-size: 11px; font-weight: 600; color: #fff; z-index: 1;
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { display: none; }
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .header-inner { padding: 16px 20px; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-ctas .btn-ghost { display: none; }
}

/* ─── Page transition ────────────────────────────────────── */
#page-root { animation: fade-in 0.4s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Utility ────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.muted { color: var(--t-1); }
.spacer-lg { height: 80px; }
