/* ============================================================
   Abdul Rehman Pakwan Center — Custom Styles
   Design System: Heritage Editorial
   Primary: #D79A11 (Saffron Gold) | Secondary: #A53B29 (Spice Red)
   Tertiary: #50652A (Leaf Green) | Surface: #FCF9F8 (Warm Cream)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    text-transform: capitalize;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

::selection {
    background-color: #7d5700;
    color: #ffffff;
}

/* --- Material Symbols -------------------------------------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Signature Gradients ----------------------------------- */
.hero-gradient {
    background: linear-gradient(135deg, #d79a11 0%, #7d5700 100%);
}

.text-stroke {
    -webkit-text-stroke: 1px rgba(215, 154, 17, 0.3);
}

.cta-gradient {
    background: linear-gradient(135deg, #d79a11 0%, #7d5700 100%);
}

/* ============================================================
   HERO IMAGE CARD — Premium Layered Design
   ============================================================ */

/* Layered cream/warm background shape behind the card — tilted */
.hero-bg-layer {
    position: absolute;
    top: -2%;
    left: 2%;
    right: -5%;
    bottom: -4%;
    background: linear-gradient(145deg, #f3ede4 0%, #e8dfcf 100%);
    border-radius: 2rem;
    z-index: 0;
    transform: rotate(6deg);
    transform-origin: center center;
}

/* Main image card */
.hero-image-card {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(30, 20, 0, 0.18), 0 4px 16px rgba(30, 20, 0, 0.08);
}

.hero-image-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Floating bottom info label — overlapping bottom-left exactly like the reference */
.hero-float-label {
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translate(-15%, 50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    width: max-content;
}

.hero-float-label__icon {
    color: #D79A11;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.hero-float-label__eyebrow {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7d5700;
    margin-bottom: 0.125rem;
}

.hero-float-label__title {
    display: block;
    font-family: 'Epilogue', sans-serif;
    font-weight: 800;
    font-size: 0.9375rem;
    text-transform: uppercase;
    color: #1c1b1b;
    letter-spacing: -0.01em;
}

/* 1995 Heritage Badge — static, upright */
.hero-badge {
    position: absolute;
    top: -1rem;
    right: -1rem;
    z-index: 3;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: #FCF9F8;
    border: 2px solid #D79A11;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    box-shadow: 0 4px 16px rgba(215, 154, 17, 0.15);
}

.hero-badge__inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed #D79A11;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-badge__label {
    font-family: 'Cinzel', serif;
    font-size: 0.5rem;
    text-transform: uppercase;
    color: #7d5700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.hero-badge__year {
    font-family: 'Epilogue', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    color: #1c1b1b;
    line-height: 1;
}

/* ── Desktop (md+) hero card sizing ─── */
@media (min-width: 768px) {
    .hero-image-card {
        aspect-ratio: 1 / 1;
        border-radius: 2rem;
    }

    .hero-bg-layer {
        border-radius: 2.5rem;
        top: -3%;
        left: 3%;
        right: -6%;
        bottom: -5%;
        transform: rotate(6deg);
    }

    .hero-float-label {
        bottom: 0;
        left: 0;
        transform: translate(-15%, 50%);
        padding: 0.875rem 1.5rem;
        border-radius: 1rem;
        gap: 0.875rem;
    }

    .hero-float-label__icon {
        font-size: 1.75rem;
    }

    .hero-float-label__eyebrow {
        font-size: 0.625rem;
        letter-spacing: 0.25em;
    }

    .hero-float-label__title {
        font-size: 1.0625rem;
    }

    .hero-badge {
        width: 7rem;
        height: 7rem;
        top: -1.5rem;
        right: -1.5rem;
        padding: 0.4rem;
    }

    .hero-badge__label {
        font-size: 0.625rem;
    }

    .hero-badge__year {
        font-size: 1.625rem;
    }
}

/* --- Glassmorphism Nav ------------------------------------- */
#site-header {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* --- Scroll-aware Navbar Shadow ---------------------------- */
#site-header.scrolled {
    box-shadow: 0 1px 12px rgba(26, 26, 26, 0.06);
}

/* ============================================================
   MOBILE NAVIGATION — Solid, opaque, properly stacked
   ============================================================ */
#mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    max-width: 85vw;
    z-index: 999;
    background-color: #FCF9F8;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    overflow-y: auto;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu a {
    display: block;
    padding: 0.875rem 0;
    font-family: 'Epilogue', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #1c1b1b;
    border-bottom: 1px solid rgba(212, 196, 174, 0.25);
    transition: color 0.2s ease;
}

#mobile-menu a:hover,
#mobile-menu a:active {
    color: #D79A11;
}

