/* ==========================================
   BASE STYLES
   ========================================== */

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}


/* ==========================================
   HEADER / NAVIGATION
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.5s var(--ease-out-expo),
                backdrop-filter 0.5s var(--ease-out-expo),
                -webkit-backdrop-filter 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo);
}

.header.scrolled {
    background: var(--color-white-85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-nav);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 24px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width var(--transition-medium);
}

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

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xs);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.hamburger:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}


/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1.5px solid transparent;
    text-decoration: none;
    letter-spacing: var(--letter-spacing-normal);
}

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

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

.btn-arrow {
    font-size: 1.1em;
    transition: transform var(--transition-medium);
}

.btn:hover .btn-arrow {
    transform: translateX(6px) scale(1.15);
}

.nav-cta-mobile {
    display: none;
}

/* Nav CTA — dark pill */
.nav-cta {
    font-size: var(--font-size-xs);
    padding: var(--btn-padding-y-sm) var(--btn-padding-x-sm);
}


/* ==========================================
   SECTION COMMON
   ========================================== */

.section {
    padding: var(--space-section) 0;
}

.section--subtle {
    background: var(--color-bg-muted);
    border-top: 1px solid var(--color-border-subtle);
}

.section--tinted {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-muted) 50%, var(--color-bg) 100%);
}

.section-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-label--light {
    color: var(--color-white-60);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    line-height: 1.1;
    letter-spacing: var(--letter-spacing-normal);
    color: var(--color-text);
    margin-bottom: var(--space-3xl);
}

.section-title--light {
    color: white;
}


/* ==========================================
   HERO
   ========================================== */

.hero {
    padding-top: calc(var(--nav-height) + var(--space-5xl));
    padding-bottom: var(--space-5xl);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}


.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-semibold);
    line-height: 1.05;
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-xl);
    color: var(--color-text);
}

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


.hero-subtitle {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    margin-bottom: var(--space-4xl);
}

.hero-proof {
    margin-bottom: var(--space-3xl);
    width: 100%;
}

.hero-proof-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-tertiary);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
}

.marquee {
    overflow: hidden;
    clip-path: inset(0);
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: var(--space-3xl);
    width: max-content;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
    animation-play-state: paused;
}

/* Pause marquee animation until page is ready (saves resources while hidden) */
.js:not(.page-ready) .marquee-track {
    animation-play-state: paused;
}

.client-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity 0.4s ease, filter 0.4s ease;
    filter: grayscale(100%);
}

.client-logo:hover {
    opacity: 0.85;
    filter: grayscale(0%);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Integrations section */
.section--integrations {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-muted);
}

.integrations-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.02em;
}

.marquee--color .integration-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.marquee--color .integration-logo:hover {
    opacity: 1;
}


/* Hero page-load animations (CSS-only, not scroll-triggered)
   Slow, graceful fade-in reveals for refined, dreamy feel */

/* Primary elements - slow graceful fade with gentle movement */
@keyframes hero-fade {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hide hero elements completely until page is ready (prevents animations starting before load) */
.js:not(.page-ready) .hero-title,
.js:not(.page-ready) .hero-subtitle,
.js:not(.page-ready) .hero-cta,
.js:not(.page-ready) .hero-proof-label,
.js:not(.page-ready) .hero-proof .marquee {
    visibility: hidden;
    opacity: 0;
}

.js.page-ready .hero-title {
    opacity: 1;
}

/* Typing cursor */
.hero-cursor {
    display: inline-block;
    width: 3px;
    height: 1.05em;
    background: var(--color-primary);
    margin-left: 3px;
    vertical-align: middle;
    border-radius: 1px;
    animation: cursor-blink 0.6s step-end infinite;
}

/* Solid cursor while actively typing */
.hero-cursor--typing {
    animation: none;
    opacity: 1;
}

.hero-cursor--done {
    animation: cursor-fade 0.5s ease-out 0.3s forwards;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes cursor-fade {
    to { opacity: 0; }
}

.js.page-ready .hero-subtitle {
    opacity: 0;
    animation: hero-fade 0.8s var(--ease-out-cubic) 2.6s both;
}

.js.page-ready .hero-cta {
    opacity: 0;
    animation: hero-fade 0.8s var(--ease-out-cubic) 2.75s both;
}

.js.page-ready .hero-proof-label {
    opacity: 0;
    animation: hero-fade 0.7s var(--ease-out-cubic) 3.0s both;
}

.js.page-ready .hero-proof .marquee {
    opacity: 0;
    animation: hero-fade 0.7s var(--ease-out-cubic) 3.15s both;
}


/* Scroll-driven hero parallax: content lifts as user scrolls past */
@supports (animation-timeline: scroll()) {
    .js.page-ready .hero .container {
        animation: hero-content-fade linear both;
        animation-duration: auto;
        animation-timeline: scroll();
        animation-range: 0vh 80vh;
    }
    @keyframes hero-content-fade {
        from { opacity: 1; transform: translateY(0); }
        to   { opacity: 0; transform: translateY(-60px); }
    }

}


/* ==========================================
   WHY CHOOSE US — VALUE CARDS
   ========================================== */

.value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.value-card {
    padding: var(--space-xl) 0;
}

.value-card-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.value-card-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: var(--font-weight-regular);
}


/* ==========================================
   SERVICES — GRID
   ========================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.service-card {
    border-radius: var(--border-radius-xl);
    background: var(--color-bg);
    padding: var(--space-2xl);
    border: 1px solid var(--color-border-subtle);
    transition: transform 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo),
                background-color 0.5s var(--ease-out-expo),
                border-color 0.5s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-primary-04);
    border-color: var(--color-border);
}

.service-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    background: var(--color-primary-07);
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
    transition: background var(--transition-normal),
                transform var(--transition-normal);
}

.service-card:hover .service-card-icon {
    background: var(--color-primary-12);
    transform: scale(1.08) rotate(-3deg);
}

.service-card-icon svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.service-card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.service-card-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: var(--font-weight-regular);
}


/* ==========================================
   APPROACH — TIMELINE
   ========================================== */

.timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

/* Vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--color-border) 5%,
        var(--color-border) 95%,
        transparent 100%
    );
    z-index: 1;
}

/* Scroll-driven progress line overlay (controlled by JS via --timeline-progress) */
.timeline::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-primary);
    z-index: 1;
    clip-path: inset(0 0 calc((1 - var(--timeline-progress, 0)) * 100%) 0);
}

