/* ══════════════════════════════════════════════════
   radio.css — shared design system for radio & hobby pages
   Used by: ham, coolstuff, openspot, xlx018, drones
   ══════════════════════════════════════════════════ */

/* ── tokens ── */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-2: #1a1a26;
    --surface-3: #22222e;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --text-dim: #55556a;
    --accent: #6c63ff;
    --accent-glow: rgba(108, 99, 255, 0.15);
    --accent-2: #00d4aa;
    --accent-2-glow: rgba(0, 212, 170, 0.1);
    --gradient: linear-gradient(135deg, #6c63ff 0%, #00d4aa 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── focus & selection ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

/* ── links ── */
a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: #33e8c0; }

/* ── skip link ── */
.skip-link {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: fixed; top: 1rem; left: 1rem;
    width: auto; height: auto;
    padding: 0.75rem 1.5rem;
    background: var(--accent); color: #fff;
    border-radius: var(--radius-xs); z-index: 9999; font-weight: 600;
}

/* ── nav ── */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 3.5rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.top-bar .brand {
    font-family: var(--mono); font-weight: 500; font-size: 0.9rem;
    color: var(--text); text-decoration: none; letter-spacing: 0.04em;
}
.top-bar .brand span { color: var(--accent); }
.top-bar nav { display: flex; gap: 0.25rem; }
.top-bar nav a {
    color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
    padding: 0.4rem 0.85rem; border-radius: var(--radius-xs);
    transition: all var(--transition);
}
.top-bar nav a:hover,
.top-bar nav a[aria-current="page"] {
    color: var(--text); background: var(--surface-2);
}
.mobile-toggle {
    display: none; background: none; border: none;
    color: var(--text); cursor: pointer; padding: 0.5rem;
}
.mobile-toggle svg { display: block; }

/* ── hero ── */
.hero {
    position: relative; min-height: 50vh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; padding: 6rem 2rem 3rem;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 50% 50% at 50% 0%, rgba(108, 99, 255, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 30% 70%, rgba(0, 212, 170, 0.05) 0%, transparent 60%);
    pointer-events: none;
}
.hero-grid {
    position: absolute; inset: 0;
    pointer-events: none;
}
.hero-grid canvas {
    width: 100%; height: 100%; opacity: 0.18;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--mono); font-size: 0.8rem;
    color: var(--accent-2); background: var(--accent-2-glow);
    border: 1px solid rgba(0, 212, 170, 0.2);
    padding: 0.35rem 1rem; border-radius: 100px;
    margin-bottom: 1.5rem; position: relative; z-index: 1;
}
.hero-badge::before {
    content: ''; width: 6px; height: 6px;
    background: var(--accent-2); border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
    position: relative; z-index: 1;
}
.hero h1 .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
    margin-top: 1.25rem; font-size: 1.05rem;
    color: var(--text-muted); max-width: 520px;
    position: relative; z-index: 1;
}
.hero-actions {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-top: 2rem; position: relative; z-index: 1;
}

/* ── buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.5rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; border: none;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    color: #fff; background: #7d75ff;
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.3);
    transform: translateY(-1px);
}
.btn-ghost {
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text); background: var(--surface-3);
    border-color: var(--border-hover); transform: translateY(-1px);
}

/* ── layout ── */
.main-content { max-width: 820px; margin: 0 auto; padding: 0 2rem 4rem; }

.section { margin-bottom: 4rem; }
.section-label {
    font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--accent); margin-bottom: 0.75rem;
}
.section-title {
    font-size: 1.6rem; font-weight: 600;
    letter-spacing: -0.02em; margin-bottom: 1rem;
}

/* ── prose ── */
.prose {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem;
}
.prose p { color: var(--text-muted); margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text-muted); }
.prose h4 {
    font-size: 1.1rem; margin-top: 1.75rem;
    margin-bottom: 0.75rem; color: var(--text);
}

/* ── footer ── */
footer {
    max-width: 820px; margin: 0 auto; padding: 2rem;
    text-align: center; color: var(--text-dim); font-size: 0.85rem;
    border-top: 1px solid var(--border);
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent-2); }

/* ── scroll reveal ── */
.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── responsive ── */
@media (max-width: 768px) {
    .top-bar { padding: 0 1rem; }
    .top-bar nav.desktop-nav { display: none; }
    .mobile-toggle { display: block; }

    .mobile-menu {
        display: none; position: fixed; inset: 3.5rem 0 0 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        flex-direction: column; padding: 1rem; z-index: 99;
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
        color: var(--text-muted); padding: 0.85rem 1rem;
        border-radius: var(--radius-xs); font-size: 1rem;
        transition: all var(--transition);
    }
    .mobile-menu a:hover,
    .mobile-menu a[aria-current="page"] {
        color: var(--text); background: var(--surface-2);
    }

    .hero { min-height: 40vh; padding: 5rem 1.5rem 2.5rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .main-content { padding: 0 1rem 3rem; }
    .prose { padding: 1.25rem; }
}

@media (min-width: 769px) {
    .mobile-toggle { display: none; }
    .mobile-menu { display: none !important; }
}
