/* Design tokens */
:root {
    --color-navy: #17233c;
    --color-blue: #3276d2;
    --color-blue-bright: #4d9cff;
    --color-slate: #64748b;
    --color-cream: #f7f3ea;
    --color-surface: #ffffff;
    --color-surface-soft: #eaf1f8;
    --color-text: #253247;
    --color-text-muted: #475569;
    --color-success: #36a675;
    --color-border: rgba(37, 50, 71, 0.12);

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;

    --shadow-sm: 0 8px 24px rgba(23, 35, 60, 0.08);
    --shadow-md: 0 18px 50px rgba(23, 35, 60, 0.12);

    --container-width: 1200px;
    --reading-width: 720px;
}

/* Self-hosted variable fonts (single file per family covers the full
   weight axis — no third-party font-loading script/request). */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/inter-latin-variable.woff2') format('woff2-variations');
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-variable.woff2') format('woff2-variations');
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, Manrope, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-surface);
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Accessibility base layer */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1000;
    background: var(--color-navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-blue-bright);
    outline-offset: 2px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--color-navy);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--color-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1.5rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 0;
}

.site-logo {
    height: 88px;
    width: auto;
}

.footer-logo a {
    display: block;
    line-height: 0;
}

.footer-logo-img {
    width: 100%;
    height: auto;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.main-navigation > ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    color: var(--color-text);
    font-weight: 500;
}

.main-navigation ul li a.active {
    color: var(--color-blue);
    font-weight: 700;
}

/* Product dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font: inherit;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
}

.nav-dropdown-toggle .caret {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.nav-dropdown[data-open="true"] .nav-dropdown-toggle .caret {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    min-width: 220px;
    list-style: none;
    z-index: 110;
}

.nav-dropdown[data-open="true"] .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    white-space: nowrap;
}

.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a:focus-visible {
    background: var(--color-surface-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-contact-link {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-navy) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Homepage full-page hero with background image */
.hero-home {
    background:
        url('../img/hero-images/mage-intake-home-hero-2.jpg') right center / cover no-repeat;
    min-height: 65vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    text-align: left;
    color: var(--color-navy);
}

.hero-home h1 {
    color: var(--color-navy);
}

.hero-home .hero-subtitle {
    color: var(--color-blue);
    opacity: 1;
}

.hero-home .container {
    width: 100%;
}

/* Hero badge */
.hero-badge {
    display: inline-block;
    background: rgba(50, 118, 210, 0.12);
    border: 1px solid rgba(50, 118, 210, 0.35);
    color: var(--color-navy);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

/* Outline dark button — for use on light hero backgrounds */
.btn-outline-dark {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--color-navy);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-navy);
    background: transparent;
    text-decoration: none;
}

.btn-outline-dark:hover {
    background: var(--color-navy);
    color: #fff;
    transform: translateY(-2px);
}

.hero-home-content {
    max-width: 580px;
}

.hero-home .hero-cta {
    justify-content: flex-start;
}

.hero-highlight {
    color: var(--color-blue);
}

.hero-trust-line {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

/* ==============================================
   FULL-PAGE HERO — INNER PAGES
   ============================================== */

.page-hero {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    padding: 6rem 0 4rem;
    position: relative;
    box-sizing: border-box;
    color: var(--color-navy);
    text-align: left;
}

/* Dark overlay removed — image displays without overlay */
.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--color-navy);
    max-width: 480px;
}

.page-hero .hero-subtitle {
    font-size: 1.3rem;
    max-width: 480px;
    color: var(--color-blue);
    opacity: 1;
}

/* Per-page background images (paths relative to this CSS file).
   Three of these also have a smaller WebP twin (see
   image-optimization-report.md) — image-set() upgrades to it where
   supported and falls back to the JPEG everywhere else. The other two
   don't have a WebP twin because it came out larger than the JPEG. */
