:root {
  --bg: #07070b;
  --bg-elev: #11111a;
  --bg-elev-2: #1a1a26;
  --text: #f5f5f7;
  --text-muted: #a0a0ad;
  --border: rgba(255, 255, 255, 0.08);

  --tv-red: #ff3b3b;
  --tv-green: #3bff7e;
  --tv-blue: #3b8fff;
  --tv-yellow: #ffd93b;
  --accent: var(--tv-red);

  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(59, 143, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(255, 59, 59, 0.05), transparent 60%),
    radial-gradient(900px 500px at 10% 80%, rgba(59, 255, 126, 0.04), transparent 60%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  display: block;
  height: 38px;
  width: auto;
  object-fit: contain;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tv-red);
  box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  margin: 1rem 0 0;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  background-image:
    linear-gradient(180deg, rgba(7, 7, 11, 0.35) 0%, rgba(7, 7, 11, 0.6) 100%),
    url("../img/bg_01_jpg_1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero > * {
  width: 100%;
  max-width: var(--max-w);
}

.tv-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 597 / 238;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(7, 7, 11, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    -18px 0 60px -30px var(--tv-red),
    18px 0 60px -30px var(--tv-blue),
    0 -18px 60px -30px var(--tv-yellow),
    0 18px 60px -30px var(--tv-green);
}

.tv-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.tv-screen iframe {
  width: 62%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 6px rgba(0, 0, 0, 0.55),
    0 20px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 80px -10px rgba(59, 143, 255, 0.25);
}

.tv-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(255, 255, 255, 0.045) 2px 3px
  );
  mix-blend-mode: overlay;
  z-index: 3;
}

.tv-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.hero-helper {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--tv-yellow);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(
    90deg,
    #ff9d00 10%,
    #ffa600 16%,
    #ffbe00 25%,
    #ffd300 32%,
    #bdcc00 40%,
    #82c600 48%,
    #6cc400 52%,
    #59c124 59%,
    #33bc72 74%,
    #17b9aa 86%,
    #06b6cd 95%
  );
  color: #ffffff;
  text-shadow: #000000 0px 0px 4px;
  box-shadow:
    0 10px 30px -10px rgba(255, 157, 0, 0.45),
    0 10px 30px -10px rgba(6, 182, 205, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 14px 36px -10px rgba(255, 157, 0, 0.55),
    0 14px 36px -10px rgba(6, 182, 205, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.85rem 1.4rem;
}

.btn-ghost:hover {
  background: var(--bg-elev);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Modal ---------- */

.modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: 560px;
  width: calc(100% - 2rem);
  margin: auto;
}

.modal::backdrop {
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal[open] {
  animation: modal-in 0.22s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  appearance: none;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

#form-embed-slot {
  min-height: 540px;
}

#form-embed-slot iframe {
  width: 100%;
  min-height: 540px;
  border: 0;
  display: block;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .topbar {
    padding: 1rem;
  }

  .hero {
    padding: 1rem 1rem 2rem;
    gap: 1.5rem;
  }

  .tv-frame {
    border-radius: var(--radius-md);
    box-shadow:
      inset 0 0 40px rgba(0, 0, 0, 0.55),
      0 18px 50px -15px rgba(0, 0, 0, 0.8),
      -8px 0 30px -20px var(--tv-red),
      8px 0 30px -20px var(--tv-blue);
  }

  .tv-screen iframe {
    width: 78%;
    border-radius: 6px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 0 3px rgba(0, 0, 0, 0.6),
      0 10px 30px -8px rgba(0, 0, 0, 0.9);
  }

  .brand-logo {
    height: 28px;
  }

  .btn-primary {
    width: 100%;
    max-width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
