/* ========================================
   ReloPlan AG – Premium Website Styles
   World-Class Responsive + Dark Mode
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --primary-dark: #0e2f44;
    --accent: #3498db;
    --accent-light: #5dade2;
    --gradient: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #33a5ff 100%);
    --gradient-text: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #33a5ff 100%);

    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 25px 60px -15px rgba(0, 0, 0, 0.2);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--gray-700);
    background: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ol, ul {
    list-style: none;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 1rem;
}

/* --- Focus States (Accessibility) --- */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
}

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

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.lead {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 400;
    color: var(--gray-600);
    line-height: 1.8;
}

/* --- Base Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(40px) translate3d(0,0,0);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.2, 1),
                transform 0.8s cubic-bezier(0.25, 1, 0.2, 1),
                filter 0.6s ease-out;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: opacity, transform;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0) translate3d(0,0,0);
}

/* Modifiers */
.anim-blur {
    filter: blur(6px);
}
.anim-blur.visible {
    filter: blur(0px);
}

.anim-scale {
    transform: translateY(40px) scale(0.96) translate3d(0,0,0);
}
.anim-scale.visible {
    transform: translateY(0) scale(1) translate3d(0,0,0);
}



#hero .animate-in {
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.2, 1),
                transform 1.2s cubic-bezier(0.25, 1, 0.2, 1),
                filter 1s cubic-bezier(0.25, 1, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

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

    html {
        scroll-behavior: auto;
    }
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

#navbar {
    padding: 1.25rem 0;
    transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 0;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 36px;
    width: auto;
    transition: var(--transition);
}

#navbar.scrolled .nav-logo img {
    height: 30px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    position: relative;
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

#navbar.scrolled .nav-link {
    color: var(--gray-700);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
    border-radius: 2px;
}

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

.nav-link.active {
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

#navbar.scrolled .nav-toggle span {
    background: var(--gray-700);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    min-height: 48px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0e2f44 0%, #1a5276 30%, #2471a3 60%, #2980b9 100%);
    z-index: 0;
    will-change: transform;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(52, 152, 219, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(93, 173, 226, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(26, 82, 118, 0.2) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

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

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- About Section --- */
#about {
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.about-text p {
    margin-bottom: 1.25rem;
    color: var(--gray-600);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

.about-text .lead {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--gray-700);
    font-weight: 400;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--gray-200);
    }
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* --- Process Section --- */
#process {
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    background: var(--gray-50);
}

.process-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 3px;
    z-index: 0;
}

.process-timeline::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
    z-index: 0;
    transform: scaleX(var(--track-fill, 0));
    transform-origin: left;
    transition: transform 0.15s linear;
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-marker {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.step-number {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .timeline-step:hover .step-marker {
        border-color: var(--accent);
        background: var(--gradient);
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.15);
    }

    .timeline-step:hover .step-number {
        color: #fff;
    }
}

.step-content {
    padding: 0 0.5rem;
}

.step-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.06), rgba(52, 152, 219, 0.08));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    transition: background 0.3s ease;
}

.step-icon svg {
    stroke: var(--primary-light);
    transition: stroke 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .timeline-step:hover .step-icon {
        background: var(--gradient);
    }

    .timeline-step:hover .step-icon svg {
        stroke: #fff;
    }
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: clamp(0.8rem, 0.9vw, 0.85rem);
    color: var(--gray-500);
    line-height: 1.6;
}

.process-bar {
    margin-top: 0.5rem;
}

.process-bar-inner {
    background: var(--gradient);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: #fff;
}

.process-bar-inner svg {
    stroke: #fff;
    flex-shrink: 0;
}

.process-bar-inner strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.process-bar-inner span {
    font-size: 0.88rem;
    opacity: 0.85;
}

/* --- Who We Are Section --- */
#who-we-are {
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    background: var(--white);
}

.who-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
}

.who-image {
    position: relative;
    background: transparent;
    border-radius: var(--radius-xl);
}

.who-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Optimized static shadow for GPU performance */
    object-fit: cover;
    aspect-ratio: 4/3;
    background: var(--gray-100);
}

.image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 60%;
    height: 60%;
    border-radius: var(--radius-xl);
    background: var(--gradient);
    opacity: 0.1;
    z-index: -1;
}

