:root {
    --bg-color: #ffffff;      /* Clean White */
    --text-color: #111111;    /* Professional Black from "CURIO" */
    --text-muted: #555555;    /* Dark Gray */
    --primary: #517bb8;       /* Logo Muted Blue from "SOL" */
    --secondary: #333333;     /* Dark Gray for secondary accents */
    --accent: #3b5b88;        /* Darker Blue */
    --danger: #b42318;
    --success: #067647;

    --primary-tint: rgba(81, 123, 184, 0.10);
    --primary-tint-strong: rgba(81, 123, 184, 0.22);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.06);

    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Fluid rhythm: one knob for every vertical gap on the page. */
    --section-pad: clamp(4rem, 10vw, 8rem);
    --gutter: clamp(1.25rem, 5vw, 2rem);
    --nav-h: 72px;
    --radius: 24px;

    /* Notch / home-indicator padding. 0px fallback on non-iOS. */
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Fixed navbar would otherwise cover anchor targets. */
    scroll-padding-top: calc(var(--nav-h) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
.sprite { display: none; }

/* Consistent icon sizing everywhere. */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Keyboard focus, never on mouse click. */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 300;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 12px 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* 3D Canvas */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    /* lvh = largest viewport height: does not resize when the mobile URL bar
       hides, so the canvas never re-lays-out mid-scroll. */
    height: 100lvh;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: max(var(--gutter), var(--safe-l)) max(var(--gutter), var(--safe-r));
}

.section {
    padding-block: var(--section-pad);
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    text-align: center;
    text-wrap: balance;
    background: linear-gradient(135deg, var(--text-color), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Descenders (g, y) get clipped by background-clip without this. */
    padding-bottom: 0.15em;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

/* ===================== Navigation ===================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    padding-block: 0.75rem;
    z-index: 100;
    transition: border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

/* The frosted panel lives on a pseudo-element, NOT on .navbar itself.
   An element with `backdrop-filter` becomes the containing block for its
   `position: fixed` descendants — so putting it on .navbar made the open
   drawer resolve `inset: 0` against the 72px navbar and crop to its height,
   but only once `.scrolled` had been applied. Same trap as `transform`/`filter`.
   ::before has no fixed descendants of its own, so it's safe here. */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;   /* behind the nav's own content, inside .navbar's stacking context */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar.scrolled::before { opacity: 1; }
.navbar.scrolled { border-bottom-color: var(--glass-border); }

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-inline: max(var(--gutter), var(--safe-l)) max(var(--gutter), var(--safe-r));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* .navbar is a stacking context, so the drawer (z-index 95, a sibling inside it)
   would paint over the logo and the close button. Lift them above it. */
.logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 96;
}

/* The wordmark is ~6:1, so drive it from width and let height follow. */
.logo-img {
    width: clamp(120px, 26vw, 160px);
    height: auto;
}

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

.nav-menu { display: flex; align-items: center; }
/* Safe to drop the ring: it's a non-interactive container that only receives
   focus programmatically, to move a keyboard user into the open drawer. */
.nav-menu:focus { outline: none; }

/* Motion override. Sits above the drawer like the other header controls. */
.motion-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 12px;
    position: relative;
    z-index: 96;
    transition: color 0.25s ease, background 0.25s ease;
}
.motion-toggle:hover { color: var(--primary); background: var(--primary-tint); }
/* Solid, not outlined — a 2px-stroked pause bar is a hairline at this size. */
.motion-toggle .icon { width: 1.05rem; height: 1.05rem; fill: currentColor; stroke: none; }
.motion-toggle[data-motion="on"] .icon-play { display: none; }
.motion-toggle[data-motion="off"] .icon-pause { display: none; }

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover:not(.btn-primary) { color: var(--primary); }

.nav-socials { display: none; }

/* Hamburger — hidden on desktop, 44px touch target on mobile. */
.nav-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 12px;
    position: relative;
    z-index: 96;   /* must stay above the open drawer, or the X is unclickable */
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(17, 17, 17, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-scrim.is-visible { opacity: 1; }

/* ===================== Buttons ===================== */
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff !important;
    padding: 0.75rem 1.5rem;
    border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px var(--primary); }

.btn-secondary {
    background: var(--glass-bg);
    color: var(--secondary);
    padding: 1rem 2rem;
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: rgba(0, 0, 0, 0.04); transform: translateY(-2px); }
.btn-secondary .icon { width: 1.15rem; height: 1.15rem; transition: transform 0.3s ease; }
.btn-secondary:hover .icon { transform: translateX(4px); }

