/* ============================================================
   EverydayEarth — Theme System
   Light (nature-inspired) + Dark (cosmic) with CSS custom props
   ============================================================ */

/* ---------- Self-hosted Mulish variable font ----------
   Eliminates the 750ms render-blocking Google Fonts request.
   Only latin + latin-ext subsets; browser uses unicode-range
   to download only the file it needs.
   -------------------------------------------------------*/
/* latin-ext */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin-ext */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin-ext */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin-ext */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/mulish-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;
}
/* latin */
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/mulish-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;
}

/* ---------- Light theme (default) ---------- */
:root,
[data-theme="light"] {
    --bg: #f7f5f0;
    --bg-elev: #ffffff;
    --bg-subtle: #efeде7;
    --card: #ffffff;
    --card-hover: #f9f8f5;
    --card-border: #e2ddd4;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --muted: #6b6b6b;
    --muted-dim: #9a9a9a;
    --primary: #2d6a1e;
    --primary-hover: #3d8a2e;
    --primary-light: #e8f5e3;
    --primary-text: #ffffff;
    --accent: #c97b1a;
    --accent-light: #fef5e7;
    --link: #2d6a1e;
    --link-hover: #1e4a12;
    --border: #e2ddd4;
    --border-light: #f0ece4;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.04);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: #e2ddd4;
    --footer-bg: #2c2c2c;
    --footer-text: #d4d4d4;
    --hero-gradient: linear-gradient(160deg, #e8f5e3 0%, #f7f5f0 40%, #fef5e7 100%);
    --section-alt: #f0ece4;
    --badge-bg: #e8f5e3;
    --badge-text: #2d6a1e;
    --input-bg: #ffffff;
    --input-border: #d4cfc6;
    --input-focus: #2d6a1e;
    --tag-bg: #f0ece4;
    --tag-text: #4a4a4a;
    --success: #2d6a1e;
    --warning: #c97b1a;
    --error: #b33a3a;
    --info: #2a6496;
    --overlay: rgba(0, 0, 0, 0.3);
    --surface: #ffffff;
    --surface-alt: #f5f3ee;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
    --space-11: 80px;
    --space-12: 96px;
    --max-width: 1200px;
    --max-width-narrow: 800px;
    --font-sans: 'Mulish', system-ui, -apple-system, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --transition: 0.2s ease;
    --transition-slow: 0.4s ease;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
    --bg: #0f1020;
    --bg-elev: #17182c;
    --bg-subtle: #1a1b30;
    --card: #1e1f36;
    --card-hover: #252744;
    --card-border: #2a2b48;
    --text: #f6f7fb;
    --text-secondary: #cfd3ff;
    --muted: #8b8fb0;
    --muted-dim: #5c5f80;
    --primary: #7459fe;
    --primary-hover: #8a72ff;
    --primary-light: rgba(116, 89, 254, 0.15);
    --primary-text: #ffffff;
    --accent: #71d9ff;
    --accent-light: rgba(113, 217, 255, 0.12);
    --link: #a08eff;
    --link-hover: #c4b8ff;
    --border: #2a2b48;
    --border-light: #1e1f36;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25);
    --nav-bg: rgba(15, 16, 32, 0.92);
    --nav-border: #1e1f36;
    --footer-bg: #0a0b18;
    --footer-text: #8b8fb0;
    --hero-gradient: radial-gradient(1200px 600px at 20% -10%, rgba(116, 89, 254, 0.18), transparent 60%),
    radial-gradient(1000px 600px at 110% 10%, rgba(113, 217, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #0e0f1e 0%, #0f1020 100%);
    --section-alt: #17182c;
    --badge-bg: rgba(116, 89, 254, 0.15);
    --badge-text: #a08eff;
    --input-bg: #1a1b30;
    --input-border: #2a2b48;
    --input-focus: #7459fe;
    --tag-bg: #1e1f36;
    --tag-text: #cfd3ff;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #71d9ff;
    --overlay: rgba(0, 0, 0, 0.6);
    --surface: #1e1f36;
    --surface-alt: #252744;
}

/* ============================================================
   Base Reset & Typography
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    transition: background var(--transition-slow), color var(--transition-slow);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--link-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.section {
    padding: var(--space-9) 0;
}

.section--alt {
    background: var(--section-alt);
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid--4,
    .grid--3,
    .grid--2 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--space-7) 0;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.text-center {
    text-align: center;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-border);
    transition: background var(--transition-slow);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    min-width: 0;
}

.nav__brand {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.nav__brand .material-icons {
    color: var(--primary);
    font-size: 28px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    list-style: none;
}

.nav__link {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: var(--space-2) 0;
    transition: color var(--transition);
    position: relative;
}

.nav__link:hover,
.nav__link--active {
    color: var(--text);
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: var(--space-2);
}

/* Nav divider between auth and public links */
.nav__divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    align-self: center;
    list-style: none;
}

/* Secondary nav links (public pages in auth nav) */
.nav__link--secondary {
    opacity: 0.6;
    font-size: var(--font-size-sm);
}

.nav__link--secondary:hover {
    opacity: 1;
}

.nav__link--secondary.nav__link--active {
    opacity: 1;
}

/* Auth actions (sign out button) */
.nav__auth-actions {
    display: flex;
    align-items: center;
}

.btn--sign-out {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

/* Mobile auth items: hidden on desktop, shown in mobile menu */
.nav__mobile-auth {
    display: none;
    list-style: none;
}

/* "Talk to Us" chat trigger in nav */
.nav__chat,
.nav__mobile-chat {
    list-style: none;
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Mobile navigation */
@media (max-width: 1080px) {
    .nav__inner {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-2);
    }

    .nav__actions {
        gap: var(--space-1);
    }

    .nav__brand {
        font-size: var(--font-size-lg);
    }

    /* All icon buttons: compact & borderless on mobile */
    .nav__search-btn,
    .nav__notif-btn,
    .nav__profile-btn,
    .nav__toggle,
    .theme-toggle {
        width: 36px;
        height: 36px;
        border-color: transparent;
        padding: var(--space-1);
    }

    /* Avatar circle: also borderless on mobile to reduce visual noise */
    .nav__avatar {
        border-color: transparent;
        background: transparent;
    }

    .nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--nav-border);
        padding: var(--space-4) var(--space-6);
        gap: var(--space-3);
        z-index: 100;
    }

    .nav__links--open {
        display: flex;
    }

    .nav__toggle {
        display: block;
    }

    /* Hide desktop sign-in/join and sign-out on mobile */
    .nav__signin-group {
        display: none !important;
    }

    .nav__auth-actions {
        display: none;
    }

    /* Show mobile auth items in the dropdown */
    .nav__mobile-auth {
        display: block;
        padding-top: var(--space-2);
        border-top: 1px solid var(--nav-border);
        margin-top: var(--space-1);
    }

    /* Hide voice-agent widget on mobile; users tap "Talk to Us" nav link instead */
    elevenlabs-convai {
        display: none !important;
    }

    /* Restore when triggered from menu */
    elevenlabs-convai.convai--active {
        display: block !important;
    }

    .btn--sign-out {
        font-size: var(--font-size-sm);
        padding: var(--space-2) var(--space-3);
    }

    .nav__divider {
        width: 100%;
        height: 1px;
        margin: var(--space-2) 0;
    }

    /* Profile dropdown: pin to viewport so it never overflows on mobile.
       The avatar is not the last element (hamburger follows), so absolute
       right:0 bleeds off-screen. Fixed positioning is the reliable fix. */
    .nav__profile-dropdown {
        position: fixed;
        top: 60px;
        right: var(--space-3);
        left: auto;
        width: min(260px, calc(100vw - var(--space-6)));
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .nav__brand {
        font-size: var(--font-size-base);
        max-width: calc(100vw - 200px);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .nav__brand .material-icons {
        font-size: 22px;
    }

    /* Further tighten on very small phones */
    .nav__search-btn,
    .nav__notif-btn,
    .nav__profile-btn,
    .nav__toggle,
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
}

/* ============================================================
   Theme Toggle
   ============================================================ */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all var(--transition);
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* Default (no data-theme set yet) shows moon */
:root:not([data-theme]) .theme-toggle .icon-moon {
    display: block;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--font-size-sm);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    line-height: 1.4;
}

.btn--primary {
    background: var(--primary);
    color: var(--primary-text);
}

.btn--primary:hover {
    background: var(--primary-hover);
    color: var(--primary-text);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn--secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--text);
}

.btn--ghost {
    background: none;
    color: var(--muted);
    padding: var(--space-2) var(--space-4);
}

.btn--ghost:hover {
    color: var(--text);
}

.btn--lg {
    font-size: var(--font-size-base);
    padding: var(--space-4) var(--space-8);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: var(--space-4);
}

.card__icon .material-icons {
    color: var(--primary);
    font-size: 22px;
}

.card__title {
    font-size: var(--font-size-lg);
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.card__text {
    color: var(--muted);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.card--link {
    text-decoration: none;
    display: block;
}

/* Species profile cards (icon + badge inline header) */
.species-profile-card .species-profile-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.species-profile-card .species-profile-card__header .card__icon {
    margin-bottom: 0;
}

.species-profile-card .card__title {
    margin-bottom: var(--space-2);
}

.species-profile-card .card__text {
    margin-bottom: var(--space-4);
}

.species-profile-card .feature-list {
    margin-top: auto;
}

/* Species profile cards with images */
.species-profile-card__image {
    margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 2;
    background: var(--surface-alt);
}

.species-profile-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.species-profile-card:hover .species-profile-card__image img {
    transform: scale(1.04);
}

.species-profile-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.species-profile-card__placeholder .material-icons {
    font-size: 48px;
    color: var(--border);
}

.species-profile-card:has(.species-profile-card__image) {
    display: flex;
    flex-direction: column;
}

.species-profile-card__body {
    flex: 1;
}

.species-profile-card__body .card__title {
    margin-top: var(--space-4);
}

a.species-profile-card {
    color: inherit;
}

/* Stats row pinned to bottom of card */
.species-profile-card__stats {
    list-style: none;
    padding: var(--space-3) 0 0;
    margin: auto 0 0;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: row;
    gap: 0;
}

.species-profile-card__stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-1);
    flex: 1;
    padding: 0 var(--space-2);
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.3;
    min-width: 0;
}

.species-profile-card__stats li + li {
    border-left: 1px solid var(--card-border);
}

.species-profile-card__stats .material-icons {
    font-size: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

/* Featured species carousel */
.featured-species-carousel {
    position: relative;
}

.featured-species-carousel__track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

@media (max-width: 768px) {
    .featured-species-carousel__track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--space-4);
        padding-bottom: var(--space-2);
    }

    .featured-species-carousel__track::-webkit-scrollbar {
        display: none;
    }

    .featured-species-carousel__track > .species-profile-card {
        flex: 0 0 80%;
        max-width: 300px;
        scroll-snap-align: center;
    }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    background: var(--hero-gradient);
    padding: var(--space-9) 0 var(--space-8);
    text-align: center;
}

.hero__tagline {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: var(--space-5);
}

.hero__title {
    font-size: clamp(1.6rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.hero__phrase {
    white-space: nowrap;
}

.hero__title-break {
    display: none;
}

@media (min-width: 600px) {
    .hero__title-break {
        display: block;
    }
}

.hero__subtitle {
    font-size: var(--font-size-lg);
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto var(--space-6);
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        justify-content: center;
        width: 100%;
    }

    /* Soft-CTA button pairs (build, learn, about, connect, explore, pricing, etc.) */
    .section .text-center > div {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .section .text-center > div > .btn {
        justify-content: center;
        width: 100%;
    }

    /* Center standalone buttons in section containers on mobile */
    .section .btn:not(.hero__actions .btn):not(.text-center .btn) {
        display: flex;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
}

