/* ============================================================
   Imperial Co. — Shared Stylesheet
   All pages link this file. Page-specific rules stay inline.
   ============================================================ */

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    /* Brand */
    --imperial-blue: #292c77;
    --imperial-blue-light: #3d40a3;

    /* Neutrals — tinted toward brand */
    --neutral-50: #ffffff;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-500: #737373;
    --neutral-900: #171717;

    /* Surfaces */
    --surface-subtle: #f5f6f8;
    --text-primary: #0c0c0c;   /* body copy, UI text, form values */
    --text-muted: #7577a0;   /* imperial-blue family, ~55% lightness */

    /* Accents (used sparingly for status/badges) */
    --accent-green: #22c55e;
    --accent-green-light: #dcfce7;
    --accent-amber: #f59e0b;
    --accent-amber-light: #fef3c7;
    --accent-coral: #fecaca;

    /* Spacing scale — 4 steps, use these everywhere */
    --space-sm: 48px;   /* compact sections, small separators */
    --space-md: 80px;   /* standard section padding */
    --space-lg: 100px;  /* prominent content sections */
    --space-xl: 120px;  /* hero-level / major landmark sections */

    /* Radius */
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0.0, 0.2, 1);

    /* Container */
    --container-max: 1400px;
    --section-header-max: 800px;

    /* Type scale — 1.25 ratio, base 1rem = 16px */
    --text-xs:   0.75rem;    /* 12px — labels, legal, captions */
    --text-sm:   0.875rem;   /* 14px — secondary, meta, nav */
    --text-base: 1rem;       /* 16px — body */
    --text-lg:   1.125rem;   /* 18px — body large, section intro */
    --text-xl:   1.25rem;    /* 20px — lead, card titles small */
    --text-2xl:  1.5rem;     /* 24px — h3 */
    --text-3xl:  2rem;       /* 32px — section h2, inner hero */
    --text-3-5xl: 2.25rem;  /* 36px — inner page section headings */
    --text-4xl:  2.75rem;    /* 44px — inner page hero h1 */
    --text-5xl:  3.75rem;    /* 60px — homepage hero h1 */
}

/* ── Base Typography ────────────────────────────────────────── */
body {
    width: 100%;
    font-family: 'BDO Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-left: max(72px, env(safe-area-inset-left, 0px));
    padding-right: max(72px, env(safe-area-inset-right, 0px));
}

/* Comfortable reading width for body copy */
.section-intro,
.article-body p,
.article p {
    max-width: 65ch;
}

h1 {
    font-size: clamp(2.25rem, 2vw + 1.125rem, var(--text-5xl));
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
    color: var(--imperial-blue);
}

h2 {
    font-size: clamp(1.75rem, 1.25vw + 0.875rem, 3rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--imperial-blue);
}

h3 {
    font-size: 1.5rem; /* 24px — subsection / subheader */
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    color: var(--imperial-blue);
    text-transform: none;
}

h4 {
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    color: var(--imperial-blue);
}

/* Form blocks and in-page subheaders (sentence case in markup) */
.form-section-title {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--imperial-blue);
    text-transform: none;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--neutral-200);
}

#main-content > .form-section-title {
    box-sizing: border-box;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* ── Skip Link (Accessibility) ──────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--imperial-blue);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 16px;
}

/* ── Focus styles ───────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--imperial-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Suppress focus ring on mouse click, keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* ── Utilities ──────────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Header & Navigation ────────────────────────────────────── */
header {
    position: fixed;
    top: max(24px, env(safe-area-inset-top, 0px));
    left: max(72px, env(safe-area-inset-left, 0px));
    right: max(72px, env(safe-area-inset-right, 0px));
    width: auto;
    background: transparent;
    border: none;
    z-index: 1000;
    transition: opacity 0.3s var(--ease);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
}

/* On pages with no hero behind the nav, use solid background */
.header-container--solid {
    background: white;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--imperial-blue);
    transition: opacity 0.2s var(--ease);
}

