/* ==========================================================
   KD2YFY shared stylesheet
   Used by index.html, links.html and ham-radio.html.
   solar.html loads it too, but only for the site nav (.site-nav);
   page-level rules are scoped to body.site-page so they don't
   fight with the Tailwind styles on the propagation dashboard.
   ========================================================== */

:root {
    --primary: #00f2ea;   /* Cyan neon */
    --secondary: #ff0055; /* Red neon */
    --warn: #facc15;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-width: 560px;
    --nav-height: 56px;
}

/* ---------- Page shell ---------- */
/* :where() keeps this reset at zero specificity so component rules below always win */
:where(body.site-page, body.site-page *) { box-sizing: border-box; margin: 0; padding: 0; }

body.site-page {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 242, 234, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 0, 85, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
}

.site-page main {
    display: flex;
    justify-content: center;
    padding: 2rem 16px 3rem;
}

/* ---------- Site navigation (shared with solar.html) ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 2000; /* above Leaflet panes on solar.html */
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    font-family: 'Inter', sans-serif;
}

.site-nav .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    min-height: var(--nav-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-nav .nav-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.site-nav .nav-brand img { width: 28px; height: 28px; display: block; }

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.site-nav a.nav-link {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.site-nav a.nav-link:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.06); }
.site-nav a.nav-link[aria-current="page"] { color: var(--primary); background: rgba(0, 242, 234, 0.1); }
.site-nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 600px) {
    .site-nav .nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.5rem 16px;
    }
    .site-nav ul { justify-content: space-between; overflow-x: auto; }
    .site-nav a.nav-link { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
}

/* ---------- Card ---------- */
.station-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: var(--card-width);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

.page-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

/* ---------- Home hero ---------- */
.hero { text-align: center; margin-bottom: 2rem; }
.hero-logo { width: 160px; height: 160px; display: block; margin: 0 auto 1rem; }
.hero h1 {
    /* Visually hidden: the logo already shows the callsign */
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.tagline {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: inline-block;
    padding: 5px 10px;
    background: rgba(0, 242, 234, 0.1);
    border-radius: 4px;
}

/* ---------- Buttons / link rows ---------- */
.grid { display: grid; gap: 1rem; }
.grid.compact { gap: 0.8rem; }

.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn.primary {
    border-color: rgba(0, 242, 234, 0.3);
    background: linear-gradient(90deg, rgba(0, 242, 234, 0.1) 0%, transparent 100%);
}
.btn.primary:hover { border-color: var(--primary); box-shadow: 0 0 20px rgba(0, 242, 234, 0.2); }

.btn.small { padding: 0.9rem 1.2rem; }

.btn-content { display: flex; align-items: center; gap: 1rem; min-width: 0; flex: 1; }
.btn .text { text-align: left; min-width: 0; }
.btn-title { display: block; color: var(--text-main); font-weight: 600; font-size: 1.1rem; }
.btn.small .btn-title { font-size: 1rem; }
.btn-title.mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px; }
.btn-subtitle { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.btn-url { display: block; font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

.icon-box {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.icon-box.square { width: 35px; height: 35px; border-radius: 8px; font-size: 1rem; background: rgba(255, 255, 255, 0.05); color: var(--primary); }
.primary .icon-box { color: var(--primary); background: rgba(0, 242, 234, 0.1); }

.arrow, .external-icon { color: var(--text-muted); opacity: 0.5; transition: 0.3s; flex-shrink: 0; }
.external-icon { font-size: 0.8rem; }
.btn:hover .arrow { opacity: 1; transform: translateX(5px); color: var(--primary); }
.btn:hover .external-icon { opacity: 1; color: var(--primary); }

/* Live propagation readout inside the home-page button */
.live-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin-top: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.live-stats b { color: var(--text-main); font-weight: 700; }
.live-stats b.good { color: var(--primary); }
.live-stats b.fair { color: var(--warn); }
.live-stats b.poor { color: var(--secondary); }

/* ---------- Links page categories ---------- */
.category-label {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 0.8rem;
    display: block;
    opacity: 0.8;
}
.category-label:first-of-type { margin-top: 0; }

/* ---------- About page ---------- */
.bio-container { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.profile-img {
    width: 150px; height: 150px;
    border-radius: 50%;
    background: #333;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px rgba(0, 242, 234, 0.2);
    object-fit: cover;
}
.bio-text {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.bio-text h3 { color: var(--primary); margin-bottom: 1rem; font-family: 'JetBrains Mono', monospace; }
.bio-text p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 1rem; }
.bio-text p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.card-footer {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}
.socials { margin-bottom: 1rem; }
.socials a { color: var(--text-muted); margin: 0 10px; font-size: 1.2rem; transition: 0.3s; }
.socials a:hover { color: var(--text-main); }

/* ---------- Motion ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .station-card { animation: none; }
    .btn, .arrow, .external-icon, .socials a { transition: none; }
    .btn:hover, .btn:hover .arrow { transform: none; }
}

@media (max-width: 480px) {
    .station-card { padding: 1.75rem 1.25rem; }
    .page-title { font-size: 1.5rem; }
    .btn { padding: 1rem; }
    .hero-logo { width: 130px; height: 130px; }
}
