/* ============================================================
   Dev Sheet — devsheet.netlify.app
   Design direction: a dark "rap sheet / stamped record" dossier.
   Ink navy paper, cream ink, stamp-red accents, mono ledger type.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg: #0B0F1A;            /* ink navy */
    --surface: #131A2A;
    --raised: #1A2338;
    --border: #232D42;
    --border-strong: #3A4661;
    --cream: #F2EBDD;         /* paper cream — primary text + primary action */
    --muted: #9AA3B5;
    --red: #E5484D;           /* stamp red — risk accents only */
    --red-bright: #FF7B80;    /* small red text on navy (contrast) */
    --red-dim: rgba(229, 72, 77, 0.12);
    --green: #2BD98B;
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --radius: 16px;
    --maxw: 1160px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-display);
    background:
        radial-gradient(1100px 500px at 85% -5%, rgba(229, 72, 77, 0.07), transparent 60%),
        radial-gradient(900px 600px at -10% 10%, rgba(242, 235, 221, 0.045), transparent 55%),
        var(--bg);
    color: var(--cream);
    line-height: 1.65;
    font-size: 16.5px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.12em 0.45em;
    word-break: break-all;
}

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 2000;
    background: var(--cream); color: var(--bg);
    padding: 0.7rem 1.2rem; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- header / nav ---------- */

.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    background: rgba(11, 15, 26, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav {
    max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 1.5rem;
    display: flex; align-items: center; gap: 1.4rem;
}
.brand {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; font-weight: 700; font-size: 1.18rem; letter-spacing: 0.01em;
    margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-strong); }
.brand .brand-word em { font-style: normal; color: var(--red-bright); }
.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem; transition: color .18s; }
.nav-links a:hover { color: var(--cream); }

.nav-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--border); color: var(--muted);
    transition: color .18s, border-color .18s;
}
.nav-x:hover { color: var(--cream); border-color: var(--border-strong); }
.nav-x svg { width: 17px; height: 17px; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    text-decoration: none; cursor: pointer;
    border-radius: 12px; padding: 0.85rem 1.5rem;
    border: 1px solid transparent;
    transition: transform .16s, background .16s, border-color .16s, box-shadow .16s;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--cream); color: #0B0F1A; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(242, 235, 221, 0.14); }
.btn-ghost { border-color: var(--border-strong); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; border-radius: 10px; }

/* ---------- stamps ---------- */

.stamp {
    display: inline-block;
    font-family: var(--font-mono); font-weight: 600;
    font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--red-bright);
    border: 2px solid var(--red); border-radius: 8px;
    background: var(--red-dim);
    padding: 0.42em 0.85em;
    transform: rotate(-1.6deg);
}

/* ---------- sections ---------- */

section { padding: 5.2rem 0; }
.section-eyebrow {
    font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
    display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem;
}
.section-eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--border); }
h1, h2, h3 { line-height: 1.14; letter-spacing: -0.015em; }
h2.section-title { font-size: clamp(1.9rem, 4.2vw, 2.7rem); font-weight: 700; margin-bottom: 0.9rem; }
.section-lede { color: var(--muted); max-width: 46rem; font-size: 1.06rem; }

/* ---------- hero ---------- */

.hero { padding: 9.2rem 0 4.6rem; text-align: center; }
.hero h1 {
    font-size: clamp(3rem, 8.5vw, 5.4rem); font-weight: 700;
    margin: 1.6rem 0 0.4rem;
}
.hero h1 .dot { color: var(--red); }
.hero .slogan {
    font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; color: var(--cream);
    margin-bottom: 1.2rem;
}
.hero .lede { color: var(--muted); max-width: 52rem; margin: 0 auto 2.1rem; font-size: 1.08rem; }
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.3rem; }
.hero-meta {
    font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted);
    display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
}
.hero-meta span + span::before { content: "·"; margin-right: 0.6rem; color: var(--border-strong); }
.hero-banner {
    margin: 3.4rem auto 0; max-width: 980px;
    border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden;
    background: var(--surface); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.hero-banner img { width: 100%; }

/* ---------- honesty stamp strip ---------- */

.stamps-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.6rem 0; }
.stamps-band .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.stamp-fact .stamp { transform: rotate(-1.2deg); margin-bottom: 0.85rem; }
.stamp-fact:nth-child(2) .stamp { transform: rotate(1.1deg); }
.stamp-fact:nth-child(3) .stamp { transform: rotate(-0.8deg); }
.stamp-fact:nth-child(4) .stamp { transform: rotate(1.5deg); }
.stamp-fact p { color: var(--muted); font-size: 0.93rem; }

/* ---------- feature cards ---------- */