.who-text .section-title {
    text-align: left;
}

.who-text p {
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    font-size: clamp(0.92rem, 1.1vw, 1.02rem);
}

.who-cta {
    color: var(--primary) !important;
    font-size: 1.1rem !important;
    margin-top: 0.5rem;
}

/* --- Team Section --- */
#team {
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    background: var(--gray-50);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.team-anim-wrapper {
    height: 100%;
}

/* Staggering natively via CSS to prevent JS lag */
.team-grid > div:nth-child(2) { transition-delay: 150ms; }
.team-grid > div:nth-child(3) { transition-delay: 300ms; }
.team-grid > div:nth-child(4) { transition-delay: 450ms; }
.team-grid > div:nth-child(5) { transition-delay: 600ms; }
.team-grid > div:nth-child(6) { transition-delay: 750ms; }

.team-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gray-100);
    flex-shrink: 0;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Hover effects only on devices with a real pointer (no touch flicker) */
@media (hover: hover) and (pointer: fine) {
    .team-card:hover {
        transform: translateY(-6px) translateZ(0);
        box-shadow: var(--shadow-xl);
        border-color: transparent;
    }

    .team-card-image img {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .team-card:hover .team-card-image img {
        transform: scale(1.05) translateZ(0);
    }
}

.team-card-body {
    padding: clamp(1.5rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-name {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.team-role {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1rem;
}

.team-description {
    font-size: clamp(0.85rem, 1vw, 0.9rem);
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.team-references {
    margin-bottom: 1.25rem;
}

.ref-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.ref-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ref-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}

.team-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.78rem, 0.9vw, 0.85rem);
    color: var(--primary-light);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    min-height: 44px;
}

.team-email:hover {
    color: var(--primary);
    border-bottom-color: var(--primary-light);
}

.team-email svg {
    flex-shrink: 0;
}

/* --- Contact Section --- */
#contact {
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    background: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
}

.contact-intro {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--gray-500);
    margin-bottom: 2.5rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    min-height: 48px;
}

@media (hover: hover) and (pointer: fine) {
    a.contact-item:hover {
        background: var(--white);
        border-color: var(--gray-200);
        box-shadow: var(--shadow-md);
        transform: translateX(4px);
    }
}

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

.contact-icon svg {
    stroke: #ffffff;
}

.contact-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    margin-bottom: 0.15rem;
}

.contact-value {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    font-weight: 500;
    color: var(--gray-700);
}

.contact-map {
    height: 100%;
    min-height: 480px;
}

.map-card {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
}

.map-card iframe {
    width: 100%;
    height: 100%;
    min-height: 480px;
    display: block;
}

/* --- Footer --- */
footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--gray-500);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--gray-400);
    transition: color 0.3s ease;
    padding: 0.25rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-social a svg {
    stroke: var(--gray-400);
    transition: stroke 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.footer-social a:hover svg {
    stroke: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.footer-credit {
    color: var(--gray-600);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1001;
    background: transparent;
}

.scroll-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--gradient);
    border-radius: 0 2px 2px 0;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 900;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary-light);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) translateZ(0);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    backface-visibility: hidden;
}

.back-to-top svg {
    stroke: #fff;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0);
}

@media (hover: hover) and (pointer: fine) {
    .back-to-top.visible:hover {
        background: var(--primary);
        transform: translateY(-2px) translateZ(0);
        box-shadow: var(--shadow-xl);
    }
}

