/* =====================================================================
   Ethos Dive Software — style.css
   Ocean + tech palette · dark-first · responsive · accessible
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Brand palette */
    --ocean-900: #061a2e;
    --ocean-800: #0a2540;
    --ocean-700: #0f3556;
    --ocean-600: #154b73;
    --ocean-500: #1f6b9e;
    --cyan-400: #00c1d1;
    --cyan-300: #2dd4e1;
    --coral-400: #ff7a59;
    --coral-300: #ff9a7a;

    /* Semantic (dark default) */
    --bg: var(--ocean-900);
    --bg-elev: var(--ocean-800);
    --bg-elev-2: var(--ocean-700);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #eaf3f8;
    --text-muted: #9bb0c0;
    --text-dim: #6e8499;
    --accent: var(--cyan-400);
    --accent-soft: rgba(0, 193, 209, 0.14);

    /* Brand refs for service cards */
    --ocean: var(--cyan-400);
    --cyan: var(--cyan-400);
    --coral: var(--coral-400);

    /* Typography */
    --font-head: 'Sora', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing & radius */
    --section-y: clamp(5rem, 9vw, 8rem);
    --container: 1200px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
    --shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.42);

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.2s;
    --t: 0.35s;
    --t-slow: 0.6s;

    /* Gradients */
    --gradient-brand: linear-gradient(120deg, var(--cyan-300) 0%, var(--cyan-400) 50%, var(--ocean-500) 100%);
    --gradient-hero: radial-gradient(ellipse at 30% 20%, rgba(0, 193, 209, 0.18), transparent 55%),
                     radial-gradient(ellipse at 80% 70%, rgba(31, 107, 158, 0.30), transparent 60%),
                     linear-gradient(180deg, var(--ocean-900) 0%, var(--ocean-800) 100%);
}

/* Light theme overrides */
html:not(.dark) {
    --bg: #eef5f8;
    --bg-elev: #ffffff;
    --bg-elev-2: #f4f9fb;
    --surface: rgba(10, 37, 64, 0.04);
    --surface-strong: rgba(10, 37, 64, 0.06);
    --border: rgba(10, 37, 64, 0.10);
    --border-strong: rgba(10, 37, 64, 0.16);
    --text: #0a2540;
    --text-muted: #3f556a;
    --text-dim: #6b8095;
    --shadow-sm: 0 2px 8px rgba(10, 37, 64, 0.06);
    --shadow: 0 14px 36px rgba(10, 37, 64, 0.10);
    --shadow-lg: 0 24px 60px rgba(10, 37, 64, 0.14);
    --gradient-hero: radial-gradient(ellipse at 30% 20%, rgba(0, 193, 209, 0.16), transparent 55%),
                     radial-gradient(ellipse at 80% 70%, rgba(31, 107, 158, 0.20), transparent 60%),
                     linear-gradient(180deg, #e7f1f5 0%, #d8e8ef 100%);
}

/* Default to dark on first load (no class) = treated as dark */
html.dark { color-scheme: dark; }
html:not(.dark) { color-scheme: light; }

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
    padding-block: var(--section-y);
    position: relative;
}

.section-header {
    max-width: 760px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

.section-header-light .section-title { color: var(--text); }

.section-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.section-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-description {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    color: var(--text-muted);
    line-height: 1.65;
}

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform var(--t-fast) var(--ease),
                box-shadow var(--t) var(--ease),
                background var(--t) var(--ease),
                color var(--t) var(--ease),
                border-color var(--t) var(--ease);
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--gradient-brand);
    color: #02141f;
    box-shadow: 0 8px 24px rgba(0, 193, 209, 0.32);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 193, 209, 0.48);
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-block { width: 100%; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-brand);
    z-index: 1000;
    transition: width 80ms linear;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding-block: 1.2rem;
    transition: padding var(--t) var(--ease),
                background var(--t) var(--ease),
                box-shadow var(--t) var(--ease),
                border-color var(--t) var(--ease);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    padding-block: 0.7rem;
    background: rgba(6, 26, 46, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}
html:not(.dark) .navbar.scrolled {
    background: rgba(238, 245, 248, 0.88);
}

.nav-container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.nav-logo-img { width: 34px; height: 34px; }
.logo-text { display: inline-flex; align-items: baseline; gap: 0.18rem; }
.logo-accent { color: var(--accent); }
.logo-sub {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-left: 0.35rem;
    align-self: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-link {
    padding: 0.5rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); }