.logo:hover {
    opacity: 0.7;
}

.logo-horizontal {
    height: 68px;
    width: auto;
    max-width: min(240px, 42vw);
    flex-shrink: 0;
    display: block;
}

/* Footer: same mark as header, 14px shorter (68→54, 60→46 on small screens) */
.footer-brand .logo-horizontal {
    height: 54px;
}

/* Brand mark dot */
.brand-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--imperial-blue);
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 8px;
}

.brand-dot-light {
    background: white;
}

h1 .brand-dot,
h2 .brand-dot {
    width: 10px;
    height: 10px;
    vertical-align: baseline;
    margin-left: 4px;
}

.text-emphasis .brand-dot {
    margin-left: 4px;
}

nav {
    display: flex;
    gap: 14px;
    align-items: center;
}

.nav-item {
    position: relative;
}

nav a {
    color: var(--imperial-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s var(--ease);
    position: relative;
}

nav a:not(.btn-portal)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--imperial-blue);
    transition: width 0.3s var(--ease);
}

nav a:not(.btn-portal):hover::after {
    width: 100%;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--imperial-blue);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    position: relative;
}

.nav-dropdown-toggle .chevron {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    transform: translateY(-1px);
    transition: transform 0.2s var(--ease);
}

.nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--imperial-blue);
    transition: width 0.3s var(--ease);
}

.nav-item:hover .nav-dropdown-toggle::after,
.nav-item:focus-within .nav-dropdown-toggle::after {
    width: 100%;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s var(--ease);
    pointer-events: none;
    z-index: 1100;
}

/* Hover bridge to prevent gap from closing dropdown */
.nav-item::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.nav-item:hover .nav-dropdown-menu,
.nav-item:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover {
    background: var(--surface-subtle);
}

.nav-item:hover .nav-dropdown-toggle .chevron,
.nav-item:focus-within .nav-dropdown-toggle .chevron {
    transform: rotate(180deg) translateY(1px);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--imperial-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s var(--ease);
}

/* Stable width when RFQ cart badge appears (avoids header layout shift) */
header nav .btn-portal {
    box-sizing: border-box;
    min-width: 14rem;
    justify-content: center;
}

/* RFQ cart count chip (injected on catalog / quote pages; matches frosted chips elsewhere) */
.rfq-badge {
    display: inline-flex;
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    align-items: center;
    justify-content: center;
}

.btn-portal:hover {
    background: var(--imperial-blue-light);
}

.btn-portal:active {
    background: var(--imperial-blue);
    transform: scale(0.98);
}

.btn-primary {
    display: inline-block;
    background: var(--imperial-blue);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s var(--ease);
}

.btn-primary:hover {
    background: var(--imperial-blue-light);
}

.btn-primary:active {
    background: var(--imperial-blue);
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    background: var(--surface-subtle);
    color: var(--imperial-blue);
    padding: 16px 32px;
    border-radius: 50px;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s var(--ease);
}

.btn-secondary:hover {
    background: var(--neutral-200);
}

.btn-secondary:active {
    background: var(--neutral-300);
    transform: scale(0.98);
}

/* ── Mobile Menu ────────────────────────────────────────────── */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--imperial-blue);
    transition: all 0.3s var(--ease);
    position: relative;
}

.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--imperial-blue);
    transition: all 0.3s var(--ease);
    left: 0;
}

.mobile-menu-btn span::before { top: -8px; }
.mobile-menu-btn span::after  { top: 8px; }

.mobile-menu-btn.active span {
    background: transparent;
}

.mobile-menu-btn.active span::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-btn.active span::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav a {
    color: var(--imperial-blue);
    text-decoration: none;
    font-size: var(--text-2xl);
    font-weight: 600;
    padding: 12px 24px;
    transition: opacity 0.2s var(--ease);
}

.mobile-nav a:hover {
    opacity: 0.7;
}

