/* ========================================
   De Leon House of Pies — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* --- Navigation --- */
.nav {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

.nav.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-logo-mark {
    color: #7B2D3B;
    transition: color 0.3s ease;
}

.nav.scrolled .nav-logo-mark {
    color: #7B2D3B;
}

.nav-link {
    position: relative;
}

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

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

.nav.scrolled .nav-link {
    color: #7B2D3B;
}

.nav.scrolled .nav-link:hover {
    color: #c72450;
}

/* Mobile menu */
.mobile-menu {
    backdrop-filter: blur(20px);
    background: rgba(253, 248, 246, 0.98);
}

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

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

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

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

/* Menu button animation */
.menu-line {
    transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

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

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

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

/* --- Hero --- */
.hero {
    background: #3a1118;
}

.hero-bg {
    will-change: transform;
}

.hero-img {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(58, 17, 24, 0.4) 0%,
        rgba(58, 17, 24, 0.55) 50%,
        rgba(58, 17, 24, 0.8) 100%
    );
}

.hero-content {
    padding-top: 80px;
}

/* Hero entrance animations */
@media (prefers-reduced-motion: no-preference) {
    #heroTag {
        animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
    }
    #heroHeadline {
        animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
    }
    #heroSubhead {
        animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s both;
    }
    #heroCta {
        animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s both;
    }
}

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

/* Hero scroll indicator */
.scroll-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-line::before {
    content: '';
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #7B2D3B;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid #7B2D3B;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #5c1f2b;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary span,
.btn-primary .btn-arrow {
    position: relative;
    z-index: 1;
}

.btn-primary .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    background: transparent;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

/* --- Section Labels & Titles --- */
.section-label {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #c72450;
    margin-bottom: 0;
}

.section-label-light {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: #3a1118;
}

.section-title-light {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: #fff;
}

/* --- Divider --- */
.divider {
    padding: 0;
}

/* --- Specialties --- */
.card-specialty {
    position: relative;
    cursor: default;
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
}

.card-image {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-image-wrapper:hover .card-image {
    transform: scale(1.05);
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58, 17, 24, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-image-wrapper:hover .card-image-overlay {
    opacity: 1;
}

/* --- Gallery --- */
.gallery-item {
    overflow: hidden;
}

.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* --- Visit --- */
.visit-info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 6px;
}

.map-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

.map-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

/* --- Contact Form --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7B2D3B;
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 14px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #3a1118;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f9cdd5;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
}

.form-input::placeholder {
    color: #f4a7b8;
}

.form-input:focus {
    border-bottom-color: #7B2D3B;
}

.form-textarea {
    line-height: 1.7;
}

.form-submit {
    margin-top: 8px;
}

.form-success {
    text-align: center;
    padding: 48px 24px;
}

.form-success-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hidden {
    display: none;
}

/* --- Footer --- */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(123, 45, 59, 0.3));
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-content {
        padding-top: 60px;
    }

    .hero-headline {
        font-size: clamp(2rem, 10vw, 3.5rem) !important;
    }

    .about,
    .specialties,
    .gallery,
    .visit,
    .contact {
        padding: 60px 0;
    }

    .card-number {
        font-size: 4rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .about,
    .specialties,
    .gallery,
    .visit,
    .contact {
        padding: 80px 0;
    }
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
