/* ============================================
   SANYOS COFFEE — Custom Styles
   Classic & Elegant · Midnight Blue + Mint
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-midnight: #0A1628;
    --color-mint: #7FBFAF;
    --color-mint-light: #B3E2D0;
    --color-cream: #FAFAF8;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: var(--color-mint);
    color: var(--color-midnight);
}

/* --- Navigation --- */
#nav {
    background: transparent;
    transition: background 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

#nav.scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-mint);
    transition: width 0.4s var(--ease-out-expo);
}

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

/* --- Mobile Menu --- */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: slideIn 0.5s var(--ease-out-expo) forwards;
    opacity: 0;
    transform: translateY(20px);
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-line {
    transition: all 0.4s var(--ease-out-expo);
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* --- Hero --- */
.hero-eyebrow {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.2s both;
}

.hero-title {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.4s both;
}

.hero-subtitle {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.6s both;
}

.hero-cta {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.8s both;
}

.hero-stats {
    animation: fadeUp 0.8s var(--ease-out-expo) 1s both;
}

.hero-image-wrapper {
    animation: fadeIn 1.2s var(--ease-out-expo) 0.5s both;
}

.hero-accent {
    animation: float 4s var(--ease-in-out) infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* --- Scroll Indicator --- */
.scroll-indicator {
    animation: fadeIn 1s var(--ease-out-expo) 1.5s both;
}

.scroll-indicator span {
    animation: pulse 2s var(--ease-in-out) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* --- Section Titles --- */
.eyebrow-text {
    animation: fadeUp 0.6s var(--ease-out-expo) both;
}

.section-title {
    animation: fadeUp 0.8s var(--ease-out-expo) both;
}

/* --- Divider --- */
.divider-line {
    animation: expandWidth 1s var(--ease-out-expo) both;
}

@keyframes expandWidth {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --- About --- */
.about-img-1 {
    animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.about-img-2 {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.2s both;
}

.about-content .section-eyebrow {
    animation: fadeUp 0.6s var(--ease-out-expo) both;
}

.about-content .section-title {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.1s both;
}

.about-body p {
    animation: fadeUp 0.6s var(--ease-out-expo) both;
}

.about-body p:nth-child(1) { animation-delay: 0.2s; }
.about-body p:nth-child(2) { animation-delay: 0.3s; }
.about-body p:nth-child(3) { animation-delay: 0.4s; }

.about-signature {
    animation: fadeUp 0.6s var(--ease-out-expo) 0.5s both;
}

/* --- Menu --- */
.menu-category {
    animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.menu-category:nth-child(1) { animation-delay: 0.1s; }
.menu-category:nth-child(2) { animation-delay: 0.2s; }
.menu-category:nth-child(3) { animation-delay: 0.3s; }

/* --- Gallery --- */
.gallery-item {
    animation: fadeIn 0.8s var(--ease-out-expo) both;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }

/* --- Visit --- */
.visit-item {
    animation: fadeUp 0.6s var(--ease-out-expo) both;
}

.visit-item:nth-child(1) { animation-delay: 0.1s; }
.visit-item:nth-child(2) { animation-delay: 0.2s; }
.visit-item:nth-child(3) { animation-delay: 0.3s; }

.map-container {
    animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.contact-form-container {
    animation: fadeUp 0.8s var(--ease-out-expo) 0.2s both;
}

/* --- Form --- */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--color-mint);
    box-shadow: 0 0 0 3px rgba(127, 191, 175, 0.1);
}

.form-input::placeholder {
    color: rgba(10, 22, 40, 0.25);
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s var(--ease-out-expo);
}

.form-submit:hover::before {
    left: 100%;
}

/* --- Scroll Reveal (JS-driven) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-accent {
        display: none;
    }

    .hero-stats {
        gap: 8px;
    }

    .hero-stats > div {
        flex: 1;
    }

    .hero-stats .font-serif {
        font-size: 1.5rem;
    }

    .about-img-2 {
        margin-top: 0;
    }

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

@media (max-width: 639px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 2.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;
    }
}