.hero-features {
    background-image: url('../img/hero-images/mage-intake-features-hero-2.jpg');
    background-image: image-set(
        url('../img/hero-images/mage-intake-features-hero-2.webp') type('image/webp'),
        url('../img/hero-images/mage-intake-features-hero-2.jpg') type('image/jpeg')
    );
}
.hero-use-cases {
    background-image: url('../img/hero-images/mage-intake-use-cases-hero-2.jpg');
    background-image: image-set(
        url('../img/hero-images/mage-intake-use-cases-hero-2.webp') type('image/webp'),
        url('../img/hero-images/mage-intake-use-cases-hero-2.jpg') type('image/jpeg')
    );
}
.hero-how-it-works {
    background-image: url('../img/hero-images/mage-intake-how-it-works-hero-2.jpg');
    background-image: image-set(
        url('../img/hero-images/mage-intake-how-it-works-hero-2.webp') type('image/webp'),
        url('../img/hero-images/mage-intake-how-it-works-hero-2.jpg') type('image/jpeg')
    );
}
.hero-agencies      { background-image: url('../img/hero-images/mage-intake-for-agencies--hero-2.jpg'); }
.hero-documentation { background-image: url('../img/hero-images/mage-intake-documentation-hero-2.jpg'); }
.hero-contact {
    background-image: url('../img/hero-images/mage-intake-contact-hero-2.jpg');
    background-image: image-set(
        url('../img/hero-images/mage-intake-contact-hero-2.webp') type('image/webp'),
        url('../img/hero-images/mage-intake-contact-hero-2.jpg') type('image/jpeg')
    );
}
.hero-pricing {
    background-image: url('../img/hero-images/mage-intake-pricing-hero-2.jpg');
    background-image: image-set(
        url('../img/hero-images/mage-intake-pricing-hero-2.webp') type('image/webp'),
        url('../img/hero-images/mage-intake-pricing-hero-2.jpg') type('image/jpeg')
    );
}

/* Pages without a bespoke hero illustration — cream fallback, matching
   the shared hero system's "cream or soft neutral background" rather
   than the old plain navy gradient. */
.hero-gradient {
    background: var(--color-cream);
    color: var(--color-text);
}

.hero-gradient h1 {
    color: var(--color-navy);
}

.hero-gradient .hero-subtitle {
    color: var(--color-text-muted);
}

/* Section Styling */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--color-surface-soft);
}

/* ==============================================
   HOMEPAGE SECTION LAYOUT
   ============================================== */

.homepage > section:not(.hero-home) {
    padding: 5.5rem 0;
    box-sizing: border-box;
}

/* Centred section heading block */
.section-heading {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.section-heading h2 {
    font-size: 2.25rem;
    color: var(--color-navy);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-heading p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.75;
}

/* Per-section backgrounds */
.homepage .problem-statement   { background-color: var(--color-navy); }
.homepage .features-overview   { background-color: var(--color-surface-soft); }
.homepage .form-css            { background-color: #fff; }
.homepage .how-it-works        { background-color: var(--color-navy); }
.homepage .agency-highlight    { background-color: var(--color-cream); }
.homepage .ecosystem           { background-color: var(--color-surface-soft); }
.homepage .security            { background-color: var(--color-navy); }
.homepage .final-cta           { background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 60%, var(--color-blue-bright) 100%); }

/* Dark section headings */
.homepage .how-it-works .section-heading h2,
.homepage .security .section-heading h2 { color: #fff; }
.homepage .how-it-works .section-heading p,
.homepage .security .section-heading p  { color: rgba(255, 255, 255, 0.6); }

/* ------------------------------------------------------------------
   PROBLEM STATEMENT — dark two-column
   ------------------------------------------------------------------ */
.homepage .problem-statement .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.problem-lead {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 1.25rem;
}

.problem-lead-body {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    font-size: 1.05rem;
    margin: 0;
}

.outcome-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.outcome-list li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 1.02rem;
}

.outcome-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue-bright);
    font-weight: 700;
}

/* Light-background X-mark list (Agencies page problem statement) */
.problem-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 3rem;
    max-width: 780px;
}

.problem-list li {
    padding-left: 1.75rem;
    position: relative;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.problem-list li::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: #ff6b6b;
    font-weight: 700;
}

.problem-details h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-align: left;
}

.problem-details p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.problem-details ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.25rem;
}

