:root {
    /* Primary Brand Colors */
    --midnight-navy: #102542;
    --cool-sky-blue: #8EAFDB;
    --fresh-emerald-green: #07AA59;
    /* WCAG-AA emerald for text, links and primary-button backgrounds:
       5.7:1 on white / 5.27:1 on canvas (the brand #07AA59 only reaches ~3:1,
       so it is kept for large graphical accents only) */
    --green-text: #067A43;
    /* Primary-button hover shade — separate token so the dark-theme
       --green-text remap (mint, for text legibility) can't brighten CTAs */
    --green-btn-hover: #067A43;
    --frost-white: #EFF7F9;
    
    /* Secondary Brand Colors */
    --deep-slate-blue: #232E38;
    --cool-mist-blue: #7FA6C6;
    --minty-fresh-green: #87D99F;  /* per visual-style-guide.md */
    
    /* Legacy color mappings for compatibility */
    --primary-blue: var(--midnight-navy);
    --primary-accent: var(--fresh-emerald-green);
    --white: #ffffff;

    /* Refined gray scale */
    --gray-100: var(--frost-white);
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: var(--deep-slate-blue);
    --gray-800: var(--midnight-navy);
    --gray-900: #1a202c;

    /* Canvas — soft tinted off-white instead of stark white.
       Cool/neutral so it sits under the navy palette. */
    --canvas: #F4F6F8;
    --canvas-warm: #EDF1F4;
    --surface: #ffffff;
    --hairline: rgba(16, 37, 66, 0.10);

    /* Primary text ink — midnight navy in light mode, frost white in dark mode
       (flipped via the [data-theme="dark"] block at the end of this file) */
    --ink: var(--midnight-navy);
    color-scheme: light;

    /* Type scale — big display steps, tight leading */
    --display-1: clamp(3rem, 6vw, 5.5rem);
    --display-2: clamp(2.5rem, 4.8vw, 4rem);
    --display-3: clamp(1.75rem, 2.6vw, 2.5rem);
    --leading-display: 0.98;

    /* Radii — pills and soft cards */
    --r-pill: 999px;
    --r-card: 24px;
    --r-card-lg: 32px;

    /* Vertical rhythm — generous */
    --section-y: clamp(6.5rem, 12vw, 11rem);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Self-hosted fonts — no third-party requests, GDPR-friendly. */
@font-face {
    font-family: 'Garet';
    /* Subset containing only the "Compeas" wordmark glyphs */
    src: url('fonts/garet-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/poppins-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/poppins-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    color: var(--gray-800);
    background-color: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

/* Typography hierarchy with geometric fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* Display type — oversized, tight, confident */
.hero-title,
.section-title,
.cta-title,
.page-hero-title {
    letter-spacing: -0.035em;
    line-height: var(--leading-display);
    font-weight: 700;
    text-wrap: balance;
}

/* Swedish has longer words and more diacritics — loosen tracking for readability */
:lang(sv) .hero-title,
:lang(sv) .section-title,
:lang(sv) .cta-title,
:lang(sv) .page-hero-title {
    letter-spacing: -0.02em;
}

/* Small uppercase eyebrow above headlines */
.eyebrow {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green-text);
    margin-bottom: 1.25rem;
}

.eyebrow-light {
    color: rgba(255, 255, 255, 0.65);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Organic blob accent — Wint-style soft shape */
.blob {
    position: absolute;
    border-radius: 42% 58% 63% 37% / 47% 41% 59% 53%;
    pointer-events: none;
    z-index: 0;
}

@keyframes blobDrift {
    0%, 100% { border-radius: 42% 58% 63% 37% / 47% 41% 59% 53%; transform: translate(0, 0) rotate(0deg); }
    50%      { border-radius: 58% 42% 37% 63% / 41% 59% 41% 59%; transform: translate(0, -14px) rotate(4deg); }
}

.blob-animated {
    animation: blobDrift 14s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
    .blob-animated { animation: none; }
}

/* Navigation */
.navbar {
    background: rgba(244, 246, 248, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

/* Hairline only once the page has scrolled */
.navbar.is-scrolled {
    border-bottom-color: var(--hairline);
    background: rgba(244, 246, 248, 0.94);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    height: 32px;
    width: auto;
}

.logo-text {
    font-family: 'Garet', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Nav items sit in soft pills that fill on hover */
.nav-menu .nav-link {
    padding: 0.6rem 1.1rem;
    border-radius: var(--r-pill);
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-menu .nav-link:hover {
    color: var(--ink);
    background: rgba(16, 37, 66, 0.06);
}

.nav-link:hover {
    color: var(--ink);
}

/* Dropdown menus */
.nav-item {
    position: relative;
}

.nav-item > .nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Chevron indicator for dropdown parents */
.nav-item > .nav-link::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s var(--ease);
    opacity: 0.6;
}

.nav-item:hover > .nav-link::after {
    transform: rotate(-135deg);
    margin-top: 4px;
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    padding: 0.5rem;
    box-shadow: 0 12px 32px rgba(16, 37, 66, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
    z-index: 1001;
}

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

.dropdown-link {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
    white-space: nowrap;
}

.dropdown-link:hover {
    color: var(--ink);
    background: rgba(16, 37, 66, 0.06);
}

.dropdown-link.active {
    color: var(--green-text);
    font-weight: 600;
}

/* Touch-friendly dropdown persistence (toggled by script.js on coarse pointers) */
.nav-item.dropdown-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.nav-actions .nav-link {
    padding: 0.6rem 0.9rem;
}

.nav-actions .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Person icon in nav */
.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-link-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.nav-link-icon:hover {
    background: rgba(16, 37, 66, 0.06);
    color: var(--ink);
}

.nav-link-icon.active {
    color: var(--green-text);
}

@media (max-width: 767.98px) {
    .nav-link-icon {
        padding: 0.75rem;
    }
    .nav-link-icon svg {
        width: 22px;
        height: 22px;
    }
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--ink);
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--r-pill);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease),
                box-shadow 0.3s var(--ease), color 0.3s var(--ease),
                border-color 0.3s var(--ease);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1.2;
}

.btn-primary {
    background: var(--fresh-emerald-green);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--green-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(7, 170, 89, 0.28);
}

/* Soft-tinted nav CTA, in the spirit of Wint's "Kom igång" */
.btn-soft {
    background: rgba(16, 37, 66, 0.07);
    color: var(--ink);
    padding: 0.85rem 1.6rem;
}

.btn-soft:hover {
    background: rgba(16, 37, 66, 0.12);
    transform: translateY(-1px);
}

/* Solid navy — the moodboard's primary dark pill */
.btn-navy {
    background: var(--midnight-navy);
    color: var(--white);
}

.btn-navy:hover {
    background: #1b3760;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 37, 66, 0.25);
}

/* Outlined pill on light backgrounds */
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--midnight-navy);
}

.btn-ghost:hover {
    background: var(--midnight-navy);
    color: var(--white);
    transform: translateY(-2px);
}

/* Arrow-circle CTA from the brand moodboard */
.btn-arrow {
    padding-right: 0.5rem;
}

.btn-arrow .arrow-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: currentColor;
    transition: transform 0.3s var(--ease);
}

.btn-arrow .arrow-circle svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Icon takes the button's own background so it reads out of the filled circle */
.btn-navy.btn-arrow .arrow-circle svg,
.btn-primary.btn-arrow .arrow-circle svg { color: var(--midnight-navy); }

.btn-white.btn-arrow .arrow-circle svg,
.btn-ghost.btn-arrow .arrow-circle svg { color: var(--white); }

.btn-ghost.btn-arrow:hover .arrow-circle svg { color: var(--midnight-navy); }

.btn-arrow:hover .arrow-circle {
    transform: translateX(4px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--midnight-navy);
}

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

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 var(--section-y);
    display: flex;
    align-items: center;
    background: var(--canvas);
    color: var(--ink);
    overflow: hidden;
}

