/* ============================================================
   PrismForge — Homepage stylesheet
   Subpages (status / vote / discord) keep using style.css.

   Palette
     abyss  #070B14  page
     slate  #0E1522  surfaces
     line   #1C2738  borders
     frost  #E8EEF8  text
     mist   #8A97AD  secondary text
     prism  #4DA6FF  brand blue (from the PF logo)
   Each game network brings its own colour through --c.
   ============================================================ */

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

:root {
    --abyss: #070B14;
    --slate: #0E1522;
    --slate-2: #121B2B;
    --line: #1C2738;
    --line-2: #2A3850;
    --frost: #E8EEF8;
    --mist: #8A97AD;
    --mist-2: #66748C;
    --prism: #4DA6FF;
    --prism-ink: #04101F;
    --ok: #4ADE80;

    --display: 'Bricolage Grotesque', 'Outfit', system-ui, sans-serif;
    --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --gutter: clamp(16px, 4vw, 40px);
    --max: 1180px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
    background: var(--abyss);
    color: var(--frost);
    font: 400 16px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

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

.skip {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--prism); color: var(--prism-ink); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { top: 12px; }

.muted { color: var(--mist); }

/* ---- Buttons ----------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 600; font-size: 15px; line-height: 1;
    padding: 14px 22px; border-radius: var(--r-md);
    transition: background-color .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.btn--sm { font-size: 13.5px; padding: 10px 14px; border-radius: var(--r-sm); }
.btn--primary { background: var(--prism); color: var(--prism-ink); }
.btn--primary:hover { background: #7BBDFF; }
.btn--ghost { border: 1px solid var(--line-2); color: var(--frost); }
.btn--ghost:hover { border-color: var(--mist-2); background: var(--slate-2); }

/* ---- Nav --------------------------------------------------- */
.nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 32px;
    height: 64px; padding: 0 var(--gutter);
    background: rgba(7, 11, 20, .86);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -.01em; }
.nav__brand img { width: 40px; height: auto; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { font-size: 14.5px; color: var(--mist); transition: color .15s; }
.nav__links a:hover { color: var(--frost); }

/* ---- Hero -------------------------------------------------- */
.hero {
    max-width: var(--max); margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero h1 {
    font: 800 clamp(2.6rem, 6.4vw, 4.6rem)/0.98 var(--display);
    letter-spacing: -0.035em;
    margin: 20px 0 22px;
    max-width: 11ch;
    text-wrap: balance;
}
.hero__sub { color: var(--mist); font-size: 1.08rem; max-width: 34em; }

.live { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--frost); }
.live__dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .15);
}

.join { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.join__ip {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden;
    background: var(--slate);
    transition: border-color .15s;
}
.join__ip:hover { border-color: var(--prism); }
.join__addr { padding: 13px 16px; font-weight: 500; font-size: 15.5px; letter-spacing: .01em; }
.join__action {
    display: flex; align-items: center; padding: 0 16px;
    background: var(--prism); color: var(--prism-ink); font-weight: 600; font-size: 14px;
}
.join__ip--sm .join__addr { padding: 9px 12px; font-size: 14px; }
.join__ip--sm .join__action { padding: 0 12px; font-size: 13px; }

.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 22px; font-size: 14px; }
.hero__meta div { display: flex; gap: 8px; }
.hero__meta dt { color: var(--mist-2); }
.hero__meta dd { color: var(--frost); }

/* ---- Prism (the one loud thing) --------------------------- */
.prism svg { width: 100%; height: auto; overflow: visible; }
.prism__beam { stroke-width: 3; stroke-linecap: round; }
.prism__glass { stroke: rgba(168, 216, 255, .55); stroke-width: 1.5; stroke-linejoin: round; }

.ray line { stroke: var(--c); stroke-linecap: round; }
.ray__in { stroke-width: 2; opacity: .55; }
.ray__out { stroke-width: 3; }
.ray__end { fill: var(--c); }
.ray__name { fill: var(--frost); font: 700 19px var(--display); letter-spacing: -.01em; }
.ray__count { fill: var(--mist); font: 500 13.5px var(--body); }
.ray--soon line { stroke-dasharray: 3 7; opacity: .6; }
.ray:hover .ray__out, .ray:focus-visible .ray__out { stroke-width: 5; }
.ray:hover .ray__name { fill: var(--c); }

