/* ============================================
   The Dinner Table — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(94, 234, 212, 0.2);
    color: #5EEAD4;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2e5280;
}

/* ---------- Navigation ---------- */
#site-header {
    background: transparent;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
}

#site-header.scrolled {
    background: rgba(3, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}

.nav-link {
    position: relative;
}

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

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

/* ---------- Mobile Menu ---------- */
.mobile-menu-overlay {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-link {
    position: relative;
}

/* Hamburger */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ---------- Hero Animations ---------- */
.hero-tagline {
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-headline {
    animation: heroSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(110%);
}

.hero-headline:nth-child(1) { animation-delay: 0.1s; }
.hero-headline:nth-child(2) { animation-delay: 0.25s; }
.hero-headline:nth-child(3) { animation-delay: 0.4s; }
.hero-headline:nth-child(4) { animation-delay: 0.55s; }

.hero-subtitle {
    animation: heroFadeUp 0.8s ease 0.7s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    animation: heroFadeUp 0.8s ease 0.9s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-image-wrapper {
    animation: heroImageIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(40px);
}

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

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

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

/* ---------- Scroll Indicator ---------- */
@keyframes scrollLine {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ---------- Marquee ---------- */
.marquee-track {
    overflow: hidden;
}

.marquee-content {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- Reveal Animations ---------- */
.reveal-section {
    /* Default: visible (progressive enhancement) */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section.reveal-hidden {
        opacity: 0;
        transform: translateY(40px);
    }
}

/* Stagger children */
.reveal-section > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-section > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-section > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-section > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-section > *:nth-child(5) { transition-delay: 0.45s; }

/* ---------- Button Hover Effects ---------- */
.btn-primary, .btn-secondary, .btn-cta {
    position: relative;
    overflow: hidden;
}

.btn-primary::before, .btn-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before, .btn-cta:hover::before {
    width: 300px;
    height: 300px;
}

/* ---------- Image Hover ---------- */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Focus Styles ---------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #5EEAD4;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Responsive Typography ---------- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    #site-header, .marquee-track, .scroll-line {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