.hero .container { position: relative; z-index: 1; }

/* Soft organic accent behind the hero visual */
.hero-blob {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle at 30% 30%,
                rgba(142, 175, 219, 0.38),
                rgba(142, 175, 219, 0) 70%);
    top: -80px;
    right: -140px;
}

.hero-blob-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 40% 40%,
                rgba(7, 170, 89, 0.20),
                rgba(7, 170, 89, 0.04) 70%);
    bottom: -120px;
    left: -100px;
    animation-delay: -6s;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}

.hero-content {
    max-width: none;
    animation: fadeIn 0.8s ease-out;
}

.hero-title {
    font-size: var(--display-1);
    color: var(--ink);
    margin-bottom: 1.75rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 400;
    max-width: 38ch;
}

/* Circular check bullets, Wint-style */
.hero-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.45;
}

.benefit-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--fresh-emerald-green);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.benefit-check svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.hero-actions .btn svg {
    transition: transform 0.3s ease;
}

.hero-actions .btn:hover svg {
    transform: translateX(4px);
}

.hero-stats {
    display: flex;
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-top: 2.5rem;
    border-top: 1px solid var(--hairline);
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Stats keep light treatment inside dark sections */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    display: inline-block;
}

.hero-main-image {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: var(--r-card-lg);
    box-shadow: 0 30px 70px rgba(16, 37, 66, 0.18);
    display: block;
}

