/* ============================================================
   STREAMGATE — reset & shared components (light edition)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: rgba(124, 92, 255, 0.26); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(16, 16, 20, 0.16); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 16, 20, 0.3); }

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
em { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid rgba(124, 92, 255, 0.7); outline-offset: 3px; border-radius: 4px; }

/* ---------- film grain overlay ---------- */
.noise {
  position: fixed; inset: -60%;
  z-index: 120;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 2%); }
}

/* ---------- custom cursor (desktop only) ---------- */
.cursor { position: fixed; inset: 0; z-index: 300; pointer-events: none; display: none; }
@media (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--ink); }
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(16, 16, 20, 0.32);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              border-color 0.35s, background-color 0.35s;
}
.cursor.is-hover .cursor-ring {
  width: 60px; height: 60px;
  border-color: rgba(124, 92, 255, 0.85);
  background: rgba(124, 92, 255, 0.07);
}
.cursor.is-down .cursor-ring { width: 26px; height: 26px; }
@media (pointer: fine) {
  body[data-page="landing"] { cursor: none; }
  body[data-page="landing"] a, body[data-page="landing"] button,
  body[data-page="landing"] input, body[data-page="landing"] .faq-q { cursor: none; }
}

/* ---------- shared atoms ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-3);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21, 162, 110, 0.4); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 162, 110, 0.38); }
  70% { box-shadow: 0 0 0 10px rgba(21, 162, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 162, 110, 0); }
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, background 0.4s, border-color 0.4s, opacity 0.3s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  box-shadow: 0 14px 34px -12px rgba(109, 76, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 20px 48px -12px rgba(109, 76, 255, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.btn-ghost {
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-s);
}
.btn-ghost:hover { background: var(--glass-2); border-color: rgba(16, 16, 20, 0.28); }

.btn-danger { color: var(--err); background: rgba(224, 72, 63, 0.08); border: 1px solid rgba(224, 72, 63, 0.35); }
.btn-danger:hover { background: rgba(224, 72, 63, 0.15); }

.btn-sm { padding: 8px 16px; font-size: 12.5px; }

/* magnetic elements — JS drives transform; strip it from CSS transitions to avoid fighting */
[data-magnetic] {
  transition-property: background, background-color, border-color, box-shadow, color, opacity, text-shadow !important;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-m);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok   { color: var(--ok);   border-color: rgba(21, 162, 110, 0.35);  background: rgba(21, 162, 110, 0.08); }
.badge--err  { color: var(--err);  border-color: rgba(224, 72, 63, 0.35);   background: rgba(224, 72, 63, 0.08); }
.badge--warn { color: var(--warn); border-color: rgba(217, 126, 6, 0.35);   background: rgba(217, 126, 6, 0.09); }
.badge--dim  { color: var(--ink-3); }
.badge--violet { color: var(--violet-deep); border-color: rgba(124, 92, 255, 0.38); background: rgba(124, 92, 255, 0.09); }

/* ---------- toast ---------- */
.toast-wrap {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-2);
  color: var(--ink);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13.5px;
  box-shadow: 0 22px 54px -18px rgba(60, 50, 120, 0.32);
  animation: toast-in 0.45s var(--ease-out);
  max-width: min(90vw, 480px);
}
.toast--ok { border-color: rgba(21, 162, 110, 0.45); }
.toast--err { border-color: rgba(224, 72, 63, 0.5); }
.toast.hide { animation: toast-out 0.4s var(--ease-io) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.96); } }

/* ---------- form atoms ---------- */
.field label {
  display: block; margin-bottom: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase;
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.13);
  background: rgba(255, 255, 255, 0.95);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.select option { background: #fff; color: var(--ink); }
.textarea { min-height: 140px; resize: vertical; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.7; }

/* ---------- language pill (shared across pages) ---------- */
.lang-pill {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lang-pill button {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--ink-3);
  transition: color 0.3s, background 0.35s, box-shadow 0.35s;
}
.lang-pill button:hover { color: var(--ink); }
.lang-pill button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  box-shadow: 0 6px 16px -6px rgba(109, 76, 255, 0.65);
}

/* ---------- brand glyph (CSS-mask tinted local SVG) ---------- */
.b-ic {
  display: block;
  background: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.b-ic--netflix       { -webkit-mask-image: url("/assets/img/brand/netflix.svg");       mask-image: url("/assets/img/brand/netflix.svg"); }
.b-ic--disneyplus    { -webkit-mask-image: url("/assets/img/brand/disneyplus.svg");    mask-image: url("/assets/img/brand/disneyplus.svg"); }
.b-ic--hbomax        { -webkit-mask-image: url("/assets/img/brand/hbomax.svg");        mask-image: url("/assets/img/brand/hbomax.svg"); }
.b-ic--appletv       { -webkit-mask-image: url("/assets/img/brand/appletv.svg");       mask-image: url("/assets/img/brand/appletv.svg"); }
.b-ic--paramountplus { -webkit-mask-image: url("/assets/img/brand/paramountplus.svg"); mask-image: url("/assets/img/brand/paramountplus.svg"); }
.b-ic--primevideo    { -webkit-mask-image: url("/assets/img/brand/primevideo.svg");    mask-image: url("/assets/img/brand/primevideo.svg"); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .noise { animation: none; }
}
