/* ===== CSS Custom Properties ===== */
:root {
    --color-midnight-900: #0a1628;
    --color-midnight-800: #1a2a42;
    --color-midnight-700: #253d5c;
    --color-mint-500: #2d9a78;
    --color-mint-400: #4bb894;
    --color-mint-100: #d8f5ec;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-400: #a8a29e;
    --color-stone-500: #78716c;
    --color-stone-600: #57534e;
    --color-stone-800: #292524;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-stone-800);
    background-color: var(--color-stone-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== Utility ===== */
.section {
    position: relative;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-mint-500);
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--color-mint-500);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-midnight-800);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--color-stone-600);
    line-height: 1.7;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-mint-500);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(45, 154, 120, 0.3);
}

.btn-primary:hover {
    background: var(--color-mint-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 154, 120, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-midnight-800);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 12px;
    border: 2px solid var(--color-stone-200);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    border-color: var(--color-mint-500);
    color: var(--color-mint-600);
    transform: translateY(-2px);
}

/* Dark variant for hero */
.hero .btn-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.hero .btn-secondary:hover {
    border-color: var(--color-mint-400);
    color: var(--color-mint-400);
}

/* ===== Navigation ===== */
.nav {
    background: transparent;
    backdrop-filter: none;
    z-index: 50;
    transition: var(--transition-smooth);
}

.nav.scrolled {
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav.scrolled .logo-text span:first-child {
    color: var(--color-midnight-800);
}

.nav.scrolled .nav-link {
    color: var(--color-midnight-700);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-mint-500);
    transition: width 0.3s ease;
}

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

/* ===== Mobile Menu ===== */
.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 60;
}

.hamburger {
    align-items: center;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-midnight-800);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.mobile-menu.open .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu.open .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-link {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-midnight-800);
    transition: color 0.3s ease;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-midnight-900);
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-img {
    opacity: 0.35;
    transition: transform 8s ease;
}

.hero:hover .hero-img {
    transform: scale(1.03);
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.92) 0%,
        rgba(26, 42, 66, 0.85) 50%,
        rgba(10, 22, 40, 0.78) 100%
    );
}

.hero-pattern {
    background-image: 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='%234bb894' fill-opacity='0.4'%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 {
    padding-top: 80px;
    padding-bottom: 120px;
}

.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-trust {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-scroll {
    animation: fadeInUp 0.8s ease 0.5s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bounce 2s ease infinite;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-mint-400);
    border-radius: 50%;
    animation: scrollDot 2s ease infinite;
}

@keyframes scrollDot {
    0% { top: -8px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

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

/* ===== About ===== */
.about-img-wrapper {
    position: relative;
}

.about-img {
    transition: transform 0.6s ease;
}

.about-img-wrapper:hover .about-img {
    transform: scale(1.01);
}

.about-stat-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.about-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-mint-100);
    color: var(--color-mint-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.about-feature:hover .about-feature-icon {
    background: var(--color-mint-500);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ===== Services ===== */
.service-card {
    perspective: 1000px;
}

.service-card-inner {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    border: 1px solid var(--color-stone-200);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-mint-400), var(--color-mint-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-inner::before {
    transform: scaleX(1);
}

.service-card:hover .service-card-inner {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-mint-100);
    color: var(--color-mint-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    background: var(--color-mint-500);
    color: #ffffff;
    transform: scale(1.05);
}

.service-title {
    transition: color 0.3s ease;
}

/* ===== Why Us ===== */
.why-us-item {
    padding-left: 0;
    transition: var(--transition-smooth);
}

.why-us-item:hover {
    transform: translateX(8px);
}

.why-us-image-wrapper {
    position: relative;
}

.why-us-img {
    transition: transform 0.6s ease;
}

.why-us-image-wrapper:hover .why-us-img {
    transform: scale(1.01);
}

/* ===== Location ===== */
.location-card {
    transition: var(--transition-smooth);
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.location-icon {
    transition: var(--transition-smooth);
}

.location-item:hover .location-icon {
    background: var(--color-mint-500);
    color: #ffffff;
}

.location-item:hover .location-icon svg {
    stroke: #ffffff;
}

/* ===== CTA ===== */
.cta-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d9a78' fill-opacity='0.3'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== Footer ===== */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-mint-500), transparent);
    border-radius: 2px;
}

.footer a:hover {
    text-decoration: none;
}

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .hero-content {
        padding-top: 100px;
        padding-bottom: 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-stat-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: clamp(3rem, 5vw, 4.5rem);
    }
}
