/* ========================================
   OrFlo Marketing Site, "Modern Builder"
   Deep Construction Blue + Safety Orange
   ======================================== */

:root {
    /* Brand */
    --primary: #00288e;            /* Deep Construction Blue */
    --primary-dark: #001453;
    --primary-container: #1e40af;
    --primary-fixed: #dde1ff;      /* light blue chip/tile bg */
    --accent: #fd761a;             /* Safety Orange, CTA only */
    --accent-dark: #e66000;
    --accent-fixed: #ffdbca;
    --accent-deep: #9d4300;

    /* Neutrals */
    --surface: #f7f9fb;
    --surface-container: #f2f4f6;
    --bg-white: #ffffff;
    --text-dark: #191c1e;
    --text-light: #444653;
    --text-subtle: #64748b;
    --border-color: #e2e8f0;
    --border-strong: #c4c5d5;
    --green: #16a34a;

    /* Layout */
    --header-h: 72px;              /* fixed header height, hero offsets by this */

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --radius-sm: 4px;
    --radius-md: 8px;
    --transition: all 0.2s ease;

    /* Legacy aliases (used by inline schema styles) */
    --primary-color: #00288e;
    --bg-light: #f7f9fb;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--surface);
    overflow-x: hidden;
}

.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Uppercase label treatment (design system "label-md") */
.label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--surface-container);
}

.btn-ghost-light {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.btn-sm {
    padding: 0.55rem 1.1rem;
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(247, 249, 251, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1250px;
    height: 100%;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    height: 44px;
    flex-shrink: 0;
}

.logo {
    height: 100%;
    width: auto;
}

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

.nav-links a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-light);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

/* Language switch */
.language-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 3px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.language-switch:hover {
    border-color: var(--primary);
}

.lang-option {
    position: relative;
    z-index: 2;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    transition: var(--transition);
    cursor: pointer;
}

.lang-option.active {
    color: white;
}

.lang-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.25s ease;
    z-index: 1;
}

.language-switch[aria-checked="true"] .lang-slider {
    transform: translateX(100%);
}

/* ========================================
   Hero Section, dark full-bleed photo with
   the Three.js process-flow scene on top
   ======================================== */

.hero {
    position: relative;
    margin-top: var(--header-h);
    min-height: min(840px, calc(100vh - var(--header-h)));   /* fallback without svh */
    min-height: min(840px, calc(100svh - var(--header-h)));
    display: flex;
    align-items: center;
    padding: 4.5rem 0 5rem;
    background: var(--primary-dark);
    overflow: hidden;
    isolation: isolate;
}

/* Layer 0: the photo, slightly overscanned so the JS parallax never
   reveals an edge */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: scale(1.12);
    will-change: transform;
}

/* Layer 1: brand navy overlay, heaviest on the left where the copy sits,
   plus the subtle dot grid the light hero used to carry */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 26px 26px,
        linear-gradient(to bottom, rgba(1, 8, 38, 0.42), rgba(1, 8, 38, 0) 32%, rgba(0, 5, 26, 0) 62%, rgba(0, 5, 26, 0.62) 100%),
        linear-gradient(97deg,
            rgba(1, 8, 38, 0.97) 0%,
            rgba(2, 13, 60, 0.92) 30%,
            rgba(2, 15, 66, 0.78) 52%,
            rgba(1, 10, 48, 0.62) 74%,
            rgba(0, 6, 30, 0.74) 100%);
}

/* Layer 2: the Three.js canvas (hero3d.js mounts it here). pointer-events
   stays off so text selection and scrolling are never blocked; the JS
   raycasts from window coordinates instead. */
.hero-3d {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-3d canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Copy protection above the canvas: dims cards drifting over the left
   copy column and the trust row, leaves the right stage untouched */
.hero-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(97deg, rgba(1, 8, 38, 0.5) 0%, rgba(2, 13, 60, 0.3) 34%, rgba(2, 15, 66, 0) 56%),
        linear-gradient(to top, rgba(0, 5, 26, 0.4) 0%, rgba(0, 5, 26, 0) 34%);
}

/* Layer 3: the copy */
.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 640px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffa063;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-eyebrow::before {
    content: '';
    width: 36px;
    height: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 28px rgba(0, 6, 30, 0.65);
    animation: fadeInUp 0.8s ease-out;
}

