/* app.css — global styles: theme tokens, base elements, marketing landing page */

:root {
    color-scheme: dark;
    --background: #0f0f0f;
    --surface: #1a1a1a;
    --surface-raised: #222226;
    --text: #f5f5f7;
    --muted: #a3a3aa;
    --line: #303035;
    --blue: #2979ff;
    --button: #1f6fff;
    --cyan: #00bcd4;
    --purple: #9c27b0;
    --amber: #ffa000;
    --eyebrow: #26c6da;
    --glow: rgba(41, 121, 255, .16);
    --glow-alt: rgba(156, 39, 176, .14);
    --shadow: 0 28px 80px rgba(0, 0, 0, .42);
    --shot-border: rgba(255, 255, 255, .1);
    --radius: 16px;
    --gutter: 28px;
}

:root[data-theme='light'] {
    color-scheme: light;
    --background: #f7f8fc;
    --surface: #ffffff;
    --surface-raised: #eef1f7;
    --text: #171923;
    --muted: #586174;
    --line: #dce1ea;
    --button: #1a62e6;
    --eyebrow: #00747f;
    --glow: rgba(41, 121, 255, .12);
    --glow-alt: rgba(156, 39, 176, .08);
    --shadow: 0 28px 80px rgba(28, 45, 92, .18);
    --shot-border: rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

.flash { margin: 1rem auto; max-width: 1124px; padding: .75rem 1rem; border-radius: .5rem; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }

/* ---------- Landing page ---------- */

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--button);
    color: #fff;
    font-weight: 700;
}

.skip-link:focus { top: 12px; }

.landing {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-x: clip;
    background:
        radial-gradient(circle at 82% 8%, var(--glow), transparent 32%),
        radial-gradient(circle at 10% 70%, var(--glow-alt), transparent 30%),
        var(--background);
}

.site-header,
.hero,
.feature-section,
.experience,
.download-section,
.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.site-header {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    letter-spacing: -.3px;
    white-space: nowrap;
}

.brand-mark { width: 36px; height: 36px; display: block; }

.site-nav { display: flex; gap: 26px; color: var(--muted); font-size: 14px; }
.site-nav a:hover, .site-footer a:hover { color: var(--text); }

.header-actions { display: flex; gap: 10px; align-items: center; }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

.theme-toggle:hover { border-color: var(--muted); }

.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dark theme shows the sun (switch to light); light theme shows the moon. */
.icon-moon { display: none; }
:root[data-theme='light'] .icon-sun { display: none; }
:root[data-theme='light'] .icon-moon { display: block; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    color: #fff;
    background: var(--button);
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(41, 121, 255, .25);
    transition: transform .15s, box-shadow .15s;
}

