/* ============================================================
   ControlAltProtect — Launch Page Stylesheet
   Light mode default · Dark mode via [data-theme="dark"] on <html>
   ============================================================ */

/* ── Self-hosted fonts ── */

/* DM Sans — latin-ext subset (weights 300–700, variable) */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* DM Sans — latin subset (weights 300–700, variable) */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Space Grotesk — vietnamese subset (weights 400–700, variable) */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Space Grotesk — latin-ext subset (weights 400–700, variable) */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — latin subset (weights 400–700, variable) */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* ── CSS Custom Properties ── */
:root {
    /* Light mode (default) */
    --bg-primary:    #ffffff;
    --bg-secondary:  #f4f7fb;
    --bg-card:       #ffffff;
    --bg-hero:       #eef3fc;
    --text-primary:  #0a1628;
    --text-secondary:#2d3a52;
    --text-muted:    #6b7a99;
    --accent-green:  #2ecc40;
    --accent-blue:   #1565c0;
    --gradient:      linear-gradient(135deg, #2ecc40 0%, #1565c0 100%);
    --border:        #dde4f0;
    --card-shadow:   0 2px 20px rgba(21, 101, 192, 0.09);
    --topbar-bg:     rgba(255, 255, 255, 0.97);
    --topbar-border: #dde4f0;
    --toggle-bg:     #0a1628;
    --toggle-fg:     #ffffff;
    --mmr-bg:        var(--bg-primary);
    --divider:       #dde4f0;
    --stat-bg:       #eef3fc;
}

[data-theme="dark"] {
    --bg-primary:    #050a14;
    --bg-secondary:  #0a1628;
    --bg-card:       #0f1f3d;
    --bg-hero:       #0a1628;
    --text-primary:  #f0f4ff;
    --text-secondary:#a0b0c8;
    --text-muted:    #6a7f9a;
    --border:        #1e3a5f;
    --card-shadow:   0 2px 20px rgba(0, 0, 0, 0.45);
    --topbar-bg:     rgba(5, 10, 20, 0.97);
    --topbar-border: #1e3a5f;
    --toggle-bg:     #2ecc40;
    --toggle-fg:     #050a14;
    --mmr-bg:        var(--bg-card);
    --divider:       #1e3a5f;
    --stat-bg:       #0f1f3d;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

[data-theme="dark"] a {
    color: var(--accent-green);
}

a:hover {
    text-decoration: underline;
}

/* ── Skip to main content (keyboard accessibility) ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    background: var(--accent-blue);
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    text-decoration: none;
}

[data-theme="dark"] .skip-link {
    background: var(--accent-green);
    color: #050a14;
}

/* ── Topbar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s, border-color 0.3s;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-logo {
    height: 48px;
    width: auto;
    display: block;
    transition: opacity 0.2s;
}

/* ── Logo cards ── */
.logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 6px 14px;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .logo-card {
    background: rgba(15, 31, 61, 0.7);
    border: 1px solid #1e3a5f;
}

.logo-card--hero {
    display: flex;
    width: fit-content;
    border-radius: 24px;
    padding: 0;
    margin: 0 auto 36px;
}

[data-theme="dark"] .logo-card--hero {
    padding: 20px 28px;
    box-shadow: 0 8px 40px rgba(46, 204, 64, 0.15);
    background: rgba(15, 31, 61, 0.8);
}

img.logo-mode-light { display: block; }
img.logo-mode-dark  { display: none;  }

[data-theme="dark"] img.logo-mode-light { display: none;  }
[data-theme="dark"] img.logo-mode-dark  { display: block; }

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--toggle-bg);
    color: var(--toggle-fg);
    border: none;
    border-radius: 50px;
    padding: 9px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.15s;
    white-space: nowrap;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ── Hero ── */
.hero {
    background: var(--bg-hero);
    text-align: center;
    padding: 80px 24px 88px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(46, 204, 64, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(21, 101, 192, 0.07) 0%, transparent 50%);
    pointer-events: none;
}

.hero-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

.hero-logo {
    width: 180px;
    display: block;
}

.hero-eyebrow {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 18px;
    transition: color 0.3s;
}

[data-theme="dark"] .hero-eyebrow {
    color: var(--accent-green);
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-body {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-contact {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero-contact a {
    font-weight: 600;
    color: var(--accent-blue);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
}

[data-theme="dark"] .hero-contact a {
    color: var(--accent-green);
}

/* ── Section shared styles ── */
.section {
    padding: 80px 24px;
    transition: background 0.3s;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 12px;
    transition: color 0.3s;
}

[data-theme="dark"] .section-label {
    color: var(--accent-green);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* ── What We Do — Cards ── */
.wwd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.wwd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--card-shadow);
    transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.wwd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(21, 101, 192, 0.14);
}

[data-theme="dark"] .wwd-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.wwd-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.wwd-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.wwd-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Mason Maggio Racing ── */
.mmr {
    background: var(--mmr-bg);
    transition: background 0.3s;
}

.mmr-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.mmr-logo {
    height: 52px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.85)) drop-shadow(0 1px 4px rgba(0,0,0,0.55));
}

[data-theme="dark"] .mmr-logo {
    filter: brightness(1.1);
}

.mmr-headline-group {
    flex: 1;
}

.mmr-section-title {
    margin-bottom: 0;
}

/* ── Announcement block ── */
.mmr-announcement {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--accent-blue);
    transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] .mmr-announcement {
    border-top-color: var(--accent-green);
}

