/* ==========================================================================
   Gamma IPTV — design tokens & base styles (original dark navy + cyan/violet style)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-var-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;

  --bg: #07090f;
  --bg-2: #0b0e17;
  --surface: #10141f;
  --surface-2: #141927;
  --surface-3: #1a2031;
  --card: linear-gradient(180deg, #141927, #10141f);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f7;
  --text-muted: #9aa3b5;
  --dim: #7d869a;
  --cyan: #67e8f9;
  --violet: #a78bfa;
  --grad: linear-gradient(90deg, #67e8f9 0%, #a78bfa 100%);
  --brand: #67e8f9;
  --brand-hover: #a5f3fc;
  --brand-soft: rgba(103, 232, 249, 0.08);
  --brand-ink: #0a0d16;
  --live: #4ade80;
  --danger: #f87171;
  --focus: #a78bfa;
  --shadow: 0 30px 80px -30px rgba(103, 232, 249, 0.25);
  --glow:
    radial-gradient(600px 400px at 10% 10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(700px 500px at 95% 40%, rgba(167, 139, 250, 0.18), transparent 60%),
    radial-gradient(600px 400px at 50% 100%, rgba(20, 184, 166, 0.14), transparent 60%);

  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 1.8vw, 3rem);
  --fs-3xl: clamp(2.2rem, 1.4rem + 2.8vw, 3.75rem);
  --fs-hero: clamp(2.4rem, 1.2rem + 3.9vw, 4.5rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --section-y: clamp(64px, 9vw, 110px);
  --gutter: clamp(16px, 4vw, 24px);
  --container: 1200px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[hidden] {
  display: none !important;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-3xl);
}
h2 {
  font-size: var(--fs-2xl);
}
h3 {
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
p {
  text-wrap: pretty;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--brand-hover);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow {
  max-width: calc(780px + 2 * var(--gutter));
}
.muted {
  color: var(--text-muted);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.06);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tag {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.grid-bg {
  position: relative;
}
.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}
.lead {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 62ch;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.stack > * + * {
  margin-top: var(--space-4);
}

/* ---------- prose (articles, legal, guides) ---------- */
.prose {
  max-width: 72ch;
  font-size: var(--fs-base);
}
.prose > * + * {
  margin-top: 1.1em;
}
.prose h2 {
  font-size: var(--fs-xl);
  margin-top: 2.2em;
}
.prose h3 {
  font-size: var(--fs-lg);
  margin-top: 1.8em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose strong {
  color: var(--text);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.prose th {
  color: var(--text);
  font-weight: 600;
}
.prose blockquote {
  border-left: 3px solid var(--brand);
  padding: 4px 0 4px 18px;
  color: var(--text-muted);
}
.prose code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
}
.placeholder {
  background: var(--brand-soft);
  color: var(--text);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- forms ---------- */
.form {
  display: grid;
  gap: 18px;
}
.form-status {
  font-size: var(--fs-sm);
  border-radius: 12px;
}
.form-status:empty {
  display: none;
}
.form-status--error,
.form-status--success {
  padding: 12px 14px;
  border: 1px solid;
}
.form-status--error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.form-status--success {
  color: var(--live);
  border-color: color-mix(in srgb, var(--live) 40%, transparent);
  background: color-mix(in srgb, var(--live) 8%, transparent);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