#mobile-menu button[data-whatsapp] {
    margin-top: 1.5rem;
}

/* Hamburger icon animation */
.hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #1c1b1b;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   SECTION TRANSITIONS (IntersectionObserver-driven)
   ============================================================ */
.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Keep above-the-fold hero content visible without waiting for JS observers. */
#hero .fade-in-section {
    opacity: 1;
    transform: none;
}

/* ============================================================
   CARD HOVER LIFT
   ============================================================ */
.card-lift {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 26, 26, 0.08);
}

/* ============================================================
   GALLERY OVERLAY
   ============================================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.5s ease;
    border-radius: inherit;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0);
}

/* ============================================================
   DAIG SPECIALS CARD DETAILS
   ============================================================ */
.daig-badge {
    font-family: 'Epilogue', sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.daig-details-link {
    transition: color 0.25s ease, gap 0.25s ease;
}

.daig-details-link:hover {
    gap: 0.5rem;
    color: #7d5700;
}

/* ============================================================
   OCCASION IMAGE CARDS
   ============================================================ */
.occasion-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.occasion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* ============================================================
   DOT LEADER (Menu Pricing)
   ============================================================ */
.dot-leader {
    flex-grow: 1;
    border-bottom: 1px dotted rgba(80, 69, 52, 0.15);
    margin: 0 0.5rem;
    min-width: 1.5rem;
    align-self: baseline;
}

/* ============================================================
   FORM FOCUS GLOW
   ============================================================ */
.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 87, 0, 0.15);
}

.form-input.is-invalid {
    box-shadow: 0 0 0 2px rgba(165, 59, 41, 0.32);
}

.form-input.is-valid {
    box-shadow: 0 0 0 2px rgba(80, 101, 42, 0.22);
}

.field-error-message:not(.hidden) {
    display: block;
}

.inquiry-form-notice:not(.hidden) {
    display: block;
}

#inquiry-form button.inquiry-submit-pending {
    opacity: 0.82;
    filter: saturate(0.88);
}

/* Event date field: keep premium form styling while improving date UX */
.event-date-input,
.event-date-helper,
.event-date-error {
    font-family: 'Poppins', 'Plus Jakarta Sans', sans-serif;
}

.event-date-input {
    min-height: 3.25rem;
    line-height: 1.2;
    color: #1c1b1b;
    -webkit-appearance: none;
    appearance: none;
}

.event-date-input:focus {
    box-shadow: 0 0 0 3px rgba(125, 87, 0, 0.18);
}

.event-date-input:invalid:required {
    color: rgba(80, 69, 52, 0.55);
}

.event-date-input::-webkit-datetime-edit {
    padding: 0;
}

.event-date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 3rem;
    height: 100%;
    cursor: pointer;
}

.event-date-field:focus-within .event-date-icon {
    color: #7d5700;
}

.event-date-error:not(.hidden) {
    display: block;
}

/* ============================================================
   DAWAT BADGE
   ============================================================ */

/* ============================================================
   WHATSAPP PULSE
   ============================================================ */
.whatsapp-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

/* ============================================================
   FOOTER SOCIAL HOVER
   ============================================================ */