.mobile-nav .btn-portal {
    margin-top: 16px;
    font-size: var(--text-lg);
    padding: 16px 32px;
    color: rgba(253, 253, 254, 1);
}

/* ── Main Content ───────────────────────────────────────────── */
main {
    margin-top: 108px;
}

.container {
    max-width: var(--container-max);
    width: 100%;
    margin-inline: auto;
    padding: 0;
}

/* ── Section Anatomy ────────────────────────────────────────── */
.section-header {
    max-width: var(--section-header-max);
    margin: 0 auto 48px;
    text-align: center;
}

/* Card / grid cell headers — not centered 800px block */
.section-header--flush {
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    text-align: left;
}

.page-section .card .section-header--flush h2 {
    font-size: 1.625rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.compliance-boundary-lead {
    max-width: var(--section-header-max);
    margin-left: auto;
    margin-right: auto;
    font-size: var(--text-lg);
    line-height: 1.65;
    opacity: 0.9;
    text-align: center;
}

/* Bordered disclaimer / role clarity (matches former sourcing inline block) */
.compliance-boundary-block {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--surface-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
}

.compliance-boundary-block p {
    font-size: var(--text-base);
    line-height: 1.65;
    opacity: 0.9;
    margin: 0;
}

/* Icon + label stacks in a horizontal row (traceability, Dubai ops) */
.pillar-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    margin-top: 8px;
}

.pillar-3__item {
    flex: 1 1 200px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.pillar-3__icon {
    width: 44px;
    height: 44px;
    display: block;
    flex-shrink: 0;
}

.pillar-3__text {
    font-size: var(--text-base);
    line-height: 1.55;
    opacity: 0.9;
    margin: 0;
}

/* Checkmark bullet lists (unordered only) */
.checklist {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding-left: 0;
    font-size: var(--text-base);
    line-height: 1.55;
    opacity: 0.9;
    position: relative;
}

.checklist li::before {
    content: none;
}

.checklist__check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

.page-section .card ul.checklist {
    width: 100%;
}

.storage-categories-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
}

.storage-categories-list li {
    margin-bottom: 0;
}

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

