/* BEadformats / CTV Scale — public pages: landing (index.php) and the two
   login screens. Standalone on purpose (doesn't load style.css), so the
   dashboard's global button/input/label rules can't leak in here.

   Brand: the logo's cyan (#00A2E8) blended into the dashboard's indigo
   (#3454D1), on near-black ink. Light surfaces carry the logo (it's a
   dark-on-light mark); the dark "stage" panels carry the TV visual. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --brand: #00A2E8;
  --brand-2: #3454D1;
  --brand-grad: linear-gradient(135deg, #00A2E8 0%, #3454D1 100%);
  --ink: #0B1220;
  --ink-2: #111A2E;
  --text: #1B2333;
  --muted: #64708A;
  --line: #E3E7EF;
  --surface: #FFFFFF;
  --bg: #F6F8FC;
  --danger: #B42318;
  --danger-bg: #FDEEEC;
  --success: #12B76A;
  --radius: 14px;
  --shadow-lg: 0 24px 60px -20px rgba(11, 18, 32, 0.25), 0 8px 20px -8px rgba(11, 18, 32, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); }
img { max-width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 15px/1 'Inter', sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(52, 84, 209, .7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(52, 84, 209, .8); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #C9D1E1; background: #FBFCFE; }
.btn-block { width: 100%; }
.btn:focus-visible, .field input:focus-visible, .pw-toggle:focus-visible { outline: 3px solid rgba(0, 162, 232, .35); outline-offset: 2px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; display: none; }
.btn.is-loading .spin { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: .85; }

/* ---------- The TV + live event feed (shared by landing + login) ---------- */
.stage-visual { position: relative; width: 100%; max-width: 460px; }
.tv {
  position: relative; border-radius: 18px; padding: 10px;
  background: linear-gradient(160deg, #1D2742, #0E1528);
  box-shadow: 0 30px 80px -30px rgba(0, 162, 232, .45), inset 0 1px 0 rgba(255,255,255,.08);
}
.tv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #050913; }
.tv-ad {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(0, 162, 232, .85), transparent 60%),
    radial-gradient(60% 80% at 85% 70%, rgba(52, 84, 209, .9), transparent 60%),
    radial-gradient(40% 50% at 60% 20%, rgba(155, 92, 255, .55), transparent 70%),
    #0A1024;
  background-size: 160% 160%;
  animation: drift 10s ease-in-out infinite alternate;
}
.tv-ad::after { /* soft scanline sheen */
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px);
}
.tv-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font: 600 11px/1 'Inter', sans-serif; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(5, 9, 19, .55); backdrop-filter: blur(6px);
  padding: 6px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
}
.tv-badge i { width: 7px; height: 7px; border-radius: 50%; background: #FF4D6D; box-shadow: 0 0 0 0 rgba(255,77,109,.6); animation: pulse 1.6s infinite; }
.tv-title { position: absolute; left: 14px; bottom: 26px; z-index: 2; color: #fff; }
.tv-title b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.tv-title span { font-size: 12px; opacity: .75; }
.tv-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.15); z-index: 2; }
.tv-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #00A2E8, #7FD3FF); animation: play 14s linear infinite; }
.tv-progress em { position: absolute; top: -3px; width: 2px; height: 11px; background: rgba(255,255,255,.55); }
.tv-stand { width: 34%; height: 10px; margin: 0 auto; border-radius: 0 0 10px 10px; background: linear-gradient(#1D2742, #10182C); }

.feed {
  list-style: none; margin: 18px 0 0; padding: 14px;
  border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  font: 500 12.5px/1 'JetBrains Mono', ui-monospace, monospace; color: rgba(255,255,255,.85);
  display: grid; gap: 9px;
}
.feed li { display: flex; align-items: center; gap: 10px; opacity: .22; animation: 14s infinite; }
.feed li .dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); flex-shrink: 0; animation: 14s infinite; }
.feed li .dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .5; }
.feed li .t { margin-left: auto; color: rgba(255,255,255,.45); }
/* One shared 14s cycle with the progress bar: each row lights up as the bar reaches its point in the ad. */
.feed li:nth-child(1) { animation-name: row1; } .feed li:nth-child(1) .dot { animation-name: dot1; }
@keyframes row1 { 0%, 0.5% { opacity: .22; } 1%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot1 { 0%, 0.5% { background: rgba(255,255,255,.08); } 1%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }
.feed li:nth-child(2) { animation-name: row2; } .feed li:nth-child(2) .dot { animation-name: dot2; }
@keyframes row2 { 0%, 2.5% { opacity: .22; } 3%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot2 { 0%, 2.5% { background: rgba(255,255,255,.08); } 3%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }
.feed li:nth-child(3) { animation-name: row3; } .feed li:nth-child(3) .dot { animation-name: dot3; }
@keyframes row3 { 0%, 20.75% { opacity: .22; } 21.25%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot3 { 0%, 20.75% { background: rgba(255,255,255,.08); } 21.25%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }
.feed li:nth-child(4) { animation-name: row4; } .feed li:nth-child(4) .dot { animation-name: dot4; }
@keyframes row4 { 0%, 42% { opacity: .22; } 42.5%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot4 { 0%, 42% { background: rgba(255,255,255,.08); } 42.5%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }
.feed li:nth-child(5) { animation-name: row5; } .feed li:nth-child(5) .dot { animation-name: dot5; }
@keyframes row5 { 0%, 63.25% { opacity: .22; } 63.75%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot5 { 0%, 63.25% { background: rgba(255,255,255,.08); } 63.75%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }
.feed li:nth-child(6) { animation-name: row6; } .feed li:nth-child(6) .dot { animation-name: dot6; }
@keyframes row6 { 0%, 84.5% { opacity: .22; } 85%, 97% { opacity: 1; } 100% { opacity: .22; } }
@keyframes dot6 { 0%, 84.5% { background: rgba(255,255,255,.08); } 85%, 97% { background: var(--success); } 100% { background: rgba(255,255,255,.08); } }

@keyframes play { 0% { width: 0; } 85%, 100% { width: 100%; } }
@keyframes drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,109,.55); } 70% { box-shadow: 0 0 0 8px rgba(255,77,109,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,109,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Dark "stage" background used behind the TV. */
.stage {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(50% 60% at 15% 10%, rgba(0, 162, 232, .28), transparent 60%),
    radial-gradient(45% 55% at 90% 90%, rgba(52, 84, 209, .35), transparent 60%),
    var(--ink);
}
.stage::before { /* faint grid */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ======================= LOGIN ======================= */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-stage { display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(32px, 5vw, 80px); }
.auth-stage > * { position: relative; }
.auth-stage .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7FD3FF; }
.auth-stage .eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.auth-stage h2 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 14px 0 12px; font-weight: 800; max-width: 520px; }
.auth-stage h2 .grad { background: linear-gradient(90deg, #7FD3FF, #A9B8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-stage p.lead { color: rgba(255,255,255,.7); font-size: 15.5px; line-height: 1.6; margin: 0 0 32px; max-width: 480px; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; animation: float-in .5s ease both; }
.auth-logo { display: block; height: 34px; width: auto; margin-bottom: 36px; }
.auth-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--brand-2); background: #EEF2FD; padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 800; color: var(--ink); }
.auth-card .sub { color: var(--muted); font-size: 15px; margin: 0 0 28px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; background: var(--danger-bg); color: var(--danger); border: 1px solid #F8D3CE; animation: shake .35s ease; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.field .control { position: relative; }
.field .control > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98A2B8; pointer-events: none; transition: color .2s; }
.field input {
  width: 100%; height: 48px; padding: 0 44px 0 42px;
  border: 1px solid var(--line); border-radius: 10px; background: #FBFCFE;
  font: 500 15px 'Inter', sans-serif; color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #A7B0C2; font-weight: 400; }
.field input:hover { border-color: #C9D1E1; }
.field input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(0, 162, 232, .14); }
.field .control:focus-within > svg { color: var(--brand); }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent;
  color: #98A2B8; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { color: var(--text); background: #F1F4F9; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: inline; }
.caps { display: none; font-size: 12px; color: #9A5B00; margin-top: 6px; }
.caps.on { display: block; }

.auth-card .btn-primary { margin-top: 8px; height: 50px; font-size: 15.5px; }
.auth-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-foot a { font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ======================= LANDING ======================= */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.82); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid rgba(227,231,239,.7); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo img { height: 30px; width: auto; display: block; }
.nav-actions { display: flex; gap: 10px; }
.nav-actions .btn { height: 40px; padding: 0 16px; font-size: 14px; }

.hero { padding: 72px 24px 96px; }
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.85); }
.hero .pill b { background: var(--brand-grad); color: #fff; padding: 3px 8px; border-radius: 999px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -.035em; margin: 20px 0 18px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(90deg, #4CC3FF, #A9B8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.72); max-width: 540px; margin: 0 0 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; font-size: 13.5px; color: rgba(255,255,255,.65); }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg { color: #4CC3FF; }
.hero .stage-visual { justify-self: end; animation: float-in .7s .1s ease both; }

.section { padding: 88px 24px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.section-head h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.025em; line-height: 1.1; margin: 10px 0 12px; color: var(--ink); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 0; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--brand-grad); margin-bottom: 18px; box-shadow: 0 10px 20px -10px rgba(52,84,209,.7); }
.feature h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: linear-gradient(180deg, #FFFFFF, #F8FAFE); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: '0' counter(step); font: 700 13px 'JetBrains Mono', monospace; color: var(--brand); background: #E6F6FD; padding: 5px 9px; border-radius: 8px; display: inline-block; margin-bottom: 16px; }
.step h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.step code { font: 500 12.5px 'JetBrains Mono', monospace; background: #F1F4F9; padding: 2px 6px; border-radius: 5px; color: var(--text); }

.cta-band { margin: 0 24px 88px; }
.cta-band .inner { max-width: 1180px; margin: 0 auto; border-radius: 22px; padding: 56px clamp(24px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.02em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.7); font-size: 16px; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); }

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer .inner { max-width: 1180px; margin: 0 auto; padding: 26px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.footer img { height: 22px; width: auto; display: block; }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-stage { display: none; } /* phones/tablets: just the form */
  .auth-panel { min-height: 100vh; background: radial-gradient(80% 50% at 50% 0%, #E6F6FD, transparent 70%), var(--surface); }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero .stage-visual { justify-self: center; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .nav-inner { padding: 12px 16px; }
  .nav-logo img { height: 24px; }
  .nav-actions .btn-ghost { display: none; }
  .hero { padding: 48px 16px 72px; }
  .section { padding: 64px 16px; }
  .cta-band { margin: 0 16px 64px; }
  .auth-panel { padding: 32px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .feed li { opacity: 1; }
  .tv-progress-fill { width: 60%; }
}

/* Landing page is hero-only: the hero fills the screen below the nav (~69px). */
.hero-full { min-height: calc(100vh - 69px); display: flex; align-items: center; }
.hero-full .hero-inner { width: 100%; }