.social-icon {
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.social-icon:hover {
    color: #f4e5c4;
    background-color: rgba(215, 154, 17, 0.12);
    border-color: rgba(215, 154, 17, 0.7);
    transform: translateY(-1px);
}

.social-icon:focus-visible {
    outline: none;
    color: #f4e5c4;
    border-color: rgba(215, 154, 17, 0.85);
    box-shadow: 0 0 0 2px rgba(215, 154, 17, 0.22);
}

/* ============================================================
   RESPONSIVE: TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .hero-headline {
        font-size: 3.25rem !important;
        line-height: 1.05;
    }

    .gallery-grid {
        height: 500px;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {

    /* Prefer fast paint on mobile over heavy visual effects. */
    #site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(252, 249, 248, 0.96);
    }

    .hero-image-container {
        box-shadow: 0 10px 24px rgba(30, 20, 0, 0.12) !important;
    }

    .hero-float-label {
        box-shadow: 0 5px 14px rgba(0, 0, 0, 0.09);
    }

    .fade-in-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card-lift,
    .gallery-item::after,
    .occasion-card,
    .social-icon {
        transition: none;
    }

    .card-lift:hover,
    .occasion-card:hover,
    .social-icon:hover {
        transform: none;
        box-shadow: inherit;
    }

    .hero-steam-container {
        display: none !important;
    }

    @supports (content-visibility: auto) {
        #specials,
        #menu,
        #catering,
        #gallery,
        #testimonials,
        #legacy,
        #inquiry,
        #footer {
            content-visibility: auto;
            contain-intrinsic-size: 1000px;
        }
    }

    /* ── MOBILE HERO ─────────────────────────────────────────── */

    /* Tighter section padding on mobile */
    .hero-section {
        padding-top: 5.5rem;
        /* just below the fixed nav */
        padding-bottom: 2rem;
    }

    /* Image card: tighter rounding on mobile */
    .hero-image-card {
        border-radius: 1rem;
    }

    .hero-bg-layer {
        border-radius: 1.25rem;
        top: -1%;
        left: 2%;
        right: -3%;
        bottom: -2%;
        transform: rotate(5deg);
    }

    /* Badge: smaller + tighter position on mobile */
    .hero-badge {
        width: 4.25rem;
        height: 4.25rem;
        top: -0.5rem;
        right: -0.5rem;
        padding: 0.2rem;
    }

    .hero-badge__label {
        font-size: 0.4rem;
    }

    .hero-badge__year {
        font-size: 1rem;
    }

    /* Floating label: compact on mobile, bottom-left overlap */
    .hero-float-label {
        bottom: 0;
        left: 0;
        transform: translate(-5%, 40%);
        padding: 0.5rem 0.875rem;
        border-radius: 0.75rem;
        gap: 0.5rem;
    }

    .hero-float-label__icon {
        font-size: 1.125rem;
    }

    .hero-float-label__eyebrow {
        font-size: 0.4375rem;
    }

    .hero-float-label__title {
        font-size: 0.75rem;
    }

    /* Eyebrow: refined spacing below the image */
    .hero-eyebrow {
        margin-top: 0.25rem;
        margin-bottom: 0.75rem;
        font-size: 0.65rem;
        letter-spacing: 0.2em;
    }

    /* Hero headline — must override Tailwind's text-5xl */
    .hero-headline {
        font-size: 2.25rem !important;
        line-height: 1.05;
        margin-bottom: 1rem;
    }

    /* Body paragraph: tighter, readable */
    .hero-body {
        font-size: 0.9375rem;
        line-height: 1.65;
        margin-bottom: 1.5rem;
    }

    /* Hero buttons: full-width stacked */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons a,
    .hero-buttons button {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
        font-size: 0.8125rem;
    }


    /* Gallery grid goes 1-col + 2-col hybrid */
    .gallery-grid {
        height: auto !important;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }

    .gallery-grid .gallery-span-tall {
        grid-column: span 2;
        height: 240px;
    }

    .gallery-grid .gallery-single {
        height: 160px;
    }

    .gallery-grid .gallery-span-2 {
        grid-column: span 2;
        height: 180px;
    }

    /* Inquiry card tighter on mobile */
    .inquiry-card {
        padding: 2rem 1.25rem !important;
        border-radius: 1.5rem !important;
    }

    .event-date-input {
        min-height: 3rem;
    }

    .event-date-icon {
        right: 1rem;
        font-size: 1.2rem;
    }

    /* Stats grid to single column */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        text-align: center;
    }

    /* Section headings scale */
    .section-heading {
        font-size: 1.75rem !important;
    }

    /* Legacy cards smaller on mobile */
    .legacy-card {
        height: 220px !important;
    }

    /* Menu item name wraps with shrink */
    .menu-item-name {
        font-size: 0.8125rem;
    }

    /* Occasion image cards: 2-col on mobile, shorter height */
    .occasion-grid {
        grid-template-columns: 1fr 1fr;
    }

    .occasion-card {
        height: 11rem !important;
    }

    /* Footer padding */
    #footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================================================
   LEGACY STAGGERED PORTRAIT CARDS
   ============================================================ */