/* Blue “Next steps” CTA band — use sitewide for inner pages */
.page-cta-next {
    padding: var(--space-md) 40px;
    text-align: center;
    background: var(--imperial-blue);
    color: #fff;
    border-radius: var(--radius-lg);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.page-cta-next h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.page-cta-next p {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.page-cta-next__row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.page-cta-next .btn-cta-solid {
    display: inline-block;
    text-decoration: none;
    background: #fff;
    color: var(--imperial-blue);
    font-weight: 500;
    border-radius: 999px;
    padding: 14px 26px;
}

.page-cta-next .btn-cta-outline {
    display: inline-block;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #fff;
    background: transparent;
    font-weight: 500;
    border-radius: 999px;
    padding: 12px 24px;
}

.page-cta-next .btn-cta-solid:hover {
    opacity: 0.92;
}

.page-cta-next .btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.card-shipping__icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.card-shipping__icon {
    width: 44px;
    height: 44px;
    display: block;
}

.section-intro {
    font-size: var(--text-lg);
    color: var(--text-primary);
    opacity: 0.85;
    line-height: 1.75;
}

/* Inner pages — insights, logistics-handling, quality-compliance (shared stack) */
.page-section {
    padding: var(--space-md) 0;
}

.page-section--tint {
    background: var(--neutral-50);
}

.page-section h2 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.875rem;
    color: var(--imperial-blue);
}

/* Multi-tone Typography Pattern */
.text-context {
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.text-emphasis {
    color: var(--imperial-blue);
    font-weight: 700;
    display: block;
}

h2 .text-context {
    font-size: 0.85em;
    margin-bottom: 4px;
}

h1 .text-context {
    font-size: 0.7em;
    margin-bottom: 8px;
}

.feature-context {
    color: var(--text-muted);
    font-weight: 400;
    font-size: var(--text-sm);
    display: block;
    margin-bottom: 2px;
}

.feature-title {
    color: var(--imperial-blue);
    font-weight: 700;
    display: block;
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    background: var(--surface-subtle);
    border: none;
    border-radius: 50px;
    color: var(--imperial-blue);
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* ── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
    padding: var(--space-md) 0 var(--space-sm);
    background: linear-gradient(to bottom, var(--neutral-50), white);
    text-align: center;
}

.page-hero h1 {
    font-size: var(--text-4xl);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.page-hero p {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--text-primary);
    opacity: 0.88;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Hero mesh (inner pages + About; same shader as index) ──── */
.hero-mesh-page {
    padding: 24px 0 0;
    background: transparent;
}

.hero-mesh-page .hero-panel {
    background: transparent;
    margin: 0 auto;
    max-width: var(--container-max);
    width: 100%;
    padding: 96px 0 84px;
    position: relative;
    box-sizing: border-box;
}

.hero-mesh-page .hero-mesh-root {
    position: relative;
    width: 100%;
    margin-inline: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 100px;
    overflow: hidden;
    color: var(--text-primary);
    isolation: isolate;
    background: unset;
}

.hero-mesh-page .hero-mesh-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-mesh-page [data-hero-mesh-canvas] {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.hero-mesh-page [data-hero-mesh-canvas] > * {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    display: block !important;
}

.hero-mesh-page .hero-mesh-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 1;
    background: rgba(41, 44, 119, 0.16);
    pointer-events: none;
}

.hero-mesh-page .hero-inner {
    position: relative;
    z-index: 2;
    padding: 56px 40px 52px;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.64);
    max-width: none;
    margin-inline: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.hero-mesh-page--compact .hero-mesh-root {
    min-height: clamp(520px, 48vh, 720px);
}

.hero-mesh-page--compact .hero-inner {
    min-height: 0;
    padding: 48px 36px 44px;
    max-width: 100%;
}

.hero-mesh-page--home .hero-inner {
    min-height: 695px;
    max-width: none;
    width: 100%;
}

.hero-mesh-page .badge.badge-hero-mesh {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    background: #ffffff;
    border: none;
    border-radius: 50px;
    color: var(--imperial-blue);
    padding: 10px 16px 10px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: 'BDO Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: 0.06em;
    text-transform: none;
    margin-bottom: 0;
    transition: all 0.3s var(--ease);
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

.hero-mesh-page .badge-hero-mesh__gdp {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.24);
    color: var(--imperial-blue);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
}

.hero-mesh-page .badge-hero-mesh__tail {
    color: var(--imperial-blue);
    font-weight: 600;
}

.hero-mesh-page .hero-inner h1 {
    font-size: var(--text-5xl);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--imperial-blue);
    max-width: 916px;
    margin: 0;
    animation: fadeInUp 0.6s var(--ease) 0.2s both;
}

.hero-mesh-page .hero-headline-sub {
    color: var(--text-primary);
    font-size: clamp(1.375rem, 0.75vw + 1.1rem, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 916px;
    animation: fadeInUp 0.6s var(--ease) 0.24s both;
}

.hero-mesh-page .hero-subtitle {
    font-size: var(--text-xl);
    line-height: 1.6;
    color: var(--text-primary);
    opacity: 0.85;
    max-width: 760px;
    margin: 0;
    animation: fadeInUp 0.6s var(--ease) 0.3s both;
}

.hero-mesh-page .hero-ctas,
.hero-mesh-page .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    animation: fadeInUp 0.6s var(--ease) 0.4s both;
}

.hero-mesh-page .hero-inner .btn-primary,
.hero-mesh-page .hero-inner .btn-solid-hero {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--imperial-blue) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px 28px;
    border-radius: 50px;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.hero-mesh-page .hero-inner .btn-primary:hover,
.hero-mesh-page .hero-inner .btn-solid-hero:hover {
    background: var(--imperial-blue-light) !important;
    color: #ffffff !important;
}

.hero-mesh-page .hero-inner .btn-secondary,
.hero-mesh-page .hero-inner .btn-outline-hero {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    padding: 14px 26px;
    border-radius: 50px;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.hero-mesh-page .hero-inner .btn-secondary:hover,
.hero-mesh-page .hero-inner .btn-outline-hero:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

@media (max-width: 968px) {
    .hero-mesh-page .hero-panel {
        margin: 0 auto;
        border-radius: 32px;
        padding: 72px 0 60px;
        min-height: 0;
    }

    .hero-mesh-page .hero-mesh-root {
        width: 100%;
        border-radius: 48px;
        min-height: 0;
    }

    .hero-mesh-page .hero-inner {
        min-height: 0;
        padding: 48px 24px 44px;
    }

    .hero-mesh-page .hero-inner h1 {
        font-size: clamp(2rem, 3vw + 0.75rem, 3rem);
    }

    .hero-mesh-page .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-mesh-page .hero-ctas,
    .hero-mesh-page .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-mesh-page .hero-inner .btn-primary,
    .hero-mesh-page .hero-inner .btn-secondary,
    .hero-mesh-page .hero-inner .btn-solid-hero,
    .hero-mesh-page .hero-inner .btn-outline-hero {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-mesh-page .hero-panel {
        margin: 0 auto;
        border-radius: 24px;
        padding: 56px 0 48px;
    }

    .hero-mesh-page .hero-mesh-root {
        border-radius: 28px;
    }

    .hero-mesh-page .hero-inner {
        padding: 40px 18px 36px;
    }

    .hero-mesh-page .hero-subtitle {
        font-size: var(--text-base);
    }
}

/* ── Footer ─────────────────────────────────────────────────── */
/* ── Content visibility — skip rendering off-screen sections ─── */
/* Browsers that support it skip layout/paint for off-screen content */
@supports (content-visibility: auto) {
    footer {
        content-visibility: auto;
        contain-intrinsic-size: 0 400px;
    }
}

footer {
    background-color: #fff;
    border-top: none;
    padding: var(--space-md) 0 var(--space-sm);
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand p {
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--text-primary);
    opacity: 0.85;
    margin-top: 14px;
    max-width: 540px;
}

.footer-section h4 {
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--imperial-blue);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    opacity: 0.72;
    transition: opacity 0.2s var(--ease);
}

.footer-section a:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.footer-social__networks,
.footer-social__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--neutral-200);
    color: var(--imperial-blue);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-social a:hover {
    background: var(--imperial-blue);
    border-color: var(--imperial-blue);
    color: #fff;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    display: block;
}

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid var(--neutral-200);
    text-align: center;
    font-size: var(--text-sm);
    line-height: 1.25;
    color: var(--text-primary);
    opacity: 0.65;
}

.footer-cookie-link {
    color: var(--imperial-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 1;
}

.footer-cookie-link:hover {
    color: var(--imperial-blue-light);
}

/* How-it-works summary — typically above the page CTA and site footer */
.prefooter-how-it-works {
    padding: 48px 0 40px;
    background: unset;
}

.footer-how-it-works {
    margin-bottom: 0;
    padding: 28px 28px 32px;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 24px;
}

.footer-how-it-works__head {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-how-it-works h3 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
    margin-bottom: 0;
    color: var(--imperial-blue);
}

.footer-how-it-works__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px 20px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.footer-how-it-works__grid li {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    opacity: 0.88;
}

.footer-how-it-works__grid .step-num {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--imperial-blue);
    margin-bottom: 6px;
}

.footer-how-it-works__more {
    font-size: var(--text-sm);
    text-align: center;
    margin-top: 4px;
}

.footer-how-it-works__more a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--imperial-blue);
    font-weight: 500;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--imperial-blue);
    background: transparent;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-how-it-works__more a:hover {
    background: var(--imperial-blue);
    color: #fff;
    border-color: var(--imperial-blue);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s var(--ease) both;
}

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