.nav-cta {
    background: var(--gradient-brand);
    color: #02141f !important;
    font-weight: 600;
    padding-inline: 1.3rem;
    box-shadow: 0 4px 16px rgba(0, 193, 209, 0.25);
}
.nav-cta:hover { transform: translateY(-1px); color: #02141f !important; background: var(--gradient-brand); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--radius-sm);
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 4rem;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--gradient-hero);
    background-size: cover;
    background-position: center;
    z-index: -2;
    will-change: transform;
}
.hero-bg.has-image {
    background-image: url('../images/hero.jpg?v=3');
    background-size: cover;
    background-position: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 26, 46, 0.55) 0%, rgba(6, 26, 46, 0.75) 60%, var(--bg) 100%);
    z-index: -1;
}
html:not(.dark) .hero-overlay {
    background:
        linear-gradient(180deg, rgba(238, 245, 248, 0.35) 0%, rgba(238, 245, 248, 0.60) 60%, var(--bg) 100%);
}

.hero-content {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1.8rem;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 193, 209, 0.6);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 193, 209, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(0, 193, 209, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 193, 209, 0); }
}

.hero-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    max-width: 18ch;
    text-align: center;
    margin-inline: auto;
}
.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.28rem);
    color: var(--text-muted);
    max-width: 60ch;
    margin-bottom: 2.5rem;
    margin-inline: auto;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.4rem);
    margin-bottom: 2.6rem;
    flex-wrap: wrap;
}
.stat { min-width: 100px; }
.stat-number {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    letter-spacing: 0.02em;
}
.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-strong);
}

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

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    z-index: 1;
}
.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--accent);
    animation: scrollDot 2s infinite var(--ease);
}
@keyframes scrollDot {
    0% { top: -50%; }
    100% { top: 100%; }
}

/* ---------- Trust bar ---------- */
.trust-bar {
    padding-block: 1.5rem;
    border-block: 1px solid var(--border);
    background: var(--bg-elev);
}
.trust-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.8rem);
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
}
.trust-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ---------- Services ---------- */
.section-services { background: var(--bg); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.service-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
    position: relative;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 6%, transparent));
    opacity: 0;
    transition: opacity var(--t) var(--ease);
    pointer-events: none;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.service-card:hover::before { opacity: 1; }
.service-card-featured {
    border-color: color-mix(in srgb, var(--cyan-400) 35%, var(--border));
}

.service-card-media {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.service-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, var(--bg-elev) 100%);
}

.service-body { padding: clamp(1.5rem, 3vw, 2rem); position: relative; z-index: 1; }

.service-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.service-icon svg { width: 26px; height: 26px; }

.service-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.service-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.25;
    margin-bottom: 0.8rem;
    color: var(--text);
}
.service-text {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
}
.service-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.service-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}
.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- Process ---------- */
.section-process {
    background: var(--bg-elev);
    position: relative;
    overflow: hidden;
}
.section-process::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
    pointer-events: none;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
}
.process-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    position: relative;
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.process-step:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.process-number {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.4rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1rem;
}
.process-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}
.process-text { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Work / capabilities ---------- */
.section-work { background: var(--bg); }

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.work-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.work-card-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.work-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-head);
    font-weight: 500;
}
.work-card-text { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Studio ---------- */
.section-studio {
    background: var(--bg-elev);
    position: relative;
    overflow: hidden;
}
.studio-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.studio-media { position: relative; }
.studio-img {
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.studio-content .section-tag { margin-bottom: 1rem; }
.studio-content .section-title { text-align: left; }
.studio-text {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1.02rem;
}
.studio-features {
    display: grid;
    gap: 0.85rem;
    margin: 1.8rem 0 2rem;
}
.studio-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    font-size: 0.98rem;
}
.studio-feature svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
    flex-shrink: 0;
    padding: 4px;
    background: var(--accent-soft);
    border-radius: 50%;
}

/* ---------- Contact ---------- */
.section-contact {
    background: var(--bg);
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    text-align: left;
}
.contact-grid .section-tag { margin-bottom: 1rem; }
.contact-grid .section-title { text-align: left; margin-bottom: 1rem; }
.contact-grid .section-description { text-align: left; margin-bottom: 2rem; }

