/* Little Jigsaws — littlejigsaws.com
   Design language mirrors the app: warm dark charcoal, amber accent,
   soft cards, difficulty rainbow. Static site, no dependencies. */

:root {
    --bg: #141418;
    --bg-raised: #1a1a20;
    --card: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --amber: #f59e0b;
    --amber-bright: #fbbf24;
    --amber-soft: rgba(245, 158, 11, 0.12);
    --purple: #7c3aed;
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1080px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--amber-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

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

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(20, 20, 24, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
}
.nav-brand:hover { text-decoration: none; }

.nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--amber-bright); }

@media (max-width: 560px) {
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 13px; }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--amber);
    color: #1a1205;
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 34px rgba(245, 158, 11, 0.45); }

.btn-ghost {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn .sub {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    display: block;
}

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

.hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 70px;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto;
    height: 130%;
    background:
        radial-gradient(600px 420px at 30% 10%, rgba(245, 158, 11, 0.13), transparent 65%),
        radial-gradient(560px 400px at 72% 6%, rgba(124, 58, 237, 0.12), transparent 65%);
    pointer-events: none;
}

.hero > .wrap { position: relative; }

.hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    margin: 0 auto 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--card-border);
}

.hero h1 {
    font-size: clamp(2.3rem, 6vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1 .accent { color: var(--amber); }

.hero p.lede {
    font-size: clamp(1.02rem, 2.1vw, 1.2rem);
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 34px;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.hero-note { font-size: 13px; color: var(--text-faint); }

/* Floating artwork cards under the hero */
.hero-art {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 56px;
    perspective: 900px;
}

.hero-art img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-art img:nth-child(odd) { transform: rotate(-3deg) translateY(8px); }
.hero-art img:nth-child(even) { transform: rotate(2.5deg) translateY(-6px); }
.hero-art img:hover { transform: rotate(0) translateY(-4px) scale(1.04); transition: transform 0.25s ease; }

@media (max-width: 760px) {
    .hero-art img { width: 104px; height: 104px; }
    .hero-art { gap: 12px; }
    .hero-art img:nth-child(6) { display: none; }
}
@media (max-width: 480px) {
    .hero-art img:nth-child(5) { display: none; }
}

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

.section { padding: 76px 0; }
.section.alt { background: var(--bg-raised); }

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}

.section h2 {
    font-size: clamp(1.6rem, 3.6vw, 2.2rem);
    font-weight: 750;
    margin-bottom: 14px;
}

.section p.sub {
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 40px;
}

/* Feature grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 26px 24px;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--amber-soft);
    color: var(--amber-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 16.5px; font-weight: 650; margin-bottom: 8px; }

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

/* Difficulty rainbow */
.difficulty-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.diff-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--card-border);
    font-size: 13px;
    font-weight: 600;
}

.diff-chip .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.diff-chip .pieces { color: var(--text-faint); font-weight: 500; }

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.gallery figure {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    position: relative;
    aspect-ratio: 1;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery figure:hover img { transform: scale(1.05); }

.gallery figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 14px 10px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

/* Screenshots (populate assets/screenshots/ and uncomment in index.html) */
.screens {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.screens img {
    height: 520px;
    width: auto;
    border-radius: 28px;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

@media (max-width: 640px) { .screens img { height: 400px; } }

.video-frame {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.video-frame video { width: 100%; display: block; }

/* ── FAQ (details/summary accordion) ─────────────────────────────── */

.faq-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 36px 0 14px;
}
.faq-section-title:first-of-type { margin-top: 0; }

details.faq-item {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

details.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
}
details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2.2px solid var(--amber);
    border-bottom: 2.2px solid var(--amber);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-top: -4px;
}

details.faq-item[open] summary::after { transform: rotate(225deg); margin-top: 4px; }

details.faq-item .answer {
    padding: 0 18px 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Page headers (subpages) ─────────────────────────────────────── */

.page-head {
    padding: 64px 0 40px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 44px;
}

.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 780; margin-bottom: 10px; }
.page-head p { color: var(--text-muted); max-width: 640px; }

/* ── Legal prose ─────────────────────────────────────────────────── */

.prose { max-width: 760px; padding-bottom: 80px; }

.prose h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 38px 0 12px;
    color: var(--text);
}

.prose p, .prose li { font-size: 15px; color: var(--text-muted); margin-bottom: 12px; }

.prose ul { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 8px; }

.prose strong { color: var(--text); font-weight: 600; }

.prose .meta {
    font-size: 13.5px;
    color: var(--text-faint);
    border-left: 3px solid var(--amber);
    padding-left: 14px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.prose hr { border: 0; border-top: 1px solid var(--card-border); margin: 30px 0; }

/* ── Support ─────────────────────────────────────────────────────── */

.support-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 44px;
}

.support-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 18px;
}
.support-card .card-icon svg { width: 28px; height: 28px; }
.support-card h2 { font-size: 1.4rem; margin-bottom: 10px; }
.support-card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 24px; }

/* ── CTA band ────────────────────────────────────────────────────── */

.cta-band {
    text-align: center;
    padding: 84px 0;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 300px at 50% 100%, rgba(245, 158, 11, 0.12), transparent 70%);
    pointer-events: none;
}

.cta-band .wrap { position: relative; }

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

.footer {
    border-top: 1px solid var(--card-border);
    padding: 44px 0 52px;
    font-size: 13.5px;
    color: var(--text-faint);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

.footer .credit { margin-top: 10px; }
.footer .credit a { color: var(--amber-bright); }