/* ── Text overflow resilience ───────────────────────────────── */
/* Prevent long pharmaceutical names and URLs from breaking layouts */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

p, li, td, th {
    overflow-wrap: break-word;
}

/* Prevent flex/grid items from overflowing their tracks */
.container > * {
    min-width: 0;
}

/* ── Responsive — Tablet (≤1200px) ─────────────────────────── */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* ── Responsive — Small Tablet (≤968px) ────────────────────── */
@media (max-width: 968px) {
    body {
        padding-left: max(24px, env(safe-area-inset-left, 0px));
        padding-right: max(24px, env(safe-area-inset-right, 0px));
    }

    #main-content > .form-section-title {
        padding-left: 24px;
        padding-right: 24px;
    }

    header {
        left: max(24px, env(safe-area-inset-left, 0px));
        right: max(24px, env(safe-area-inset-right, 0px));
    }

    .header-container {
        padding: 20px 16px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    nav {
        display: none;
    }

    main {
        margin-top: 108px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .section-header--flush {
        margin-bottom: 0;
    }

    .section-intro {
        font-size: 16px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-how-it-works__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-section {
        text-align: left;
    }

    .footer-brand {
        text-align: left;
    }

    footer {
        padding: 48px 0 32px;
    }
}

/* ── Responsive — Mobile (≤600px) ──────────────────────────── */
@media (max-width: 600px) {
    body {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #main-content > .form-section-title {
        padding-left: 16px;
        padding-right: 16px;
    }

    header {
        left: max(16px, env(safe-area-inset-left, 0px));
        right: max(16px, env(safe-area-inset-right, 0px));
    }

    h3,
    .form-section-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .form-section-title {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .header-container {
        padding: 20px 16px;
    }

    .logo-horizontal {
        height: 60px;
    }

    .footer-brand .logo-horizontal {
        height: 46px;
    }

    h1 {
        font-size: clamp(1.625rem, 4vw + 0.5rem, 1.875rem);
        line-height: 1.15;
    }

    h2 {
        font-size: clamp(1.375rem, 3vw + 0.55rem, 1.625rem);
        line-height: 1.22;
    }

    .section-intro {
        font-size: 0.9375rem;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .section-header--flush {
        margin-bottom: 0;
    }

    .badge {
        font-size: 10px;
        padding: 6px 12px;
        margin-bottom: 20px;
    }

    .btn-primary,
    .btn-secondary {
        font-size: var(--text-sm);
        padding: 14px 20px;
    }

    .footer-how-it-works {
        padding: 22px 18px 26px;
    }

    .footer-how-it-works h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .footer-how-it-works__grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 48px 0 24px;
    }

    .footer-grid {
        gap: 24px;
    }

    .footer-brand p {
        font-size: var(--text-sm);
    }

    .footer-section h4 {
        font-size: var(--text-xs);
        margin-bottom: 16px;
    }

    .footer-section a {
        font-size: var(--text-sm);
    }

    .footer-bottom {
        font-size: var(--text-xs);
        padding-top: 24px;
    }

    .mobile-nav a {
        font-size: 20px;
        padding: 10px 20px;
    }

    .mobile-nav .btn-portal {
        font-size: 16px;
        padding: 14px 28px;
    }

    main {
        margin-top: 100px;
    }
}

/* ── Touch Devices ──────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-portal:hover {
        transform: none;
    }

    .btn-primary:active,
    .btn-secondary:active,
    .btn-portal:active {
        transform: scale(0.98);
    }
}

/* ── iOS Safari Fix ─────────────────────────────────────────── */
@supports (-webkit-touch-callout: none) {
    .mobile-nav {
        height: -webkit-fill-available;
    }
}

/* ── Cookie consent card (sitewide) ─────────────────────────── */
html.imperial-cookie-consent-open,
html.imperial-cookie-consent-open body {
    overflow: hidden;
}

.imperial-cookie-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    background: rgba(23, 23, 23, 0.45);
    box-sizing: border-box;
}

.imperial-cookie-card {
    width: 100%;
    max-width: 520px;
    margin-bottom: 8px;
    padding: 28px;
    background: var(--surface-subtle);
    border: 1px solid rgba(40, 42, 116, 0.24);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(40, 42, 116, 0.12);
    transition: box-shadow 0.35s var(--ease);
}

.imperial-cookie-card__title {
    font-size: var(--text-2xl);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--imperial-blue);
    margin: 0 0 12px;
}

.imperial-cookie-card__text {
    font-size: var(--text-base);
    line-height: 1.55;
    color: var(--text-primary);
    opacity: 0.88;
    margin: 0 0 22px;
}

.imperial-cookie-card__text a {
    color: var(--imperial-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.imperial-cookie-card__text a:hover {
    color: var(--imperial-blue-light);
}

.imperial-cookie-manage {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease);
}

.imperial-cookie-card.is-manage-open .imperial-cookie-manage {
    max-height: 340px;
}

.imperial-cookie-manage-inner {
    padding-top: 8px;
    padding-bottom: 18px;
    border-top: 1px solid rgba(40, 42, 116, 0.12);
    margin-top: 8px;
}

.imperial-cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(40, 42, 116, 0.1);
}

.imperial-cookie-option:last-of-type {
    border-bottom: none;
}

.imperial-cookie-option__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.imperial-cookie-option__name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.imperial-cookie-option__desc {
    font-size: var(--text-xs);
    line-height: 1.45;
    color: var(--text-primary);
    opacity: 0.75;
}

.imperial-cookie-option__locked {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--neutral-500);
    flex-shrink: 0;
}