.mmr-announcement-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 14px;
}

[data-theme="dark"] .mmr-announcement-label {
    color: var(--accent-green);
}

.mmr-announcement p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

.mmr-upcoming {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-blue);
}

[data-theme="dark"] .mmr-upcoming {
    border-left-color: var(--accent-green);
}

.mmr-upcoming-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 8px;
}

[data-theme="dark"] .mmr-upcoming-label {
    color: var(--accent-green);
}

.mmr-upcoming ul {
    list-style: none;
    padding: 0;
}

.mmr-upcoming li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 6px 0;
    border-bottom: 1px solid var(--divider);
}

.mmr-upcoming li:last-child {
    border-bottom: none;
}

.mmr-upcoming li strong {
    color: var(--text-primary);
}

.mmr-pr-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.2s;
}

.mmr-pr-link:hover {
    opacity: 0.75;
    text-decoration: none;
}

[data-theme="dark"] .mmr-pr-link {
    color: var(--accent-green);
}

/* ── Car photo inside announcement block ── */
.mmr-car-photo {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--card-shadow);
    margin: 20px 0;
}

.mmr-stats-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.mmr-bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
    align-items: start;
}

.mmr-bio h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.mmr-bio p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.mmr-bio p:last-child {
    margin-bottom: 0;
}

/* Career stats */
.mmr-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mmr-stat {
    background: var(--stat-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: background 0.3s, border-color 0.3s;
}

.mmr-stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 6px;
}

.mmr-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}

/* Wide stat card — 5th card spans both grid columns */
.mmr-stat--wide {
    grid-column: 1 / -1;
}

/* Parallel section */
.mmr-parallel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    margin-bottom: 48px;
    box-shadow: var(--card-shadow);
    transition: background 0.3s, border-color 0.3s;
}

.mmr-parallel h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.mmr-parallel p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.mmr-parallel .mmr-campaign-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

[data-theme="dark"] .mmr-parallel .mmr-campaign-label {
    color: var(--accent-green);
}

.mmr-pillars {
    list-style: none;
    padding: 0;
    margin: 24px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mmr-pillars li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 18px;
    border-left: 3px solid var(--accent-blue);
}

[data-theme="dark"] .mmr-pillars li {
    border-left-color: var(--accent-green);
}

.pillar-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pillar-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.mmr-quote {
    margin: 28px 0 16px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--accent-blue);
}

[data-theme="dark"] .mmr-quote {
    border-left-color: var(--accent-green);
}

.mmr-quote p {
    font-style: italic;
    font-size: 0.97rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.7;
}

.mmr-quote footer {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent-blue);
}

