/* ==========================================================================
   Paint The Room — landing styles
   ========================================================================== */

:root {
    --cream: #fdf2e0;
    --cream-light: #fffaf0;
    --ink: #2a2140;
    --ink-soft: #5d5470;
    --coral: #ef6b52;
    --teal: #23b3a4;
    --mustard: #f5b73c;
    --lilac: #8a6ff2;
    --night: #1b1730;
    --night-2: #262040;
    --line: #ddcdb4;

    --body: "Nunito", "Segoe UI", system-ui, sans-serif;
    --pixel: "Silkscreen", "Courier New", monospace;

    --shell: min(1280px, calc(100% - 48px));
    --pixel-shadow: 6px 6px 0 rgba(42, 33, 64, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }

canvas.pixel { image-rendering: pixelated; image-rendering: crisp-edges; width: 100%; height: auto; }

.skip-link {
    position: fixed; z-index: 900; top: 8px; left: 8px;
    padding: 10px 16px; color: #fff; background: var(--ink);
    font-family: var(--pixel); font-size: 12px;
    transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------- shell */
.page {
    background-color: var(--cream);
    background-image:
        linear-gradient(rgba(42, 33, 64, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 33, 64, .045) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* --------------------------------------------------------------- nav */
.navbar { position: sticky; top: 0; z-index: 200; background: var(--cream); border-bottom: 3px solid var(--ink); }
.nav-container {
    width: var(--shell); height: 76px; margin: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--pixel); font-size: 21px; line-height: 1; letter-spacing: .02em;
    text-transform: uppercase; white-space: nowrap;
}
.logo-mark {
    display: grid; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 2px;
    padding: 3px; background: var(--ink);
}
.logo-mark i { display: block; }
.logo-mark i:nth-child(1) { background: var(--coral); }
.logo-mark i:nth-child(2) { background: var(--mustard); }
.logo-mark i:nth-child(3) { background: var(--teal); }
.logo-mark i:nth-child(4) { background: var(--lilac); }
.logo em { color: var(--coral); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav-link {
    position: relative; padding: 6px 0;
    font-family: var(--pixel); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
}
.nav-link::after {
    content: ""; position: absolute; right: 0; bottom: -2px; left: 0; height: 4px;
    background: var(--coral); transform: scaleX(0); transform-origin: left;
    transition: transform .18s steps(4);
}
.nav-link:hover::after, .nav-link.active::after { transform: none; }
.nav-badge {
    padding: 8px 14px 9px; color: #fff; background: var(--teal);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--pixel); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
    white-space: nowrap;
}
.nav-toggle { display: none; width: 46px; height: 46px; padding: 10px; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }

/* --------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    min-height: 54px; padding: 12px 26px;
    font-family: var(--pixel); font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
    border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
    transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { color: #fff; background: var(--coral); }
.btn-ghost { background: var(--cream-light); }
.btn i { font-style: normal; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; border-bottom: 3px solid var(--ink); }
.hero-inner {
    position: relative; z-index: 2; width: var(--shell); margin: auto;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
    padding: 56px 0 60px;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
    padding: 7px 12px; background: var(--mustard); border: 3px solid var(--ink);
    font-family: var(--pixel); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 {
    font-family: var(--pixel); font-size: clamp(34px, 4.6vw, 62px); line-height: 1.12;
    letter-spacing: .01em; text-transform: uppercase;
}
.hero h1 em { color: var(--coral); font-style: normal; }
.hero h1 b { color: var(--teal); font-weight: inherit; }
.pixel-rule { display: flex; gap: 5px; margin: 20px 0 18px; }
.pixel-rule i { width: 16px; height: 8px; background: var(--ink); }
.pixel-rule i:nth-child(1) { background: var(--coral); }
.pixel-rule i:nth-child(2) { background: var(--mustard); }
.pixel-rule i:nth-child(3) { background: var(--teal); }
.pixel-rule i:nth-child(4) { background: var(--lilac); }
.hero-lead { max-width: 46ch; margin: 0 0 26px; font-size: 17px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
    padding: 6px 11px; background: var(--cream-light); border: 2px solid var(--line);
    font-family: var(--pixel); font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ink-soft);
}

/* floating pixel cards */
.float-card { position: absolute; z-index: 1; padding: 8px; background: var(--cream-light); border: 3px solid var(--ink); box-shadow: var(--pixel-shadow); }
.float-card span { display: block; margin-top: 6px; font-family: var(--pixel); font-size: 9px; text-align: center; letter-spacing: .04em; }
/* anchored to the phone edges so each card peeks out from behind it */
.float-a { top: 30px; left: calc(50% - 190px); width: 104px; transform: rotate(-6deg); }
.float-b { bottom: 46px; right: calc(50% - 190px); width: 104px; transform: rotate(5deg); }

/* --------------------------------------------------------------- phone */
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone {
    position: relative; z-index: 2; width: min(300px, 100%); padding: 10px;
    background: linear-gradient(#3a3350, #1a1628);
    border: 3px solid var(--ink); border-radius: 30px;
    box-shadow: 0 10px 0 #14101f, 0 18px 30px rgba(27, 23, 48, .34);
}
.phone::before {
    content: ""; position: absolute; top: 14px; left: 50%; width: 62px; height: 8px;
    background: #100d1c; border-radius: 6px; transform: translateX(-50%);
}
.screen {
    overflow: hidden; padding: 22px 12px 14px;
    background: #f6ebd8; border-radius: 22px;
    display: grid; gap: 10px;
}
.screen-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--pixel); font-size: 9px; }
.screen-top b { padding: 4px 7px; color: #fff; background: var(--ink); font-weight: 400; }
.screen-top span { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); }
.coin { width: 9px; height: 9px; background: var(--mustard); border: 2px solid var(--ink); }

.board {
    position: relative; display: grid; gap: 3px;
    grid-template-columns: repeat(6, 1fr); aspect-ratio: 1;
    padding: 5px; background: var(--ink); border: 3px solid var(--ink);
}
.cell { background: #e6d7bf; transition: background .18s steps(2); }
.cell.filled { background: var(--teal); }
.cell.wall { background: #4a4166; }
.tracer {
    position: absolute; z-index: 3; background: var(--coral);
    border: 2px solid #fff; box-shadow: 0 0 0 2px var(--ink);
    transition: transform .34s steps(6);
}
.board.solved .cell.filled { background: var(--mustard); }

.palette-row { display: flex; align-items: center; gap: 6px; font-family: var(--pixel); font-size: 8px; color: var(--ink-soft); }
.palette-row i { flex: 1; height: 12px; border: 2px solid var(--ink); opacity: .35; transition: opacity .3s steps(2); }
.palette-row i.on { opacity: 1; }
.palette-row i:nth-of-type(1) { background: var(--coral); }
.palette-row i:nth-of-type(2) { background: var(--mustard); }
.palette-row i:nth-of-type(3) { background: var(--teal); }
.palette-row i:nth-of-type(4) { background: var(--lilac); }
.palette-row i:nth-of-type(5) { background: #6aa6e0; }

.room-strip { display: grid; grid-template-columns: 62px 1fr; gap: 9px; align-items: center; padding: 7px; background: #eaddc6; border: 3px solid var(--ink); }
.room-strip canvas { border: 2px solid var(--ink); }
.room-strip p { margin: 0 0 5px; font-family: var(--pixel); font-size: 8px; letter-spacing: .03em; }
.bar { height: 10px; background: #d4c3a6; border: 2px solid var(--ink); }
.bar i { display: block; height: 100%; background: var(--coral); transition: width .4s steps(8); }

/* --------------------------------------------------------------- section head */
.section { padding: 68px 0; }
.section-head { width: var(--shell); margin: 0 auto 38px; max-width: 760px; }
.section-label { font-family: var(--pixel); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.section-title { margin: 12px 0 10px; font-family: var(--pixel); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; text-transform: uppercase; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* --------------------------------------------------------------- features */
.feature-grid { width: var(--shell); margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--cream-light); border: 3px solid var(--ink); box-shadow: var(--pixel-shadow);
}
.feature-visual { padding: 16px; background: #efe2ca; border-bottom: 3px solid var(--ink); }
.feature-body { flex: 1; padding: 20px 22px 24px; }
.feature-tag {
    display: inline-block; margin-bottom: 12px; padding: 5px 10px; color: #fff;
    font-family: var(--pixel); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.tag-coral { background: var(--coral); }
.tag-teal { background: var(--teal); }
.tag-lilac { background: var(--lilac); }
.feature-body h3 { font-family: var(--pixel); font-size: 20px; text-transform: uppercase; line-height: 1.25; }
.feature-body p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }

/* --------------------------------------------------------------- steps */
.steps { border-block: 3px solid var(--ink); background: var(--cream-light); }
.steps-inner { width: var(--shell); margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.step { padding: 34px 28px; border-left: 3px solid var(--ink); }
.step:first-child { border-left: 0; }
.step b { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; color: #fff; background: var(--ink); font-family: var(--pixel); font-size: 15px; font-weight: 400; }
.step h3 { font-family: var(--pixel); font-size: 16px; text-transform: uppercase; }
.step p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }

/* --------------------------------------------------------------- rooms */
.rooms { position: relative; overflow: hidden; padding: 66px 0 54px; color: #fff; background: var(--night); border-block: 3px solid var(--ink); }
.rooms::before {
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 24px 24px;
}
.rooms > * { position: relative; z-index: 2; }
.rooms .section-title { color: #fff; }
.rooms .section-head p { color: #b8b0cf; }
.rooms .section-label { color: var(--mustard); }
.room-grid { width: var(--shell); margin: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.room-card { overflow: hidden; background: var(--night-2); border: 3px solid #4b4370; }
.room-art { position: relative; border-bottom: 3px solid #4b4370; }
.room-chapter {
    position: absolute; z-index: 2; top: 0; left: 0; padding: 5px 10px 6px; color: var(--ink);
    font-family: var(--pixel); font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
}
.ch-1 { background: var(--mustard); }
.ch-2 { background: var(--teal); }
.ch-3 { background: var(--coral); }
.ch-4 { background: var(--lilac); color: #fff; }
.room-info { padding: 14px 16px 18px; }
.room-info h3 { font-family: var(--pixel); font-size: 14px; text-transform: uppercase; }
.room-info p { margin: 7px 0 12px; color: #b8b0cf; font-size: 13px; }
.room-bar { height: 10px; background: #14112a; border: 2px solid #4b4370; }
.room-bar i { display: block; height: 100%; background: var(--teal); }
.room-info small { display: block; margin-top: 7px; font-family: var(--pixel); font-size: 9px; color: #8a82a8; }
.rooms-note { width: var(--shell); margin: 22px auto 0; color: #7a7296; font-family: var(--pixel); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; text-align: right; }

/* --------------------------------------------------------------- manifesto */
.manifesto { position: relative; overflow: hidden; padding: 52px 24px; text-align: center; background: var(--cream-light); border-bottom: 3px solid var(--ink); }
.manifesto h2 { position: relative; z-index: 2; font-family: var(--pixel); font-size: clamp(20px, 3vw, 34px); line-height: 1.5; text-transform: uppercase; }
.manifesto h2 em { color: var(--coral); font-style: normal; }
.manifesto h2 b { color: var(--teal); font-weight: inherit; }
.manifesto-dots { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
.manifesto-dots i { width: 12px; height: 12px; background: var(--line); }
.manifesto-dots i:nth-child(2n) { background: var(--mustard); }
.manifesto-dots i:nth-child(3n) { background: var(--teal); }

/* --------------------------------------------------------------- download */
.download { padding: 54px 24px; color: #fff; background: var(--coral); border-bottom: 3px solid var(--ink); }
.download-inner { width: var(--shell); margin: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.download h2 { font-family: var(--pixel); font-size: clamp(24px, 3vw, 36px); text-transform: uppercase; }
.download p { max-width: 44ch; margin: 12px 0 0; font-size: 16px; }
.download .btn { color: var(--ink); background: var(--cream-light); }

/* --------------------------------------------------------------- footer */
.footer { padding: 40px 0 30px; color: #b8b0cf; background: var(--night); }
.footer-inner { width: var(--shell); margin: auto; display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.footer .logo { color: #fff; font-size: 18px; }
.footer-tagline { margin: 10px 0 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { font-family: var(--pixel); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.footer-links a:hover { color: var(--mustard); }
.footer-bottom { width: var(--shell); margin: 26px auto 0; padding-top: 18px; border-top: 2px solid #3a3358; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; }
.footer-bottom p { margin: 0; }

/* --------------------------------------------------------------- legal */
.legal { padding: 66px 0 80px; }
.legal-inner { width: min(880px, calc(100% - 48px)); margin: auto; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; font-family: var(--pixel); font-size: 11px; text-transform: uppercase; }
.legal h1 { font-family: var(--pixel); font-size: clamp(28px, 4vw, 44px); text-transform: uppercase; }
.legal-updated { margin: 14px 0 0; font-family: var(--pixel); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.legal-body { margin-top: 32px; padding: 34px; background: var(--cream-light); border: 3px solid var(--ink); box-shadow: var(--pixel-shadow); }
.legal-body section { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 2px solid var(--line); }
.legal-body section:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
.legal-body h2 { font-family: var(--pixel); font-size: 16px; text-transform: uppercase; }
.legal-body h3 { margin-top: 18px; font-size: 16px; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 15px; }
.legal-body ul { padding-left: 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--coral); text-decoration: underline; }

/* --------------------------------------------------------------- motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .hero-inner { grid-template-columns: 1fr .8fr; gap: 32px; }
    .feature-grid, .room-grid { grid-template-columns: repeat(2, 1fr); }
    .float-a, .float-b { display: none; }
}

@media (max-width: 860px) {
    :root { --shell: calc(100% - 32px); }
    .nav-toggle { display: block; position: relative; z-index: 320; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-links {
        position: fixed; z-index: 310; inset: 0;
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
        padding: 80px 34px; color: #fff; background: rgba(27, 23, 48, .98);
        transform: translateX(100%); transition: transform .25s ease;
    }
    .nav-links.open { transform: none; }
    .nav-link { font-size: 20px; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 44px 0 50px; }
    .steps-inner { grid-template-columns: 1fr; }
    .step { padding: 26px 0; border-left: 0; border-top: 3px solid var(--ink); }
    .step:first-child { border-top: 0; }
    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .section { padding: 50px 0; }
    .feature-grid, .room-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .legal-body { padding: 22px; }
    .download-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