.problem-details li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.problem-details li::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: #ff6b6b;
    font-weight: 700;
    font-size: 0.85rem;
    top: 2px;
}

/* ------------------------------------------------------------------
   FEATURES GRID
   ------------------------------------------------------------------ */
.homepage .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.homepage .feature-card {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.75rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.homepage .feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.11);
}

.homepage .feature-card .card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.homepage .feature-card h3 {
    color: var(--color-navy);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.homepage .feature-card p {
    color: var(--color-text-muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* ------------------------------------------------------------------
   HOW IT WORKS — dark, 4-step horizontal flow
   ------------------------------------------------------------------ */
.homepage .workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

/* Connecting line */
.homepage .workflow-steps::before {
    content: '';
    position: absolute;
    top: 27px;
    left: calc(12.5% + 22px);
    right: calc(12.5% + 22px);
    height: 2px;
    background: rgba(255, 255, 255, 0.18);
}

.homepage .how-it-works .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.homepage .how-it-works .step-number {
    width: 54px;
    height: 54px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(50, 118, 210, 0.25);
}

.homepage .how-it-works .step-content h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.homepage .how-it-works .step-content p {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
    line-height: 1.65;
}

.flow-diagram-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    font-family: 'Courier New', Courier, monospace;
    margin: 2.5rem 0 0;
}

/* ------------------------------------------------------------------
   AGENCY HIGHLIGHT — large distinct blue-and-cream panel
   ------------------------------------------------------------------ */
.agency-highlight-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.agency-highlight-text h2 {
    font-size: 2.1rem;
    color: var(--color-navy);
    margin: 1rem 0 1rem;
    line-height: 1.2;
}

.agency-highlight-text p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.75rem;
}

.agency-highlight-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.agency-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agency-benefits li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.5;
}

.agency-benefits li:last-child {
    margin-bottom: 0;
}

.agency-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

/* ------------------------------------------------------------------
   COMPATIBILITY CARDS
   ------------------------------------------------------------------ */
.homepage .compatibility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.homepage .compatibility-card {
    background: var(--color-surface-soft);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.homepage .compatibility-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
}