/* Active dot state (added by JS as each step scrolls into view) */
@keyframes dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.timeline-connector-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    animation: dot-pulse 0.6s var(--ease-out-expo);
    transition: background 0.4s var(--ease-out-cubic),
                border-color 0.4s var(--ease-out-cubic);
}

.timeline-step {
    padding: var(--space-2xl) 0;
    position: relative;
    transition: background-color 0.5s var(--ease-out-expo);
}

/* Connector dot */
.timeline-connector-dot {
    position: absolute;
    left: 20px;
    top: var(--space-2xl);
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
    z-index: 2;
}

.timeline-step-inner {
    display: block;
    padding: 0 var(--space-xl) 0 48px;
    transition: transform 0.5s var(--ease-out-expo);
}

.timeline-step:hover {
    background-color: var(--color-bg-subtle);
}

.timeline-step:hover .timeline-step-inner {
    transform: translateY(-2px);
}

.timeline-number {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-border);
    line-height: 1;
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-lg);
    transition: color 0.5s var(--ease-out-expo);
}

/* Number lights up when step scrolls into view (JS adds .active to step) */
.timeline-step.active .timeline-number {
    color: var(--color-primary-light);
}

.timeline-step:hover .timeline-number {
    color: var(--color-primary-light);
}

.timeline-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.timeline-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: var(--font-weight-regular);
}



/* ==========================================
   AI OS BRIDGE
   ========================================== */

.approach-bridge-desc {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    max-width: 38rem;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
}


/* ==========================================
   CONTACT
   ========================================== */

.section--contact {
    background: var(--color-dark-bg);
    background-image: radial-gradient(ellipse at 50% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
    text-align: center;
    position: relative;
    overflow: hidden;
}


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

.section--contact .section-title {
    font-size: var(--font-size-5xl);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-2xl);
}

.contact-subtitle {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    color: var(--color-white-60);
    max-width: 420px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

.contact-btn {
    font-size: var(--font-size-sm);
    background: transparent;
    color: white;
    border-color: var(--color-white-50);
}

.contact-btn:hover {
    background: white;
    color: var(--color-dark-bg);
    border-color: white;
}


/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: var(--space-3xl) 0 var(--space-2xl);
    background: linear-gradient(180deg, var(--color-bg-subtle) 0%, var(--color-bg) 40%);
}

.footer-border {
    height: 1px;
    margin-bottom: var(--space-4xl);
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: var(--space-4xl);
    margin-bottom: var(--space-3xl);
}

.footer-logo .logo-img {
    height: 22px;
    opacity: 0.85;
}

.footer-heading {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links li:last-child {
    margin-bottom: 0;
}

.footer-links a {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-regular);
    transition: color var(--transition-medium);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copyright {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-tertiary);
}


/* ==========================================
   LEGAL PAGES (Privacy Policy, Terms of Service)
   ========================================== */

.legal-page {
    padding-top: calc(var(--nav-height) + var(--space-4xl));
    padding-bottom: var(--space-section);
}

.legal-page h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--color-text);
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.legal-page .legal-effective-date {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-light);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-3xl);
}

