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

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* =========================================
   NAVBAR
   ========================================= */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-subtext,
#navbar.scrolled .nav-link {
    color: #f8fafc;
}

.nav-logo-text {
    color: #f8fafc;
    font-family: 'Lora', Georgia, serif;
}

.nav-subtext {
    color: rgba(248, 250, 252, 0.6);
}

.nav-link {
    color: rgba(248, 250, 252, 0.8);
}

.mobile-nav-link {
    color: rgba(248, 250, 252, 0.8);
}

/* =========================================
   HERO
   ========================================= */
#hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.pexels.com/photos/18448916/pexels-photo-18448916.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 15, 26, 0.72) 0%,
        rgba(8, 15, 26, 0.65) 40%,
        rgba(8, 15, 26, 0.80) 100%
    );
}

.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    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");
    pointer-events: none;
}

.hero-eyebrow {
    opacity: 0;
    animation: fadeDown 0.8s ease forwards 0.3s;
}

.hero-headline {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtext {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.9s;
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero scroll indicator */
.hero-scroll-indicator {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.4s;
}

.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.3;
        transform: translateY(8px);
    }
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0d9488;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.4);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* =========================================
   SECTION TYPOGRAPHY
   ========================================= */
.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0d9488;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    color: #0f172a;
}

/* =========================================
   SERVICE CARDS
   ========================================= */
.service-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
    border-color: #ccfbf1;
}

.service-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d9488;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
}

/* =========================================
   FORM INPUTS
   ========================================= */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: #94a3b8;
}

/* =========================================
   REVEAL ANIMATIONS (below-the-fold only)
   ========================================= */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state for reveals is visible (progressive enhancement) */
.reveal {
    transform: translateY(20px);
    opacity: 0;
}

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

/* =========================================
   MOBILE MENU
   ========================================= */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.25rem;
    }

    .hero-subtext {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta a {
        width: 100%;
        justify-content: center;
    }

    #about .grid {
        gap: 3rem;
    }

    .service-card {
        padding: 1.5rem;
    }
}

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

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
