/* ===========================================================================
   D4 Build Overlay — landing site stylesheet

   Mirrors the WPF app's Theme.xaml palette so the browser→download→install
   journey feels continuous. If you change a color in Theme.xaml, update the
   corresponding CSS variable here.
   =========================================================================== */

:root {
    /* Backgrounds */
    --bg-deepest: #07040a;
    --bg-base: #0e0a08;
    --bg-panel: #19120e;
    --bg-panel-hover: #231811;
    --bg-inset: #0a0605;

    /* Chrome / borders */
    --chrome-border: #3a2a1c;
    --chrome-border-light: #58402a;
    --brass: #8b6e40;
    --brass-bright: #b38c4e;

    /* Accents — the blood-red "do the thing" color */
    --blood-dark: #6e0a0a;
    --blood: #a52a2a;
    --blood-bright: #c83a3a;
    --blood-glow: #ff4a3a;

    /* Rarity / tier */
    --legendary: #ff8c1a;
    --rare: #ffd060;

    /* Text */
    --text-parchment: #e8d7a8;
    --text-gold: #d4a84a;
    --text-dim: #8c7a58;
    --text-faint: #5a4a34;
    --text-on-accent: #fff3e0;

    /* Typography */
    --font-display: 'Cinzel', 'Palatino Linotype', Georgia, serif;
    --font-body: 'EB Garamond', 'Palatino Linotype', Georgia, serif;
    --font-mono: 'Consolas', ui-monospace, monospace;

    /* Sizing */
    --wrap-max: 1080px;
    --wrap-narrow-max: 760px;
    --radius: 3px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--text-parchment);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    /* Subtle warm radial glow at the very top of the page */
    background:
        radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(193, 60, 58, 0.18), transparent 70%),
        var(--bg-base);
    background-attachment: fixed;
}

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

a { color: var(--text-gold); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--rare); }
code { font-family: var(--font-mono); color: var(--text-gold); font-size: 0.9em; }

/* ================================================================
   Navigation
   ================================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 4, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--chrome-border);
}
.site-nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gold);
}
.brand-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.1em;
    text-shadow: 0 0 12px rgba(200, 58, 58, 0.4);
}
.site-nav nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 14px;
}
.site-nav nav a {
    color: var(--text-dim);
    font-weight: 500;
}
.site-nav nav a:hover { color: var(--text-parchment); }
.nav-cta {
    color: var(--text-gold) !important;
    padding: 6px 14px;
    border: 1px solid var(--brass);
    border-radius: var(--radius);
    transition: all 0.15s;
}
.nav-cta:hover {
    background: var(--blood-dark);
    color: var(--text-on-accent) !important;
    border-color: var(--blood-bright);
}

/* ================================================================
   Hero
   ================================================================ */

.hero {
    position: relative;
    padding: 100px 0 60px;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    left: 50%;
    top: -120px;
    width: 800px;
    height: 400px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(200, 58, 58, 0.25), transparent 65%);
    pointer-events: none;
    filter: blur(20px);
}
.hero-inner {
    position: relative;
    text-align: center;
    max-width: 780px;
}
.hero-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    padding: 8px 18px;
    border: 1px solid var(--chrome-border);
    border-radius: 20px;
    background: rgba(14, 10, 8, 0.6);
    margin-bottom: 32px;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 64px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin: 0 0 24px;
    color: var(--text-parchment);
    text-shadow: 0 0 40px rgba(200, 58, 58, 0.3);
}
.hero-title .accent { color: var(--blood-bright); text-shadow: 0 0 30px rgba(255, 74, 58, 0.6); }