.button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(41, 121, 255, .32); }
.button-small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.button-secondary { color: var(--text); background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.button-secondary:hover { box-shadow: none; border-color: var(--muted); }

.eyebrow {
    margin: 0 0 14px;
    color: var(--eyebrow);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 22px;
    font-size: clamp(40px, 5.4vw, 70px);
    line-height: 1;
    letter-spacing: -.045em;
    text-wrap: balance;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.04em;
    text-wrap: balance;
}

h3 { margin-bottom: 8px; font-size: 20px; }

.hero-lead,
.experience-copy p,
.download-copy p {
    max-width: 520px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

/* Hero: copy and screenshot side by side, stacked below 960px. */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 96px;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }

.content-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    margin: 28px 0 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.content-types li { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.live { background: var(--cyan); }
.dot.movies { background: var(--purple); }
.dot.series { background: var(--amber); }

.app-shot {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--shot-border);
    border-radius: var(--radius);
    background: #0f0f0f;
    box-shadow: var(--shadow);
}

.app-shot img { display: block; width: 100%; height: auto; }

.hero-shot {
    margin-right: -64px;
    transform: perspective(1600px) rotateY(-8deg) rotateX(2deg);
    transform-origin: left center;
}

/* Features */
.feature-section { padding-top: 40px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.feature-section .section-heading { padding-top: 56px; max-width: 560px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.feature-grid article {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.feature-grid p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 22px;
    border-radius: 12px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-icon.live { color: var(--cyan); background: rgba(0, 188, 212, .15); background: color-mix(in srgb, var(--cyan) 15%, transparent); }
.feature-icon.movies { color: #c158dc; background: rgba(156, 39, 176, .18); background: color-mix(in srgb, var(--purple) 18%, transparent); }
.feature-icon.series { color: var(--amber); background: rgba(255, 160, 0, .15); background: color-mix(in srgb, var(--amber) 15%, transparent); }
:root[data-theme='light'] .feature-icon.live { color: #00838f; }
:root[data-theme='light'] .feature-icon.movies { color: var(--purple); }
:root[data-theme='light'] .feature-icon.series { color: #b26a00; }

.detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 20px 0 0;
    list-style: none;
}

.detail-list li {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
}

/* Experience: copy beside two overlapping screenshots. */
.experience {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 56px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 110px;
}

.experience-shots { position: relative; padding-bottom: 18%; }
.feature-shot { width: 88%; margin-left: auto; }

.detail-shot {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56%;
    border-radius: 12px;
    box-shadow: 0 0 0 6px var(--background), var(--shadow);
}

/* Download: full screensaver capture, no circular mask. */
.download-section {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 110px;
}

.download-copy .button { margin-top: 12px; }

.screensaver-shot { box-shadow: 0 0 0 1px var(--line), 0 30px 120px rgba(156, 39, 176, .22); }

.text-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

:root[data-theme='light'] .text-link { color: var(--button); }

/* "Player, not a provider" notice */
.byo-section { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 96px; }

.byo-card {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.byo-card .feature-icon { flex: none; margin-bottom: 0; }
.byo-card h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.03em; }
.byo-card p { max-width: 720px; color: var(--muted); line-height: 1.6; }

.site-footer {
    padding-top: 28px;
    padding-bottom: 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer p { margin: 0; }
.footer-notice { max-width: 760px; margin-bottom: 18px !important; line-height: 1.55; }

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Legal pages */
.legal-page { max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.legal-article { max-width: 760px; }
.legal-article h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 10px; }
.legal-article h2 { margin-top: 40px; font-size: 24px; letter-spacing: -.02em; }
.legal-article p, .legal-article li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal-article strong { color: var(--text); }
.legal-article ul { padding-left: 22px; }
.legal-article li + li { margin-top: 8px; }
.legal-updated { font-size: 14px !important; }
.legal-lead { font-size: 18px !important; }

.legal-callout {
    margin: 28px 0 8px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
    border-left-width: 4px;
    border-radius: 12px;
    background: var(--surface);
    background: color-mix(in srgb, var(--amber) 8%, var(--surface));
}

.legal-callout p { margin: 0; color: var(--text); }

@media (max-width: 960px) {
    .hero,
    .experience,
    .download-section { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero { padding-top: 48px; padding-bottom: 72px; }
    .hero-shot { margin-right: 0; transform: none; }
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
    .experience-copy, .download-copy { max-width: 620px; }
}

@media (max-width: 760px) {
    .site-nav { display: none; }
}

@media (max-width: 520px) {
    :root { --gutter: 16px; }
    .site-header { height: 64px; }
    .header-actions .button-small { display: none; }
    .brand { font-size: 15px; }
    .brand-mark { width: 32px; height: 32px; }
    .hero { padding-top: 32px; }
    .hero-actions .button { flex: 1 1 100%; }
    .hero-lead, .experience-copy p, .download-copy p { font-size: 16px; }
    .feature-grid article { padding: 22px; }
    .app-shot { border-radius: 12px; }
    .detail-shot { border-radius: 8px; box-shadow: 0 0 0 4px var(--background), var(--shadow); }
    .footer-row { flex-direction: column; align-items: flex-start; }
    .byo-card { flex-direction: column; padding: 22px; }
    .legal-page { padding-top: 28px; }
}
