/* ============================================
   NOVRIK TECHNOLOGIES INC.
   Professional Design System
   Light Default + Dark Mode Toggle
   ============================================ */

/* ========== DESIGN TOKENS ========== */
:root {
    /* Brand */
    --brand: #017b6e;
    --brand-dark: #015d54;
    --brand-light: #02a08f;
    --accent: #7c5cff;
    --coral: #f26f55;

    /* Surfaces — Light */
    --surface-0: #ffffff;
    --surface-1: #f8f9fa;
    --surface-2: #f1f3f5;
    --surface-3: #e9ecef;
    --surface-4: #dee2e6;

    /* Text — Light */
    --text-1: #1a1a2e;
    --text-2: #495057;
    --text-3: #868e96;

    /* Borders — Light */
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(1, 123, 110, 0.4);

    /* Shadows — Light */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Glass — Light */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);

    /* Nav */
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);

    /* Footer — brand gradient */
    --footer-bg: linear-gradient(135deg, #011f1c 0%, #015d54 45%, #017b6e 100%);
    --footer-text: rgba(255, 255, 255, 0.72);
    --footer-heading: #ffffff;
    --footer-border: rgba(255, 255, 255, 0.14);
    --footer-link: rgba(255, 255, 255, 0.72);
    --footer-link-hover: #ffffff;
    --footer-muted: rgba(255, 255, 255, 0.5);

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #017b6e 0%, #02a08f 100%);
    --gradient-text: linear-gradient(135deg, #017b6e 0%, #02a08f 60%, #7c5cff 100%);
    --gradient-hero: linear-gradient(135deg, #02a08f 0%, #017b6e 100%);

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    /* Misc */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== DARK MODE ========== */
[data-theme="dark"] {
    --surface-0: #0f1114;
    --surface-1: #16181d;
    --surface-2: #1e2027;
    --surface-3: #282a33;
    --surface-4: #32353f;

    --text-1: #e8e9ed;
    --text-2: #a0a3b1;
    --text-3: #6b6f7e;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(2, 160, 143, 0.4);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);

    --glass-bg: rgba(22, 24, 29, 0.8);
    --glass-border: rgba(255, 255, 255, 0.06);

    --nav-bg: rgba(15, 17, 20, 0.9);
    --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);

    --brand: #02a08f;
    --brand-dark: #017b6e;
    --brand-light: #03c4ad;

    --gradient-brand: linear-gradient(135deg, #02a08f 0%, #03c4ad 100%);
    --gradient-text: linear-gradient(135deg, #03c4ad 0%, #02a08f 60%, #7c5cff 100%);
    --gradient-hero: linear-gradient(135deg, #03c4ad 0%, #02a08f 100%);
}

/* ========== DARK MODE — TAILWIND COLOR OVERRIDES ========== */
/* Tailwind CDN can't use CSS vars as config colors, so we override here */
[data-theme="dark"] body,
[data-theme="dark"] .bg-surface { background-color: #0f1114; }
[data-theme="dark"] .bg-surface-container-lowest { background-color: #0f1114; }
[data-theme="dark"] .bg-surface-container-low { background-color: #16181d; }
[data-theme="dark"] .bg-surface-container { background-color: #1e2027; }
[data-theme="dark"] .bg-surface-container-high { background-color: #282a33; }
[data-theme="dark"] .bg-surface-container-highest { background-color: #32353f; }
[data-theme="dark"] .bg-surface-bright { background-color: #0f1114; }
[data-theme="dark"] .bg-surface-dim { background-color: #1e2027; }
[data-theme="dark"] .bg-surface-variant { background-color: #282a33; }
[data-theme="dark"] .bg-surface\/80 { background-color: rgba(15, 17, 20, 0.8); }

[data-theme="dark"] .text-on-surface { color: #e8e9ed; }
[data-theme="dark"] .text-on-surface-variant { color: #a0a3b1; }
[data-theme="dark"] .text-on-background { color: #e8e9ed; }
[data-theme="dark"] .text-outline { color: #6b6f7e; }

[data-theme="dark"] .border-outline-variant { border-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] [class*="border-outline-variant\/"] { border-color: rgba(255, 255, 255, 0.06); }

[data-theme="dark"] .bg-primary { background-color: #02a08f; }
[data-theme="dark"] .text-primary { color: #02a08f; }
[data-theme="dark"] .bg-primary-container { background-color: #02a08f; }
[data-theme="dark"] .text-on-primary-container { color: #ffffff; }

[data-theme="dark"] .bg-surface-container-high\/80 { background-color: rgba(40, 42, 51, 0.8); }

/* Opacity variants for dark mode */
[data-theme="dark"] .bg-primary\/10 { background-color: rgba(2, 160, 143, 0.1); }
[data-theme="dark"] .bg-primary\/15 { background-color: rgba(2, 160, 143, 0.15); }
[data-theme="dark"] .bg-primary\/20 { background-color: rgba(2, 160, 143, 0.2); }
[data-theme="dark"] .bg-primary\/5 { background-color: rgba(2, 160, 143, 0.05); }
[data-theme="dark"] .bg-secondary\/10 { background-color: rgba(124, 92, 255, 0.1); }
[data-theme="dark"] .bg-secondary\/20 { background-color: rgba(124, 92, 255, 0.2); }
[data-theme="dark"] .bg-tertiary\/10 { background-color: rgba(77, 112, 149, 0.1); }
[data-theme="dark"] .bg-tertiary\/20 { background-color: rgba(77, 112, 149, 0.2); }

/* Text outline-variant for dark */
[data-theme="dark"] .text-outline-variant { color: #6b6f7e; }

/* Focus ring */
[data-theme="dark"] .focus\:ring-primary\/40:focus { --tw-ring-color: rgba(2, 160, 143, 0.4); }

/* Placeholder */
[data-theme="dark"] .placeholder\:text-outline-variant::placeholder { color: #6b6f7e; }
[data-theme="dark"] .placeholder\:text-outline::placeholder { color: #6b6f7e; }

/* Input/select background in dark */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: #16181d;
    color: #e8e9ed;
    border-color: rgba(255, 255, 255, 0.08);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background: var(--surface-0);
    color: var(--text-1);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition), color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.no-underline { text-decoration: none !important; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-1); }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ========== NAVIGATION ========== */
.site-nav {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--nav-shadow);
    transition: background var(--transition), box-shadow var(--transition);
}

.nav-brand {
    color: var(--text-1);
    transition: color var(--transition);
}

.nav-link {
    color: var(--text-2);
    position: relative;
    padding-bottom: 2px;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 1px;
}

/* Hamburger */
.hamburger { background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-1);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu { display: none; background: var(--nav-bg); backdrop-filter: blur(20px); }
.mobile-menu.active { display: flex; }
.mobile-menu .nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

/* ========== THEME TOGGLE ========== */
.theme-toggle-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: all var(--transition);
}
.theme-toggle-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--surface-3);
}
.theme-icon-dark { display: none; }
.theme-icon-light { display: block; font-size: 20px; }
[data-theme="dark"] .theme-icon-dark { display: block; font-size: 20px; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* ========== GLASS PANELS ========== */
.glass-panel,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

/* ========== DOT GRID ========== */
.dot-grid {
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ========== TEXT GRADIENT ========== */
.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== HERO CAROUSEL ========== */
.hero-carousel {
    position: relative;
    isolation: isolate;
}
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.hero-slide.is-active {
    opacity: 1;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: heroKenBurns 14s ease-in-out infinite alternate;
}
@keyframes heroKenBurns {
    0%   { transform: scale(1.02) translate3d(0, 0, 0); }
    100% { transform: scale(1.12) translate3d(-1%, -1%, 0); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(135deg, rgba(1, 31, 28, 0.88) 0%, rgba(1, 93, 84, 0.55) 55%, rgba(0, 0, 0, 0.35) 100%),
        linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 55%);
}
.hero-content-on-image,
.hero-content-on-image h1 {
    color: #ffffff;
}
.hero-content-on-image .hero-highlight {
    background: linear-gradient(135deg, #7fe8dc 0%, #ffffff 60%, #c9b9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-content-on-image .hero-lede {
    color: rgba(255, 255, 255, 0.82);
}
.hero-content-on-image .hero-secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
}
.hero-content-on-image .hero-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Fallback (no slides): keep original theme colors */
.hero-highlight {
    background: linear-gradient(135deg, #017b6e 0%, #02a08f 60%, #7c5cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lede { color: var(--text-2); }
.hero-secondary-btn {
    background: var(--surface-3);
    color: var(--text-1);
}
.hero-secondary-btn:hover { background: var(--surface-4); }

.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 0.5rem;
}
.hero-dot {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition), width var(--transition);
}
.hero-dot.is-active {
    background: #ffffff;
    width: 44px;
}
.hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide img { animation: none; }
    .hero-slide { transition: opacity 0.2s; }
}

/* ========== HERO GRADIENT ========== */
.hero-gradient,
.bg-gradient-primary {
    background: var(--gradient-hero);
}

/* ========== COMPETENCY CARDS ========== */
.competency-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--surface-0);
    border: 1px solid var(--border);
    color: var(--text-1);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.competency-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition);
}
.competency-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--gradient-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.competency-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 20px 50px -12px rgba(1, 123, 110, 0.35);
}
.competency-card:hover::before {
    opacity: 1;
}
.competency-card:hover::after {
    transform: scaleX(1);
}
.competency-card:hover,
.competency-card:hover .competency-desc,
.competency-card:hover .competency-cta {
    color: #ffffff;
}
.competency-card:hover .competency-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.competency-card:hover .competency-index {
    color: rgba(255, 255, 255, 0.35);
}
.competency-index {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-3);
    transition: color var(--transition);
}
.competency-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(1, 123, 110, 0.08);
    border: 1px solid rgba(1, 123, 110, 0.18);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.competency-card:hover .competency-icon {
    transform: scale(1.08) rotate(-4deg);
}
.competency-desc {
    color: var(--text-2);
    margin-bottom: 1.75rem;
    transition: color var(--transition);
}
.competency-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    color: var(--brand-light);
    transition: color var(--transition), gap var(--transition);
}
.competency-card:hover .competency-cta {
    gap: 0.9rem;
}
.competency-cta-arrow {
    font-size: 1rem;
    transition: transform var(--transition);
}

/* ========== LOCATION BADGE ========== */
.location-badge {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
    transition: background var(--transition);
}

/* ========== BUTTONS ========== */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: all var(--transition);
}
.btn-glow:visited { color: #fff; }
.btn-glow:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-1);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--surface-1);
}

.btn-submit {
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    color: #fff;
    transition: all var(--transition);
}
.btn-submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

/* ========== FOOTER (brand gradient) ========== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--footer-border);
}
.footer-brand { color: var(--footer-heading); }
.footer-text { color: var(--footer-text); }
.footer-heading { color: #ffffff; }
.footer-link { color: var(--footer-link); }
.footer-link:hover { color: var(--footer-link-hover); }
.footer-muted { color: var(--footer-muted); }
.site-footer .footer-bottom-border { border-top: 1px solid var(--footer-border); }

/* ========== PRELOADER ========== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--surface-0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 1rem;
}
.preloader-bar {
    width: 100px;
    height: 2px;
    background: var(--surface-3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}
.preloader-progress {
    width: 0;
    height: 100%;
    background: var(--brand);
    animation: preloaderFill 0.8s ease-out forwards;
}
@keyframes preloaderFill { to { width: 100%; } }

/* ========== SKIP LINK ========== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { top: 0; }

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    z-index: 9000;
    padding: 1rem;
    transition: bottom 0.5s ease;
}
.cookie-banner.visible { bottom: 0; }
.cookie-banner.hidden { bottom: -200px; }
.cookie-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
}
.cookie-text h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.cookie-text p { font-size: 0.8rem; color: var(--text-2); line-height: 1.6; }
.cookie-text a { color: var(--brand); text-decoration: underline; }
.cookie-btn-accept {
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter var(--transition);
}
.cookie-btn-accept:hover { filter: brightness(1.1); }

/* ========== ACCESSIBILITY WIDGET ========== */
.a11y-widget { position: fixed; bottom: 5rem; right: 1.5rem; z-index: 8000; }

.a11y-trigger {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}
.a11y-trigger:hover { background: var(--surface-2); border-color: var(--brand); }

.a11y-panel {
    position: absolute;
    bottom: 56px;
    right: 0;
    width: 280px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.a11y-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.a11y-panel-header h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
}
.a11y-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color var(--transition);
}
.a11y-close:hover { color: var(--text-1); }
.a11y-panel-body { padding: 1rem 1.25rem; }
.a11y-group { margin-bottom: 1rem; }
.a11y-group label {
    font-size: 0.75rem;
    color: var(--text-3);
    display: block;
    margin-bottom: 0.4rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.a11y-btn-group { display: flex; gap: 0.4rem; }
.a11y-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
}
.a11y-btn:hover { background: var(--surface-3); border-color: var(--border-hover); }

.a11y-switch-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem !important;
    color: var(--text-1) !important;
}
.a11y-switch-label input { display: none; }
.a11y-switch {
    width: 36px;
    height: 20px;
    background: var(--surface-4);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}
.a11y-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
    box-shadow: var(--shadow-xs);
}
.a11y-switch-label input:checked + .a11y-switch { background: var(--brand); }
.a11y-switch-label input:checked + .a11y-switch::after {
    transform: translateX(16px);
    background: #fff;
}

.a11y-reset-all {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
}
.a11y-reset-all:hover { color: var(--text-1); border-color: var(--text-3); }

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 7000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--surface-2); border-color: var(--brand); }

/* ========== LEGAL MODALS ========== */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.legal-modal-overlay.visible { opacity: 1; }

.legal-modal {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}
.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.legal-modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}
.legal-modal-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition);
}
.legal-modal-close:hover { color: var(--text-1); }
.legal-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    line-height: 1.8;
    color: var(--text-2);
    font-size: 0.9rem;
}
.legal-modal-body h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 1.5rem 0 0.5rem;
}
.legal-modal-body ul { padding-left: 1.5rem; margin: 0.5rem 0; }
.legal-modal-body li { margin-bottom: 0.3rem; }
.legal-modal-body a { color: var(--brand); }
.legal-modal-body code {
    background: var(--surface-3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== ACCESSIBILITY OVERRIDES ========== */
.a11y-dyslexia * { font-family: 'OpenDyslexic', sans-serif !important; }
.a11y-high-contrast { filter: contrast(1.4); }
.a11y-reduce-motion * { animation: none !important; transition: none !important; }
.a11y-highlight-links a { outline: 2px solid var(--brand) !important; outline-offset: 2px; }
.a11y-large-cursor,
.a11y-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%23017b6e' fill-opacity='0.25' stroke='%23017b6e' stroke-width='2'/%3E%3C/svg%3E") 16 16, auto !important;
}

/* ========== MATERIAL SYMBOLS ========== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ========== CTA OVERLAY ========== */
.cta-overlay {
    background: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .cta-overlay {
    background: rgba(15, 17, 20, 0.85);
}

/* ========== SERVICES HERO ========== */
.services-hero {
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-0) 50%, var(--surface-1) 100%);
}

/* ========== FILTER BUTTONS ========== */
.filter-btn {
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

/* ========== PROJECT CARDS ========== */
.project-card {
    transition: all 0.4s ease;
}

/* ========== RESPONSIVE ========== */

/* Tablet & below */
@media (max-width: 1024px) {
    .site-nav .nav-brand { font-size: 1rem; }
}

/* Mobile */
@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .a11y-widget { bottom: 4rem; right: 1rem; }
    .back-to-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
    .legal-modal { width: 95%; max-height: 85vh; }
    .legal-modal-header { padding: 1rem; }
    .legal-modal-body { padding: 1rem; }
}

/* Small mobile */
@media (max-width: 480px) {
    .a11y-panel { width: 260px; right: -1rem; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ========== HOME BANNER — PROJECT BRIEF CTA ========== */
.brief-banner {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #017b6e 0%, #02a08f 45%, #7c5cff 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 30px -12px rgba(1, 123, 110, 0.45);
}
.brief-banner:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(1, 123, 110, 0.55); }
.brief-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.18), transparent 40%);
    pointer-events: none;
}
.brief-banner-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}
@media (min-width: 768px) {
    .brief-banner { padding: 2.25rem 2.5rem; border-radius: 1.25rem; }
    .brief-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
}
.brief-banner-eyebrow {
    font-family: 'Space Grotesk', monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}
