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

:root {
    --teal-50:  #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

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

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', 'Segoe UI', system-ui, sans-serif;

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

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--slate-800);
    background: var(--slate-50);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Typography ─── */
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal-600);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--slate-500);
    max-width: 600px;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--teal-600);
    color: #ffffff;
    border-color: var(--teal-600);
}

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

.btn-ghost {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-ghost-light {
    background: transparent;
    color: var(--teal-700);
    border-color: var(--teal-600);
}

.btn-ghost-light:hover {
    background: var(--teal-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

/* ─── Navigation ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--slate-200);
    transition: var(--transition);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 72px;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--slate-900);
    flex-shrink: 0;
}

.nav-logo-icon {
    color: var(--teal-600);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-600);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--teal-600);
    background: var(--teal-50);
}

.nav-cta {
    background: var(--teal-600) !important;
    color: #ffffff !important;
    border-radius: var(--radius-sm) !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--teal-700) !important;
    color: #ffffff !important;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--slate-700);
    border-radius: 2px;
    transition: var(--transition);
}

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

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

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

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--teal-800) 0%,
        var(--teal-700) 25%,
        var(--slate-800) 55%,
        var(--slate-900) 80%,
        #1a1a3e 100%
    );
    z-index: 0;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(13, 148, 136, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(30, 41, 59, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 50% 50%, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
}

.hero-gradient::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;
    max-width: 780px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal-200);
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.08;
    color: #ffffff;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

.hero-title br {
    display: none;
}

@media (min-width: 640px) {
    .hero-title br {
        display: block;
    }
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--slate-300);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.4);
    animation: float 2.5s ease-in-out infinite;
}

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

/* ─── Sections ─── */
.section {
    padding: 100px 0;
}

/* ─── Services ─── */
.services {
    background: var(--slate-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 36px 28px;
    border: 1px solid var(--slate-200);
    transition: var(--transition);
}

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

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--teal-50);
    border-radius: var(--radius-sm);
    color: var(--teal-600);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--teal-600);
    color: #ffffff;
}

.service-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 0.95rem;
    color: var(--slate-500);
    line-height: 1.7;
}

/* ─── About ─── */
.about {
    background: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content .section-title {
    margin-bottom: 24px;
}

.about-text {
    font-size: 1.05rem;
    color: var(--slate-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin: 36px 0;
    padding: 28px 0;
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--teal-600);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--slate-500);
    font-weight: 500;
}

.about-content .btn {
    margin-top: 8px;
}

/* ─── Areas ─── */
.areas {
    background: var(--slate-50);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.area-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--slate-200);
    transition: var(--transition);
}

.area-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-200);
}

.area-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.area-card-content {
    padding: 24px 28px 28px;
}

.area-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.area-desc {
    font-size: 0.95rem;
    color: var(--slate-500);
    line-height: 1.7;
}

/* ─── Testimonials ─── */
.testimonials {
    background: var(--slate-900);
}

.testimonials .section-eyebrow {
    color: var(--teal-400);
}

.testimonials .section-title {
    color: #ffffff;
}

.testimonials .section-subtitle {
    color: var(--slate-400);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--slate-800);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    border: 1px solid var(--slate-700);
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: var(--teal-700);
    transform: translateY(-4px);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    color: var(--teal-400);
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--slate-300);
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--teal-200);
}

/* ─── CTA ─── */
.cta {
    background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-800) 50%, var(--slate-900) 100%);
    padding: 100px 0;
    text-align: center;
}

.cta-content {
    max-width: 640px;
    margin: 0 auto;
}

.cta .section-eyebrow {
    color: var(--teal-200);
}

.cta .section-title {
    color: #ffffff;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--slate-300);
    line-height: 1.7;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* ─── Contact ─── */
.contact {
    background: #ffffff;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--slate-500);
    line-height: 1.7;
    margin-bottom: 36px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

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

.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-400);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 1rem;
    color: var(--slate-700);
    line-height: 1.6;
}

.contact-item a {
    color: var(--teal-600);
    font-weight: 500;
    transition: var(--transition);
}

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

.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ─── Contact Form ─── */
.contact-form-wrap {
    background: var(--slate-50);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--slate-200);
}

.contact-form-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--slate-800);
    background: #ffffff;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--slate-400);
}

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

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    color: var(--teal-600);
}

.form-success h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
}

.form-success p {
    font-size: 1rem;
    color: var(--slate-500);
    line-height: 1.6;
}

