/* PolyConsole site styles.
 *
 * Loud, friendly, a little arcade. Dark base so the box art pops, with
 * neon accents and chunky rounded surfaces. Not a corporate landing
 * page, and not a pixel-sprite skin either. Just fun and readable.
 *
 * The hero "deck" is the live demo: a Cover Flow of made-up cartridges
 * you browse with the arrow keys. The screen swap runs through htmx.
 *
 * Colour follows the PolyConsole identity: plum ground #18001C, ink
 * #F6EEF8, stick red #FF4A56 as the primary and its glint #FF7281 for
 * hover. The arcade accents (cyan, lime, gold) stay as category colours;
 * the brand itself is only the red. */

:root {
    --bg-0: #0f0012;
    --bg-1: #18001c;
    --bg-2: #220628;
    --bg-3: #2e0c36;
    --ink: #f6eef8;
    --ink-2: #d2bfd6;
    --ink-3: #9a80a0;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);

    --red: #ff4a56;
    --glint: #ff7281;
    --cyan: #25e3d8;
    --lime: #c6f23c;
    --gold: #ffd23c;
    --violet: #9b5cff;
    --coral: #ff6b3d;

    --primary: var(--red);
    --radius: 16px;
    --radius-lg: 26px;
    --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
    --wrap: 1160px;

    --font-ui: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--ink);
    background-color: var(--bg-1);
    background-image:
        radial-gradient(60% 50% at 12% -5%, rgba(255, 74, 86, 0.20), transparent 70%),
        radial-gradient(55% 45% at 95% 0%, rgba(37, 227, 216, 0.16), transparent 70%),
        radial-gradient(70% 60% at 50% 110%, rgba(155, 92, 255, 0.18), transparent 70%);
    background-attachment: fixed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.wrap-narrow {
    max-width: 760px;
}

.skip-link {
    position: absolute;
    top: -200px;
    left: 16px;
    z-index: 200;
    background: var(--bg-3);
    color: var(--ink);
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    top: 16px;
}

.eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    color: var(--cyan);
    margin: 0 0 14px;
}

.eyebrow-hero {
    color: var(--gold);
}

/* ---- header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg-0) 72%, transparent);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-wordmark {
    height: 34px;
    width: auto;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-2);
    transition: color 160ms var(--ease), background 160ms var(--ease);
}

.site-nav a:hover {
    color: var(--ink);
    background: var(--line);
}

.nav-cta {
    color: var(--bg-0) !important;
    background: var(--lime);
    font-weight: 800 !important;
}

.nav-cta:hover {
    background: #d6ff5a;
    color: var(--bg-0) !important;
}

/* ---- buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 160ms var(--ease), box-shadow 160ms var(--ease),
        background 160ms var(--ease);
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 0 -2px color-mix(in srgb, var(--primary) 55%, #000);
}

.btn-primary:hover {
    background: var(--glint);
    transform: translateY(-2px);
    box-shadow: 0 14px 0 -2px color-mix(in srgb, var(--primary) 55%, #000);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-screen {
    background: var(--gold);
    color: var(--bg-0);
    padding: 10px 20px;
    font-size: 0.92rem;
}

.btn-screen:hover {
    background: #ffdf6a;
    transform: translateY(-2px);
}

/* ---- hero ---- */

.hero {
    padding: 64px 0 40px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 900;
    margin: 0 0 22px;
}

.hero-title-accent {
    color: var(--cyan);
}

.hero-lead {
    font-size: 1.18rem;
    color: var(--ink-2);
    max-width: 30em;
    margin: 0 0 28px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.hero-note {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--ink-3);
    margin: 0;
}

/* ---- deck (the live demo) ---- */

.hero-deck {
    perspective: 1200px;
}

.deck {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    /* Clip the Cover Flow so cards that fan past the panel slide away at
       its rounded edge instead of spilling outside the card. */
    overflow: hidden;
}

.deck-screen {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #07060d;
    border: 2px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

/* scanline veneer that survives htmx swaps because it lives on the frame */
.deck-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0,
        rgba(255, 255, 255, 0.04) 1px,
        transparent 2px,
        transparent 4px
    );
    mix-blend-mode: overlay;
}

.screen {
    display: block;
}

.screen-inner {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 320px;
}

.screen-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 28px;
    min-height: 200px;
    background:
        radial-gradient(120% 120% at 20% 0%, hsl(var(--hue) 95% 64%), transparent 60%),
        linear-gradient(150deg, hsl(var(--hue) 80% 46%), hsl(calc(var(--hue) + 50) 75% 30%));
    overflow: hidden;
}

