/* site.css — Apps by Dan
   Dark theme carried over from True Shuffle so the whole lineup reads as one
   family. Mobile-first; no framework, no build step. */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --bg:          #121212;
    --surface:     #181818;
    --surface-2:   #202020;
    --border:      #2a2a2a;
    --border-lit:  #3a3a3a;

    --accent:      #1db954;
    --accent-dark: #158a3e;
    --accent-soft: rgba(29, 185, 84, 0.12);

    --tip:         #ffdd00;
    --tip-warm:    #ff9d2f;

    --text:        #ffffff;
    --text-muted:  #b3b3b3;
    --text-dim:    #7a7a7a;

    --radius:      12px;
    --radius-lg:   20px;
    --radius-pill: 999px;

    --transition:  0.2s ease;
    --max-w:       1100px;
    --gutter:      20px;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

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

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--accent);
    color: #000;
    padding: 12px 20px;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ── Header / nav ───────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: none; }
.site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
}
.site-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.site-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-weight: 500;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* Without JavaScript the toggle can never open the menu, so show the nav
   outright and drop the button instead of stranding phone users. */
.no-js .nav-toggle { display: none; }
.no-js .header-inner { flex-wrap: wrap; padding-top: 10px; }
.no-js .brand { white-space: nowrap; }
.no-js .site-nav {
    display: block;
    position: static;
    padding: 0 0 12px;
    background: none;
    border: 0;
    width: 100%;
}
.no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px; }

@media (min-width: 760px) {
    .nav-toggle { display: none; }
    .site-nav { display: block !important; position: static; padding: 0; background: none; border: 0; }
    .site-nav ul { flex-direction: row; gap: 4px; }
    .site-nav a { padding: 8px 14px; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
main { flex: 1 0 auto; }

.section { padding: 56px 0; }
.section + .section { padding-top: 0; }

.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.section-head p { color: var(--text-muted); margin-top: 8px; max-width: 60ch; }

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 64px 0 56px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 130%);
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
    pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
    font-size: clamp(2.1rem, 8vw, 3.5rem);
    letter-spacing: -0.03em;
}
.hero .hero-lede {
    color: var(--text-muted);
    font-size: clamp(1.02rem, 2.5vw, 1.2rem);
    max-width: 52ch;
    margin-top: 18px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #05240f; }
.btn-primary:hover { background: #22d363; }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-lit);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-dim); }

.btn-sm { padding: 9px 16px; font-size: 0.875rem; }

/* ── Card grid ──────────────────────────────────────────────────────────── */
.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* A section with a single card shouldn't stretch it across the full width -
   the banner art balloons and the card stops reading as a card. */
.grid > :only-child { max-width: 560px; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition),
                box-shadow var(--transition);
}
.card:hover {
    border-color: var(--border-lit);
    transform: translateY(-2px);
}
.card-live:hover {
    border-color: var(--accent-dark);
    box-shadow: 0 8px 28px rgba(29, 185, 84, 0.10);
}

.card-media {
    position: relative;
    background: var(--surface-2);
    aspect-ratio: 16 / 9;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(18, 18, 18, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border-lit);
    color: var(--text-muted);
}
.badge-live { color: var(--accent); border-color: var(--accent-dark); }

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
    gap: 10px;
}
.card-body h3 { font-size: 1.25rem; }
.card-tagline {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}
.card-coming .card-tagline { color: var(--text-dim); }
.card-body p { color: var(--text-muted); font-size: 0.95rem; }

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

.card-coming { border-style: dashed; }
.card-coming .card-media img { opacity: 0.78; }
.card-coming:hover .card-media img { opacity: 1; }

.card-note {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: auto;
    padding-top: 14px;
}

.card-body p.card-fineprint,
.feature-body p.card-fineprint {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
    margin-top: 12px;
}
.card-body p.card-fineprint a,
.feature-body p.card-fineprint a { color: var(--text-muted); }
.card-body p.card-fineprint a:hover,
.feature-body p.card-fineprint a:hover { color: var(--accent); }

/* Placeholder tile for sections with no art yet (3D printing). */
.card-placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    background:
        repeating-linear-gradient(45deg,
            var(--surface-2) 0 12px,
            #1a1a1a 12px 24px);
    color: var(--text-dim);
}
.card-placeholder svg { width: 56px; height: 56px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ── Feature block ──────────────────────────────────────────────────────── */
/* One thing given room, distinct from the card grid. The banner renders at its
   native ratio here - no aspect-ratio, no object-fit - because it is a designed
   image with the title laid into it, and the card's 16/9 frame crops its sides. */
.feature {
    max-width: 820px;
    /* Left-aligned, not centred: every heading and card grid on the page hangs
       off the container's left edge, and centring this broke that line. */
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.feature-media img { width: 100%; height: auto; display: block; }

.feature-body { padding: 24px 28px 28px; }
.feature-body > * + * { margin-top: 12px; }
.feature-body h3 { font-size: 1.45rem; }
.feature-body p { color: var(--text-muted); }
.feature-body .card-tagline { color: var(--accent); font-size: 0.95rem; font-weight: 600; }

.feature-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* The Android test is still on offer, but must not compete with Play. */
.feature-sub {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.feature-sub-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.feature-sub .card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

@media (max-width: 480px) {
    .feature-body { padding: 20px 20px 24px; }
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about-layout {
    display: grid;
    gap: 28px;
    align-items: start;
    /* Cap the whole block, not the paragraphs: the grid then sets the reading
       measure and nothing is left dangling to the right of the text. */
    max-width: 940px;
}
@media (min-width: 760px) {
    /* minmax(0, 1fr) so a long unbroken string can't blow the column out. */
    .about-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
}

.about-portrait {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 220px;
    margin-inline: auto;
    background: var(--surface-2);
}
@media (min-width: 760px) {
    /* Becomes a real column here, so it stops being centred. 260px against a
       480px source keeps it ~1.8x for retina. */
    .about-portrait { max-width: 260px; margin-inline: 0; }
}
.about-portrait img { width: 100%; height: auto; }

.about-copy > * + * { margin-top: 16px; }
.about-copy p { color: var(--text-muted); }
.about-copy strong { color: var(--text); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    flex: none;
    margin-top: 64px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 44px 0 32px;
}

.tip-block { text-align: center; max-width: 54ch; margin: 0 auto; }
.tip-block h2 { font-size: 1.25rem; }
.tip-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 10px;
}

/* Colorful, but it stays an outline until you actually reach for it. */
.btn-tip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 26px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--tip);
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
                linear-gradient(100deg, var(--tip), var(--tip-warm)) border-box;
    border: 2px solid transparent;
    transition: color var(--transition), background var(--transition),
                transform var(--transition), box-shadow var(--transition);
}
.btn-tip:hover,
.btn-tip:focus-visible {
    color: #1a1400;
    background: linear-gradient(100deg, var(--tip), var(--tip-warm)) border-box;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 170, 30, 0.22);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

.footer-legal {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 18px;
}

/* ── Motion ─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .btn:hover, .card:hover, .btn-tip:hover { transform: none; }
}