.hero-title .accent {
    color: #ff8a3d;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 2.25rem;
    text-shadow: 0 1px 14px rgba(0, 6, 30, 0.5);
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero .btn-primary {
    box-shadow: 0 6px 22px rgba(253, 118, 26, 0.35);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: rgba(203, 213, 225, 0.95);
    animation: fadeInUp 0.8s ease-out 0.45s both;
}

.hero-trust .trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-trust svg {
    width: 20px;
    height: 20px;
    color: #34d399;
    flex-shrink: 0;
}

/* Scroll cue at the bottom of the hero */
.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.1rem;
    z-index: 2;
    color: rgba(255, 255, 255, 0.65);
    /* base centering so the cue stays centered under reduced motion */
    transform: translateX(-50%);
    animation: cueBob 2.4s ease-in-out infinite;
}

.hero-scroll-cue svg {
    width: 26px;
    height: 26px;
    display: block;
}

@keyframes cueBob {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
    50% { transform: translate(-50%, 9px); opacity: 0.95; }
}

/* ========================================
   Section scaffolding
   ======================================== */

.section-head {
    margin-bottom: 3.5rem;
}

.section-head.center {
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.section-sub {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 680px;
}

.section-head.center .section-sub {
    margin: 0 auto;
}

/* AI-sectie: donkere fotostijl (zoals de CTA), witte koppen; subtitel op één regel */
.ai-section .section-title {
    color: #ffffff;
}

.ai-section .section-sub {
    max-width: none;
    color: rgba(226, 232, 240, 0.9);
}

/* ========================================
   Why OrFlo, problems removed
   ======================================== */

.why {
    padding: 6rem 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

.why-eyebrow {
    display: inline-block;
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.why-card {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.6rem;
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

.why-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.why-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-fixed);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.why-icon svg {
    width: 24px;
    height: 24px;
}

.why-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.why-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.925rem;
}

.why-more {
    display: flex;
    justify-content: center;
    margin-top: 2.75rem;
}

/* ========================================
   AI Section (bento cards)
   ======================================== */

.ai-section {
    padding: 6rem 0;
    background-color: var(--primary-dark);
    background-image: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)), url('../img/hero_sub2.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

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

.ai-card {
    background: rgba(10, 18, 48, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease, background 0.5s ease;
}

.ai-card:hover {
    background: rgba(16, 26, 64, 0.62);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ai-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-fixed);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-card-icon svg {
    width: 26px;
    height: 26px;
}

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.badge-live {
    background: #dcfce7;
    color: #15803d;
}

.badge-roadmap {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(255, 255, 255, 0.35);
}

.ai-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

.ai-card > p {
    color: rgba(226, 232, 240, 0.88);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.ai-example {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
}

.ai-example-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #b4c0ff;
    margin-bottom: 0.5rem;
}

.ai-example-label.alert {
    color: #ff9d5c;
}

.ai-example-label svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ai-example-text {
    font-size: 0.875rem;
    color: rgba(226, 232, 240, 0.82);
    line-height: 1.6;
}

.ai-example-text.quote {
    font-style: italic;
}

.ai-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(10, 18, 48, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.7;
}

.ai-privacy-note svg {
    width: 22px;
    height: 22px;
    color: #b4c0ff;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   Features Section
   ======================================== */

.features {
    padding: 6rem 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

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

.feature-card {
    background: var(--bg-white);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-fixed);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

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

/* --- Expandable extra features --- */

.features-extra {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.5s ease, opacity 0.5s ease;
}

.features-extra.open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.features-extra-inner {
    overflow: hidden;
    min-height: 0;
}

.features-grid-extra {
    margin-top: 1.5rem;
}

.features-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

#featuresToggle .chevron {
    transition: transform 0.5s ease;
}

#featuresToggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* ========================================
   CTA Section
   ======================================== */

.cta {
    padding: 6rem 0;
    background-color: var(--primary-dark);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/hero_sub.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    border-bottom: 1px solid var(--border-color);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

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

/* Legacy class names kept for script.js hooks */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button-demo {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

.cta-button-demo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    box-shadow: none;
}

/* ========================================
   FAQ Section
   ======================================== */

.faq {
    padding: 6rem 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

.faq-card:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    margin: 0;
}

.faq-question button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary);
    text-align: left;
}

.faq-question .chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-subtle);
    transition: transform 0.5s ease;
}

.faq-card.open .faq-question .chevron {
    transform: rotate(180deg);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    padding-top: 0;
    transition: grid-template-rows 0.5s ease, opacity 0.5s ease, padding-top 0.5s ease;
}

.faq-card.open .faq-answer {
    grid-template-rows: 1fr;
    opacity: 1;
    padding-top: 0.75rem;
}

.faq-answer > p {
    overflow: hidden;
    min-height: 0;
}

.faq-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--surface-container);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

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