.imperial-cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.imperial-cookie-switch-input {
    position: absolute;
    opacity: 0;
    width: 48px;
    height: 28px;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.imperial-cookie-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--neutral-300);
    pointer-events: none;
    transition: background 0.25s var(--ease);
}

.imperial-cookie-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.28s var(--ease);
    box-shadow: 0 1px 4px rgba(40, 42, 116, 0.2);
}

.imperial-cookie-switch-input:focus-visible + .imperial-cookie-switch-track {
    outline: 2px solid var(--imperial-blue);
    outline-offset: 2px;
}

.imperial-cookie-switch-input:checked + .imperial-cookie-switch-track {
    background: var(--imperial-blue);
}

.imperial-cookie-switch-input:checked + .imperial-cookie-switch-track::after {
    transform: translateX(20px);
}

.imperial-cookie-manage-save {
    width: 100%;
    margin-top: 8px;
}

.imperial-cookie-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.imperial-cookie-btn {
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    border: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.imperial-cookie-btn:focus-visible {
    outline: 2px solid var(--imperial-blue);
    outline-offset: 2px;
}

.imperial-cookie-btn--primary {
    background: var(--imperial-blue);
    color: #fff;
}

.imperial-cookie-btn--primary:hover {
    background: var(--imperial-blue-light);
}

.imperial-cookie-btn--secondary {
    background: #fff;
    color: var(--imperial-blue);
    border: 1px solid rgba(40, 42, 116, 0.35);
}

.imperial-cookie-btn--secondary:hover {
    background: var(--neutral-100);
}

.imperial-cookie-btn--tertiary {
    background: transparent;
    color: var(--imperial-blue);
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-left: 4px;
    padding-right: 4px;
}

.imperial-cookie-btn--tertiary:hover {
    color: var(--imperial-blue-light);
    background: rgba(40, 42, 116, 0.06);
    border-radius: 8px;
}

@media (max-width: 520px) {
    .imperial-cookie-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .imperial-cookie-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .imperial-cookie-card.is-manage-open .imperial-cookie-manage {
        max-height: 380px;
    }
}