.hero-badge-cloud {
    position: absolute;
    top: -40px;
    right: -60px;
    z-index: 2;
    pointer-events: none;
    background: var(--fresh-emerald-green);
    color: #fff;
    padding: 0.6rem 1.4rem;
    text-align: center;
    box-shadow: 0 8px 16px rgba(7, 170, 89, 0.35);
    transform: rotate(-5deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    white-space: nowrap;
}

.hero-badge-cloud strong {
    font-size: 1.125rem;
    line-height: 1.3;
    font-weight: 700;
}

.hero-badge-cloud span {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

@media (max-width: 1100px) {
    .hero-badge-cloud {
        top: -25px;
        right: -15px;
        padding: 0.5rem 1rem;
    }

    .hero-badge-cloud strong { font-size: 0.9375rem; }
    .hero-badge-cloud span { font-size: 0.8125rem; }
}

@media (max-width: 767.98px) {
    .hero-badge-cloud {
        top: -12px;
        right: -5px;
        padding: 0.35rem 0.75rem;
    }

    .hero-badge-cloud strong { font-size: 0.75rem; }
    .hero-badge-cloud span { font-size: 0.6875rem; }
}

/* Navy card floating on the light canvas */

/* ============================================================
   HERO — Hands holding laptop mockup (replaces hero-logo card)
   ============================================================ */

/* Showcase hands — realistic, larger, presenting the device */

/* Subtle lift on hover for the showcase presentation effect */

/* Floating "Allt ingår!"-style badge */

.dashboard-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    margin-left: auto;
}

/* Trust Section */
.trust-section {
    padding: 4rem 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    border-top: 1px solid var(--hairline);
}

.trust-content {
    text-align: center;
}

.trust-label {
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.trust-logo {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border-radius: var(--r-pill);
    border: 1px solid var(--hairline);
}

.trust-logo:hover {
    color: var(--ink);
    transform: translateY(-2px);
    border-color: rgba(16, 37, 66, 0.15);
}

/* Features Section */
.features {
    padding: var(--section-y) 0;
    background: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: clamp(4rem, 7vw, 6rem);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: var(--display-2);
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.65;
    text-wrap: pretty;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--r-card-lg);
    border: 1px solid var(--hairline);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
                border-color 0.4s var(--ease);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(16, 37, 66, 0.08);
    border-color: var(--cool-mist-blue);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(7, 170, 89, 0.12) 0%, rgba(135, 217, 159, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
    color: var(--green-text);
}



.feature-title {
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 0.625rem;
    text-wrap: balance;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.65;
}

/* CTA Section */
/* CTA as an inset rounded navy card on the canvas */
.cta-section {
    padding: var(--section-y) 0;
    background: var(--canvas);
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    background: var(--midnight-navy);
    border-radius: var(--r-card-lg);
    padding: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
}

.cta-content > * { position: relative; z-index: 1; }

/* Light-theme variant for the CTA card (e.g. book page bottom banner) */
.cta-content-light {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--hairline);
    box-shadow: 0 20px 48px rgba(16, 37, 66, 0.08);
}

.cta-content-light .cta-subtitle {
    color: var(--gray-600);
}

.cta-title {
    font-size: var(--display-2);
    margin-bottom: 1.25rem;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    max-width: 54ch;
    margin-left: auto;
    margin-right: auto;
}

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

/* Footer */
.footer {
    background: var(--midnight-navy);
    color: rgba(255, 255, 255, 0.6);
    padding: clamp(4rem, 7vw, 6rem) 0 2rem;
}

.footer .footer-link {
    color: rgba(255, 255, 255, 0.6);
}

.footer .footer-link:hover {
    color: var(--white);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-heading {
    letter-spacing: 0.02em;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-link-icon {
    display: inline-flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .nav-menu {
        display: none;
    }
    
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 3rem 0 4rem;
        min-height: auto;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
    }

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

    .hero-visual {
        order: 2;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        max-width: 100%;
    }

    /* Badge tucks in rather than hanging off the edge on small screens */
    .hero-badge-blob {
        top: -18px;
        right: 4px;
        padding: 1.25rem 1.4rem;
        max-width: 165px;
    }

    .hero-badge-blob strong { font-size: 1.125rem; }
    .hero-badge-blob span { font-size: 0.8125rem; }

    .hero-stats {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .feature-card { padding: 2rem; }

    .cta-content { padding: 3rem 1.5rem; }

    /* Blobs are decoration — keep them from causing overflow */
    .hero-blob, .hero-blob-2 { opacity: 0.6; }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }

    .hero-logo-image {
        width: 120px;
        margin-bottom: 1.5rem;
    }

    .hero-logo-text {
        font-size: 2rem;
    }

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

    .hero-hands-composition {
        max-width: 420px;
    }

    .hand {
        width: 110px;
        height: 100px;
    }

    .hand-left { left: -22px; }
    .hand-right { right: -22px; }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-logos {
        gap: 1.5rem;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    
    .cta-actions .btn {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Page Hero Styles */
/* Light, airy page hero to match the home hero */
.page-hero {
    padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
    background: var(--canvas);
    color: var(--ink);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: -220px;
    border-radius: 42% 58% 63% 37% / 47% 41% 59% 53%;
    background: radial-gradient(circle at 35% 35%,
                rgba(142, 175, 219, 0.28),
                rgba(142, 175, 219, 0) 70%);
    pointer-events: none;
}

.page-hero-content {
    max-width: 820px;
    margin: 0 auto;
}

/* Explicit section spacing variants — preferred over fragile sibling selectors */
.section {
    padding: var(--section-y) 0;
}

.section-alt {
    padding: var(--section-y) 0;
    background: var(--surface);
}

.section-compact {
    padding-top: clamp(2.5rem, 4vw, 4rem) !important;
}

/* Legacy: page hero supplies breathing room for the immediately following section.
   If an element is ever inserted between the hero and the first section,
   add .section-compact to that section instead. */
.page-hero + section {
    padding-top: clamp(2.5rem, 4vw, 4rem);
}

.page-hero-title {
    font-size: var(--display-2);
    margin-bottom: 1.5rem;
}

.page-hero-subtitle {
    font-size: 1.1875rem;
    color: var(--gray-600);
    line-height: 1.65;
    max-width: 60ch;
    margin: 0 auto;
    text-wrap: pretty;
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--green-text);
    font-weight: 600;
}

/* Features Overview */
.features-overview {
    padding: var(--section-y) 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-text);
    font-weight: bold;
}

/* Compliance Frameworks */
.compliance-frameworks {
    padding: var(--section-y) 0;
    background: var(--canvas-warm);
}

.frameworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.framework-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--r-card);
    border: 1px solid var(--gray-200);
}

.framework-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.framework-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}

