/* ── Design tokens ─────────────────────────────────── */

:root {
    --bg-primary:    #0d0e0f;
    --header-h: 3.5rem;
    --bg-surface:    #141618;
    --bg-elevated:   #1c1f22;
    --text-primary:  #e8e4dc;
    --text-secondary:#9a9690;
    --text-tertiary: #5c5a57;
    --accent:        #c8a96e;
    --accent-dim:    #7a6540;
    --danger:        #8b3a3a;
    --shell:         720px;
    --section-gap:   5rem;
}

/* ── Reset ─────────────────────────────────────────── */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.8;
}

h1, h2, h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

p, blockquote {
    margin: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color 0.2s;
}

a:hover {
    border-color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ── Shell ─────────────────────────────────────────── */

.shell {
    width: min(calc(100% - 2rem), var(--shell));
    margin: 0 auto;
}

/* ── Site header ───────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--text-tertiary);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: none;
}

.brand:hover {
    border-bottom: none;
}

.brand__logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    flex-shrink: 0;
}

.brand strong {
    font-family: 'Instrument Serif', serif;
    font-size: 1rem;
    color: var(--text-primary);
}

.brand small {
    display: none;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    justify-content: end;
}

.main-nav a {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent);
    border-bottom: none;
}

.main-nav a.is-active,
.main-nav a[aria-current="page"] {
    color: var(--accent);
}

/* ── Hero section ──────────────────────────────────── */

.hero {
    position: relative;
    overflow: clip;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.02em;
}

.eyebrow,
.hero__tagline {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.hero__tagline {
    margin-top: 1.75rem;
    margin-bottom: 0;
}

.hero__lead,
.page-hero__lead,
.page-hero__summary {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    max-width: 480px;
    margin-top: 0.8rem;
}

.hero__value {
    margin-top: 1rem;
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hero__visual {
    display: flex;
    align-items: center;
    justify-content: end;
}

.hero__divider {
    display: none;
}

/* ── Buttons ───────────────────────────────────────── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
    border-bottom: 1px solid var(--accent);
    text-decoration: none;
}

.button:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-bottom: 1px solid var(--accent);
}

.button--primary {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.button--primary:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.button--ghost {
    border: 1px solid var(--text-tertiary);
    color: var(--text-secondary);
}

.button--ghost:hover {
    border-color: var(--accent);
    background: transparent;
    color: var(--accent);
}

/* ── Section labels ────────────────────────────────── */

.section-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* ── Waveform hero visual ──────────────────────────── */

.hero-waveform {
    position: relative;
    width: min(100%, 28rem);
    min-height: 320px;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
    overflow: hidden;
}

.hero-waveform__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.28;
}

.hero-waveform__line {
    fill: none;
    stroke-linecap: round;
    stroke-width: 5;
}

.hero-waveform__line--soft {
    stroke: var(--accent-dim);
    animation: waveform-drift 16s ease-in-out infinite;
}

.hero-waveform__line--mid {
    stroke: var(--accent);
    opacity: 0.5;
    animation: waveform-drift 12s ease-in-out infinite reverse;
}

.hero-waveform__line--bright {
    stroke: var(--accent);
    opacity: 0.8;
    animation: waveform-glow 8s ease-in-out infinite;
}

.hero-waveform__panel {
    position: absolute;
    right: 1.4rem;
    bottom: 1.4rem;
    max-width: 15rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--text-tertiary);
}

.hero-waveform__panel .eyebrow {
    margin-bottom: 0.6rem;
}

.hero-waveform__panel p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ── Sections ──────────────────────────────────────── */

.section {
    padding: var(--section-gap) 0;
}

.section--dense {
    padding-top: 1rem;
}

.section--with-divider {
    position: relative;
}

.section--with-divider::before {
    content: "";
    display: block;
    width: 60px;
    height: 1px;
    background: var(--text-tertiary);
    margin: 0 auto 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ── Page nav (sticky section nav) ─────────────────── */

.page-nav {
    position: sticky;
    top: var(--header-h);
    z-index: 15;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--text-tertiary);
}

.page-nav__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    padding: 0.75rem 0;
}

.page-nav a {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    border-bottom: none;
    transition: color 0.2s;
}

.page-nav a:hover {
    color: var(--accent);
    border-bottom: none;
}