/* Sits directly over the 3D scene, so it needs its own backdrop — plain text
   on the bulb's metal base was unreadable. */
.btn-ghost {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--secondary);
    padding: 1rem 1.5rem;
    border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--primary); background: rgba(255, 255, 255, 0.85); }

.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.w-full { width: 100%; }

/* ===================== Hero ===================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh; /* smallest viewport height: no jump when URL bar retracts */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: var(--section-pad);
}

/* The diorama sits dead centre, right where the headline goes. Wash it out
   behind the copy so the 3D reads as atmosphere, not competition. */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 80% 60% at 50% 48%,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.78) 40%,
        rgba(255, 255, 255, 0.30) 68%,
        rgba(255, 255, 255, 0) 85%
    );
}

/* Dissolve the bulb's base into the page rather than letting it float as a
   grey slab above the fold. */
.hero-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 34%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.72) 48%,
        var(--bg-color) 100%
    );
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.highlight-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    text-wrap: pretty;
}
.hero-subtitle strong { color: var(--text-color); font-weight: 600; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* ===================== Services ===================== */
.services-grid {
    display: grid;
    /* min() keeps the 300px floor from overflowing a 320px phone. */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}

.service-card {
    padding: clamp(1.75rem, 4vw, 2.5rem);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-tint-strong);
    box-shadow: 0 20px 45px -20px rgba(81, 123, 184, 0.45);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-tint-strong), var(--primary-tint));
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}
.service-icon .icon { width: 2rem; height: 2rem; }

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.service-card p { color: var(--text-muted); }

/* ===================== Process timeline ===================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--bg-color);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 2;
    box-shadow: 0 0 20px var(--primary-tint-strong);
}

.timeline-content { padding: clamp(1.5rem, 3vw, 2rem); }
.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.timeline-content p { color: var(--text-muted); }

/* ===================== Contact ===================== */
.contact-section { padding-bottom: var(--section-pad); }

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem);
    text-align: center;
}

.contact-lede {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 2rem;
    margin-bottom: 3rem;
}
.contact-links > li:first-child { flex-basis: 100%; }

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.25rem 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.25s ease, background 0.25s ease;
    text-align: left;
}
.contact-link .icon { color: var(--primary); }
a.contact-link:hover { color: var(--primary); background: var(--primary-tint); }
.contact-link--address { cursor: default; }

/* ---- Form ---- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.input-group { display: flex; gap: 1.25rem; }
.input-group .field { flex: 1; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

input, textarea {
    width: 100%;
    padding: 0.875rem 1.15rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);       /* was #fff — invisible on the white card */
    font-family: var(--font-body);
    font-size: 1rem;                /* >= 16px stops iOS from zooming on focus */
    line-height: 1.5;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

textarea { resize: vertical; min-height: 120px; }

