/* ============================================
   THUY T HOANG MD — Custom Styles
   Bold Editorial | Plum + Amber
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #D4A017;
    color: #1F0B1D;
}

/* --- Navbar --- */
.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(74, 25, 66, 0.08);
}

.navbar-scrolled .nav-link {
    color: rgba(74, 25, 66, 0.7) !important;
}

.navbar-scrolled .font-serif,
.navbar-scrolled .text-plum-500,
.navbar-scrolled [class*="text-plum-500"] {
    color: #4A1942 !important;
}

.navbar-scrolled .text-plum-500\/60 {
    color: rgba(74, 25, 66, 0.5) !important;
}

/* --- Hero Orbs --- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.hero-orb--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7B2D6E 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.hero-orb--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #D4A017 0%, transparent 70%);
    bottom: -5%;
    left: -5%;
    animation-delay: -7s;
}

.hero-orb--3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #f472b6 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* --- Hero Badge --- */
.hero-badge {
    animation: badgeIn 0.8s ease-out 0.2s both;
}

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

/* --- Hero Headline --- */
h1 {
    animation: headlineIn 1s ease-out 0.4s both;
}

@keyframes headlineIn {
    from {
        opacity: 0;
        transform: translateY(30px);
        letter-spacing: -0.02em;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: normal;
    }
}

/* --- Service Cards --- */
.service-card {
    perspective: 1000px;
}

.service-card > div {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
}

.service-card:hover > div {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(74, 25, 66, 0.25);
}

/* --- Scroll Reveal --- */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Progressive enhancement — animations only when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-section.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays for grid children */
.service-card:nth-child(1) .reveal-section { transition-delay: 0.05s; }
.service-card:nth-child(2) .reveal-section { transition-delay: 0.1s; }
.service-card:nth-child(3) .reveal-section { transition-delay: 0.15s; }
.service-card:nth-child(4) .reveal-section { transition-delay: 0.2s; }
.service-card:nth-child(5) .reveal-section { transition-delay: 0.25s; }
.service-card:nth-child(6) .reveal-section { transition-delay: 0.3s; }

/* --- Mobile Menu --- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* --- Input Focus States --- */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

/* --- Smooth Scroll Offset --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-orb {
        filter: blur(60px);
        opacity: 0.3;
    }
    
    .hero-orb--1 {
        width: 300px;
        height: 300px;
    }
    
    .hero-orb--2 {
        width: 250px;
        height: 250px;
    }
    
    .hero-orb--3 {
        width: 150px;
        height: 150px;
    }
}

/* --- Print Styles --- */
@media print {
    header, footer, #contactForm, #formSuccess {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
