/* ===================================================================
   Broadcast Control — Design Tokens
   Refresh: tokenised colour + typography system.
   Each product page sets only --accent-* (see per-page <style>).
   =================================================================== */
:root {
    /* --- Surfaces (deepened base; cards get a real surface token) --- */
    --bg:            #0E1124;
    --bg-elevated:   #141832;
    --surface:       #1A1F40;
    --surface-hover: #222850;

    /* --- Text hierarchy --- */
    --text-1: rgba(255, 255, 255, 0.92);
    --text-2: rgba(255, 255, 255, 0.62);
    --text-3: rgba(255, 255, 255, 0.40);
    --text-on-accent: #ffffff;

    /* --- Lines & borders --- */
    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.05);

    /* --- Accent (default: Broadcast Control red; overridden per page) --- */
    --accent:        #d42030;
    --accent-hover:  #b81c2a;
    --accent-bright: #ff2d40;
    --accent-rgb:    212, 32, 48;
    --accent-glow:   rgba(var(--accent-rgb), 0.08);

    /* --- Support / brand constants --- */
    --coffee:        #FFDD00;
    --coffee-hover:  #e6c700;

    /* --- Typography --- */
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, 'Segoe UI Mono', monospace;

    /* --- Radii --- */
    --radius-lg: 16px;  /* logos */
    --radius-md: 10px;  /* cards */
    --radius-sm: 8px;   /* images */
    --radius-xs: 6px;   /* buttons */
    --radius-pill: 4px; /* badges */

    /* --- Motion --- */
    --ease: 0.2s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ===== Background Glow ===== */
.bg-glow {
    position: fixed;
    top: -40%;
    left: -20%;
    width: 140%;
    height: 140%;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 40%, var(--accent-glow) 0%, transparent 60%);
}

/* ===== Navigation ===== */
.nav {
    width: 100%;
    position: relative;
    z-index: 5;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-2);
    text-decoration: none;
    letter-spacing: 0.08em;
}

.nav-brand:hover {
    color: var(--text-1);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-3);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color var(--ease);
}

.nav-links a:hover {
    color: var(--text-1);
}

.nav-links a.active {
    color: var(--accent);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.nav-hamburger svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-2);
}

/* ===== Sections & Layout ===== */
.section {
    width: 100%;
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
}

.section.hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== Logo ===== */
.logo {
    display: inline-block;
    margin-bottom: 2rem;
}

.logo img {
    width: 220px;
    height: 220px;
    border-radius: var(--radius-lg);
}

/* ===== Divider ===== */
.divider {
    width: 60px;
    height: 3px;
    margin: 0 auto 2rem;
    border-radius: 2px;
    background: var(--accent);
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.4em 1.2em;
    border-radius: var(--radius-pill);
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: var(--accent-bright);
}

/* ===== Typography ===== */
h1, h2, h3,
.section-title,
.nav-brand,
.badge {
    font-family: var(--font-display);
}

.hero h1 {
    font-family: var(--font-display);
}

.app-description {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 300;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

/* ===== CTA Buttons ===== */
.cta-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7em 1.5em;
    border-radius: var(--radius-xs);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background var(--ease), transform 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent-bright);
    color: var(--text-on-accent);
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-1);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-coffee {
    background: var(--coffee);
    color: #000000;
    font-weight: 700;
}

.btn-coffee:hover {
    background: var(--coffee-hover);
}

.btn-coffee svg {
    width: 20px;
    height: 20px;
}

/* ===== Checkers Animation ===== */
.checkers {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 1rem;
}

.checker {
    width: 10px;
    height: 10px;
    opacity: 0.3;
    background: var(--accent);
    animation: pulse 1.8s ease-in-out infinite;
}

.checker:nth-child(2) { animation-delay: 0.2s; }
.checker:nth-child(3) { animation-delay: 0.4s; }
.checker:nth-child(4) { animation-delay: 0.6s; }
.checker:nth-child(5) { animation-delay: 0.8s; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== Screenshots ===== */
.screenshot-slot {
    text-align: center;
}

.screenshot-placeholder {
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.screenshot-slot .caption {
    font-size: 0.8rem;
    color: var(--text-2);
    text-align: center;
    margin-top: 0.6rem;
}

.screenshot-slot img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform var(--ease), box-shadow var(--ease);
}

.screenshot-slot img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== Features Grid ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    transition: background var(--ease), border-color var(--ease), transform 0.15s ease;
    scroll-margin-top: 2rem;
}

.feature-card:hover {
    background: var(--surface-hover);
    border-color: rgba(var(--accent-rgb), 0.35);
    transform: translateY(-2px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ===== ADRR Section ===== */
.adrr-section {
    text-align: center;
    margin-top: 2.5rem;
}

.adrr-section a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.adrr-section a:hover {
    opacity: 0.8;
}

.adrr-section img {
    width: 150px;
    height: auto;
    margin-bottom: 0.5rem;
}

.adrr-section .discord-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-3);
    letter-spacing: 0.08em;
}

/* ===== Support Section ===== */
.support-section {
    text-align: center;
}

.support-section p {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--text-2);
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto 2rem;
}

/* ===== Footer ===== */
.footer {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-2);
    letter-spacing: 0.05em;
    padding: 2rem 2rem 5rem;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-3);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    transition: color var(--ease);
}

.footer-links a:hover {
    color: var(--text-1);
}

.footer-links a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.footer-copy {
    color: var(--text-3);
}

/* ===== Buy Me a Coffee Fixed Button ===== */
.bmc-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

/* ===== Lightbox ===== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-1);
    font-size: 2rem;
    cursor: pointer;
    z-index: 101;
    line-height: 1;
    padding: 0.5rem;
}

.lightbox-close:hover {
    color: #ffffff;
}

/* ===== Focus states for accessibility ===== */
a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .section { padding: 3rem 1.25rem; }
    .features-grid { grid-template-columns: 1fr; }
    .cta-row { flex-direction: column; align-items: center; }
    .logo img { width: 160px; height: 160px; }
    .nav-inner { padding: 0.8rem 1.25rem; gap: 1rem; }
    .nav-hamburger { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; gap: 1rem; }
    .nav-links.open { display: flex; }
    .footer-links { flex-direction: column; align-items: center; gap: 0.75rem; }
}
