/* ===================================
   BLEEDING-EDGE CSS - 2026
   - CSS Grid + Subgrid
   - Container Queries
   - Modern Color Functions
   - WCAG AA Compliant
   - Smooth Animations
   =================================== */

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

:root {
    /* Modern Color Palette - WCAG AA Compliant */
    --color-primary: #1a5f7a;
    --color-primary-light: #2d7a9b;
    --color-primary-dark: #0d3d52;

    --color-accent: #e07a5f;
    --color-accent-light: #f4a583;
    --color-accent-dark: #c15840;

    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;

    /* Typography Scale */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;

    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */

    /* Spacing Scale */
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
    --space-24: 6rem;       /* 96px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: prefer-reduced-motion) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-neutral-900);
    background: var(--color-neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-neutral-200);
    transition: transform var(--transition-base);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: var(--space-8);
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-neutral-700);
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

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

.nav-cta {
    padding: var(--space-2) var(--space-5);
    background: var(--color-primary);
    color: white !important;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

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

.nav-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: var(--space-24) var(--space-6);
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 50%,
        var(--color-accent) 100%
    );
    opacity: 0.95;
}

.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-10);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.4s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.6s forwards;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: white;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--color-neutral-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* ===================================
   SECTIONS
   =================================== */

section {
    padding: var(--space-20) var(--space-6);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-neutral-700);
}

/* ===================================
   SERVICES SECTION
   =================================== */

.services {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
    container-type: inline-size;
}

.service-card {
    background: var(--color-neutral-50);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all var(--transition-slow);
    border: 1px solid var(--color-neutral-200);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    margin-bottom: var(--space-6);
    color: white;
}

.service-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-3);
}

.service-description {
    color: var(--color-neutral-700);
    margin-bottom: var(--space-5);
    line-height: 1.7;
}

.service-benefits {
    list-style: none;
    margin-bottom: var(--space-6);
}

.service-benefits li {
    padding: var(--space-2) 0;
    color: var(--color-neutral-700);
    position: relative;
    padding-left: var(--space-6);
}

.service-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-neutral-200);
    font-weight: 600;
    color: var(--color-neutral-900);
}

/* ===================================
   TEAM SECTION
   =================================== */

.team {
    background: linear-gradient(to bottom, white, var(--color-neutral-50));
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--space-10);
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-md);
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.team-photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: var(--text-5xl);
    font-weight: 700;
    color: white;
}

.team-info {
    padding: var(--space-8);
}

.team-name {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-2);
}

.team-role {
    font-size: var(--text-base);
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.team-bio {
    color: var(--color-neutral-700);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.team-credentials {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.credential {
    padding: var(--space-1) var(--space-3);
    background: var(--color-neutral-100);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-neutral-700);
}

/* ===================================
   LOCATION SECTION
   =================================== */

.location {
    background: white;
}

.location-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

@media (max-width: 968px) {
    .location-split {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    display: grid;
    gap: var(--space-6);
}

.contact-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: start;
}

.contact-item svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-1);
}

.contact-item p {
    color: var(--color-neutral-700);
    line-height: 1.7;
}

.contact-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.contact-item a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.location-map {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-neutral-100);
    display: grid;
    place-items: center;
    gap: var(--space-4);
    color: var(--color-neutral-700);
}

.map-placeholder svg {
    color: var(--color-accent);
}

/* ===================================
   BOOK SECTION
   =================================== */

.book {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    text-align: center;
}

.book-content {
    max-width: 800px;
    margin: 0 auto;
}

.book-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.book-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    margin-bottom: var(--space-10);
}

.book-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.book-note {
    font-size: var(--text-sm);
    opacity: 0.8;
}

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

.footer {
    background: var(--color-neutral-900);
    color: white;
    padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto var(--space-12);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

.footer-brand h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.footer-brand p {
    color: var(--color-neutral-300);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--color-neutral-300);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--color-neutral-800);
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.footer-legal {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-neutral-800);
    color: var(--color-neutral-300);
    font-size: var(--text-sm);
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    /* Navigation - Mobile optimized */
    .nav-container {
        padding: var(--space-3) var(--space-4);
    }

    .logo {
        font-size: var(--text-lg);
    }

    .nav-links {
        gap: var(--space-2);
        font-size: var(--text-sm);
    }

    .nav-cta {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-sm);
        white-space: nowrap;
    }

    /* Sections */
    .hero {
        min-height: 90vh;
        padding: var(--space-12) var(--space-4);
    }

    section {
        padding: var(--space-12) var(--space-4);
    }

    .section-header {
        margin-bottom: var(--space-10);
    }

    .services-grid,
    .team-grid {
        gap: var(--space-6);
    }
}

/* Extra small screens - further optimization */
@media (max-width: 480px) {
    .nav-links {
        gap: var(--space-1);
    }

    .nav-links li:not(:has(.nav-cta)) a {
        font-size: var(--text-xs);
    }
}

/* ===================================
   TEAM SHOW MORE BUTTON
   =================================== */

.team-show-more {
    text-align: center;
    margin-top: var(--space-12);
}

.team-show-more .btn {
    min-width: 280px;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-neutral-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--color-neutral-700);
    transition: all var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: var(--color-neutral-200);
    transform: rotate(90deg);
}

.modal-content {
    padding: var(--space-8);
}

.modal-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-6);
    align-items: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-neutral-100);
}

.modal-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.modal-photo .photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: white;
}

.modal-title-section h2 {
    font-size: var(--text-3xl);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-2);
}

.modal-role {
    font-size: var(--text-lg);
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.modal-experience {
    font-size: var(--text-base);
    color: var(--color-neutral-700);
}

.modal-body {
    margin-bottom: var(--space-8);
}

.modal-section {
    margin-bottom: var(--space-8);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: var(--text-xl);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-neutral-200);
}

.modal-section p {
    color: var(--color-neutral-700);
    line-height: 1.8;
}

.modal-list {
    list-style: none;
    display: grid;
    gap: var(--space-2);
}

.modal-list li {
    padding-left: var(--space-6);
    position: relative;
    color: var(--color-neutral-700);
    line-height: 1.7;
}

.modal-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.modal-footer {
    padding-top: var(--space-6);
    border-top: 2px solid var(--color-neutral-100);
    display: flex;
    justify-content: center;
}

.modal-cta {
    width: 100%;
    max-width: 400px;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal {
        padding: 0;
    }

    .modal-container {
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    .modal-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .modal-photo {
        margin: 0 auto;
    }

    .modal-content {
        padding: var(--space-6);
        padding-top: var(--space-16);
    }

    .modal-close {
        top: var(--space-6);
        right: var(--space-6);
    }
}

/* ===================================
   SERVICE MODAL SPECIFIC STYLES
   =================================== */

.service-modal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-gray-light);
}

.service-modal-header .modal-title-section {
    width: 100%;
}

.service-modal-duration {
    color: var(--color-gray);
    font-size: var(--text-base);
    margin-top: var(--space-2);
}