/* --- Mobile Nav Animation --- */
@media (max-width: 768px) {
    .nav-links {
        opacity: 0;
        visibility: hidden;
        display: flex !important;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links .nav-link {
        transform: translateY(20px) translateZ(0);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        transition-delay: 0s;
        backface-visibility: hidden;
    }

    .nav-links.open .nav-link {
        transform: translateY(0) translateZ(0);
        opacity: 1;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.open .nav-link:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.open .nav-link:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.open .nav-link:nth-child(3) { transition-delay: 0.15s; }
    .nav-links.open .nav-link:nth-child(4) { transition-delay: 0.2s; }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
    }
}

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

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .about-grid {
        gap: 6rem;
    }

    .who-grid {
        gap: 6rem;
    }

    .team-grid {
        gap: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid .team-card:last-child {
        grid-column: 1 / -1;
        max-width: 450px;
        justify-self: center;
    }

    .who-grid {
        gap: 3rem;
    }

    .process-timeline {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    /* Nav links: positioned + animated via the animation block above */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links .nav-link {
        color: #ffffff !important;
        font-size: 1.5rem;
        font-weight: 500;
        min-height: 48px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-toggle.open span {
        background: #ffffff !important;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        gap: 0.75rem;
    }

    .stat-card {
        flex: 1;
        padding: 1.25rem 1rem;
        text-align: center;
    }

    .process-timeline {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .process-timeline::before,
    .process-timeline::after {
        display: none;
    }

    .timeline-step {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 0 0 2rem 0;
        position: relative;
    }

    .timeline-step::before {
        content: '';
        position: absolute;
        left: 23px;
        top: 56px;
        bottom: 0;
        width: 2px;
        background: var(--gray-200);
    }

    .timeline-step:last-child::before {
        display: none;
    }

    .step-marker {
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }

    .step-content {
        padding: 0;
        flex: 1;
        min-width: 0;
    }

    .step-icon {
        display: none;
    }

    .step-content h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .step-content p {
        font-size: 0.88rem;
    }

    .process-bar-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem 1.5rem;
        gap: 0.75rem;
    }

    .who-grid {
        grid-template-columns: 1fr;
    }

    .who-text .section-title {
        text-align: center;
    }

    .who-text {
        text-align: center;
    }

    .image-accent {
        display: none;
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .team-grid .team-card:last-child {
        max-width: none;
    }

    .team-card-image {
        aspect-ratio: 4 / 3;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info .section-title {
        text-align: center;
    }

    .contact-intro {
        text-align: center;
    }

    .contact-map {
        min-height: 280px;
    }

    .map-card iframe {
        min-height: 280px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-stats {
        flex-direction: column;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
    }

    .team-card-image {
        aspect-ratio: 1 / 1;
    }

    .contact-item {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .contact-value {
        word-break: break-all;
    }

    .team-email {
        word-break: break-all;
    }
}

/* ==============================
   Dark Mode
   ============================== */

@media (prefers-color-scheme: dark) {
    :root {
        --white: #0f172a;
        --gray-50: #1e293b;
        --gray-100: #293548;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #94a3b8;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;

        --gradient-text: linear-gradient(135deg, #93d1f7, #b8e2fb, #d6effe);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.45);
        --shadow-xl: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
    }

    body {
        color-scheme: dark;
    }

    #navbar.scrolled {
        background: rgba(15, 23, 42, 0.92);
        box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
    }

    #navbar.scrolled .nav-link {
        color: var(--gray-700);
    }

    #navbar.scrolled .nav-toggle span {
        background: var(--gray-700);
    }

    .btn-primary {
        background: var(--accent);
        color: #fff;
    }

    /* Dark mode hovers handled by @media (hover: hover) blocks above */

    .who-cta {
        color: var(--accent-light) !important;
    }

    .ref-tag {
        background: var(--gray-100);
        border-color: var(--gray-200);
        color: var(--gray-600);
    }

    /* Dark mode contact hover handled via @media (hover:hover) block above */

    .contact-icon svg {
        stroke: #fff;
    }

    .map-card {
        border-color: var(--gray-200);
    }

    .step-marker {
        border-color: var(--gray-300);
    }

    .step-icon {
        background: linear-gradient(135deg, rgba(41, 128, 185, 0.15), rgba(52, 152, 219, 0.15));
    }

    .timeline-step::before {
        background: var(--gray-300);
    }

    *:focus-visible {
        outline-color: var(--accent-light);
    }

    footer {
        background: #060d19;
    }

    .footer-inner {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .footer-logo {
        filter: brightness(0) invert(1);
        opacity: 0.7;
    }

    .footer-social a {
        border-color: rgba(255, 255, 255, 0.08);
    }

    .footer-social a svg {
        stroke: var(--gray-400);
    }

    .footer-social a:hover {
        background: var(--primary-light);
        border-color: var(--primary-light);
    }

    .footer-social a:hover svg {
        stroke: #fff;
    }

    .footer-links a {
        color: var(--gray-400);
    }

    .footer-links a:hover {
        color: #fff;
    }

    .footer-bottom,
    .footer-credit {
        color: var(--gray-400);
    }
}