.legacy-pair {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.legacy-card {
    flex: 1;
    height: 280px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.legacy-card--left {
    margin-top: 3rem;
}

.legacy-card--right {
    margin-top: 0;
}

.legacy-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}

.legacy-motion-item {
    opacity: 1;
    transform: none;
}

.legacy-motion-enabled .legacy-motion-item {
    opacity: 0;
    transform: translateY(36px);
}

.legacy-motion-enabled .legacy-motion-item.legacy-motion-ready {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .legacy-pair {
        gap: 1.25rem;
    }

    .legacy-card {
        height: 360px;
        border-radius: 1.25rem;
    }

    .legacy-card--left {
        margin-top: 4rem;
    }

    .legacy-pair:hover .legacy-card {
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
    }

    .legacy-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (max-width: 767px) {
    .legacy-motion-enabled .legacy-motion-item {
        transform: translateY(24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .legacy-motion-item {
        opacity: 1;
        transform: none;
    }

    .legacy-card {
        transition: none;
    }
}

/* ============================================================
   RESPONSIVE: SMALL MOBILE (max-width: 400px)
   ============================================================ */
@media (max-width: 400px) {
    .hero-headline {
        font-size: 1.875rem !important;
    }

    /* Hero image slightly more compact on small phones */
    .hero-image-container {
        aspect-ratio: 16 / 11 !important;
    }

    .hero-eyebrow {
        font-size: 0.6rem;
    }

    /* Header brand smaller */
    .brand-name {
        font-size: 0.95rem !important;
    }

    /* Occasion cards */
    .occasion-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.75rem;
    }

    .stats-grid span:first-child {
        font-size: 1.75rem !important;
    }
}

/* ============================================================
   HERO STEAM / SMOKE OVERLAY EFFECT
   Realistic wisps that rise slowly and fade naturally
   ============================================================ */
.hero-steam-container {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 45%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 50%, transparent 100%);
}

.hero-steam-wisp {
    position: absolute;
    bottom: 10%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.08) 40%,
            transparent 70%);
    filter: blur(12px);
    will-change: transform, opacity;
}

.hero-steam-wisp--1 {
    width: 80px;
    height: 100px;
    left: 35%;
    animation: steamRise1 7s ease-in-out infinite;
    animation-delay: 0s;
}

.hero-steam-wisp--2 {
    width: 60px;
    height: 80px;
    left: 50%;
    animation: steamRise2 8s ease-in-out infinite;
    animation-delay: 1.5s;
}

.hero-steam-wisp--3 {
    width: 70px;
    height: 90px;
    left: 42%;
    animation: steamRise3 9s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes steamRise1 {
    0% {
        transform: translateY(0) translateX(0) scale(0.8);
        opacity: 0;
    }

    15% {
        opacity: 0.5;
    }

    50% {
        transform: translateY(-80px) translateX(12px) scale(1.2);
        opacity: 0.35;
    }

    85% {
        opacity: 0.1;
    }

    100% {
        transform: translateY(-150px) translateX(-8px) scale(1.5);
        opacity: 0;
    }
}

@keyframes steamRise2 {
    0% {
        transform: translateY(0) translateX(0) scale(0.7);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    55% {
        transform: translateY(-70px) translateX(-15px) scale(1.1);
        opacity: 0.3;
    }

    80% {
        opacity: 0.08;
    }

    100% {
        transform: translateY(-130px) translateX(10px) scale(1.4);
        opacity: 0;
    }
}

@keyframes steamRise3 {
    0% {
        transform: translateY(0) translateX(0) scale(0.9);
        opacity: 0;
    }

    18% {
        opacity: 0.45;
    }

    48% {
        transform: translateY(-90px) translateX(8px) scale(1.15);
        opacity: 0.28;
    }

    82% {
        opacity: 0.06;
    }

    100% {
        transform: translateY(-160px) translateX(-12px) scale(1.6);
        opacity: 0;
    }
}

/* Steam wisps scale down on mobile for subtlety */
@media (max-width: 767px) {
    .hero-steam-container {
        height: 40%;
        left: 15%;
        right: 15%;
    }

    .hero-steam-wisp {
        filter: blur(10px);
    }

    .hero-steam-wisp--1 {
        width: 50px;
        height: 65px;
    }

    .hero-steam-wisp--2 {
        width: 40px;
        height: 55px;
    }

    .hero-steam-wisp--3 {
        width: 45px;
        height: 60px;
    }
}