/* Discito brand stylesheet — Plan 22 §22.C
 *
 * Brand tokens (mirror Packages/DiscitoUI/Sources/DiscitoUI/Theme/DiscitoColors.swift):
 *   navy   #0A2540  brand primary  (Plan 21 spec § 4.4)
 *   gold   #D4892A  brand accent / CTA / streak
 *   paper  #F4E8CE  warm Apple-Books surface (Plan 21 E.C)
 *   ink    #141008  paper dark counterpart
 *
 * Typography: native iOS / macOS system stack — matches the in-app feel.
 * Light + dark via prefers-color-scheme. Dark-mode-first per Plan 21 design intent.
 */

:root {
    --navy: #0A2540;
    --navy-soft: #1E3A5F;
    --gold: #D4892A;
    --gold-soft: #E5A858;
    --paper: #F4E8CE;
    --paper-warm: #FFF7E1;
    --ink: #141008;
    --gray-50: #FAFAF9;
    --gray-100: #F4F4F4;
    --gray-300: #D4D4D4;
    --gray-500: #737373;
    --gray-700: #404040;
    --gray-900: #171717;

    /* Light mode (default — adapted from dark per Plan 21 dark-first design intent) */
    --bg: var(--paper-warm);
    --bg-elev: #FFFFFF;
    --text: var(--ink);
    --text-soft: var(--gray-700);
    --border: rgba(20, 16, 8, 0.1);
    --shadow: 0 4px 24px rgba(20, 16, 8, 0.08);
    --shadow-strong: 0 12px 48px rgba(20, 16, 8, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: var(--ink);
        --bg-elev: #1F1B12;
        --text: var(--paper);
        --text-soft: rgba(244, 232, 206, 0.7);
        --border: rgba(244, 232, 206, 0.1);
        --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
        --shadow-strong: 0 12px 48px rgba(0, 0, 0, 0.6);
    }
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top nav */
nav.top {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
}
nav.top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1180px;
    margin: 0 auto;
}
nav.top a.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
nav.top a.brand span.accent { color: var(--gold); }
nav.top .links { display: flex; gap: 24px; align-items: center; }
nav.top .links a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}
nav.top .links a:hover { color: var(--gold); }

/* Hero */
section.hero {
    padding: 80px 24px 60px;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}
@media (max-width: 900px) {
    section.hero { grid-template-columns: 1fr; padding: 48px 20px; gap: 40px; }
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
}
.hero h1 .accent { color: var(--gold); }
.hero p.lede {
    font-size: 1.25rem;
    color: var(--text-soft);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.5;
}
.hero .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}
.hero .pricing-blurb {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin-top: 8px;
}
.hero .pricing-blurb strong { color: var(--gold); font-weight: 700; }

.hero .device {
    position: relative;
    width: 100%;
    max-width: 380px;
    justify-self: center;
}
.hero .device img {
    width: 100%;
    border-radius: 38px;
    box-shadow: var(--shadow-strong);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 6px 20px rgba(212, 137, 42, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212, 137, 42, 0.4); }
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-elev); border-color: var(--gold); }

/* Section header */
section { padding: 80px 24px; }
section .container { max-width: 1180px; margin: 0 auto; }
section h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    text-align: center;
}
section h2 .accent { color: var(--gold); }
section p.section-lede {
    font-size: 1.15rem;
    color: var(--text-soft);
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

/* Feature grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    transition: transform 0.15s ease, border-color 0.15s;
}
.feature:hover { transform: translateY(-3px); border-color: var(--gold); }
.feature .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--gold) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}
.feature h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}
.feature p {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Comparison table */
.comparison-table {
    background: var(--bg-elev);
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.comparison-table table { width: 100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td {
    text-align: left;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table th {
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.comparison-table th.brand { color: var(--gold); }
.comparison-table td:first-child { font-weight: 600; }
.comparison-table .yes { color: #15803D; font-weight: 700; }
.comparison-table .no { color: #B91C1C; font-weight: 500; }
.comparison-table .partial { color: #B45309; font-weight: 500; }

@media (prefers-color-scheme: dark) {
    .comparison-table .yes { color: #4ADE80; }
    .comparison-table .no { color: #FCA5A5; }
    .comparison-table .partial { color: #FCD34D; }
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 880px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--bg-elev);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    position: relative;
    transition: transform 0.15s ease;
}
.pricing-card.featured {
    border-color: var(--gold);
    box-shadow: 0 12px 48px rgba(212, 137, 42, 0.15);
}
.pricing-card .badge {
    position: absolute;
    top: -14px;
    left: 32px;
    background: var(--gold);
    color: var(--navy);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.pricing-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.pricing-card .tagline {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin-bottom: 24px;
}
.pricing-card .price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.pricing-card .price .number {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gold);
}
.pricing-card .price .qual {
    font-size: 1rem;
    color: var(--text-soft);
}
.pricing-card .founder-note {
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 32px;
}
.pricing-card ul.includes {
    list-style: none;
    margin-bottom: 32px;
}
.pricing-card ul.includes li {
    padding: 8px 0;
    color: var(--text);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.pricing-card ul.includes li::before {
    content: "✓";
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}
.pricing-card .btn { width: 100%; }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    margin-top: 40px;
}
footer .container {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
@media (max-width: 720px) {
    footer .container { grid-template-columns: 1fr 1fr; }
}
footer .brand-block { color: var(--text-soft); font-size: 0.9rem; line-height: 1.6; }
footer .brand-block .brand { color: var(--text); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; display: block; }
footer h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; color: var(--text-soft); }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
    transition: opacity 0.15s, color 0.15s;
}
footer a:hover { opacity: 1; color: var(--gold); }
footer .copyright {
    grid-column: 1 / -1;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.85rem;
}
footer .copyright a { color: inherit; }

/* Utility */
.center { text-align: center; }
.gap-md { display: flex; gap: 16px; flex-wrap: wrap; }
.gap-md.center-items { justify-content: center; }

/* Screenshot strip for theme showcase */
.theme-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.theme-strip img {
    width: 100%;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease;
}
.theme-strip img:hover { transform: scale(1.04); }
.theme-strip .theme-label {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.85rem;
    margin-top: 8px;
}
.theme-strip > div { display: flex; flex-direction: column; }