@media (prefers-reduced-motion: no-preference) {
    .prism__beam { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw .6s ease-out .1s forwards; }
    .ray__out {
        stroke-dasharray: 220; stroke-dashoffset: 220;
        animation: draw .7s cubic-bezier(.2, .7, .2, 1) forwards;
        animation-delay: calc(.6s + var(--i) * 70ms);
    }
    .ray--soon .ray__out { stroke-dasharray: 3 7; stroke-dashoffset: 0; animation: none; }
    .ray__end, .ray__name, .ray__count { opacity: 0; animation: appear .35s ease-out forwards; animation-delay: calc(1s + var(--i) * 70ms); }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    @keyframes appear { to { opacity: 1; } }
}

/* ---- Sections ---------------------------------------------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter); }
.section--band {
    max-width: none;
    background: var(--slate);
    border-block: 1px solid var(--line);
    padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.section__head { max-width: 40em; margin-bottom: 32px; }
.section__head--row {
    max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.section__head h2 {
    font: 700 clamp(1.9rem, 3.6vw, 2.6rem)/1.05 var(--display); letter-spacing: -.03em; margin-bottom: 12px;
}
.section__head p { color: var(--mist); font-size: 1.02rem; }

/* ---- Playstyle picker ------------------------------------- */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip, .tab {
    padding: 9px 15px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
    border: 1px solid var(--line-2); color: var(--mist);
    transition: background-color .15s, color .15s, border-color .15s;
}
.chip:hover, .tab:hover { color: var(--frost); border-color: var(--mist-2); }
.chip[aria-pressed="true"], .tab[aria-pressed="true"] { background: var(--frost); border-color: var(--frost); color: var(--abyss); }

/* ---- Network cards ---------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.net {
    position: relative;
    display: flex; flex-direction: column; gap: 14px;
    padding: 22px;
    background: var(--slate);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: opacity .2s, border-color .2s;
}
.net::before {
    content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 3px;
    background: var(--c); border-radius: 0 0 3px 3px;
}
.net:hover { border-color: rgba(var(--c-rgb), .55); }
.net.is-dim { opacity: .38; }
.net.is-dim:hover, .net.is-dim:focus-within { opacity: .8; }

.net__flag {
    position: absolute; top: 16px; right: 16px;
    font-size: 12.5px; font-weight: 600; color: var(--abyss);
    background: var(--c); padding: 4px 10px; border-radius: 999px;
}
.net__top { display: flex; gap: 14px; align-items: center; }
.net.is-best .net__top { padding-right: 92px; }
.net__icon { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: rgba(var(--c-rgb), .12); padding: 4px; flex-shrink: 0; }
.net__name { font: 700 1.3rem/1.15 var(--display); letter-spacing: -.02em; }
.net__tagline { color: var(--mist); font-size: 14px; line-height: 1.35; margin-top: 3px; }
.net__desc { font-size: 15px; color: #C3CCDA; }
.net__genres { font-size: 13.5px; color: var(--mist-2); }
.net__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.net__status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--frost); }
.net__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.net--soon .net__dot { background: transparent; border: 1.5px solid var(--mist-2); }
.net__actions { display: flex; gap: 8px; }

/* ---- Join steps (a real sequence, so numbered) ------------ */
.steps {
    counter-reset: step;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
    margin-top: 40px;
    border: 1px solid var(--line); border-radius: var(--r-lg);
}
.steps li { counter-increment: step; padding: 22px 24px; }
.steps li + li { border-left: 1px solid var(--line); }
.steps h3 { display: flex; align-items: center; gap: 10px; font: 700 1.05rem/1.2 var(--display); margin-bottom: 8px; }
.steps h3::before {
    content: counter(step);
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--line-2); font: 600 13px var(--body); color: var(--mist);
}
.steps p { color: var(--mist); font-size: 14.5px; }
.steps strong { color: var(--frost); font-weight: 500; }