.page-nav a.is-active,
.page-nav a[aria-current="location"] {
    color: var(--accent);
}

/* ── Section headers ───────────────────────────────── */

.section__header {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.section__header--single {
    grid-template-columns: 1fr;
    max-width: 100%;
}

.section__intro {
    max-width: 100%;
}

.section__intro p,
.section__copy,
.section-copy p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.section-copy p + p {
    margin-top: 1rem;
}

.section-copy .button {
    margin-top: 1.5rem;
}

/* ── Two-column layout ─────────────────────────────── */

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.two-column--featured {
    align-items: center;
}

/* ── Page hero ─────────────────────────────────────── */

.page-hero {
    padding: 5rem 0 2rem;
}

.page-hero--compact {
    padding-bottom: 1rem;
}

.page-hero__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.page-hero__inner {
    max-width: 100%;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-style: italic;
    line-height: 1.1;
}

/* ── Game cards ─────────────────────────────────────── */

.game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.game-card {
    border: 1px solid var(--text-tertiary);
    padding: 1.5rem;
    background: var(--bg-surface);
    transition: border-color 0.2s;
}

.game-card:hover {
    border-color: var(--accent-dim);
}

.game-card__status {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.game-card h2,
.game-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.game-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.game-card__tagline {
    color: var(--text-primary);
    font-style: italic;
}

.game-card .text-link {
    margin-top: 0.75rem;
    display: inline-block;
}

/* ── Detail cards ──────────────────────────────────── */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.detail-card {
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
}

.detail-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.detail-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.detail-card p + p {
    margin-top: 0.8rem;
}

.detail-card--hero {
    align-self: stretch;
}

.detail-card--hero h2 {
    margin-top: 0.9rem;
    margin-bottom: 0.8rem;
}

.stack-grid {
    display: grid;
    gap: 1.5rem;
}

/* ── Highlights ────────────────────────────────────── */

.highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.highlight {
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
}

.highlight p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ── Text links ────────────────────────────────────── */

.text-link {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color 0.2s;
}

.text-link:hover {
    border-color: var(--accent);
}

/* ── Feature lists ─────────────────────────────────── */

.feature-list {
    padding-left: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.feature-list li + li {
    margin-top: 0.3rem;
}

.link-stack {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}

/* ── Progress list (in development) ────────────────── */

.progress-list {
    display: grid;
    gap: 1rem;
}

.progress-list__item {
    padding: 1.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
}

.progress-list__item h3 {
    margin: 0;
    font-size: 1.1rem;
}

.progress-list__item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.progress-list__item--released {
    border-color: var(--accent-dim);
}

.progress-list__item--in-development {
    opacity: 0.82;
    border-style: dashed;
}

.progress-list__item--early-concept {
    opacity: 0.62;
    border-style: dotted;
}

.progress-list__title--concept {
    font-style: italic;
}

/* ── Art panel (decorative) ────────────────────────── */

.art-panel {
    position: relative;
    min-height: 260px;
    border: 1px solid var(--text-tertiary);
    background: var(--bg-surface);
    overflow: hidden;
}

.art-panel__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--text-tertiary) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-tertiary) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.3;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.art-panel__pulse {
    position: absolute;
    border: 1px solid var(--accent-dim);
    border-radius: 999px;
    opacity: 0.5;
}

.art-panel__pulse--one {
    inset: 22% 18% 22% 18%;
}

.art-panel__pulse--two {
    inset: 34% 30% 34% 30%;
}

.art-panel__marker {
    position: absolute;
    inset: auto auto 22% 22%;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(200, 169, 110, 0.12);
}

.art-panel__marker--alt {
    inset: 34% 20% auto auto;
    width: 0.55rem;
    height: 0.55rem;
    background: var(--accent-dim);
    box-shadow: 0 0 0 5px rgba(122, 101, 64, 0.1);
}

/* ── Game logo card (Audio Mines detail) ───────────── */

.game-logo-card {
    position: relative;
    padding: 1.4rem;
    border: 1px solid var(--text-tertiary);
    background: var(--bg-surface);
    overflow: hidden;
}

.game-logo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(var(--text-tertiary) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-tertiary) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.2;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
    pointer-events: none;
}

.game-logo-card__frame,
.game-logo-card__details {
    position: relative;
    z-index: 1;
}