.hero-sub {
    font-size: 20px;
    line-height: 1.5;
    color: var(--text-dim);
    margin: 0 auto 40px;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.hero-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

/* Brass rule below hero */
.rule-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 60px;
    opacity: 0.4;
}
.rule {
    flex: 0 0 auto;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.rule-diamond {
    color: var(--text-gold);
    font-size: 12px;
}

/* ================================================================
   Buttons
   ================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-out;
    user-select: none;
}
.btn-large { padding: 16px 32px; font-size: 15px; }

.btn-primary {
    color: var(--text-on-accent);
    background: var(--blood-dark);
    border-color: var(--blood-bright);
    box-shadow: 0 0 16px rgba(165, 42, 42, 0.4), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-primary:hover {
    background: var(--blood);
    box-shadow: 0 0 24px rgba(200, 58, 58, 0.55), 0 6px 18px rgba(0,0,0,0.4);
    transform: translateY(-1px);
    color: var(--text-on-accent);
}
.btn-primary:active { transform: translateY(0); background: var(--blood-bright); }

.btn-secondary {
    color: var(--text-parchment);
    background: var(--bg-panel);
    border-color: var(--brass);
}
.btn-secondary:hover {
    background: var(--bg-panel-hover);
    border-color: var(--brass-bright);
    color: var(--text-parchment);
}

.btn-arrow { color: var(--text-gold); font-size: 13px; }
.btn-primary .btn-arrow { color: var(--rare); }

/* ================================================================
   Sections
   ================================================================ */

.section {
    padding: 88px 0;
}
.section-dark {
    background: var(--bg-deepest);
    border-top: 1px solid var(--chrome-border);
    border-bottom: 1px solid var(--chrome-border);
}

.section-kicker {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--text-gold);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 24px;
    max-width: 780px;
    color: var(--text-parchment);
}
.section-title .accent { color: var(--blood-bright); }

.section-lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dim);
    max-width: 680px;
    margin: 0 0 48px;
}

/* ================================================================
   Problem stats
   ================================================================ */

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.problem-card {
    padding: 28px 24px;
    background: var(--bg-panel);
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.problem-card:nth-child(3) {
    border-color: var(--brass);
    background: linear-gradient(180deg, #1e140e, var(--bg-panel));
}
.problem-num {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-gold);
    margin-bottom: 12px;
}
.problem-num span {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dim);
    margin-left: 4px;
    letter-spacing: 0.1em;
}
.problem-card:nth-child(3) .problem-num { color: var(--legendary); text-shadow: 0 0 16px rgba(255,140,26,0.3); }
.problem-card p { margin: 0; color: var(--text-parchment); }

/* ================================================================
   Steps
   ================================================================ */

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    padding: 32px 28px;
    background: var(--bg-panel);
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    position: relative;
}
.step-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--blood-bright);
    letter-spacing: 0.2em;
    margin-bottom: 12px;
}
.step h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-gold);
    margin: 0 0 12px;
}
.step p {
    color: var(--text-parchment);
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

/* ================================================================
   Feature grid
   ================================================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.feature {
    padding: 24px;
    background: var(--bg-panel);
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.feature:hover { border-color: var(--brass); }
.feature-ico {
    color: var(--text-gold);
    font-size: 24px;
    margin-bottom: 10px;
}
.feature h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text-parchment);
    margin: 0 0 10px;
}
.feature p {
    color: var(--text-dim);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
}

/* ================================================================
   Download
   ================================================================ */

.section-download {
    padding: 110px 0;
    background:
        radial-gradient(ellipse 600px 300px at 50% 50%, rgba(200, 58, 58, 0.15), transparent 70%),
        var(--bg-deepest);
}
.download-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 42px;
    background: var(--bg-panel);
    border: 1.5px solid var(--brass);
    border-radius: var(--radius);
    box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 60px rgba(200,58,58,0.1);
}
.download-text h2 {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--text-parchment);
    margin: 0 0 12px;
}
.download-text p { color: var(--text-dim); font-size: 15px; margin: 0; }
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}
.download-hash {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

@media (max-width: 720px) {
    .download-card { grid-template-columns: 1fr; padding: 28px; }
    .download-actions { align-items: stretch; }
    .btn { justify-content: center; }
}

/* ================================================================
   FAQ
   ================================================================ */

.faq {
    background: var(--bg-panel);
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}
.faq[open] { border-color: var(--brass); }
.faq summary {
    cursor: pointer;
    padding: 18px 22px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-gold);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq summary::after {
    content: '◈';
    color: var(--brass);
    font-size: 12px;
    transition: transform 0.2s;
}
.faq[open] summary::after { transform: rotate(45deg); color: var(--blood-bright); }
.faq summary::-webkit-details-marker { display: none; }
.faq p {
    padding: 0 22px 18px;
    margin: 0 0 10px;
    color: var(--text-parchment);
    font-size: 15px;
    line-height: 1.6;
}
.faq p strong { color: var(--text-gold); }

/* ================================================================
   Footer
   ================================================================ */

.site-footer {
    background: var(--bg-deepest);
    border-top: 1px solid var(--chrome-border);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    margin: 0 0 16px;
}
.footer-col a {
    display: block;
    color: var(--text-parchment);
    font-size: 14px;
    margin-bottom: 8px;
}
.footer-col a:hover { color: var(--text-gold); }
.footer-tag {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-gold);
    letter-spacing: 0.1em;
    margin: 12px 0 6px;
}
.footer-sub {
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
    margin: 0;
}
.footer-disclaimer {
    border-top: 1px solid var(--chrome-border);
    padding-top: 24px;
    font-size: 11px;
    color: var(--text-faint);
    line-height: 1.7;
    max-width: 820px;
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hero-title { font-size: 42px; }
    .section-title { font-size: 30px; }
    .site-nav nav { gap: 18px; font-size: 13px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-sub { font-size: 17px; }
}

/* ================================================================
   Pricing + account pages
   ================================================================ */

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 40px auto 0;
}