.screen-art::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 80%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0.5;
    transform: rotate(-8deg);
}

.screen-art-kind {
    position: relative;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.55);
    font-weight: 700;
}

.screen-art-title {
    position: relative;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
    line-height: 1;
}

.screen-meta {
    padding: 18px 20px 20px;
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}

.screen-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 800;
}

.screen-blurb {
    margin: 0 0 12px;
    color: var(--ink-2);
    font-size: 0.96rem;
}

.screen-soon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.82rem;
    color: var(--ink-3);
}

.screen-soon .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 25%, transparent);
    flex: none;
    animation: pulse 1.8s var(--ease) infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.4;
    }
}

/* ---- cover flow rail ---- */

.deck-rail {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    padding: 8px 4px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    outline: none;
}

/* enhanced (JS on): becomes a 3D cover flow centered on the active cart */
.deck.is-enhanced .deck-rail {
    overflow: visible;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    padding: 0;
}

.cart {
    flex: 0 0 auto;
    width: 150px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    scroll-snap-align: center;
    font-family: inherit;
    color: var(--ink);
    text-align: center;
}

.deck.is-enhanced .cart {
    position: absolute;
    left: 50%;
    top: 46%;
    margin: 0;
    transition: transform 280ms var(--ease), opacity 280ms var(--ease);
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cart-art {
    display: block;
    width: 150px;
    height: 188px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(0, 0, 0, 0.4);
    background:
        linear-gradient(165deg, hsl(var(--hue) 92% 64%), hsl(calc(var(--hue) + 45) 82% 42%));
    box-shadow: 0 14px 26px -12px rgba(0, 0, 0, 0.7);
}

/* a little label window so it reads as a cartridge/case */
.cart-art::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 16px;
    height: 64px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.cart-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 200ms var(--ease);
}

.cart-name {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart.is-active .cart-art {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 60%, transparent),
        0 22px 40px -14px rgba(0, 0, 0, 0.8);
}

.cart.is-active .cart-shine {
    opacity: 1;
}

.cart.is-active .cart-name {
    color: var(--ink);
}

.cart:focus-visible .cart-art {
    border-color: var(--cyan);
}

/* ---- on-screen pad ---- */

.deck-pad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}

.pad-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    background: var(--bg-3);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}

.pad-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pad-hint {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-3);
}

/* ---- sections ---- */

.section {
    padding: 72px 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}

.section-lead {
    font-size: 1.1rem;
    color: var(--ink-2);
    max-width: 40em;
    margin: 0 0 36px;
}

/* ---- features ---- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.feature-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.feature-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--bg-0);
    background: var(--cyan);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
    font-weight: 700;
}

.feature-card:nth-child(2n) .feature-tag {
    background: var(--lime);
}

.feature-card:nth-child(3n) .feature-tag {
    background: var(--gold);
}

.feature-title {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 800;
}

.feature-body {
    margin: 0;
    color: var(--ink-2);
}

/* ---- get it ---- */

.section-get {
    background: linear-gradient(180deg, transparent, rgba(155, 92, 255, 0.08));
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.platform-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg-2);
    border: 1px solid var(--line);
    text-decoration: none;
    transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}

.platform-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.platform-name {
    font-size: 1.3rem;
    font-weight: 800;
}

.platform-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-3);
}

.platform-go {
    margin-top: 12px;
    font-weight: 800;
    color: var(--gold);
}

.get-fine {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-3);
    margin: 0;
}

/* ---- what's next ---- */

.soon-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.soon-item {
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px dashed var(--line-strong);
    background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}

.soon-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cyan);
}

.soon-body {
    margin: 0;
    color: var(--ink-2);
}

/* ---- faq ---- */

.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    overflow: hidden;
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    color: var(--ink);
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
}

.faq-q:hover {
    color: var(--cyan);
}

.faq-plus {
    font-size: 1.4rem;
    color: var(--primary);
    flex: none;
}

.faq-a {
    color: var(--ink-2);
}

.faq-a:not(:empty) {
    padding: 0 22px 20px;
}

/* ---- footer ---- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    margin-top: 40px;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-tagline {
    margin: 0;
    color: var(--ink-2);
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--ink-3);
    text-decoration: none;
    font-weight: 600;
}

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

/* ---- responsive ---- */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-grid,
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .soon-list {
        grid-template-columns: 1fr;
    }

    .site-nav ul li:not(:last-child) {
        display: none;
    }

    .brand-wordmark {
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
