/* ============================================================
   THE CHILL CHUMS NETWORK — hub landing
   Shares the quest's retro tokens; console "channel select" layout.
   ============================================================ */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url(/assets/fonts/press-start-2p-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193;
}
@font-face {
    font-family: 'DotGothic16';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url(/assets/fonts/dotgothic16-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193;
}

:root {
    --void: #04041c;
    --win-top: #3050e0;
    --win-bot: #101070;
    --win-line: #181860;
    --frame: #f8f8f8;
    --ink: #ffffff;
    --dim: #a8b0e8;
    --gold: #f8cc50;
    --gold-deep: #c89020;
    --glint: #80e8ff;
    --rose: #ff70b8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100%;
    background: var(--void);
    color: var(--ink);
    font-family: 'DotGothic16', 'Courier New', monospace;
    -webkit-font-smoothing: none;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}
.f-title { font-family: 'Press Start 2P', monospace; }
a { color: inherit; }

/* ---------- Starfield (same as quest) ---------- */
#starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(ellipse 120% 60% at 50% 110%, rgba(32, 40, 140, 0.45), transparent 60%),
        radial-gradient(ellipse 80% 50% at 80% -10%, rgba(64, 24, 96, 0.4), transparent 60%),
        var(--void);
}
.star-layer { position: absolute; inset: -10% 0; will-change: transform; }
.star { position: absolute; background: #fff; image-rendering: pixelated; }
.star.glint { background: var(--glint); }
.star.warm { background: var(--gold); }
.star-layer.drift-slow { animation: star-drift 240s linear infinite; }
.star-layer.drift-mid { animation: star-drift 150s linear infinite; }
@keyframes star-drift { from { transform: translateY(0); } to { transform: translateY(12%); } }
.star.twinkle { animation: twinkle 3.5s step-end infinite; }
@keyframes twinkle { 0%, 60%, 100% { opacity: 1; } 70%, 80% { opacity: 0.15; } }

/* ---------- Layout shell ---------- */
.wrap {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: max(20px, env(safe-area-inset-top)) 18px 60px;
}

/* ---------- Hero ---------- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 0 30px;
    gap: 16px;
}
.logo-wrap {
    position: relative;
    width: min(84vw, 440px);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.logo-img {
    width: 82%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(128, 232, 255, 0.55));
    transition: opacity 0.8s ease;
}
.logo-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}
.logo-wrap.video-on {
    background: var(--void);
    -webkit-mask: radial-gradient(ellipse 76% 66% at 50% 48%, #000 60%, transparent 94%);
    mask: radial-gradient(ellipse 76% 66% at 50% 48%, #000 60%, transparent 94%);
}
.logo-wrap.video-on .logo-video { opacity: 1; }
.logo-wrap.video-on .logo-img { opacity: 0; }
.hero-tagline {
    font-size: clamp(15px, 3.6vw, 20px);
    color: var(--dim);
    max-width: 30ch;
    line-height: 1.5;
}
.hero-tagline .glint { color: var(--glint); }
.press-start {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(9px, 2.4vw, 11px);
    color: var(--glint);
    letter-spacing: 3px;
    margin-top: 4px;
    animation: blink 1.4s step-start infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- Section headings ---------- */
.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px 0 18px;
}
.section-head h2 {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(12px, 3vw, 16px);
    color: var(--gold);
    text-shadow: 2px 2px 0 #703808;
    white-space: nowrap;
}
.section-head .rule {
    flex: 1 1 auto;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--gold-deep) 0 8px, transparent 8px 14px);
}

/* ---------- Featured channel (Summer Quest) ---------- */
.featured {
    display: block;
    text-decoration: none;
    position: relative;
    border: 3px solid var(--frame);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--win-top), var(--win-bot));
    box-shadow: inset 0 0 0 3px var(--win-line), 0 8px 0 rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.featured:hover, .featured:focus-visible {
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 3px var(--win-line), 0 11px 0 rgba(0, 0, 0, 0.45), 0 0 26px rgba(128, 232, 255, 0.4);
    outline: none;
}
.featured-body { padding: 22px 22px 20px; }
.badge-live {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    color: #04120a;
    background: #4dff9e;
    padding: 5px 9px;
    border-radius: 4px;
    margin-bottom: 12px;
    animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 rgba(77, 255, 158, 0); } 50% { box-shadow: 0 0 14px rgba(77, 255, 158, 0.8); } }
.featured h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(15px, 4.4vw, 26px);
    color: var(--gold);
    line-height: 1.4;
    text-shadow: 2px 2px 0 #703808;
    margin-bottom: 12px;
}
.featured p {
    font-size: clamp(15px, 3.4vw, 19px);
    color: var(--ink);
    line-height: 1.5;
    max-width: 46ch;
    margin-bottom: 18px;
}
.featured .enter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(10px, 2.8vw, 13px);
    color: #201004;
    background: linear-gradient(180deg, var(--gold), var(--gold-deep));
    border: 3px solid var(--frame);
    border-radius: 8px;
    padding: 12px 18px;
}
.featured .enter .arrow { animation: nudge 0.7s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

/* ---------- Channel grid (secondary / coming soon) ---------- */
.channels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.channel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    border: 3px solid var(--win-line);
    border-radius: 10px;
    background: rgba(8, 10, 34, 0.7);
    padding: 18px 16px;
    min-height: 132px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.channel.open:hover, .channel.open:focus-visible {
    transform: translateY(-3px);
    border-color: var(--gold);
    outline: none;
}
.channel .ch-icon {
    width: 30px; height: 30px;
    color: var(--glint);
}
.channel h4 {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: var(--ink);
    line-height: 1.5;
}
.channel p { font-size: 15px; color: var(--dim); line-height: 1.45; }
.channel.soon { opacity: 0.72; cursor: default; }
.channel.soon h4 { color: var(--dim); }
.channel .tag {
    margin-top: auto;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    letter-spacing: 1px;
}
.channel.open .tag { color: var(--glint); }
.channel.soon .tag { color: var(--gold-deep); }

/* ---------- About strip ---------- */
.about {
    border: 3px dashed var(--win-line);
    border-radius: 10px;
    padding: 22px;
    margin-top: 40px;
    text-align: center;
}
.about p {
    font-size: clamp(15px, 3.4vw, 19px);
    color: var(--ink);
    line-height: 1.6;
    max-width: 52ch;
    margin: 0 auto;
}
.about .glint { color: var(--glint); }
.about .gold { color: var(--gold); }

/* ---------- Footer ---------- */
.foot {
    margin-top: 46px;
    text-align: center;
    font-size: 14px;
    color: var(--dim);
    line-height: 1.7;
}
.foot .f-title { font-size: 8px; color: var(--gold); letter-spacing: 2px; display: block; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
    .star-layer, .star, .press-start, .badge-live, .featured .enter .arrow { animation: none !important; }
    .logo-img, .logo-video, .featured, .channel { transition: none !important; }
}