.brief-banner-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}
@media (min-width: 768px) { .brief-banner-title { font-size: 1.65rem; } }
.brief-banner-sub {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}
.brief-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #017b6e;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== PROJECT BRIEF FORM ========== */
.brief-option {
    position: relative;
    display: block;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--surface-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.brief-option:hover { border-color: var(--brand); }
.brief-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.brief-option:has(input[type="radio"]:checked) {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(2, 160, 143, 0.18);
    background: var(--surface-2);
}
.brief-option-body { display: flex; flex-direction: column; gap: 0.3rem; }
.brief-option-icon {
    color: var(--brand);
    font-size: 1.6rem;
    font-variation-settings: 'FILL' 1;
    margin-bottom: 0.1rem;
}
.brief-option-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--text-1);
    font-size: 1rem;
}
.brief-option-desc {
    font-family: 'Inter', sans-serif;
    color: var(--text-2);
    font-size: 0.83rem;
    line-height: 1.4;
}

.brief-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    font-family: 'Inter', sans-serif;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text-1);
    transition: all 0.15s ease;
    user-select: none;
}
.brief-chip:hover { border-color: var(--brand); color: var(--brand); }
.brief-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.brief-chip:has(input:checked) {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

.brief-field { display: block; }
.brief-field-label {
    display: inline-block;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-2);
    margin-bottom: 0.4rem;
}
.brief-optional {
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: none;
    color: var(--text-2);
    opacity: 0.7;
    margin-left: 0.25rem;
}
.brief-input {
    width: 100%;
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-1);
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.7rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.brief-input::placeholder { color: var(--text-3); }
.brief-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(2, 160, 143, 0.18);
}
textarea.brief-input { resize: vertical; min-height: 110px; }

.brief-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: var(--gradient-brand);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.75rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -12px rgba(1, 123, 110, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.brief-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(1, 123, 110, 0.7); }
.brief-submit-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.brief-submit-btn .material-symbols-outlined { font-size: 1.25rem; font-variation-settings: 'FILL' 1; }

.brief-cancel-btn {
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.brief-cancel-btn:hover { background: var(--surface-3); }