.game-logo-card__frame {
    display: grid;
    place-items: center;
    padding: 1.4rem;
    border: 1px solid var(--text-tertiary);
    background: rgba(13, 14, 15, 0.72);
    min-height: 260px;
}

.game-logo-card__image {
    width: min(100%, 20rem);
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.game-logo-card__details {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.game-logo-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-logo-card__meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--text-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.04em;
}

/* ── Testimonial ───────────────────────────────────── */

.testimonial {
    margin-top: 1.6rem;
    padding: 1.2rem 1.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
    border-left: 2px solid var(--accent-dim);
}

.testimonial p {
    color: var(--text-secondary);
    font-style: italic;
}

/* ── Legal copy ────────────────────────────────────── */

.legal-copy {
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--text-tertiary);
}

.legal-copy p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.legal-copy p + p {
    margin-top: 1rem;
}

/* ── Mini-signal (placeholder decorative element) ──── */

.mini-signal {
    display: none;
}

/* ── Footer ────────────────────────────────────────── */

.site-footer {
    margin-top: 3rem;
    padding: 2.5rem 0 1.2rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--text-tertiary);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.site-footer__title {
    margin: 0 0 0.3rem;
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.site-footer__tagline {
    margin: 0 0 0.4rem;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-footer__text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.2rem;
    justify-content: end;
}

.footer-nav a {
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent);
    border-bottom: none;
}

.site-footer__bottom {
    padding-top: 1.2rem;
    border-top: 1px solid var(--text-tertiary);
}

.site-footer__bottom p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* ── Cookie banner ─────────────────────────────────── */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-elevated);
    border-top: 1px solid var(--text-tertiary);
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.cookie-banner__text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-banner__actions {
        justify-content: end;
    }
}

/* ── Fade-in on scroll ─────────────────────────────── */

.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Keyframes ─────────────────────────────────────── */

@keyframes waveform-drift {
    0%, 100% {
        transform: translateY(0) scaleX(1);
    }
    50% {
        transform: translateY(-8px) scaleX(1.02);
    }
}

@keyframes waveform-glow {
    0%, 100% {
        opacity: 0.8;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(4px);
    }
}

/* ── Reduced motion ────────────────────────────────── */

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

    .hero-waveform__line {
        animation: none;
    }

    .button,
    .main-nav a,
    .page-nav a,
    .footer-nav a,
    a {
        transition: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Responsive: tablet ─────────────────────────────── */

@media (max-width: 900px) {
    .hero__grid,
    .two-column,
    .detail-grid,
    .highlights,
    .page-hero__layout,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .main-nav {
        justify-content: start;
    }

    .hero {
        min-height: auto;
        padding-top: 4.5rem;
    }

    .page-hero {
        padding-top: 4rem;
    }

    .page-nav {
        top: var(--header-h);
    }

    .hero-waveform {
        min-height: 260px;
    }

    .game-logo-card__frame {
        min-height: 200px;
    }

    .art-panel {
        min-height: 200px;
    }
}

/* ── Responsive: mobile ─────────────────────────────── */

@media (max-width: 640px) {
    :root {
        --section-gap: 3rem;
    }

    .shell {
        width: min(calc(100% - 1.2rem), var(--shell));
    }

    .site-header__inner {
        flex-direction: column;
        gap: 0.5rem;
        align-items: start;
    }

    .main-nav {
        gap: 0.6rem 1rem;
    }

    .hero__content h1,
    .page-hero h1 {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .detail-grid,
    .highlights {
        grid-template-columns: 1fr;
    }

    .detail-card,
    .game-card,
    .highlight,
    .legal-copy,
    .testimonial,
    .progress-list__item {
        padding: 1.2rem;
    }

    .page-nav {
        top: var(--header-h);
    }

    .page-nav__inner {
        gap: 0.6rem 1rem;
        padding: 0.65rem 0;
    }

    .hero-waveform {
        min-height: 220px;
        padding: 1.2rem;
    }

    .game-logo-card {
        padding: 1.1rem;
    }

    .game-logo-card__frame {
        min-height: 170px;
        padding: 1rem;
    }

    .hero-waveform__panel {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        max-width: none;
    }

    .footer-nav {
        justify-content: start;
    }
}
