/* ============================================
   Morning Sky — Custom Styles
   Premium Dark Luxury Bakery Theme
   ============================================ */

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

body {
    background-color: #070E0A;
    color: #F5F0E8;
}

::selection {
    background-color: rgba(212, 175, 55, 0.3);
    color: #F5F0E8;
}

/* --- Grain Texture Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    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-repeat: repeat;
    background-size: 256px 256px;
}

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

#site-header.scrolled {
    background: rgba(7, 14, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 175, 55, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #D4AF37, #E8C95A);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #D4AF37;
}

/* --- Mobile Menu --- */
#mobile-menu {
    background: rgba(7, 14, 10, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-nav-link:hover {
    color: #D4AF37;
}

/* Menu toggle animation */
.menu-line {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Hero --- */
#hero {
    background: radial-gradient(ellipse at 70% 30%, rgba(26, 58, 42, 0.6) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(4, 120, 87, 0.15) 0%, transparent 50%),
                linear-gradient(160deg, #070E0A 0%, #0A1410 50%, #070E0A 100%);
}

/* --- Cards --- */
.group:hover .group-hover\:text-ms-gold {
    color: #D4AF37;
}

/* --- Buttons --- */
button[type="submit"]:hover,
a[href="#offerings"].group:hover {
    transform: translateY(-1px);
}

button[type="submit"],
a[href="#offerings"].group {
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

button[type="submit"]:hover,
a[href="#offerings"].group:hover {
    box-shadow: 0 8px 32px rgba(4, 120, 87, 0.25);
}

/* --- Form Elements --- */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: rgba(245, 240, 232, 0.2);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Staggered delays */
.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; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group:hover img {
        transform: none;
    }
}

/* --- Gold shimmer on hover for special elements --- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer {
    background: linear-gradient(90deg, #D4AF37 0%, #F5E6A3 25%, #D4AF37 50%, #F5E6A3 75%, #D4AF37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Image hover effects --- */
.aspect-\[4\/3\] img,
.aspect-\[3\/4\] img,
.aspect-\[4\/5\] img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Smooth section transitions --- */
section {
    position: relative;
}

/* --- Focus visible for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #070E0A;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    #hero h1 span.block {
        font-size: 1.5rem;
    }
    .floating-badge {
        position: relative;
        left: 0;
        bottom: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* --- Print styles --- */
@media print {
    .grain-overlay,
    #site-header,
    .reveal {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