[data-theme="dark"] .mmr-quote footer {
    color: var(--accent-green);
}

.mmr-parallel .mmr-ceo-attribution {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 18px;
    border-left: 3px solid var(--border);
    font-style: italic;
}

/* Photo + CTA row */
.mmr-bottom {
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.mmr-race-video {
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    max-width: 560px;
    max-height: 420px;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.mmr-cta-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    flex-shrink: 0;
}

.mmr-cta-group p {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 220px;
    line-height: 1.6;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient);
    color: #ffffff;
    border-radius: 50px;
    padding: 14px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    text-decoration: none;
    color: #ffffff;
}

[data-theme="dark"] .btn-primary:hover {
    color: #ffffff;
}

/* ── Footer ── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--divider);
    text-align: center;
    padding: 28px 24px;
    transition: background 0.3s, border-color 0.3s;
}

.footer p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.social-link:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

[data-theme="dark"] .social-link:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #050a14;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ── Responsive ── */

/* ── Tablet / large phone (≤900px) ── */
@media (max-width: 900px) {
    .mmr-bio-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .mmr-bottom {
        grid-template-columns: 1fr;
    }

    .mmr-race-video {
        max-width: 100%;
        max-height: 320px;
    }

    .mmr-cta-group {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .mmr-cta-group p {
        max-width: none;
    }
}

/* ── Small tablet / large phone (≤600px) ── */
@media (max-width: 600px) {
    .hero {
        padding: 48px 20px 56px;
    }

    .hero-logo {
        width: 140px;
        height: auto;
    }

    .hero-body {
        font-size: 1rem;
    }

    .section {
        padding: 48px 20px;
    }

    .section-subtitle {
        font-size: 0.97rem;
        margin-bottom: 32px;
    }

    .topbar-inner {
        padding: 12px 20px;
    }

    .topbar-logo {
        height: 38px;
    }

    .theme-toggle {
        padding: 8px 14px;
        font-size: 0.82rem;
        min-height: 44px;
    }

    .btn-primary {
        min-height: 44px;
    }

    .wwd-grid {
        grid-template-columns: 1fr;
    }

    .wwd-card {
        padding: 24px 20px;
    }

    .mmr-stats {
        grid-template-columns: 1fr 1fr;
    }

    .mmr-parallel {
        padding: 24px 20px;
    }

    .mmr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mmr-announcement {
        padding: 24px 20px;
    }

    .mmr-cta-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── ≤430px ── */
@media (max-width: 430px) {
    .hero {
        padding: 40px 18px 48px;
    }

    .hero-logo {
        width: 120px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-body {
        font-size: 0.97rem;
    }

    .hero-contact {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .section {
        padding: 40px 18px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .topbar-inner {
        padding: 10px 18px;
    }

    .topbar-logo {
        height: 34px;
    }

    .mmr-logo {
        height: 40px;
    }

    .mmr-stat-label {
        font-size: 0.75rem;
    }

    .mmr-parallel {
        padding: 20px 16px;
    }

    .mmr-quote {
        padding: 16px 18px;
    }

    .mmr-pillars li {
        padding-left: 14px;
    }

    .mmr-race-video {
        max-height: 260px;
        border-radius: 10px;
    }

    .mmr-cta-group p {
        font-size: 0.9rem;
    }

    .mmr-announcement {
        padding: 20px 16px;
    }
}

/* ── ≤390px ── */
@media (max-width: 390px) {
    .hero {
        padding: 40px 16px 48px;
    }

    .hero h1 {
        font-size: 1.95rem;
    }

    .section {
        padding: 40px 16px;
    }

    .hero-contact a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* ── ≤375px ── */
@media (max-width: 375px) {
    .topbar-logo {
        height: 30px;
    }

    .toggle-label {
        display: none;
    }

    .theme-toggle {
        padding: 8px 12px;
        gap: 0;
    }

    .hero {
        padding: 36px 16px 44px;
    }

    .hero-logo {
        width: 110px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 36px 16px;
    }

    .mmr-stats {
        grid-template-columns: 1fr;
    }

    .mmr-stat {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding: 14px 16px;
    }

    .mmr-stat-number {
        font-size: 1.6rem;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .mmr-parallel {
        padding: 18px 14px;
    }

    .mmr-announcement {
        padding: 18px 14px;
    }

    .mmr-quote {
        padding: 12px 14px;
    }

    .mmr-pillars li {
        padding-left: 12px;
    }

    .logo-card {
        padding: 4px 10px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ── 404 Error Page ── */
.error-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background: var(--bg-hero);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.error-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(46, 204, 64, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(21, 101, 192, 0.07) 0%, transparent 50%);
    pointer-events: none;
}

.error-inner {
    max-width: 560px;
    width: 100%;
    position: relative;
}

.error-code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(6rem, 22vw, 11rem);
    font-weight: 700;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -6px;
    margin-bottom: 4px;
}

.error-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.error-body {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* ── Risk Data Section ── */

.risk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.risk-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.risk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(21, 101, 192, 0.14);
}

[data-theme="dark"] .risk-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.risk-card-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.35;
    transition: color 0.3s;
}

/* ── Donut chart container ── */
.risk-chart-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.risk-chart-wrap--donut {
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
}

.risk-chart-wrap--donut.risk-chart-wrap--sm {
    width: 110px;
    height: 110px;
    margin: 0 auto 8px;
}

.risk-chart-wrap--bar {
    height: 140px;
}

/* Center label inside donut */
.risk-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.risk-donut-pct {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    transition: color 0.3s;
}

.risk-donut-pct--sm {
    font-size: 1.1rem;
}

.risk-donut-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 2px;
    transition: color 0.3s;
}

/* Paired donuts (third-party card) */
.risk-donut-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.risk-donut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.risk-donut-arrow {
    font-size: 1.6rem;
    color: var(--accent-green);
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
    margin-bottom: 28px;
}

.risk-donut-year {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    transition: color 0.3s;
}

/* ── Progress bar (Card 4) ── */
.risk-progress-wrap {
    margin-bottom: 16px;
}

.risk-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.risk-progress-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.risk-progress-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(21, 101, 192, 0.1);
    border-radius: 20px;
    padding: 3px 10px;
    transition: color 0.3s, background 0.3s;
}

[data-theme="dark"] .risk-progress-badge {
    color: var(--accent-green);
    background: rgba(46, 204, 64, 0.12);
}

.risk-progress-track {
    position: relative;
    height: 20px;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: visible;
    border: 1px solid var(--border);
    margin-bottom: 34px;
}

.risk-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1565c0 0%, #2ecc40 100%);
    border-radius: 20px;
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.risk-progress-tip {
    position: absolute;
    right: -1px;
    top: calc(100% + 6px);
    background: var(--accent-green);
    color: #050a14;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease 1s;
}

.risk-progress-fill.is-animated .risk-progress-tip {
    opacity: 1;
}

.risk-progress-caption {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.55;
    transition: color 0.3s;
}

/* ── Animated counters (Card 6) ── */
.risk-counters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.risk-counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.risk-counter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.risk-counter--us {
    background: linear-gradient(135deg, #2ecc40 0%, #1565c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.risk-counter--global {
    color: var(--text-secondary);
}

.risk-counter-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s;
}

.risk-counter-divider {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 20px;
}

/* ── Shared card footer elements ── */
.risk-card-takeaway {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: auto;
    padding-top: 12px;
    transition: color 0.3s;
}

.risk-source {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
    transition: color 0.3s;
}

.risk-footer-note {
    margin-top: 36px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.7;
    transition: color 0.3s;
}

.risk-footer-note a {
    font-weight: 600;
}

/* ── Risk grid responsive ── */
@media (max-width: 900px) {
    .risk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .risk-grid {
        grid-template-columns: 1fr;
    }

    .risk-chart-wrap--donut {
        width: 140px;
        height: 140px;
    }

    .risk-donut-pct {
        font-size: 1.5rem;
    }
}

/* ── Reduced motion accessibility ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    html {
        scroll-behavior: auto;
    }
}