input::placeholder, textarea::placeholder { color: #9a9a9a; }

input:focus, textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.honeypot {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#cf-submit { position: relative; }
#cf-submit .btn-icon { width: 1.15rem; height: 1.15rem; }

.spinner {
    display: none;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#cf-submit.is-sending .btn-icon { display: none; }
#cf-submit.is-sending .spinner { display: block; }

.form-status {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.45;
}
.form-status .icon { width: 1.2rem; height: 1.2rem; margin-top: 0.1rem; }
.form-status.is-success { background: rgba(6, 118, 71, 0.08); color: var(--success); }
.form-status.is-error   { background: rgba(180, 35, 24, 0.08); color: var(--danger); }

/* ===================== Footer ===================== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--glass-border);
    padding-top: clamp(2.5rem, 6vw, 4rem);
    padding-bottom: calc(1.5rem + var(--safe-b));
    background: rgba(255, 255, 255, 0.9);   /* was rgba(0,0,0,.5) — a dark slab on a white page */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: clamp(2rem, 5vw, 3rem);
    align-items: start;
}

.logo-img-footer { width: 140px; height: auto; }
.footer-tagline {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 32ch;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.footer-nav ul, .footer-connect ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-nav a,
.footer-connect a,
.footer-address {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.25s ease;
}
.footer-connect .icon, .footer-address .icon { width: 1.15rem; height: 1.15rem; color: var(--primary); }
.footer-nav a:hover, .footer-connect a:hover { color: var(--primary); }

.footer-bottom {
    margin-top: clamp(2rem, 5vw, 3rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}
.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* ===================== Reveal (JS-driven) ===================== */
/* The <head> bootstrap puts exactly one of `motion-on` / `no-anim` on <html>
   before first paint. Hiding requires BOTH `js` and `motion-on`, so a failed
   GSAP load or a no-JS visitor can never end up staring at a blank page. */
.js.motion-on .reveal-up,
.js.motion-on .reveal-fade,
.js.motion-on .hero-title .line { opacity: 0; }

/* Set when motion is off, when GSAP never loaded, or by main.js's failsafe. */
.no-anim .reveal-up,
.no-anim .reveal-fade,
.no-anim .hero-title .line { opacity: 1 !important; transform: none !important; }

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

/* Tablet and below: collapse the nav into a drawer. */
@media (max-width: 900px) {
    .nav-toggle { display: grid; }

    .nav-menu {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(320px, 82vw);
        z-index: 95;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: calc(var(--nav-h) + 2rem) 1.75rem calc(2rem + var(--safe-b));
        padding-right: max(1.75rem, var(--safe-r));

        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.18);

        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .nav-menu.is-open { transform: translateX(0); }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 52px;
        padding: 0 0.5rem;
        font-size: 1.15rem;
        font-family: var(--font-heading);
        font-weight: 600;
        border-radius: 12px;
    }
    .nav-links a:hover:not(.btn-primary) { background: var(--primary-tint); }
    .nav-cta {
        justify-content: center;
        margin-top: 1rem;
        padding: 0.85rem 1.5rem !important;
    }

    .nav-socials {
        display: flex;
        gap: 0.5rem;
        list-style: none;
        margin-top: auto;
        padding-top: 2rem;
    }
    .nav-socials a {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        color: var(--text-muted);
        border: 1px solid var(--glass-border);
        transition: color 0.25s ease, background 0.25s ease;
    }
    .nav-socials a:hover { color: var(--primary); background: var(--primary-tint); }

    .footer-content { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

/* Lock the page behind the open drawer. */
body.menu-open { overflow: hidden; }

@media (max-width: 768px) {
    .input-group { flex-direction: column; gap: 1.25rem; }

    .timeline::before { left: 20px; }
    .timeline-dot { width: 40px; height: 40px; font-size: 1rem; }
    .timeline-item { padding-left: 60px; }

    .contact-links { gap: 0.25rem; }
    .contact-links > li,
    .contact-links > li .contact-link { width: 100%; }
    .contact-link { justify-content: flex-start; }
    .contact-link--address { align-items: flex-start; padding-block: 0.5rem; }
    .contact-link--address .icon { margin-top: 0.35rem; }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn-secondary, .hero-actions .btn-ghost { width: 100%; }

    /* Narrow screens leave the copy nowhere to hide — veil harder. */
    .hero-section::before {
        background: radial-gradient(
            ellipse 130% 55% at 50% 42%,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.90) 45%,
            rgba(255, 255, 255, 0.55) 72%,
            rgba(255, 255, 255, 0) 92%
        );
    }

    .footer-content { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .footer-tagline { max-width: none; }
}

@media (max-width: 380px) {
    .service-icon { width: 52px; height: 52px; }
    .timeline-item { padding-left: 54px; }
}

/* Landscape phones: the 100svh hero would otherwise squash. */
@media (max-height: 520px) and (orientation: landscape) {
    .hero-section { min-height: auto; padding-block: calc(var(--nav-h) + 2rem) 4rem; }
    .hero-title { font-size: clamp(1.75rem, 6vw, 3rem); }
    .hero-subtitle { margin-bottom: 1.5rem; }
}

/* Coarse pointers get no hover-lift — it fires on tap and looks like a bug. */
@media (hover: none) {
    .service-card:hover { transform: none; box-shadow: var(--glass-shadow); }
    .btn-primary:hover, .btn-secondary:hover { transform: none; }
    .btn-secondary:hover .icon { transform: none; }
}

/* Honour the OS preference — but let an explicit `motion-on` opt-in win, so a
   visitor whose machine reports `reduce` by default (Windows Server, "adjust
   for best performance", many VMs) can still turn the site's motion back on. */
@media (prefers-reduced-motion: reduce) {
    html:not(.motion-on) { scroll-behavior: auto; }
    html:not(.motion-on) *,
    html:not(.motion-on) *::before,
    html:not(.motion-on) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    html:not(.motion-on) .nav-menu { transition: none; }
}

/* The spinner is feedback, not decoration — it must keep turning either way. */
.spinner { animation-duration: 0.7s !important; animation-iteration-count: infinite !important; }

@media print {
    #bg-canvas, .navbar, .nav-scrim, .contact-form { display: none; }
    .glass { box-shadow: none; border: 1px solid #ddd; }
}