.framework-badge {
    background: var(--green-text);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.framework-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.framework-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

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

.framework-list li {
    padding: 0.5rem 0;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.5rem;
}

.framework-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--green-text);
    font-weight: bold;
}

.framework-timeline {
    background: rgba(7, 170, 89, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--fresh-emerald-green);
    color: var(--ink);
    font-size: 0.875rem;
}

/* Process Steps */

/* Pricing Plans */
.pricing-plans {
    padding: var(--section-y) 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--r-card);
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: var(--green-text);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border-color: var(--green-text);
    transform: scale(1.05);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fresh-emerald-green);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
}

.plan-price {
    margin-bottom: 1rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ink);
}

.price-period {
    color: var(--gray-600);
    font-size: 1rem;
}

.plan-description {
    color: var(--gray-600);
    line-height: 1.6;
}

.plan-features h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
}

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

.features-list li {
    padding: 0.75rem 0;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-text);
    font-weight: bold;
}

.features-list li:last-child {
    border-bottom: none;
}

.plan-action {
    text-align: center;
}

/* Add-ons */
.pricing-addons {
    padding: var(--section-y) 0;
    background: var(--canvas-warm);
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.addon-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--r-card);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.addon-icon {
    width: 60px;
    height: 60px;
    background: rgba(7, 170, 89, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.addon-icon svg {
    width: 30px;
    height: 30px;
    color: var(--green-text);
}

.addon-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
}

.addon-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.addon-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-text);
}

/* FAQ */
.pricing-faq, .contact-faq {
    padding: var(--section-y) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--r-card);
    border: 1px solid var(--gray-200);
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
    text-wrap: balance;
}

.faq-answer {
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* About page styles */
.about-mission {
    padding: var(--section-y) 0;
}

.mission-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.mission-content--single {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.mission-description {
    color: var(--gray-600);
    line-height: 1.8;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.mission-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-values {
    padding: var(--section-y) 0;
    background: var(--canvas-warm);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--r-card);
    border: 1px solid var(--hairline);
    text-align: center;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
                border-color 0.4s var(--ease);
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(16, 37, 66, 0.08);
    border-color: var(--cool-mist-blue);
}

.value-card--book {
    background: var(--white);
    border-color: rgba(7, 170, 89, 0.2);
}

.value-card--book:hover {
    border-color: var(--fresh-emerald-green);
}

.value-card--book .value-description a {
    color: var(--green-text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.value-card--book .value-description a:hover {
    text-decoration: underline;
}

.value-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(7, 170, 89, 0.12) 0%, rgba(135, 217, 159, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.value-icon svg {
    width: 26px;
    height: 26px;
    color: var(--green-text);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.value-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
}

.value-description {
    color: var(--gray-600);
    line-height: 1.6;
}

.about-team {
    padding: var(--section-y) 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
}

.member-photo {
    margin-bottom: 1.5rem;
}

/* Enterprise CEO headshot — circular, crisp, subtle shadow */
.member-photo-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(16, 37, 66, 0.14);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.team-member:hover .member-photo-img {
    transform: scale(1.04);
    box-shadow: 0 8px 28px rgba(16, 37, 66, 0.18);
}

.placeholder-photo {
    width: 120px;
    height: 120px;
    background: var(--cool-sky-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
}

.member-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.member-title {
    color: var(--green-text);
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-bio {
    color: var(--gray-600);
    line-height: 1.6;
}

.about-info {
    padding: 3rem 0;
    background: var(--canvas-warm);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
}

.info-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.info-detail {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

.careers-cta {
    padding: var(--section-y) 0;
    background: var(--midnight-navy);
    color: var(--white);
    text-align: center;
}

/* Contact page styles */
.contact-options {
    padding: var(--section-y) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--r-card);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(7, 170, 89, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-icon svg {
    width: 30px;
    height: 30px;
    color: var(--green-text);
}

.contact-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
    text-wrap: balance;
}

.contact-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-action {
    color: var(--green-text);
    text-decoration: none;
    font-weight: 600;
}

.contact-action:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form-section {
    padding: var(--section-y) 0;
    background: var(--canvas-warm);
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--r-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
    text-wrap: balance;
}

.form-subtitle {
    color: var(--gray-600);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--ink);
}

.form-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23102542' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--green-text);
}

.form-error {
    display: none;
    color: #C53030;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-group.has-error .form-error {
    display: block;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--gray-600);
    line-height: 1.5;
}

.signup-checkbox-label {
    font-size: 0.8125rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.5rem;
}

.signup-checkbox-label a {
    white-space: nowrap;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.btn-full {
    width: 100%;
}

/* Office Info */
.office-info {
    padding: var(--section-y) 0;
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.office-card {
    text-align: center;
    padding: 2rem;
}

.office-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
}

.office-details p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* Login page styles */
.login-section {
    min-height: 80vh;
    padding: var(--section-y) 0;
    display: flex;
    align-items: center;
}

/* Signup side panel (classes instead of inline styles) */
.signup-visual {
    order: 1;
    text-align: left;
}

.signup-visual .visual-content {
    max-width: 480px;
    margin: 0;
}

.signup-visual .visual-title {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

.signup-visual .visual-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.signup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signup-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

.signup-form-order {
    order: 2;
}

/* Honeypot field — visually hidden but present in the DOM */
.form-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.login-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-600);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-visual {
    background: var(--midnight-navy);
    color: var(--white);
    padding: 3rem;
    border-radius: var(--r-card);
    text-align: center;
}

.visual-content {
    max-width: 400px;
    margin: 0 auto;
}

.visual-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.visual-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered reveals (Intersection Observer in script.js) */
.js-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), border-color 0.4s var(--ease);
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays once the parent grid enters the viewport */
.js-reveal.is-visible:nth-child(1) { transition-delay: 0.08s; }
.js-reveal.is-visible:nth-child(2) { transition-delay: 0.16s; }
.js-reveal.is-visible:nth-child(3) { transition-delay: 0.24s; }
.js-reveal.is-visible:nth-child(4) { transition-delay: 0.32s; }
.js-reveal.is-visible:nth-child(5) { transition-delay: 0.40s; }
.js-reveal.is-visible:nth-child(6) { transition-delay: 0.48s; }
.js-reveal.is-visible:nth-child(7) { transition-delay: 0.56s; }
.js-reveal.is-visible:nth-child(8) { transition-delay: 0.64s; }

/* ===== Accessibility ===== */

/* Skip-to-content link — hidden until focused */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1100;
    background: var(--midnight-navy);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 12px 12px;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
    top: 0;
    color: var(--white);
}

/* Clear keyboard focus for every interactive element */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--green-text);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Anchor targets must clear the fixed navbar */
[id] {
    scroll-margin-top: 110px;
}

/* The hamburger is a <button> — strip its default chrome */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0.5rem;
}

/* Respect users who prefer reduced motion */
@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;
    }
}