@media (max-width: 760px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 520px; }
}

.pricing-card {
    position: relative;
    background: var(--bg-panel);
    border: 1.5px solid var(--chrome-border);
    border-radius: var(--radius);
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}
.pricing-card:hover {
    border-color: var(--brass);
    transform: translateY(-2px);
}

.pricing-card-featured {
    border: 1.5px solid var(--brass-bright);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.55),
        0 0 80px rgba(255, 140, 26, 0.12);
    background: linear-gradient(180deg, #221611, var(--bg-panel));
}
.pricing-card-featured:hover {
    border-color: var(--legendary);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.6),
        0 0 100px rgba(255, 140, 26, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--legendary), #ffb347);
    color: #1a0808;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    padding: 6px 14px;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(255, 140, 26, 0.35);
}

.pricing-card .pricing-features { flex: 1 1 auto; }
.pricing-card .pricing-cta { margin-top: auto; width: 100%; justify-content: center; }
.pricing-tier {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.22em;
    color: var(--text-gold);
    margin-bottom: 20px;
}
.pricing-amount {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 32px;
}
.pricing-currency {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--text-dim);
    font-weight: 600;
}
.pricing-dollars {
    font-family: var(--font-display);
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-parchment);
    text-shadow: 0 0 30px rgba(200,58,58,0.4);
}
.pricing-period {
    font-size: 16px;
    color: var(--text-dim);
    margin-left: 8px;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
}
.pricing-features li {
    font-size: 15px;
    color: var(--text-parchment);
    padding: 8px 0;
    border-bottom: 1px dashed var(--chrome-border);
}
.pricing-features li:last-child { border-bottom: 0; }
.pricing-cta { margin: 8px auto 0; }
.pricing-footnote {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 16px;
    line-height: 1.55;
}
.pricing-faq {
    max-width: 760px;
    margin: 60px auto 0;
}

.license-box {
    background: var(--bg-inset);
    border: 1px solid var(--brass);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin: 32px auto;
}
.license-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--text-gold);
    margin-bottom: 14px;
}
.license-key {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--text-parchment);
    background: var(--bg-deepest);
    padding: 12px 20px;
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    user-select: all;
    letter-spacing: 0.05em;
}
.license-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text-parchment);
    background: var(--bg-deepest);
    padding: 12px 16px;
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 8px;
}
.license-input:focus {
    outline: none;
    border-color: var(--brass);
}

/* ================================================================
   Legal pages (privacy, terms) — tall text column, indexable headings
   ================================================================ */

.legal-page h1.section-title { font-size: 36px; }

.legal-page h2 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-gold);
    margin: 48px 0 12px;
}

.legal-page h2:first-of-type { margin-top: 32px; }

.legal-page p,
.legal-page ul {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-parchment);
    margin: 0 0 14px;
}

.legal-page ul { padding-left: 22px; }
.legal-page li { margin: 0 0 8px; }
.legal-page strong { color: var(--text-gold); }
.legal-page em { color: var(--text-parchment); font-style: italic; }
.legal-page a { border-bottom: 1px dotted var(--brass); }
.legal-page a:hover { border-bottom-color: var(--rare); }

.legal-updated {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
    margin: 0 0 32px;
}

.legal-intro {
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.7;
    padding: 20px 24px;
    border-left: 3px solid var(--brass);
    background: var(--bg-panel);
    margin-bottom: 40px !important;
}

.legal-footer-note {
    font-size: 13px !important;
    color: var(--text-faint) !important;
    margin-top: 56px !important;
    padding-top: 24px;
    border-top: 1px solid var(--chrome-border);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