.homepage .compatibility-card .card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.homepage .compatibility-card h3 {
    color: var(--color-navy);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.homepage .compatibility-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ------------------------------------------------------------------
   FORM CSS — split with code window
   ------------------------------------------------------------------ */
.homepage .form-css-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.homepage .form-css h2 {
    font-size: 2rem;
    color: var(--color-navy);
    margin-bottom: 1.25rem;
    line-height: 1.2;
    text-align: left;
}

.homepage .form-css-text p {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.homepage .form-css-text ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.homepage .form-css-text li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.homepage .form-css-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

/* Code window chrome */
.code-window {
    background: #0d1b2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.code-window-bar {
    background: #162436;
    padding: 0.7rem 1rem;
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.code-window-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.code-window-bar span:nth-child(1) { background: #ff5f57; }
.code-window-bar span:nth-child(2) { background: #ffbd2e; }
.code-window-bar span:nth-child(3) { background: #28c940; }

.code-window pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent;
    border-radius: 0;
    color: #93c5fd;
    font-size: 0.82rem;
    line-height: 1.75;
    box-shadow: none;
    overflow-x: auto;
}

.code-copy-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    color: #cfe2ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.code-copy-btn.is-copied {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

/* === TWO INTEGRATION PATHS (How It Works page) === */
.integration-paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.integration-path {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.integration-path h3 {
    color: var(--color-navy);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.integration-path p.lead {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.integration-path ol {
    padding-left: 1.25rem;
    margin: 0;
}

.integration-path ol li {
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* ------------------------------------------------------------------
   SECURITY — dark, 3-column icon cards
   ------------------------------------------------------------------ */
.homepage .security-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.homepage .security-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.homepage .security-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(50, 118, 210, 0.55);
}

.homepage .security-card .security-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.homepage .security-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.5rem; }
.homepage .security-card p  { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; line-height: 1.65; }

/* ------------------------------------------------------------------
   USE CASES — white, 4-column cards
   ------------------------------------------------------------------ */
.homepage .use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.homepage .use-case-card {
    background: var(--color-surface-soft);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.homepage .use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

.homepage .use-case-card .card-icon {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 0.75rem;
}

.homepage .use-case-card h3 {
    color: var(--color-navy);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.homepage .use-case-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ------------------------------------------------------------------
   ECOSYSTEM — centred badge pills
   ------------------------------------------------------------------ */
.homepage .ecosystem .container {
    text-align: center;
}

.ecosystem-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.ecosystem-badge {
    background: #fff;
    border: 2px solid var(--color-blue);
    color: var(--color-blue);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: default;
}

.ecosystem-badge:hover {
    background: var(--color-blue);
    color: #fff;
}

/* ------------------------------------------------------------------
   FINAL CTA
   ------------------------------------------------------------------ */
.homepage .final-cta .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.homepage .final-cta h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.homepage .final-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 580px;
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-cta-primary {
    display: inline-block;
    padding: 14px 34px;
    background: #fff;
    color: var(--color-blue);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-cta-primary:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
}

.btn-cta-secondary {
    display: inline-block;
    padding: 14px 34px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-details ul {
    list-style: none;
    margin-top: 1.5rem;
}

.contact-details li {
    margin-bottom: 0.5rem;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(50, 118, 210, 0.25);
}

.form-group input.has-error,
.form-group select.has-error,
.form-group textarea.has-error {
    border-color: #ff6b6b;
}

.form-optional {
    font-weight: 400;
    color: var(--color-text-muted);
}

.form-error {
    color: #d92626;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.form-error:empty {
    display: none;
}

/* Honeypot field — off-screen, not display:none, so it still looks
   fillable to automated form-fillers but is invisible to real visitors. */
.form-group-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-privacy-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

/* Links inline in body copy need an underline — color alone isn't
   enough to distinguish them from surrounding text. Also darkened to
   var(--color-navy): the default link blue fell just short of the
   4.5:1 contrast ratio at this text size against the section's
   background. */
.form-privacy-note a,
.contact-details a {
    text-decoration: underline;
    color: var(--color-navy);
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-text);
}

.contact-category-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.contact-category-list li {
    margin-bottom: 1.25rem;
}

.contact-category-list h3 {
    color: var(--color-navy);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.contact-category-list p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin: 0;
}

/* Final CTA — all pages */
.final-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 60%, var(--color-blue-bright) 100%);
    color: white;
    padding: 5rem 0;
}

.final-cta .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-cta h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.final-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 560px;
    margin-bottom: 2.5rem;
    line-height: 1.75;
    opacity: 1;
}

/* Footer */
.site-footer {
    background: radial-gradient(120% 140% at 15% 0%, #223256 0%, var(--color-navy) 45%, #0e1626 100%);
    color: #fff;
    padding-top: 4.5rem;
}

/* CTA panel */
.footer-cta {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.footer-cta h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.footer-cta p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.footer-cta .cta-actions {
    justify-content: center;
}

/* Link columns */
.footer-main {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-top: 1rem;
    max-width: 260px;
}

.footer-col h3 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.1rem;
}

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

.footer-col ul li {
    margin-bottom: 0.65rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
    color: #fff;
}

/* Privacy Policy */
.privacy-policy {
    padding: 4rem 0;
}

/* Shared legal-page reading column */
.legal-page-content {
    max-width: var(--reading-width);
    margin: 0 auto;
}

.legal-meta {
    display: inline-block;
    background: var(--color-surface-soft);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 2rem;
}

/* Table of contents */
.legal-toc {
    background: var(--color-surface-soft);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
}

.legal-toc h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.9rem;
}

.legal-toc ol {
    list-style: none;
    display: grid;
    gap: 0.55rem;
    counter-reset: toc-counter;
}

.legal-toc li {
    counter-increment: toc-counter;
}

.legal-toc a {
    color: var(--color-text);
    font-weight: 500;
}

.legal-toc a::before {
    content: counter(toc-counter) ". ";
    color: var(--color-blue);
    font-weight: 700;
}

.legal-toc a:hover {
    color: var(--color-blue);
}

.legal-entity-statement {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.policy-content,
.terms-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.policy-content h2,
.terms-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.policy-content ul,
.terms-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.policy-content li,
.terms-content li {
    margin-bottom: 0.5rem;
}

/* Terms of Use */
.terms-of-use {
    padding: 4rem 0;
}

/* ==============================================
   INNER PAGE CONTENT — SHARED STYLES
   ============================================== */

/* Section padding & alternating backgrounds */
main:not(.homepage) section:not(.hero) {
    padding: 5rem 0;
}

main:not(.homepage) section:not(.hero):nth-child(odd) {
    background-color: #fff;
}

main:not(.homepage) section:not(.hero):nth-child(even) {
    background-color: var(--color-surface-soft);
}

/* Pricing page: only one plan, so the widget section reads better as
   plain white with the "what's included" section beneath it darker,
   overriding the default odd/even alternation for these two. */
/* !important needed: the nth-child alternation above outranks a
   plain class selector on specificity alone. */
main:not(.homepage) section.pricing-widget-section {
    background-color: #fff !important;
}

main:not(.homepage) section.compatibility {
    background-color: var(--color-surface-soft) !important;
}

/* Section heading — reuse homepage .section-heading on inner pages */
main:not(.homepage) .section-heading h2 {
    font-size: 2.1rem;
    color: var(--color-navy);
}

main:not(.homepage) .section-heading p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

/* Fallback for bare h2 not wrapped in .section-heading.
   Excludes .final-cta for the same reason as the paragraph rule above
   — it sets its own white heading color for the dark gradient. */
main:not(.homepage) section:not(.hero):not(.final-cta) > .container > h2:not(.section-heading h2) {
    font-size: 2rem;
    color: var(--color-navy);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Intro paragraph directly under container (no section-heading).
   Excludes .final-cta — that component sets its own white-on-gradient
   text color, which this higher-specificity selector would otherwise
   silently override to the muted gray meant for plain content
   sections (was unreadable against the dark gradient background). */
main:not(.homepage) section:not(.hero):not(.final-cta) > .container > p {
    text-align: center;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* === CARD GRIDS === */
.features-grid,
.use-cases-grid,
.compatibility-grid,
.benefits-grid,
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 1rem;
}

.feature-card,
.use-case-card,
.compatibility-card,
.benefit-card,
.category-card {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.75rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.use-case-card:hover,
.compatibility-card:hover,
.benefit-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.11);
}

.feature-card .card-icon,
.use-case-card .card-icon,
.compatibility-card .card-icon,
.benefit-card .card-icon,
.category-card .card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3,
.use-case-card h3,
.compatibility-card h3,
.benefit-card h3,
.category-card h3 {
    color: var(--color-navy);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.feature-card p,
.use-case-card p,
.compatibility-card p,
.benefit-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.category-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-card ul li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.category-card ul li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

/* === SCENARIO CARDS (Use Cases page mini-scenarios) === */
.scenario-card {
    background: #fff;
    border-radius: 10px;
    border-left: 5px solid var(--color-blue);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.scenario-card h3 {
    color: var(--color-navy);
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.scenario-parts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.scenario-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-blue);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.scenario-part p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

/* === DETAIL CARDS (feature-detail, use-case-detail, etc.) === */
.feature-detail,
.use-case-detail,
.technical-detail {
    background: #fff;
    border-radius: 10px;
    border-left: 5px solid var(--color-blue);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.feature-detail h3,
.use-case-detail h3,
.technical-detail h3 {
    color: var(--color-navy);
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

/* Custom checkmark list bullets */
.feature-detail ul,
.use-case-detail ul,
.technical-detail ul {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.feature-detail ul li,
.use-case-detail ul li,
.technical-detail ul li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.45rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.feature-detail ul li::before,
.use-case-detail ul li::before,
.technical-detail ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

/* === SPLIT SECTION (alternating image-and-copy, e.g. Features page) === */
.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

/* Grid tracks default to a content-based minimum width, so a long
   unbroken code line can force the whole column (and everything
   stacked in it on mobile) wider than the viewport. min-width: 0
   lets the column — and the code block's own overflow-x: auto —
   actually shrink to fit. */
.split-visual,
.split-text {
    min-width: 0;
}

.split-content.reverse .split-visual {
    order: 2;
}

.split-text h2 {
    font-size: 1.9rem;
    color: var(--color-navy);
    text-align: left;
    margin-bottom: 0.85rem;
}

.split-text p.lead {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.split-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.split-checklist li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.6rem;
    color: var(--color-text);
    line-height: 1.5;
}

.split-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

.split-visual {
    background: var(--color-surface-soft);
    border-radius: var(--radius-lg);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.split-visual .code-window {
    width: 100%;
}

.split-visual img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md, 8px);
}

.split-visual-inner {
    text-align: center;
    color: var(--color-text-muted);
    font-weight: 600;
}

.split-visual-inner .visual-icon {
    display: block;
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
}

/* === PROCESS STEPS (How It Works page) === */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.process-steps .step {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    border-top: 4px solid var(--color-blue);
}

.process-steps .step-number {
    width: 56px;
    height: 56px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

.process-steps .step h3 {
    color: var(--color-navy);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.process-steps .step p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === WORKFLOW STEPS (Agencies page) === */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
    counter-reset: workflow-counter;
}

.workflow-step {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    counter-increment: workflow-counter;
}

.workflow-step::before {
    content: counter(workflow-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.workflow-step h3 {
    color: var(--color-navy);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.workflow-step p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* === ARCHITECTURE DIAGRAM (How It Works page) === */
.architecture-diagram {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.architecture-step {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    border-top: 4px solid var(--color-blue);
    flex: 1;
    min-width: 160px;
}

.architecture-step h3 {
    color: var(--color-navy);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.architecture-step p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.architecture-arrow {
    font-size: 1.5rem;
    color: var(--color-blue);
    font-weight: 700;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* === DOCUMENTATION STYLES === */
/* === DOCUMENTATION HERO START CARDS === */
.docs-start-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
    max-width: 640px;
}

.docs-start-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.docs-start-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.docs-start-card h2 {
    color: var(--color-navy);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    text-align: left;
}

.docs-start-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* === DOCUMENTATION SIDEBAR LAYOUT === */
.docs-layout-section {
    padding-top: 0;
}

.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    background: var(--color-surface-soft);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.docs-sidebar-toggle {
    font-weight: 700;
    color: var(--color-navy);
    list-style: none;
}

.docs-sidebar-toggle::-webkit-details-marker {
    display: none;
}

.docs-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.docs-sidebar a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.92rem;
}

.docs-sidebar a:hover {
    color: var(--color-blue);
}

.docs-main {
    min-width: 0;
}

.docs-main .docs-section {
    padding-bottom: 3rem;
}

.docs-main .docs-section:last-child {
    padding-bottom: 0;
}

/* Desktop: sidebar always expanded, not a clickable toggle */
@media (min-width: 769px) {
    .docs-sidebar-toggle {
        pointer-events: none;
        cursor: default;
    }
}

.docs-navigation {
    background: var(--color-surface-soft);
    border-radius: 10px;
    padding: 1.75rem 2rem;
    border-left: 5px solid var(--color-blue);
    margin-top: 1.5rem;
}

.docs-navigation h3 {
    color: var(--color-navy);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.docs-navigation ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 2.5rem;
}

.docs-navigation ul li::before { content: none; }

.docs-navigation a {
    color: var(--color-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

.docs-navigation a:hover {
    text-decoration: underline;
}

.docs-content {
    background: #fff;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
}

.docs-content h3 {
    color: var(--color-navy);
    font-size: 1.05rem;
    margin: 2rem 0 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.docs-content h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.docs-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 1rem;
}

.docs-content ul li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.45rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.docs-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

pre {
    background: var(--color-navy);
    color: #cfe2ff;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 1rem 0 1.5rem;
}

/* Docs sections scroll-target padding */
.docs-section {
    scroll-margin-top: 100px;
}

/* ==============================================
   FAQ / ACCORDION
   ============================================== */
.faq-list {
    max-width: var(--reading-width);
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    text-align: left;
    font: inherit;
    font-weight: 600;
    color: var(--color-text);
    padding: 1.25rem 0.25rem;
    cursor: pointer;
}

.faq-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--color-blue);
    transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.faq-answer p {
    padding: 0 0.25rem 1.25rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.faq-item.is-open .faq-answer {
    max-height: 480px;
}

/* ==============================================
   COMPARISON TABLE
   ============================================== */
.comparison-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    min-width: 640px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}

.comparison-table th {
    background: var(--color-surface-soft);
    color: var(--color-text);
    font-weight: 700;
}

.comparison-table td:first-child,
.comparison-table th:first-child {
    color: var(--color-text-muted);
    font-weight: 600;
}

.comparison-table td.is-highlight {
    background: rgba(50, 118, 210, 0.06);
    color: var(--color-navy);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    .main-navigation.is-active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        box-shadow: var(--shadow-sm);
        padding: 0.5rem 0 1rem;
    }

    .main-navigation.is-active > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-navigation.is-active ul li {
        margin: 0;
    }

    .main-navigation.is-active ul li a,
    .main-navigation.is-active .nav-dropdown-toggle {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.75rem 1.5rem;
        box-sizing: border-box;
    }

    /* Product dropdown becomes an inline expanding panel on mobile */
    .main-navigation.is-active .nav-dropdown-menu {
        display: none;
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--color-surface-soft);
        min-width: 0;
        margin: 0 1.5rem;
        padding: 0.25rem 0;
    }

    .main-navigation.is-active .nav-dropdown[data-open="true"] .nav-dropdown-menu {
        display: block;
    }

    .main-navigation.is-active .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 1rem 1.5rem 0;
        border-top: 1px solid var(--color-border);
        margin-top: 0.5rem;
    }

    .main-navigation.is-active .nav-contact-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    .mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr 1fr;
        row-gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }


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

    /* Stack hero content centrally on mobile */
    .hero-home {
        background:
            url('../img/hero-images/mage-intake-home-hero-2.jpg') right center / cover no-repeat;
        text-align: center;
        padding: 7rem 0 4rem;
    }

    .hero-home-content {
        max-width: 100%;
    }

    .hero-home .hero-cta {
        justify-content: center;
    }

    .page-hero {
        min-height: auto;
        padding: 7rem 0 4rem;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .page-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .container {
        width: 95%;
    }

    /* Homepage sections */
    .homepage > section:not(.hero-home) {
        padding: 4rem 0;
    }

    .section-heading h2 {
        font-size: 1.8rem;
    }

    .homepage .problem-statement .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .problem-lead {
        font-size: 2rem;
    }

    .homepage .features-grid,
    .homepage .compatibility-grid,
    .homepage .security-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .homepage .workflow-steps,
    .homepage .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .homepage .workflow-steps::before {
        display: none;
    }

    .homepage .form-css-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .agency-highlight-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .agency-highlight-panel {
        padding: 2rem;
    }

    .split-content,
    .split-content.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .split-content.reverse .split-visual {
        order: initial;
    }

    .homepage .final-cta h2 {
        font-size: 1.8rem;
    }

    /* Inner page grids */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .workflow-steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .architecture-diagram {
        flex-direction: column;
        align-items: stretch;
    }

    .architecture-arrow {
        transform: rotate(90deg);
        justify-content: center;
        padding: 0.25rem 0;
    }

    .feature-detail,
    .use-case-detail,
    .technical-detail,
    .scenario-card {
        padding: 1.5rem;
    }

    .scenario-parts {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .integration-paths {
        grid-template-columns: 1fr;
    }

    .problem-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .docs-start-cards {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .docs-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .docs-sidebar {
        position: static;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .homepage .features-grid,
    .homepage .compatibility-grid,
    .homepage .security-content,
    .homepage .workflow-steps,
    .homepage .use-cases-grid {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .process-steps,
    .workflow-steps {
        grid-template-columns: 1fr;
    }

    .problem-lead {
        font-size: 1.7rem;
    }
}