/* ===== Mobile menu open state (lives here, not in script.js) ===== */
@media (max-width: 767.98px) {
    /* Must come after the unscoped ".mobile-menu-toggle { display: none }"
       above — same specificity, later rule wins, so the hamburger is only
       visible inside the mobile breakpoint. */
    .mobile-menu-toggle {
        display: flex;
    }

    /* The wrapper wraps so the open menu, language switcher and actions
       stack as full-width rows inside the sticky navbar — no absolute
       positioning, so the panels can never overlap. */
    .navbar .nav-wrapper {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .nav-menu.active,
    .nav-actions.active {
        display: flex;
        position: static;
        flex-basis: 100%;
        flex-direction: column;
        padding: 0.5rem 0 1rem;
        background: transparent;
        box-shadow: none;
        z-index: 100;
    }

    .nav-menu.active {
        order: 10;
    }

    .nav-actions.active {
        order: 12;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        border-top: 1px solid var(--hairline);
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > .nav-link::after {
        margin-left: auto;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 0.75rem;
        min-width: auto;
        background: transparent;
    }

    .dropdown-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

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

    /* Language switcher sits as a full-width row inside the open menu */
    .lang-switcher {
        order: 11;
        width: 100%;
        padding: 0.75rem 0;
        border-top: 1px solid var(--hairline);
        justify-content: center;
    }
}

/* ===== Cookie consent banner ===== */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(680px, calc(100% - 2rem));
    background: var(--midnight-navy);
    color: var(--white);
    border-radius: var(--r-card);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 50px rgba(16, 37, 66, 0.35);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.cookie-banner-text a {
    color: var(--minty-fresh-green);
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-banner-actions button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.cookie-accept {
    background: var(--fresh-emerald-green);
    color: var(--white);
    border: 0;
}

.cookie-accept:hover {
    filter: brightness(1.1);
}

/* Decline is styled with equal visual weight to Accept (EDPB symmetry) */
.cookie-decline {
    background: var(--white);
    color: var(--midnight-navy);
    border: 0;
}

.cookie-decline:hover {
    filter: brightness(0.94);
}

@media (max-width: 640px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-banner-actions {
        justify-content: center;
    }
}

/* ===== Legal pages (privacy / terms) ===== */
.legal-section {
    padding-bottom: var(--section-y);
}

.legal-content {
    max-width: 760px;
    margin: 0 auto;
}

/* Wider variant for table-heavy documents (subprocessors etc.) */
.legal-content-wide {
    max-width: 900px;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--ink);
    margin: 2.5rem 0 1rem;
}

.legal-content h3 {
    font-size: 1.125rem;
    color: var(--ink);
    margin: 1.5rem 0 0.75rem;
}

.legal-content p,
.legal-content ul {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--green-text);
}

.legal-updated {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Tables inside legal documents (cookie list, retention schedule, subprocessors) */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.75rem;
    font-size: 0.95rem;
}

.legal-table th {
    text-align: left;
    color: var(--ink);
    font-weight: 600;
    padding: 0.65rem 0.9rem;
    border-bottom: 2px solid var(--hairline);
}

.legal-table td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--hairline);
    color: var(--gray-600);
    vertical-align: top;
}