/* ---- Divisions (rows, not cards) -------------------------- */
.divs { border-top: 1px solid var(--line-2); }
.div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1.5fr) minmax(0, 1fr) auto;
    gap: 24px; align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--line-2);
}
.div__icon {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid var(--line-2); color: var(--mist);
}
.div__icon svg { width: 24px; height: 24px; }
.div--live .div__icon { color: var(--prism); border-color: rgba(77, 166, 255, .45); background: rgba(77, 166, 255, .08); }
.div__body h3 { font: 700 1.3rem/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.div__body p { color: var(--mist); font-size: 15px; max-width: 36em; }
.div__points { font-size: 14px; color: #C3CCDA; display: grid; gap: 4px; }
.div__points li { padding-left: 16px; position: relative; }
.div__points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.div--live .div__points li::before { background: var(--prism); }
.div__cta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pill { font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mist); }
.pill--live { color: var(--ok); border-color: rgba(74, 222, 128, .35); }

/* ---- Creators ---------------------------------------------- */
.creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.creator {
    display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; row-gap: 1px; align-items: center;
    padding: 14px; border-radius: var(--r-md); border: 1px solid transparent;
    transition: background-color .15s, border-color .15s;
}
.creator:hover { background: var(--slate); border-color: var(--line); }
.creator__avatar {
    grid-row: span 3; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
    background: var(--slate-2); border: 1px solid var(--line-2);
    display: grid; place-items: center; position: relative;
}
.creator__avatar::before { content: attr(data-initials); font: 700 16px var(--display); color: var(--mist); }
.creator__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.creator__name { font-weight: 600; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator__subs { font-size: 13px; color: var(--mist); line-height: 1.3; }
.creator__played { font-size: 12.5px; color: var(--mist-2); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Videos ------------------------------------------------ */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { padding: 7px 13px; font-size: 14px; }
.videos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.video a, .video > div { display: block; }
.video__thumb { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--slate-2); margin-bottom: 10px; }
.video__thumb img.is-broken { visibility: hidden; }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video a:hover .video__thumb img { transform: scale(1.03); }
.video__net {
    position: absolute; left: 8px; bottom: 8px;
    font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
    background: rgba(7, 11, 20, .82); color: var(--frost);
    border-left: 3px solid var(--c);
}
.video__title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-weight: 500; font-size: 14.5px; line-height: 1.4;
}
.video__author { display: block; font-size: 13px; color: var(--mist); margin-top: 3px; }
.videos__more { margin-top: 28px; }
.video[hidden] { display: none; }

/* ---- Footer ------------------------------------------------ */
.foot {
    max-width: var(--max); margin: 0 auto;
    padding: 56px var(--gutter) 40px;
    display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px;
}
.foot__brand p { color: var(--mist); font-size: 14.5px; margin: 12px 0 18px; max-width: 26em; }
.foot__col h2 { font: 600 14px var(--body); color: var(--frost); margin-bottom: 12px; }
.foot__col ul { display: grid; gap: 8px; }
.foot__col a { font-size: 14.5px; color: var(--mist); }
.foot__col a:hover { color: var(--frost); }
.foot__legal {
    grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
    font-size: 13px; color: var(--mist-2);
}

/* ---- Toast ------------------------------------------------- */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 300;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    max-width: calc(100% - 32px);
    background: var(--frost); color: var(--abyss);
    font-weight: 500; font-size: 14.5px; padding: 12px 18px; border-radius: var(--r-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
    transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } html { scroll-behavior: auto; } }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 1000px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .div { grid-template-columns: 48px minmax(0, 1fr); }
    .div__points, .div__cta { grid-column: 2; }
    .div__cta { flex-direction: row; align-items: center; justify-content: flex-start; }
}
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; }
    .prism { max-width: 560px; }
    .nav__links { display: none; }
    .nav .btn { margin-left: auto; }
    .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .steps { grid-template-columns: 1fr; }
    .steps li + li { border-left: 0; border-top: 1px solid var(--line); }
    .div { grid-template-columns: 1fr; gap: 14px; }
    .div__points, .div__cta { grid-column: 1; }
    .join__ip { flex: 1 1 100%; }
    .join__addr { flex: 1; text-align: left; }
    .join > .btn { flex: 1 1 100%; }
    .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .net__top { padding-right: 0; }
    .net__flag { position: static; align-self: flex-start; order: -1; }
}