.contact-info { display: grid; gap: 1.2rem; align-content: start; }
.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--t) var(--ease);
}
.contact-info-item:hover { border-color: var(--accent); }
.contact-info-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-sm);
}
.contact-info-icon svg { width: 22px; height: 22px; }
.contact-info-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}
.contact-info-value {
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
a.contact-info-value:hover { color: var(--accent); }

/* Form */
.contact-form {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: grid;
    gap: 1.1rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
.form-group { display: grid; gap: 0.4rem; }
.form-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}
.req { color: var(--coral-400); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.98rem;
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    font-family: var(--font-body);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--coral-400);
    box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.14);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239bb0c0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 18px;
    padding-right: 2.5rem;
    cursor: pointer;
}
html:not(.dark) .form-group select option { color: #0a2540; }

.form-error {
    font-size: 0.82rem;
    color: var(--coral-400);
    min-height: 0;
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}
.form-error:not(:empty) { opacity: 1; }

.form-success {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.form-success svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; }
.form-success strong { display: block; font-family: var(--font-head); }
.form-success span { font-size: 0.9rem; color: var(--text-muted); }

/* Non-blocking error banner shown above the submit button (server/network issues). */
.form-banner {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.45;
    border: 1px solid transparent;
}
.form-error-banner {
    background: rgba(255, 122, 89, 0.10);
    border-color: rgba(255, 122, 89, 0.40);
    color: var(--coral-300);
}

/* Honeypot anti-spam field — hidden from real users, visible to bots */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.hp-field input { width: 1px; height: 1px; }

/* ---------- Footer ---------- */
.footer {
    background: var(--ocean-900);
    color: var(--text-muted);
    padding-top: 4rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
}
.footer-badge .pulse-dot {
    /* keep the pulse animation; tone down the glow slightly for the footer */
    background: var(--accent);
}
.footer > .container {
    /* the footer-container / footer-bottom-inner wrappers should span full width */
    width: 100%;
}
html:not(.dark) .footer { background: var(--ocean-800); color: #b9c8d4; }

.footer-container {
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 3rem;
    padding-bottom: 3rem;
}
.footer-brand { max-width: 360px; }
.footer-logo { margin-bottom: 1rem; color: var(--text); }
html:not(.dark) .footer-logo { color: #eaf3f8; }
.footer-tagline { font-size: 0.95rem; line-height: 1.6; }

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-heading {
    font-family: var(--font-head);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 1rem;
}
html:not(.dark) .footer-heading { color: #eaf3f8; }
.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col a {
    font-size: 0.92rem;
    transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-block: 1.4rem;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); }
.theme-icon { width: 18px; height: 18px; color: var(--text-muted); }
.theme-toggle:hover .theme-icon { color: var(--accent); }

/* Sun visible in dark mode (click = go light) */
html.dark .theme-icon-sun,
html:not(.dark) .theme-icon-moon { display: block; }
html:not(.dark) .theme-icon-sun,
html.dark .theme-icon-moon { display: none; }
/* On first load (no class) we treat as dark, so show the sun */
html:not(.dark):not(.has-pref) .theme-icon-sun { display: block; }
html:not(.dark):not(.has-pref) .theme-icon-moon { display: none; }

/* ---------- Scroll animations ---------- */
[data-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}
[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

@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;
    }
    [data-animate] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
    .services-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .work-grid { grid-template-columns: 1fr; }
    .studio-container { grid-template-columns: 1fr; }
    .studio-media { max-width: 480px; }
    .studio-img { aspect-ratio: 16/10; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }

    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: min(82vw, 360px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.3rem;
        padding: 6rem 1.5rem 2rem;
        background: var(--bg-elev);
        border-left: 1px solid var(--border);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
        transform: translateX(100%);
        transition: transform var(--t) var(--ease);
        z-index: 99;
    }
    .nav-menu.open { transform: translateX(0); }
    .nav-link {
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
    }
    .nav-cta { margin-top: 0.5rem; text-align: center; }

    .hero-stats {
        gap: 1rem 1.5rem;
    }
    .stat-divider { display: none; }
    .stat { min-width: calc(50% - 1rem); }

    .form-row { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom-inner { flex-direction: column; text-align: center; }

    .hero-scroll { display: none; }
}

@media (max-width: 420px) {
    .hero-title { font-size: 2.2rem; }
    .hero-actions .btn { width: 100%; }
    .footer-links { grid-template-columns: 1fr; }
}

/* ---------- Body lock when mobile nav open ---------- */
body.nav-open { overflow: hidden; }

/* Backdrop for mobile nav */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    transition: opacity var(--t) var(--ease);
    pointer-events: none;
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