.legal-table code {
    font-size: 0.85em;
    background: var(--canvas);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
}

/* ===== Security page ===== */
.security-status {
    padding-bottom: var(--section-y);
}

/* Compliance roadmap status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.status-badge-active {
    background: rgba(7, 170, 89, 0.14);
    color: var(--green-text);
}

.status-badge-roadmap {
    background: rgba(142, 175, 219, 0.25);
    color: var(--ink);
}

/* Whitepaper showcase card — cover image + download info */
.whitepaper-showcase {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: center;
    padding: 2.5rem;
}

.whitepaper-showcase-image {
    display: block;
    position: relative;
    border-radius: var(--r-card);
    overflow: hidden;
    /* Multi-layer shadow for realistic depth */
    box-shadow:
        0 2px 4px rgba(16, 37, 66, 0.06),
        0 12px 24px rgba(16, 37, 66, 0.10),
        0 32px 64px rgba(16, 37, 66, 0.14);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
    line-height: 0;
    /* Straight when idle */
    transform: translateY(0);
}

.whitepaper-showcase-image:hover {
    /* Lift up and tilt slightly toward the viewer (upwards) */
    transform: perspective(1200px) rotateX(-4deg) translateY(-8px);
    box-shadow:
        0 6px 12px rgba(16, 37, 66, 0.08),
        0 20px 40px rgba(16, 37, 66, 0.14),
        0 48px 96px rgba(16, 37, 66, 0.20);
}

.whitepaper-showcover {
    width: 100%;
    height: auto;
    display: block;
}

/* Page-edge effect — subtle left-side highlight simulating paper thickness */
.whitepaper-showcase-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 2;
}

.whitepaper-showcase-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.whitepaper-showcase-content .security-status-title {
    font-size: 1.5rem;
    margin-bottom: 0;
    text-wrap: balance;
}

.whitepaper-showcase-content .security-status-description {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .whitepaper-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .whitepaper-showcase-image {
        max-width: 280px;
        margin: 0 auto;
        /* Keep straight on small screens; simpler shadows for performance */
        transform: none;
        box-shadow:
            0 2px 4px rgba(16, 37, 66, 0.06),
            0 12px 24px rgba(16, 37, 66, 0.10),
            0 24px 48px rgba(16, 37, 66, 0.12);
    }
    .whitepaper-showcase-image:hover {
        transform: translateY(-4px);
    }
    .whitepaper-showcase-content .cta-actions {
        justify-content: center;
    }
}

/* Dark mode: subtle border so the light cover stands out on dark canvas */
[data-theme="dark"] .whitepaper-showcase-image {
    border: 1px solid var(--hairline);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.20),
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 32px 64px rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] .whitepaper-showcase-image:hover {
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.25),
        0 20px 40px rgba(0, 0, 0, 0.30),
        0 48px 96px rgba(0, 0, 0, 0.35);
}

/* ===== Book page ===== */
.book-showcase {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3.5rem;
    padding: 3rem;
}

.book-showcase .whitepaper-showcase-image {
    max-width: 420px;
    margin: 0 auto;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.book-meta-item {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--green-text);
    background: rgba(7, 170, 89, 0.10);
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.book-cta-actions {
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .book-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
    .book-showcase .whitepaper-showcase-image {
        max-width: 260px;
    }
}

/* Book page — inside pages preview gallery */
.book-pages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.book-page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s var(--ease);
}

.book-page-card:hover {
    transform: translateY(-4px);
}

.book-page-frame {
    display: block;
    border-radius: var(--r-card);
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(16, 37, 66, 0.06),
        0 8px 16px rgba(16, 37, 66, 0.08),
        0 16px 32px rgba(16, 37, 66, 0.10);
    transition: box-shadow 0.35s var(--ease);
    line-height: 0;
    background: var(--surface);
    border: 1px solid var(--hairline);
}

.book-page-card:hover .book-page-frame {
    box-shadow:
        0 4px 8px rgba(16, 37, 66, 0.08),
        0 12px 24px rgba(16, 37, 66, 0.12),
        0 24px 48px rgba(16, 37, 66, 0.16);
}

.book-page-image {
    width: 100%;
    height: auto;
    display: block;
}

.book-page-caption {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
}

@media (max-width: 640px) {
    .book-pages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 360px;
    }
}

[data-theme="dark"] .book-page-frame {
    border: 1px solid var(--hairline);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.20),
        0 16px 32px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .book-page-card:hover .book-page-frame {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.20),
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 24px 48px rgba(0, 0, 0, 0.30);
}