.features .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.feature {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.7rem 1.7rem 1.6rem; transition: border-color .18s, transform .18s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature .tab-tag {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
    border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.3em 0.85em;
    margin-bottom: 1.05rem;
}
.feature .tab-tag svg { width: 15px; height: 15px; }
.feature h3 { font-size: 1.32rem; margin-bottom: 0.55rem; }
.feature p { color: var(--muted); font-size: 0.98rem; }
.feature-wide { grid-column: 1 / -1; background: linear-gradient(135deg, var(--surface), var(--raised)); }
.feature-wide h3 { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- chip anatomy ---------- */

.anatomy .panel {
    margin-top: 2.4rem;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start;
}
.mock-card {
    background: var(--raised); border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: 1.6rem; position: relative;
}
.mock-card .mock-label {
    position: absolute; top: -0.85rem; right: 1.2rem;
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em;
    color: var(--muted); background: var(--bg); border: 1px dashed var(--border-strong);
    border-radius: 999px; padding: 0.25em 0.8em; text-transform: uppercase;
}
.badge-dev {
    display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 1.7rem;
    color: var(--red-bright); background: var(--red-dim);
    border: 2px solid var(--red); border-radius: 12px; padding: 0.18em 0.5em;
    transform: rotate(-1.5deg); margin-bottom: 1rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
    font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
    border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--surface); color: var(--cream);
    padding: 0.34em 0.8em; white-space: nowrap;
}
.chip-danger { color: var(--red-bright); border-color: var(--red); background: var(--red-dim); }
.chip-muted { color: var(--muted); }
.chip-green { color: var(--green); border-color: rgba(43, 217, 139, 0.45); }

.definitions { display: grid; gap: 0.95rem; }
.definitions div { border-left: 2px solid var(--border-strong); padding-left: 1rem; }
.definitions dt { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; color: var(--cream); }
.definitions dd { color: var(--muted); font-size: 0.93rem; margin-top: 0.15rem; }
.anatomy .footnote { margin-top: 1.6rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }

/* ---------- how it works ---------- */

.steps { margin-top: 2.4rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.step {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; position: relative;
}
.step::before {
    counter-increment: step; content: "0" counter(step);
    font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
    color: var(--red-bright); letter-spacing: 0.1em;
    display: block; margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* ---------- fine print ---------- */

.fineprint .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.rule-card {
    background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius);
    padding: 1.5rem;
}
.rule-card h3 { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream); margin-bottom: 0.6rem; }
.rule-card p { color: var(--muted); font-size: 0.93rem; }
.rule-card .u { color: var(--cream); font-weight: 600; }

/* ---------- screenshots ---------- */

.shots .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1.1rem; margin-top: 2.4rem; }
.shots figure {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; transition: border-color .18s, transform .18s;
}
.shots figure:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.shots img { width: 100%; height: auto; border-bottom: 1px solid var(--border); }
.shots figcaption {
    font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; color: var(--muted);
    padding: 0.75rem 0.9rem 0.85rem;
}
.shots figcaption b { color: var(--cream); font-weight: 600; display: block; }
.shots .source-note { margin-top: 1.4rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }

/* ---------- download ---------- */

.download-card {
    margin-top: 2.4rem;
    border: 1px dashed var(--border-strong); border-radius: 20px;
    background: linear-gradient(160deg, var(--surface), var(--bg));
    padding: 3.2rem 2rem 2.8rem; text-align: center;
}
.download-card .btn { font-size: 1.1rem; padding: 1.05rem 2.1rem; margin: 1.6rem 0 1.4rem; }
.hash {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
    background: var(--raised); border: 1px solid var(--border); border-radius: 10px;
    padding: 0.7rem 1rem; max-width: 620px; margin: 0 auto; word-break: break-all; line-height: 1.6;
}
.hash b { color: var(--cream); font-weight: 600; }
.dl-steps { margin: 2.2rem auto 0; max-width: 640px; text-align: left; display: grid; gap: 0.8rem; list-style: none; counter-reset: dl; }
.dl-steps li { counter-increment: dl; display: flex; gap: 0.8rem; color: var(--muted); font-size: 0.96rem; }
.dl-steps li::before {
    content: counter(dl); flex: none; width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
    border: 1px solid var(--border-strong); border-radius: 8px; color: var(--cream);
    background: var(--raised); margin-top: 0.15rem;
}
.dl-note { margin-top: 1.8rem; font-size: 0.88rem; color: var(--muted); max-width: 620px; margin-left: auto; margin-right: auto; }
.dl-note .u { color: var(--cream); }

/* ---------- legal document pages (Dev Sheet brand) ---------- */

.page { max-width: 880px; margin: 0 auto; padding: 8.6rem 1.5rem 4rem; }
.document-header { margin-bottom: 2.6rem; }
.document-header h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; margin-bottom: 0.5rem; }
.document-header .meta { color: var(--muted); font-size: 0.98rem; font-family: var(--font-mono); }
.document-content {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 2.8rem;
}
.document-content h2 {
    font-size: 1.28rem; font-weight: 700; color: var(--cream);
    margin-top: 2.1rem; margin-bottom: 0.9rem;
}
.document-content h2:first-child { margin-top: 0; }
.document-content p { color: var(--muted); margin-bottom: 1rem; font-size: 1rem; }
.document-content p strong, .document-content li strong { color: var(--cream); }
.document-content ul { margin: 0 0 1rem 1.4rem; color: var(--muted); }
.document-content li { margin-bottom: 0.55rem; }
.document-content a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.document-content a:hover { text-decoration-color: var(--red); }
.document-content .doc-fields { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--border); padding: 3.4rem 0 2.4rem; background: rgba(19, 26, 42, 0.5); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand { font-size: 1.25rem; margin-bottom: 0.8rem; }
.footer-brand p { color: var(--muted); font-size: 0.93rem; max-width: 26rem; }
footer h3 { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
footer ul { list-style: none; display: grid; gap: 0.6rem; }
footer ul a { color: var(--cream); text-decoration: none; font-size: 0.95rem; opacity: 0.85; transition: opacity .16s, color .16s; display: inline-flex; align-items: center; gap: 0.5rem; }
footer ul a:hover { opacity: 1; color: var(--red-bright); }
footer ul a svg { width: 15px; height: 15px; }
.footer-bottom {
    margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    color: var(--muted); font-size: 0.88rem;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
    .stamps-band .grid { grid-template-columns: repeat(2, 1fr); }
    .features .grid { grid-template-columns: 1fr; }
    .anatomy .panel { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .fineprint .grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .nav-links { display: none; }
    section { padding: 3.8rem 0; }
    .hero { padding: 7.6rem 0 3.4rem; }
    .document-content { padding: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 15.5px; }
    .stamps-band .grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .fineprint .grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .footer-bottom { flex-direction: column; }
    .shots .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
