:root {
    /* Home (gold standard) */
    --hero-logo-top: 72px;
    --hero-logo-top-mobile: 52px;
    --hero-logo-pill-width: 280px;
    --hero-logo-pill-height: 70px;

    /* Pages (visually aligned to Home) */
    --page-logo-top: 82px;
    --page-logo-top-mobile: 60px;
    --page-logo-pill-width: 250px;
    --page-logo-pill-height: 62px;

    --bg: #f6fbff;
    --surface: #ffffff;
    --surface-alt: #ebf6ff;
    --text: #183446;
    --muted: #5b7485;
    --line: #d8e8f3;
    --primary: #0e7cc0;
    --primary-dark: #0b6096;
    --shadow: 0 18px 40px rgba(19, 66, 97, 0.08);
    --radius: 20px;
    --container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: linear-gradient(180deg, #f7fcff 0%, #edf8ff 100%);
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f7fcff 0%, #edf8ff 100%);
    line-height: 1.6;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 2rem), 760px);
    margin: 0 auto;
}

main {
    min-height: calc(100vh - 76px);
    background: transparent;
}

.section {
    padding: 4.5rem 0;
    background: transparent;
}

.section-alt,
.section-soft,
.cta-band {
    background: rgba(255, 255, 255, 0.55);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(216, 232, 243, 0.9);
}

.page-app .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 200;
}

.page-app main {
    padding-top: 76px;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 76px;
    gap: 1rem;
    position: relative;
}

.brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.brand span {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    order: 3;
    min-width: 120px;
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(14, 124, 192, 0.18);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(12, 44, 70, 0.14);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    flex: 0 0 46px;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.back-arrow img {
    width: 20px;
    height: 20px;
}

.back-arrow:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(12, 44, 70, 0.18);
    background: #ffffff;
}

.back-arrow:active {
    transform: scale(0.96);
}

.back-arrow:focus-visible {
    outline: 3px solid rgba(15, 154, 212, 0.25);
    outline-offset: 3px;
}

.back-arrow-hidden {
    visibility: hidden !important;
    pointer-events: none;
}

.primary-nav {
    display: flex;
    justify-content: center;
    gap: 1.15rem;
    align-items: center;
    order: 2;
}

.primary-nav a {
    color: var(--text);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 0.68rem 1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.page-hero {
    padding: 2.2rem 0 1.4rem;
    background: transparent;
}

.page-hero h1 {
    margin-bottom: 0.6rem;
}

.page-hero p {
    margin-bottom: 0;
}

.hero {
    padding: 0;
}

.hero-grid,
.two-col,
.why-grid,
.cta-band-inner {
    display: grid;
    gap: 2rem;
}

.hero-grid {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: center;
}

.two-col,
.why-grid,
.cta-band-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.08;
    margin: 0 0 1rem;
}

.hero-copy,
.page-hero p {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 60ch;
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-visual {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: flex-start;
    padding: calc(76px + 0.2rem) 0 3rem;
    background:
        linear-gradient(rgba(10, 40, 64, 0.42), rgba(10, 40, 64, 0.42)),
        url('/assets/images/hero.jpg') center center / cover no-repeat;
}

.hero-grid-single {
    grid-template-columns: 1fr;
}

.hero-visual .container,
.hero-visual .container.hero-grid-single,
.hero-visual .hero-grid,
.hero-visual .hero-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
    background: transparent !important;
    box-shadow: none !important;
}

.hero-visual .container {
    padding-top: 0;
}

.hero-panel {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: center;
}

.hero-visual .eyebrow,
.hero-visual .hero-title,
.hero-visual .hero-title span,
.hero-visual .hero-copy {
    color: #ffffff !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.hero-visual .hero-copy,
.hero-visual .hero-title,
.hero-visual .eyebrow,
.hero-visual .hero-actions {
    position: relative;
    left: 0;
    right: 0;
}

.hero-title {
    margin: 0 auto 0.8rem;
    text-align: center;
}

.hero-title span,
.hero-line {
    display: block;
}

.hero-line-indent,
.hero-title .indent {
    display: block;
    margin-left: 1.15em;
}

.hero-copy {
    margin: 0 auto;
    max-width: 36rem;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.hero-actions,
.home-intro-actions,
.card-actions,
.cta-band-actions,
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.45rem;
}

.hero-actions .button,
.home-intro-actions .button,
.home-hero-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.78rem 1.18rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
}

