/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

/* ── Navbar ── */
.navbar-text {
    color: #0f172a;
}

.navbar-link {
    color: #334155;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.3s ease;
}

.navbar-link:hover {
    color: #0d9488;
}

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

/* Scrolled navbar */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

nav.scrolled .navbar-text {
    color: #0f172a;
}

nav.scrolled .navbar-link {
    color: #334155;
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

.mobile-nav-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ── Floating Cards ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 4.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ── Reveal Animations ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Default visible state for reduced motion / no-JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Always visible for no-JS fallback */
.no-js .reveal,
.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Group card hover ── */
.group:hover .group-hover\!bg-teal-500\/20 {
    background: rgba(45, 212, 191, 0.2);
}

/* ── Button focus ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Map container ── */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* ── Responsive tweaks ── */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif {
        font-size: clamp(2rem, 4vw, 3rem);
    }
}