.legal-page h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-md);
    letter-spacing: var(--letter-spacing-normal);
}

.legal-page h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--color-text);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.legal-page p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--space-lg);
    max-width: 72ch;
}

.legal-page ul,
.legal-page ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.legal-page ul {
    list-style: disc;
}

.legal-page ol {
    list-style: decimal;
}

.legal-page li {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--space-sm);
}

.legal-page a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-light);
    text-underline-offset: 2px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.legal-page a:hover {
    color: var(--color-primary-dark);
    text-decoration-color: var(--color-primary-dark);
}


/* ==========================================
   SCROLL ANIMATIONS
   Progressive enhancement: content visible by default,
   animations only apply when JS is available (.js class on <html>)
   ========================================== */

/* When JS is available, hide elements for animation */
.js .fade-in {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s var(--ease-out-cubic),
                transform 0.5s var(--ease-out-cubic);
}

/* Visible state - triggered by IntersectionObserver
   Uses .js prefix for higher specificity to reliably override hidden state */
.js .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for child elements
   Uses organic rhythm (accelerating gaps) for natural feel */
.js .fade-in-stagger > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s var(--ease-out-cubic),
                transform 0.5s var(--ease-out-cubic);
}

.js .fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.js .fade-in-stagger.visible > *:nth-child(2) { transition-delay: 130ms; opacity: 1; transform: translateY(0); }
.js .fade-in-stagger.visible > *:nth-child(3) { transition-delay: 260ms; opacity: 1; transform: translateY(0); }
.js .fade-in-stagger.visible > *:nth-child(4) { transition-delay: 370ms; opacity: 1; transform: translateY(0); }
.js .fade-in-stagger.visible > *:nth-child(5) { transition-delay: 470ms; opacity: 1; transform: translateY(0); }
.js .fade-in-stagger.visible > *:nth-child(6) { transition-delay: 560ms; opacity: 1; transform: translateY(0); }

/* Section labels: opacity-only (small text doesn't need movement) */
.js .section-label.fade-in {
    transform: none;
}

.js .section-label.fade-in.visible {
    transform: none;
}

/* Micro-stagger: title lags label for intentional reveal sequence */
.js .section-title.fade-in {
    transition-delay: 150ms;
}

/* Contact CTA cascade: label (0ms) → title (150ms) → subtitle (250ms) → button (350ms) */
.js .contact-subtitle.fade-in {
    transition-delay: 250ms;
}

.js .contact-btn.fade-in {
    transition-delay: 350ms;
}

.js .footer-grid.fade-in {
    transition-duration: 0.55s;
}

.js .footer-copyright.fade-in {
    transition-delay: 150ms;
}

/* Note: scroll-driven section reveals (@supports animation-timeline: view()) removed.
   Safari 18.2+ passes the @supports check but the animation doesn't reliably fire,
   leaving elements stuck at opacity: 0 (animation fill-mode takes precedence over
   IO fallback's .visible class). The IO-based transitions above are reliable everywhere. */


/* ==========================================
   MOBILE MENU BACKDROP
   ========================================== */

.menu-backdrop {
    display: none;
}


/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: var(--space-md);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Focus styles for keyboard navigation */
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.nav-logo:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.footer-links a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.legal-page a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ==========================================
   CONTACT MODAL
   ========================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--color-dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s var(--ease-out-cubic);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-backdrop.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-white-60);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
    transition: color var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.modal-close:hover {
    color: white;
}

.modal-close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Form layout */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.contact-form-grid .form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-white-60);
    margin-bottom: var(--space-xs);
    letter-spacing: var(--letter-spacing-wide);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 2.625rem;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    color: white;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.12);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-group select option {
    background: var(--color-dark-bg);
    color: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Honeypot — visually hidden but present in DOM */
.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Submit button */
.contact-form .btn-submit {
    margin-top: var(--space-md);
    width: 100%;
    justify-content: center;
    font-size: var(--font-size-sm);
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    position: relative;
}

.contact-form .btn-submit:hover {
    background: var(--color-primary-dark);
    color: white;
    border-color: var(--color-primary-dark);
}

.contact-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner inside submit button */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center;
    margin-left: -8px;
    margin-top: -8px;
}

.btn-submit.is-loading .btn-spinner {
    display: block;
}

.btn-submit.is-loading .btn-label {
    visibility: hidden;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.form-error {
    margin-top: var(--space-md);
    padding: 0.625rem 0.875rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius-md);
    color: #fca5a5;
    font-size: var(--font-size-sm);
    display: none;
}

.form-error.visible {
    display: block;
}

/* Success message */
.form-success {
    display: none;
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.form-success.visible {
    display: block;
}

.form-success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: #4ade80;
    font-size: 1.5rem;
}

.form-success p {
    color: var(--color-white-60);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.form-success p strong {
    color: white;
    display: block;
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}