/* Book page — author section */
.book-author {
    padding: var(--section-y) 0;
}

.book-author-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.book-author-photo {
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(16, 37, 66, 0.06),
        0 8px 16px rgba(16, 37, 66, 0.08),
        0 16px 32px rgba(16, 37, 66, 0.10);
    line-height: 0;
    background: var(--surface);
    border: 1px solid var(--hairline);
    aspect-ratio: 1;
}

.book-author-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.book-author-bio .author-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
    text-wrap: balance;
}

.book-author-bio .author-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--green-text);
    margin-bottom: 1rem;
    display: block;
}

.book-author-bio p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

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

@media (max-width: 640px) {
    .book-author-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .book-author-photo {
        max-width: 180px;
        margin: 0 auto;
    }
}

/* Book page — audience section */
.book-audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.book-audience-card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.book-audience-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 4px 8px rgba(16, 37, 66, 0.06),
        0 12px 24px rgba(16, 37, 66, 0.10),
        0 24px 48px rgba(16, 37, 66, 0.12);
}

.book-audience-icon {
    width: 48px;
    height: 48px;
    color: var(--green-text);
    margin: 0 auto 1rem;
}

.book-audience-icon svg {
    width: 100%;
    height: 100%;
}

.book-audience-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.book-audience-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
    text-wrap: pretty;
}

@media (max-width: 900px) {
    .book-audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .book-audience-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Book page — contents section */
.book-contents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.book-contents-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    padding: 1.25rem 1.5rem;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.book-contents-item:hover {
    transform: translateY(-3px);
    box-shadow:
        0 4px 8px rgba(16, 37, 66, 0.06),
        0 12px 24px rgba(16, 37, 66, 0.10);
}

.book-contents-number {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fresh-emerald-green);
    line-height: 1;
    flex-shrink: 0;
    min-width: 2rem;
    text-align: center;
}

.book-contents-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.book-contents-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    text-wrap: balance;
}

.book-contents-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    text-wrap: pretty;
}

@media (max-width: 640px) {
    .book-contents-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode overrides for new book sections */
[data-theme="dark"] .book-author-photo {
    border: 1px solid var(--hairline);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.20),
        0 16px 32px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .book-audience-card {
    background: var(--surface);
    border-color: var(--hairline);
}

[data-theme="dark"] .book-audience-card:hover {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.20),
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 24px 48px rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] .book-contents-item {
    background: var(--surface);
    border-color: var(--hairline);
}

[data-theme="dark"] .book-contents-item:hover {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.20),
        0 12px 24px rgba(0, 0, 0, 0.25);
}

/* 404 page */
.nav-actions-static {
    display: flex !important;
}

/* ===== Print ===== */
@media print {
    .navbar,
    .cookie-banner,
    .skip-link,
    .hero-actions,
    .cta-actions,
    .footer-bottom-links,
    .blob {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .cta-section,
    .page-hero,
    .hero {
        padding: 1.5rem 0 !important;
        background: #fff !important;
    }

    .section-title,
    .cta-title,
    .page-hero-title,
    .footer-heading {
        color: #000 !important;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #444;
    }

    .feature-card,
    .security-status-card,
    .step-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

.error-hero .page-hero-content {
    text-align: center;
    margin: 0 auto;
}

.error-hero .cta-actions {
    justify-content: center;
    margin-top: 2rem;
}

/* Trust resources link strip */
.trust-resources {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2rem;
    padding-bottom: var(--section-y);
}

.trust-resources a {
    color: var(--green-text);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease);
}

.trust-resources a:hover {
    border-bottom-color: currentColor;
}

.security-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.security-status-card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    padding: 2rem;
}