.footer-provider {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.footer-provider a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.footer-provider a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

.contact-details {
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 2rem;
}

.contact-details summary {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-light);
    cursor: pointer;
    list-style: none;
    padding: 0.5rem;
    transition: var(--transition);
    user-select: none;
}

.contact-details summary::-webkit-details-marker {
    display: none;
}

.contact-details summary::after {
    content: ' ▾';
    font-size: 0.9rem;
}

.contact-details summary:hover {
    color: var(--primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.contact-item h4 {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.9rem;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Demo Lightbox
   ======================================== */

.demo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 18, 40, 0.85);
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    overflow: hidden;
}

.demo-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.demo-lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    font-family: inherit;
}

.demo-lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.demo-lightbox iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   Animations
   ======================================== */

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

/* ========================================
   Scroll Reveal
   ======================================== */

/* Classes are added via JS (initScrollReveal), so content stays visible
   when JavaScript is unavailable. */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-fade {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal { transform: translateY(28px); }
.reveal-left { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-scale { transform: translateY(16px) scale(0.96); }

.in-view {
    opacity: 1;
    transform: none;
}

/* Once the reveal is done, restore the hover transition (0.5s shadow lift) */
.revealed {
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .hero-content {
        max-width: 560px;
    }

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

@media (max-width: 860px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .nav-container {
        padding: 0.75rem 1.25rem;
    }

    .logo-container {
        height: 36px;
    }

    :root {
        --header-h: 61px;
    }

    .hero {
        min-height: min(700px, calc(100vh - var(--header-h)));   /* fallback without svh */
        min-height: min(700px, calc(100svh - var(--header-h)));
        padding: 3.25rem 0 4rem;
    }

    /* stronger, more even overlay: the 3D flow runs behind the copy here */
    .hero-bg::after {
        background:
            radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 26px 26px,
            linear-gradient(180deg, rgba(1, 9, 42, 0.94) 0%, rgba(2, 12, 54, 0.86) 55%, rgba(0, 6, 30, 0.9) 100%);
    }

    .hero-scroll-cue {
        display: none;
    }

    /* the flow runs behind the copy here: fade it to ambient so the
       text always wins */
    .hero-3d {
        opacity: 0.5;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

    .hero-trust {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .why,
    .ai-section,
    .features,
    .cta,
    .faq {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-sub {
        font-size: 1rem;
    }

    .features-grid,
    .ai-grid,
    .why-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

    .cta p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .faq-card {
        padding: 1.35rem 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .demo-lightbox.active {
        padding: 1rem;
    }

    .demo-lightbox-content {
        height: 85vh;
    }

    .demo-lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .lang-option {
        padding: 0.3rem 0.7rem;
    }

    .cta-button {
        padding: 0.9rem 1.75rem;
    }

    .demo-lightbox-content {
        height: 80vh;
    }
}

/* ========================================
   Footer legal links
   ======================================== */

.footer-legal {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.footer-legal a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

/* ========================================
   Legal / content pages (privacy, cookies, voorwaarden)
   ======================================== */

.legal-hero {
    background: var(--primary);
    color: #fff;
    padding: calc(var(--header-h) + 3.5rem) 0 3rem;
}

.legal-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
}

.legal-hero p {
    margin-top: 0.75rem;
    max-width: 60ch;
    color: var(--primary-fixed);
    font-size: 1.05rem;
}

.legal {
    background: var(--bg-white);
    padding: 3.5rem 0 4rem;
}

.legal-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-note {
    background: var(--accent-fixed);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent-deep);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.legal h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2.5rem 0 0.85rem;
}

.legal h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.75rem 0 0.6rem;
}

.legal p,
.legal li {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

.legal ul,
.legal ol {
    margin: 0 0 1rem 1.5rem;
}

.legal li {
    margin-bottom: 0.4rem;
}

.legal a {
    color: var(--primary);
    text-decoration: underline;
    word-break: break-word;
}

.legal a:hover {
    color: var(--accent-dark);
}

.legal .legal-meta {
    color: var(--text-subtle);
    font-size: 0.9rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.legal-back:hover {
    color: var(--accent-dark);
}
