*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
select, input, textarea { font: inherit; color: inherit; }

/* ─── NAV ─────────────────────────────────── */
.nav-fixed {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.nav-fixed.scrolled {
    background: rgba(12, 31, 63, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1.5px;
    background: #7EC8B8;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ─── MOBILE NAV ──────────────────────────── */
.nav-toggle { transition: transform 0.2s ease; }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
#mobile-menu { animation: slideDown 0.25s ease; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── HERO ────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-img { transition: transform 8s ease; }
.hero:hover .hero-img { transform: scale(1.03); }
.hero-grain {
    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");
    background-size: 128px 128px;
    pointer-events: none;
}
.animate-bounce-slow {
    animation: bounce-slow 2.5s ease-in-out infinite;
}
@keyframes bounce-slow {
    0%, 100% { transform: translate(-50%, 0); }
    50%       { transform: translate(-50%, 8px); }
}

/* ─── BUTTONS ─────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: #7EC8B8;
    color: #0C1F3F;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    border: none;
}
.btn-primary:hover {
    background: #8CCFB3;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(126,200,184,0.3);
}
.btn-outline-light {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #fff;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,0.35);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

/* ─── DIVIDER ─────────────────────────────── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(12,31,63,0.12), transparent);
}

/* ─── CARDS ───────────────────────────────── */
.card-group {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card-group:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(12,31,63,0.1);
}
.card {
    box-shadow: 0 4px 20px rgba(12,31,63,0.08);
    transition: box-shadow 0.35s ease;
}
.card-group:hover .card {
    box-shadow: 0 12px 40px rgba(12,31,63,0.14);
}
.card-img {
    transition: transform 0.6s ease;
}
.card-group:hover .card-img {
    transform: scale(1.06);
}

/* ─── PHILOSOPHY PATTERN ──────────────────── */
.philosophy-pattern {
    background-image: radial-gradient(circle, #7EC8B8 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ─── GALLERY ─────────────────────────────── */
.gallery-item { transition: transform 0.35s ease; }
.gallery-item:hover { transform: translateY(-4px); }
.gallery-img { transition: transform 0.5s ease, filter 0.5s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.05); filter: brightness(1.05); }

/* ─── INPUTS ──────────────────────────────── */
.input-field {
    background: #FDFCF8;
    border: 1.5px solid #E8DFD0;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: #0C1F3F;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    width: 100%;
}
.input-field::placeholder { color: #C4A882; }
.input-field:focus {
    border-color: #7EC8B8;
    box-shadow: 0 0 0 3px rgba(126,200,184,0.15);
    background: #fff;
}
.input-field:invalid:not(:placeholder-shown) {
    border-color: #e07a7a;
}

/* ─── REVEAL ANIMATIONS ───────────────────── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── BACK TO TOP ─────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0C1F3F;
    color: #7EC8B8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(12,31,63,0.3);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    background: #0A1628;
    transform: translateY(-2px);
}

/* ─── FOCUS VISIBLE ───────────────────────── */
:focus-visible {
    outline: 2px solid #7EC8B8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── SELECTION ───────────────────────────── */
::selection {
    background: rgba(126,200,184,0.3);
    color: #0C1F3F;
}

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 639px) {
    .nav-fixed { background: rgba(12,31,63,0.97); }
    .hero { min-height: 100svh; }
    .hero h1 { font-size: 2.25rem; }
    .hero h1 br { display: none; }
    .philosophy-pattern { display: none; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .hero h1 { font-size: 3.5rem; }
}
@media (min-width: 1024px) {
    .hero h1 { font-size: 4.25rem; }
}

/* ─── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F9F6EE; }
::-webkit-scrollbar-thumb { background: #C4A882; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A08060; }