.hero-visual .button,
.home-intro-actions .button {
    background-image: none !important;
}

.hero-visual .button-primary,
.home-intro-actions .button-primary,
.hero-actions .button-primary,
.home-hero-actions .button.button-primary,
.home-hero-actions .button.button-primary:visited {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary) !important;
}

.hero-visual .button-primary:hover,
.home-intro-actions .button-primary:hover,
.hero-actions .button-primary:hover,
.home-hero-actions .button.button-primary:hover {
    background: var(--primary-dark) !important;
    color: #ffffff !important;
    border-color: var(--primary-dark) !important;
}

.hero-visual .button-secondary,
.home-intro-actions .button-secondary,
.hero-actions .button-secondary,
.home-hero-actions .button.button-secondary,
.home-hero-actions .button.button-secondary:visited {
    background: #eef8ff !important;
    color: var(--text) !important;
    border: 1px solid #cfe4f2 !important;
}

.hero-visual .button-secondary:hover,
.home-intro-actions .button-secondary:hover,
.hero-actions .button-secondary:hover,
.home-hero-actions .button.button-secondary:hover {
    background: #e7f5ff !important;
    color: var(--text) !important;
    border-color: #b7d8ec !important;
}

.hero-card,
.panel,
.info-card,
.category-card,
.operator-card,
.notice,
.contact-form,
.faq-item,
.steps-card {
    background: var(--surface);
    border: 1px solid rgba(216, 232, 243, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.panel,
.contact-form,
.notice,
.steps-card {
    padding: 1.5rem;
}

.info-card,
.category-card,
.operator-card,
.faq-item {
    padding: 1.4rem;
}

.hero-points,
.mini-list,
.check-list,
.footer-grid ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
}

.hero-note {
    margin-top: 1rem;
    color: var(--muted);
}

.section-heading {
    margin-bottom: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.section-heading h2,
.two-col h2,
.why-grid h2,
.page-hero h1,
.cta-band h2 {
    margin: 0.2rem 0 0.7rem;
}

.card-grid,
.category-grid,
.operator-grid,
.faq-list,
.footer-grid {
    display: grid;
    gap: 1.25rem;
}

.card-grid,
.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.operator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-list {
    grid-template-columns: 1fr;
}

.text-link {
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.72rem 1.08rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.button-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.button-secondary:hover {
    background: var(--surface-alt);
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #dff2ff;
    color: var(--primary-dark);
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-soft {
    background: #eef5fa;
    color: var(--muted);
}

.pill-featured,
.pill-partner {
    background: #0e7cc0;
    color: #ffffff;
}

.pill-verified {
    background: #e6f7eb;
    color: #156b33;
}

.operator-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.operator-card-featured {
    border-color: #b6d7eb;
    box-shadow: 0 20px 42px rgba(14, 124, 192, 0.10);
}

.operator-card-coming-soon {
    border-style: dashed;
}

.operator-card-coming-soon .button-primary {
    display: none;
}

.operator-details {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.96rem;
}

.operator-details strong {
    color: var(--text);
}

.step-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.step-item + .step-item {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid #c8ddeb;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #8fc5e6;
    box-shadow: 0 0 0 4px rgba(14, 124, 192, 0.08);
}

.contact-form textarea {
    resize: vertical;
    min-height: 180px;
}

.notice.success {
    border-color: #b9e4c7;
    background: #f3fff6;
}

.notice.error {
    border-color: #efc1c1;
    background: #fff5f5;
}

.prose p,
.prose ul {
    color: var(--muted);
}

.site-footer {
    padding: 3rem 0 1.6rem;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr;
}

.footer-grid h3 {
    margin-top: 0;
}

.footer-grid ul {
    margin-top: 0.6rem;
}

.footer-bottom {
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.category-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.category-note strong {
    color: var(--text);
}

.category-note span {
    color: var(--muted);
}

.hero-summary-card h2 {
    margin-top: 0;
}

.hero-summary-card .hero-note {
    margin-bottom: 0;
}

.mini-category-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.mini-category-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: #ffffff;
}

.mini-category-item:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.mini-category-item span {
    color: var(--muted);
    font-size: 0.95rem;
}

.check-list li + li {
    margin-top: 0.5rem;
}

.hero-points,
.home-check-list,
.hero-summary-card,
.mini-category-list,
.hero-note {
    display: none !important;
}

.home-intro,
.home-intro-copy,
.section-compact-top,
.page-hero {
    background: transparent !important;
}

.home-intro-copy {
    text-align: center;
}

.home-intro-copy .muted {
    max-width: 42rem;
    margin: 0 auto;
}

.section-compact-top {
    padding-top: 2rem;
}

.home-hero {
    position: relative;
    min-height: 64vh;
    padding: calc(76px + 1rem) 0 3rem;
    background:
        linear-gradient(rgba(9, 35, 56, 0.34), rgba(9, 35, 56, 0.38)),
        url('/assets/images/hero.jpg') center center / cover no-repeat;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 28, 45, 0.12) 0%, rgba(8, 28, 45, 0.22) 100%);
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.home-hero-copy,
.home-hero-copy h1,
.home-hero-copy p,
.home-hero-copy span,
.home-hero-copy div,
.home-hero-copy * {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.home-hero-copy {
    width: min(100%, 900px);
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.home-hero-kicker {
    margin: 0 0 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.home-hero-title {
    margin: 0 auto 0.95rem;
    color: #ffffff !important;
    font-size: clamp(2.5rem, 6vw, 5.2rem);
    line-height: 1.02;
    max-width: 11ch;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
}

.home-hero-line {
    display: block;
}

.home-hero-line-indent {
    margin-left: 1.08em;
}

.home-hero-text {
    margin: 0 auto;
    max-width: 44rem;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #ffffff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.home-category-strip {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    background: transparent;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
    background: transparent;
}

.home-category-card,
.home-category-card:visited {
    display: grid !important;
    gap: 0.45rem;
    padding: 1.05rem 1.1rem;
    text-decoration: none;
    background: var(--surface) !important;
    border: 1px solid rgba(216, 232, 243, 0.95) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow) !important;
    color: var(--text) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(14, 124, 192, 0.12);
    border-color: #b9d9ec;
    color: var(--text);
}

.home-category-card strong,
.home-category-card span {
    display: block;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.home-category-card strong {
    font-size: 1rem;
    color: var(--text);
}

.home-category-card span {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

@media (min-width: 761px) {
    .hero-visual {
        padding-top: calc(76px - 0.15rem);
    }

    .hero-visual,
    .hero-visual .container,
    .hero-visual .hero-grid,
    .hero-visual .hero-grid-single,
    .hero-visual .hero-panel,
    .hero-visual .hero-title,
    .hero-visual .hero-copy,
    .hero-visual .eyebrow {
        background-color: transparent !important;
    }

    .hero-visual .button-primary,
    .hero-visual .button-primary:visited {
        background: var(--primary) !important;
        color: #ffffff !important;
    }

    .hero-visual .button-secondary,
    .hero-visual .button-secondary:visited {
        background: #eef8ff !important;
        color: var(--text) !important;
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .two-col,
    .why-grid,
    .cta-band-inner,
    .category-grid,
    .operator-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 560px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-app .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .page-app main {
        padding-top: 76px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .header-actions {
        gap: 0.45rem;
        min-width: 108px;
    }

    .primary-nav {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
        z-index: 60;
    }

    .primary-nav.open {
        display: flex;
    }

    .primary-nav a {
        display: block;
        width: 100%;
        padding: 0.8rem 0.5rem;
    }

    .page-hero,
    .section {
        padding: 3.5rem 0;
    }

    .hero-visual,
    .home-hero {
        min-height: 500px;
        padding: calc(76px + 0.95rem) 0 2rem;
    }

    .hero h1 {
        font-size: clamp(1.7rem, 5vw, 3rem);
    }

    .hero-actions .button {
        min-height: 42px;
        padding: 0.68rem 0.95rem;
        font-size: 0.89rem;
    }

    .back-arrow {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .back-arrow img {
        width: 18px;
        height: 18px;
    }

    .menu-toggle {
        padding: 0.68rem 0.95rem;
    }

    .hero-line-indent,
    .hero-title .indent,
    .home-hero-line-indent {
        margin-left: 0.76em;
    }

    .home-hero-title {
        font-size: clamp(2rem, 9vw, 3.2rem);
        max-width: 100%;
    }

    .home-hero-text {
        font-size: 1rem;
        max-width: 32rem;
    }

    .home-category-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    .home-category-card,
    .home-category-card:visited {
        padding: 1rem 1rem !important;
        border-radius: 16px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(216, 232, 243, 1) !important;
        box-shadow: 0 14px 30px rgba(19, 66, 97, 0.10) !important;
    }

    .home-category-card strong {
        font-size: 0.98rem;
    }

    .home-category-card span {
        font-size: 0.92rem;
        line-height: 1.4;
    }
}

@media (max-width: 420px) {
    .hero-actions .button {
        font-size: 0.84rem;
        padding: 0.64rem 0.84rem;
    }

    .hero-card,
    .panel,
    .contact-form,
    .notice,
    .steps-card {
        padding: 1.2rem;
    }

    .info-card,
    .category-card,
    .operator-card,
    .faq-item {
        padding: 1.15rem;
    }
}


/* Final hero title balance */
.home-hero-title {
    display: inline-block;
    text-align: left;
    max-width: none !important;
}

.home-hero-line {
    display: block;
}

.home-hero-line-indent {
    display: block;
    padding-left: 1.6em;
    white-space: nowrap;
}



/* HERO LOGO FINAL (VARIABLE CONTROLLED) */

.home-hero-logo-wrap {
    position: absolute;
    top: var(--hero-logo-top);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.home-hero-logo-pill {
    width: var(--hero-logo-pill-width);
    height: var(--hero-logo-pill-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    border-radius: 999px;
    box-shadow:
        0 10px 30px rgba(8, 28, 45, 0.18),
        0 0 12px rgba(255, 255, 255, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.70);
}

.home-hero-logo {
    width: 100%;
    height: auto;
    display: block;
    transform: translateY(var(--hero-logo-offset-y));
    opacity: 0;
    animation: heroLogoFade 1.6s ease-out forwards;
}

@keyframes heroLogoFade {
    0% {
        opacity: 0;
        transform: translateY(calc(var(--hero-logo-offset-y) - 6px)) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(var(--hero-logo-offset-y)) scale(1);
    }
}

.home-hero-inner {
    position: relative;
    z-index: 3;
    padding-top: 64px;
}

.home-hero-actions {
    margin-top: 1.8rem;
}

@media (max-width: 760px) {
    .home-hero-logo-wrap {
        top: var(--hero-logo-top-mobile);
    }

    .home-hero-logo-pill {
        width: min(210px, 62vw);
        height: 52px;
    }

    .home-hero-logo {
        transform: translateY(var(--hero-logo-offset-y-mobile));
    }

    .home-hero-inner {
        padding-top: 52px;
    }
}


/* GLOBAL PAGE SPACING FINAL */
.page-hero {
    padding: 2.1rem 0 0.85rem !important;
}

.page-hero h1 {
    margin: 0 0 0.7rem !important;
}

.page-hero p {
    margin: 0 !important;
}

.section {
    padding: 2.2rem 0 !important;
}

@media (max-width: 760px) {
    .page-hero {
        padding: 1.8rem 0 0.7rem !important;
    }

    .section {
        padding: 1.9rem 0 !important;
    }
}

/* ABOUT PAGE SPACING FIX */
.page-about .section {
    padding-top: 1.2rem !important;
}

/* TIGHTER SPACING DIRECTLY AFTER PAGE HERO */
.page-hero + .section,
.bb-page-hero-wrap + .section {
    padding-top: 0 !important;
}

@media (max-width: 760px) {
    .page-hero + .section,
    .bb-page-hero-wrap + .section {
        padding-top: 0.15rem !important;
    }
}

/* SHARED BRAND HERO */
.bb-page-hero-wrap {
    padding-top: var(--page-logo-top);
    padding-bottom: 0;
}

.bb-page-hero {
    text-align: center;
    margin: 0 auto 0.12rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.bb-logo-pill {
    width: var(--page-logo-pill-width);
    height: var(--page-logo-pill-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    border-radius: 999px;
    border: 1px solid rgba(14, 124, 192, 0.20);
    box-shadow:
        0 8px 22px rgba(8, 28, 45, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    margin: 0 0 0.25rem;
}

.bb-logo-pill img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

.bb-eyebrow {
    display: inline-block;
    margin: 0 0 0.12rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0c6787;
    font-weight: 700;
}

.bb-title {
    margin: 0 0 0.1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    text-align: center;
}

.bb-subtitle {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.45;
    color: #33566a;
    text-align: center;
}

.bb-subtitle + .bb-subtitle {
    margin-top: 0.35rem;
}

.bb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    margin-top: 1rem;
}

.bb-hero-actions .button {
    min-height: 46px;
}

@media (max-width: 760px) {
    .bb-page-hero-wrap {
        padding-top: var(--page-logo-top-mobile);
        padding-bottom: 0;
    }

    .bb-page-hero {
        min-height: 0;
        margin-bottom: 0.15rem;
    }

    .bb-logo-pill {
        width: min(210px, 62vw);
        height: 52px;
        margin-bottom: 0.25rem;
    }

    .bb-eyebrow {
        margin-bottom: 0.18rem;
    }

    .bb-title {
        font-size: clamp(1.9rem, 8vw, 2.8rem);
        margin-bottom: 0.15rem;
    }

    .bb-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
}





/* =========================
   FINAL PAGE SPACING TWEAKS
   ========================= */

/* Apps: bring first tool card closer to Logout */
.page-app .bb-page-hero-wrap + .section {
    padding-top: 0 !important;
}

/* Contact / About / all page forms and first blocks: pull content upward a bit more */
.bb-page-hero-wrap + .section .container.narrow,
.bb-page-hero-wrap + .section .container {
    margin-top: -0.35rem;
}

/* Categories list page: tighten gap below description and intro block */
.section-heading-centered {
    margin-top: -0.35rem !important;
    margin-bottom: 1rem !important;
}

.section-heading-centered > div {
    max-width: 760px;
    margin: 0 auto;
}

.section-heading-centered p,
.section-heading-centered h2 {
    text-align: center;
}

.section-heading-centered .eyebrow {
    margin-bottom: 0.35rem !important;
}

.section-heading-centered h2 {
    margin-bottom: 0.45rem !important;
}

.section-heading-centered p:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 760px) {
    .page-app .bb-page-hero-wrap + .section {
        padding-top: 0 !important;
    }

    .bb-page-hero-wrap + .section .container.narrow,
    .bb-page-hero-wrap + .section .container {
        margin-top: -0.25rem;
    }

    .section-heading-centered {
        margin-top: -0.25rem !important;
        margin-bottom: 0.85rem !important;
    }

    .section-heading-centered .eyebrow {
        margin-bottom: 0.28rem !important;
    }

    .section-heading-centered h2 {
        margin-bottom: 0.38rem !important;
    }
}




/* =========================
   ULTRA TIGHT PAGE SPACING
   ========================= */

/* Pull all inner-page content tighter under hero */
.bb-page-hero-wrap + .section {
    padding-top: 0 !important;
}

/* Apps: tighten hero-to-tools gap hard */
.page-app .bb-page-hero-wrap + .section {
    padding-top: 0 !important;
}
.page-app .apps-grid {
    margin-top: -0.75rem;
}

/* Contact/About/general first content block sits higher */
.bb-page-hero-wrap + .section .container.narrow,
.bb-page-hero-wrap + .section .container {
    margin-top: -0.6rem;
}

/* Categories intro block sits closer to description */
.section-heading-centered {
    margin-top: -0.6rem !important;
    margin-bottom: 0.7rem !important;
}
.section-heading-centered .eyebrow {
    margin-bottom: 0.22rem !important;
}
.section-heading-centered h2 {
    margin: 0.08rem 0 0.28rem !important;
}
.section-heading-centered p:last-child {
    margin-bottom: 0 !important;
}

/* About first content block */
.prose > h2:first-child {
    margin-top: -0.15rem !important;
}

/* Contact form sits tighter under intro */
.contact-form {
    margin-top: -0.15rem;
}

@media (max-width: 760px) {
    .bb-page-hero-wrap + .section {
        padding-top: 0 !important;
    }

    .page-app .apps-grid {
        margin-top: -0.55rem;
    }

    .bb-page-hero-wrap + .section .container.narrow,
    .bb-page-hero-wrap + .section .container {
        margin-top: -0.45rem;
    }

    .section-heading-centered {
        margin-top: -0.45rem !important;
        margin-bottom: 0.55rem !important;
    }

    .section-heading-centered .eyebrow {
        margin-bottom: 0.18rem !important;
    }

    .section-heading-centered h2 {
        margin: 0.05rem 0 0.22rem !important;
    }

    .contact-form {
        margin-top: -0.1rem;
    }
}




/* =========================
   APPS HERO EXTRA TIGHTEN
   ========================= */

.page-app .bb-page-hero-wrap + .section {
    padding-top: 0 !important;
}

.page-app .bb-page-hero-wrap + .section .container.narrow,
.page-app .bb-page-hero-wrap + .section .container {
    margin-top: -2.2rem !important;
}

.page-app .apps-grid {
    margin-top: -2rem !important;
}

@media (max-width: 760px) {
    .page-app .bb-page-hero-wrap + .section .container.narrow,
.page-app .bb-page-hero-wrap + .section .container {
    margin-top: -2.2rem !important;
}

    .page-app .apps-grid {
    margin-top: -2rem !important;
}
}




/* =========================
   NAV HIGHLIGHT FIX
   ========================= */

.primary-nav {
    position: relative;
}

.nav-highlight {
    position: absolute;
    left: 0;
    top: 50%;
    height: 42px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgba(14, 124, 192, 0.10);
    border: 1px solid rgba(14, 124, 192, 0.16);
    box-shadow: 0 4px 14px rgba(14, 124, 192, 0.06);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition:
        left 180ms ease-out,
        width 180ms ease-out,
        opacity 140ms ease-out;
}

.primary-nav a {
    position: relative;
    z-index: 2;
    padding: 0.56rem 0.92rem;
    border-radius: 999px;
    transition: color 0.18s ease;
}

.primary-nav a.active {
    color: var(--primary);
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Mobile keeps simple active state */
@media (max-width: 760px) {
    .primary-nav a.active {
        background: rgba(14, 124, 192, 0.14);
    }

    .nav-highlight {
        display: none !important;
    }
}




/* =========================
   FINAL NAV HIGHLIGHT POSITION FIX
   ========================= */

.nav-highlight {
    top: 0 !important;
    transform: none !important;
    height: 0; /* JS sets the real height */
}

.primary-nav.nav-ready .nav-highlight {
    opacity: 1;
}




/* =========================
   MOBILE MENU POSITION LOCK
   ========================= */

@media (max-width: 760px) {
    .header-inner {
        position: relative;
    }

    .primary-nav {
        position: absolute !important;
        top: calc(100% + 0.55rem) !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        margin: 0 !important;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0.8rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
        z-index: 60;
        transform: none !important;
    }

    .primary-nav.open {
        display: flex !important;
    }

    .primary-nav a {
        display: block;
        width: 100%;
        padding: 0.85rem 0.6rem;
        margin: 0;
    }

    .nav-highlight {
        display: none !important;
    }
}