/* ─── Footer ─── */
.footer {
    background: var(--slate-950);
    color: var(--slate-400);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--slate-800);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-logo svg {
    color: var(--teal-500);
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--slate-400);
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--slate-400);
    transition: var(--transition);
}

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

.footer-contact p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 4px;
}

.footer-contact a {
    color: var(--teal-400);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--teal-200);
    text-decoration: underline;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--slate-500);
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid .testimonial-card:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
        justify-self: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        border-bottom: 1px solid var(--slate-200);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        opacity: 0;
        transition: var(--transition);
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        padding: 12px 16px;
        width: 100%;
    }

    .nav-cta {
        margin-left: 0 !important;
        text-align: center;
    }

    .hero {
        min-height: 100svh;
        padding: 100px 24px 60px;
    }

    .hero-title {
        font-size: clamp(2.4rem, 10vw, 3.5rem);
    }

    .section {
        padding: 72px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

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

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

    .about-image-wrap {
        order: -1;
    }

    .about-stats {
        gap: 24px;
    }

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

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

    .testimonials-grid .testimonial-card:last-child {
        max-width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-form-wrap {
        padding: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
}
</style>
<sm-file path="script.js">
(function () {
    'use strict';

    // ─── Mobile Navigation ───
    const navToggle = document.getElementById('navToggle');
    const navLinks = document.getElementById('navLinks');
    const nav = document.getElementById('nav');

    if (navToggle && navLinks) {
        navToggle.addEventListener('click', function () {
            var isOpen = navLinks.classList.toggle('open');
            navToggle.classList.toggle('active');
            navToggle.setAttribute('aria-expanded', isOpen);
        });

        // Close menu on link click
        navLinks.querySelectorAll('a').forEach(function (link) {
            link.addEventListener('click', function () {
                navLinks.classList.remove('open');
                navToggle.classList.remove('active');
                navToggle.setAttribute('aria-expanded', 'false');
            });
        });

        // Close on escape
        document.addEventListener('keydown', function (e) {
            if (e.key === 'Escape' && navLinks.classList.contains('open')) {
                navLinks.classList.remove('open');
                navToggle.classList.remove('active');
                navToggle.setAttribute('aria-expanded', 'false');
                navToggle.focus();
            }
        });
    }

    // ─── Navbar scroll effect ───
    if (nav) {
        var onScroll = function () {
            if (window.scrollY > 10) {
                nav.classList.add('scrolled');
            } else {
                nav.classList.remove('scrolled');
            }
        };
        window.addEventListener('scroll', onScroll, { passive: true });
        onScroll();
    }

    // ─── Scroll Reveal (progressive enhancement) ───
    if (window.matchMedia('(prefers-reduced-motion: no-preference)').matches) {
        var reveals = document.querySelectorAll('.reveal');
        if (reveals.length > 0) {
            var observer = new IntersectionObserver(function (entries) {
                entries.forEach(function (entry) {
                    if (entry.isIntersecting) {
                        entry.target.classList.add('revealed');
                        observer.unobserve(entry.target);
                    }
                });
            }, {
                threshold: 0.12,
                rootMargin: '0px 0px -40px 0px'
            });

            reveals.forEach(function (el) {
                observer.observe(el);
            });
        }
    }

    // ─── Contact Form ───
    var form = document.getElementById('contactForm');
    var success = document.getElementById('formSuccess');

    if (form && success) {
        form.addEventListener('submit', function (e) {
            e.preventDefault();

            // Basic validation
            var required = form.querySelectorAll('[required]');
            var valid = true;
            required.forEach(function (input) {
                if (!input.value.trim()) {
                    input.style.borderColor = '#ef4444';
                    valid = false;
                } else {
                    input.style.borderColor = '';
                }
            });

            if (!valid) return;

            // Show success
            form.style.display = 'none';
            success.classList.add('show');
        });
    }

    // ─── Smooth scroll for anchor links ───
    document.querySelectorAll('a[href^="#"]').forEach(function (anchor) {
        anchor.addEventListener('click', function (e) {
            var targetId = this.getAttribute('href');
            if (targetId === '#') return;

            var target = document.querySelector(targetId);
            if (target) {
                e.preventDefault();
                var navHeight = nav ? nav.offsetHeight : 0;
                var targetPosition = target.getBoundingClientRect().top + window.pageYOffset - navHeight - 20;

                window.scrollTo({
                    top: targetPosition,
                    behavior: 'smooth'
                });
            }
        });
    });
})();
