/* Deckboy's site, in Deckboy's clothes.
 *
 * The palette is not a taste decision. Sampling a capture of the application
 * running its DEFAULT theme returns, in order of area:
 *
 *   #fcfe1f  bright yellow   the buttons and the lit chrome
 *   #1f601f  dark green      the panels everything sits on
 *   #f3fdca  pale cream      secondary ink
 *   #94ae79  sage            muted ink and rules
 *
 * So the site uses those. An earlier version of this file used the Game Boy
 * DMG greens, because the screenshot that had been to hand was shot in the
 * "gameboy" colourway -- one of about thirty themes the app ships -- and I
 * took a theme for the identity. The default is yellow on green.
 *
 * Long body copy is set in the cream rather than the yellow. The application
 * can put #fcfe1f on #1f601f because its text is short and its panels are
 * small; a paragraph of it on a web page is a migraine. Headings, buttons and
 * the lit accents keep the yellow, which is where the app uses it too.
 *
 * The font is not a choice either. The application draws its branding in
 * Press Start 2P by name (native/core/paths.cpp: "retro pixel font used for
 * the Deckboy branding/logo") and its interface in a monospace. Headings are
 * Press Start 2P; everything else is mono.
 *
 * Press Start 2P is used ONLY at headline sizes -- it is enormously wide and
 * has no lower-case rhythm, so body copy set in it is unreadable, and a site
 * nobody can read is not on brand, it is broken.
 */

/* The application's OWN font files, copied from data/. Not Google's cut of
 * Press Start 2P but the very binary the deck draws its wordmark with, and
 * Liberation Mono because that is what the interface sets its text in. Served
 * from the site so the page does not depend on a third party to look like
 * itself. */
@font-face {
    font-family: 'Deckboy Pixel';
    src: url('fonts/PressStart2P.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Deckboy Mono';
    src: url('fonts/LiberationMono-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    --db-yellow:      #fcfe1f;
    --db-yellow-dim:  #e3fd1f;
    --db-green:       #1f601f;
    --db-green-deep:  #143f14;
    --db-cream:       #f3fdca;
    --db-sage:        #94ae79;

    --ground:   var(--db-green-deep);
    --panel:    var(--db-green);
    --ink:      var(--db-yellow);
    --ink-body: var(--db-cream);
    --ink-soft: var(--db-sage);
    --rule:     #2c7a2c;

    --pixel: 'Deckboy Pixel', 'Press Start 2P', 'Courier New', monospace;
    --mono: 'Deckboy Mono', ui-monospace, 'Consolas', Menlo, monospace;
}

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

body {
    font-family: var(--mono);
    background-color: var(--ground);
    color: var(--ink-body);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    /* the faint scanline of a screen you are looking at rather than reading */
    background-image: repeating-linear-gradient(
        0deg, rgba(252, 254, 31, 0.03) 0 1px, transparent 1px 3px);
}

/* The old design had two blurred colour blobs behind everything. Nothing in the
 * interface is blurred, so they are gone rather than recoloured. */
.background-glow { display: none; }

/* ── navigation ─────────────────────────────────────────────────────────── */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--rule);
}

.logo {
    font-family: var(--pixel);
    font-size: 1rem;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }

.nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.85rem;
}

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

.btn-primary {
    border: 2px solid var(--ink-soft);
    padding: 0.45rem 0.9rem;
    color: var(--ink) !important;
}

.btn-primary:hover { background: var(--db-green); }

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

.hero { padding: 4.5rem 1.5rem 2rem; text-align: center; }
.hero-content { max-width: 900px; margin: 0 auto; }

h1 {
    font-family: var(--pixel);
    font-size: clamp(1.1rem, 4.2vw, 2.4rem);
    line-height: 1.6;
    color: var(--ink);
}

/* was a pink-to-blue gradient. The interface has no gradients in it. */
.gradient-text { color: var(--db-yellow-dim); }

.hero-subtitle {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.25rem;
}

.btn-large {
    font-family: var(--pixel);
    font-size: 0.7rem;
    line-height: 1.6;
    text-decoration: none;
    padding: 1rem 1.2rem;
    border: 2px solid var(--ink);
    background: var(--db-green);
    color: var(--ink);
}

.btn-large:hover { background: var(--ink); color: var(--ground); }

.btn-outline { background: transparent; }

.badges {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.75rem;
    filter: grayscale(1) sepia(1) hue-rotate(38deg) saturate(2.2);
}

/* ── panels ─────────────────────────────────────────────────────────────── */

.glass {
    background: var(--panel);
    border: 2px solid var(--rule);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.feature-card { padding: 1.5rem; }
.feature-card .icon { font-size: 1.6rem; }

.feature-card h3 {
    font-family: var(--pixel);
    font-size: 0.72rem;
    line-height: 1.7;
    margin: 0.9rem 0 0.7rem;
    color: var(--ink);
}

.feature-card p { color: var(--ink-body); font-size: 0.88rem; }

/* ── the screenshot ─────────────────────────────────────────────────────── */

.shot { max-width: 1100px; margin: 0 auto 4rem; padding: 0 1.5rem; text-align: center; }

.shot img, .shot video {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid var(--rule);
    image-rendering: pixelated;   /* it is a pixel interface; do not smooth it */
}

.shot-caption { margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-soft); }

/* ── the terminal block ─────────────────────────────────────────────────── */

.code-preview { max-width: 880px; margin: 0 auto 4rem; padding: 0; }

.window-header {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 2px solid var(--rule);
}

.dot { width: 10px; height: 10px; background: var(--db-green); border: 1px solid var(--ink-soft); }
.dot.green { background: var(--ink-soft); }

.terminal { padding: 1.5rem; font-size: 0.88rem; }
.terminal p { margin-bottom: 0.55rem; color: var(--ink-body); }
.prompt { color: var(--ink-soft); margin-right: 0.5rem; }

/* ── footer ─────────────────────────────────────────────────────────────── */

footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 2px solid var(--rule);
    color: var(--ink-soft);
    font-size: 0.82rem;
}

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

/* ── prose, used by compare.html and faq.html ───────────────────────────── */

.prose h2 { font-family: var(--pixel); font-size: 0.8rem; line-height: 1.8; color: var(--ink); }
.prose h3 { font-family: var(--pixel); font-size: 0.68rem; line-height: 1.8; color: var(--ink); }
.prose p, .prose li { color: var(--ink-body); }
.prose a { color: var(--ink); }

table th { font-family: var(--mono); color: var(--ink); }
table td { color: var(--ink-body); }
table th, table td { border-bottom: 1px solid var(--rule); }

.callout { border-left: 3px solid var(--ink-soft); background: var(--panel); }

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

.animate-up {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.7s steps(6, end) forwards;   /* stepped, not eased */
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .animate-up { animation: none; opacity: 1; transform: none; }
}