.security-status-title {
    color: var(--ink);
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.security-status-description {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.security-status-description a {
    color: var(--green-text);
}

.security-disclosure {
    padding-bottom: var(--section-y);
}

.security-disclosure-card {
    background: var(--canvas-warm);
    border-radius: var(--r-card-lg);
    padding: 3rem;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.security-disclosure-card .section-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.security-disclosure-card p {
    color: var(--gray-600);
    line-height: 1.7;
}

.security-disclosure-card a {
    color: var(--green-text);
    font-weight: 600;
}

@media (max-width: 900px) {
    .security-status-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Blog ===== */
.blog-card {
    position: relative;
}

.blog-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-text);
    background: rgba(7, 170, 89, 0.1);
    border-radius: var(--r-pill);
    padding: 0.3rem 0.85rem;
    margin-bottom: 1rem;
}

/* ===== How it Works (Wint-inspired) ===== */
.how-it-works {
    padding: var(--section-y) 0;
    background: var(--canvas);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border-radius: var(--r-card-lg);
    border: 1px solid var(--hairline);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
                border-color 0.4s var(--ease);
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(16, 37, 66, 0.08);
    border-color: var(--cool-mist-blue);
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--minty-fresh-green);
    color: var(--midnight-navy);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.step-description {
    color: var(--gray-600);
    line-height: 1.65;
    font-size: 0.9375rem;
}

/* ===== Why Compeas (Differentiators) ===== */
.why-compeas {
    padding: var(--section-y) 0;
    background: var(--surface);
}

.differentiators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.differentiator-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: var(--r-card-lg);
    border: 1px solid var(--hairline);
    background: var(--surface);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.differentiator-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(16, 37, 66, 0.08);
    border-color: rgba(16, 37, 66, 0.15);
}

.differentiator-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(7, 170, 89, 0.12) 0%, rgba(135, 217, 159, 0.2) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.differentiator-icon svg {
    width: 28px;
    height: 28px;
    color: var(--green-text);
}

.differentiator-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.differentiator-description {
    color: var(--gray-600);
    line-height: 1.65;
    font-size: 0.9375rem;
}

@media (max-width: 900px) {
    .differentiators-grid {
        grid-template-columns: 1fr;
    }
    .differentiator-card {
        padding: 2rem 1.5rem;
    }
}

/* ===== Language Switcher ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--r-pill);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-500);
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-link:hover {
    color: var(--ink);
    background: rgba(16, 37, 66, 0.06);
}

.lang-link.active {
    color: var(--ink);
    background: rgba(16, 37, 66, 0.1);
    font-weight: 600;
}

/* ===== Responsive for new sections ===== */
@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 2rem 1.5rem;
    }
}
/* ============================================================
   DARK THEME — activated via [data-theme="dark"] on <html>
   (set by script.js: OS preference default, manual toggle in
   the navbar, persisted in localStorage under 'compeas-theme')
   ============================================================ */

:root[data-theme="dark"] {
    color-scheme: dark;

    /* Brand ink flips to frost white; minty green keeps links AA-legible */
    --ink: #EAF1F8;
    --green-text: #87D99F;
    /* CTA hover: a notch lighter than the base emerald for dark-mode
       affordance, but still saturated — never the minty text shade */
    --green-btn-hover: #12C170;

    /* Deep navy surfaces — darker than the brand navy sections,
       so footer/CTA cards still read as intentional accents */
    --canvas: #0B1526;
    --canvas-warm: #101D33;
    --surface: #152A46;
    --hairline: rgba(255, 255, 255, 0.12);

    /* Inverted gray scale */
    --gray-100: #182C49;
    --gray-200: #2A3F5E;
    --gray-300: #3D5578;
    --gray-400: #7E93B0;
    --gray-500: #97ABC6;
    --gray-600: #B3C3D8;
    --gray-700: #D5E0EE;
    --gray-800: #EAF1F8;
    --gray-900: #F3F7FC;
}

/* Gentle cross-fade when the theme flips */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar — dark frosted glass */
[data-theme="dark"] .navbar {
    background: rgba(11, 21, 38, 0.82);
}
[data-theme="dark"] .navbar.is-scrolled {
    background: rgba(11, 21, 38, 0.94);
}

/* Navy-tinted hover washes become white-tinted */
[data-theme="dark"] .nav-menu .nav-link:hover,
[data-theme="dark"] .dropdown-link:hover,
[data-theme="dark"] .nav-link-icon:hover,
[data-theme="dark"] .lang-link:hover {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .lang-link.active {
    background: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .btn-soft {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .btn-soft:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Ghost button: light outline, light hover fill */
[data-theme="dark"] .btn-ghost {
    border-color: var(--ink);
}
[data-theme="dark"] .btn-ghost:hover {
    background: var(--ink);
    color: var(--canvas);
}

/* Components that hardcode white card backgrounds */
[data-theme="dark"] .framework-card,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .addon-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .value-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .contact-form-wrapper {
    background: var(--surface);
}

/* Form fields — recessed dark wells with light text */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
    background-color: var(--canvas-warm);
    color: var(--ink);
}
[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23EFF7F9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
/* The opened dropdown list must follow the theme too
   (Windows browsers don't inherit color-scheme into the popup) */
[data-theme="dark"] .form-select option {
    background-color: var(--surface);
    color: var(--ink);
}
[data-theme="dark"] .form-error {
    color: #FF8080;
}
[data-theme="dark"] .form-group.has-error .form-input,
[data-theme="dark"] .form-group.has-error .form-select,
[data-theme="dark"] .form-group.has-error .form-textarea {
    border-color: #FF8080;
}

/* Small green pill badges: mint text on mint tint (dark-mode badge idiom) */
[data-theme="dark"] .framework-badge {
    background: rgba(135, 217, 159, 0.16);
    color: var(--green-text);
}

/* Navy buttons on dark cards need a hairline to stay visible */
[data-theme="dark"] .btn-navy {
    border: 1px solid var(--hairline);
}

/* Subtle separation for the light product screenshot on dark canvas */
[data-theme="dark"] .hero-main-image {
    border: 1px solid var(--hairline);
}

/* Theme toggle button in the navbar */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.theme-toggle:hover {
    background: rgba(16, 37, 66, 0.06);
    color: var(--ink);
}
[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
}
/* Sun shows in light mode (click → go dark), moon in dark mode */
.theme-toggle .icon-moon {
    display: none;
}
[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}
[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

@media print {
    .theme-toggle {
        display: none;
    }
}
