/*
Theme Name: Cayman Szechuan Fusion
Author: Antigravity
Description: A high-fidelity, premium WordPress theme for Uncle Liu's Chinese Kitchen.
Version: 1.0
Text Domain: cayman-fusion
*/

:root {
    /* Brand palette */
    --ink: 108, 13%, 5%;            /* #0C110B */
    --cream: 35, 47%, 83%;          /* #EAD6BB */
    --cream-soft: 35, 47%, 90%;
    --bamboo: 115, 25%, 38%;        /* #507949 */
    --bamboo-deep: 115, 28%, 22%;
    --imperial: 359, 56%, 49%;      /* #C53435 */
    --imperial-glow: 5, 75%, 58%;
    --gold: 38, 55%, 60%;

    /* Grain Overlay */
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

    /* Semantic */
    --background: var(--cream);
    --foreground: var(--ink);
    
    /* Fonts */
    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-cn: 'Noto Serif SC', serif;
}

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

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-family: var(--font-display);
    font-weight: 400;
}

h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 300;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 4rem;
    }
}

.section-padding {
    padding: 7rem 0;
}

@media (min-width: 1024px) {
    .section-padding {
        padding: 10rem 0;
    }
}

/* Premium Typography */
.text-balance { text-wrap: balance; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.35em; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
    background-color: hsl(var(--imperial));
    color: hsl(var(--cream));
    box-shadow: 0 25px 60px -15px hsla(var(--imperial), 0.45);
}

.btn-primary:hover {
    background-color: hsl(var(--imperial-glow));
    gap: 1.25rem;
}

.btn-outline {
    border: 1px solid hsla(var(--cream), 0.3);
    color: hsl(var(--cream));
}

.btn-outline:hover {
    border-color: hsl(var(--cream));
}

.btn-outline-dark {
    border: 1px solid hsla(var(--ink), 0.3);
    color: hsl(var(--ink));
}

.btn-outline-dark:hover {
    border-color: hsl(var(--imperial));
    color: hsl(var(--imperial));
}

/* Hero Social/Trust indicators */
.hero-trust-bar {
    margin-top: 3rem; /* Controlled space from content */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: hsla(var(--cream), 0.7);
    font-size: 0.875rem;
    padding-bottom: 1.5rem; /* Reduced from 6rem to tighten layout */
}

.hero-stars {
    display: flex;
    gap: 0.25rem;
    color: hsl(var(--gold));
}

.trust-sep {
    color: hsla(var(--cream), 0.3);
}

.hero-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    border-top: 1px solid hsla(var(--cream), 0.1);
    background-color: hsla(var(--ink), 0.9);
    backdrop-filter: blur(12px);
}

.hero-ticker-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between; /* Aligned to edges of container */
    align-items: center;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: hsla(var(--cream), 0.6);
}

@media (max-width: 1024px) {
    .hero-ticker-inner {
        letter-spacing: 0.15em;
    }
}

@media (max-width: 768px) {
    .hero-ticker-inner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.5rem;
        text-align: center;
    }
}

/* Navbar Refining */
.navbar .nav-logo {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.navbar .nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    color: hsl(var(--cream));
}

.navbar .nav-logo-text span {
    color: hsl(var(--imperial));
}

.navbar .nav-logo-cn {
    font-family: var(--font-cn);
    color: hsla(var(--cream), 0.6);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .navbar .nav-logo-cn { display: none; }
}

.navbar .btn-book {
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    background-color: hsl(var(--ink));
    color: hsl(var(--cream));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        min-height: auto; /* Allow content to define height on mobile to prevent empty space */
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, hsla(var(--ink), 0.7) 0%, hsla(var(--ink), 0.5) 40%, hsl(var(--ink)) 100%);
    z-index: 2;
}

.hero-watermark {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-family: var(--font-cn);
    color: hsla(var(--imperial), 0.08);
    font-size: clamp(15rem, 40vw, 32rem);
    line-height: 1;
    font-weight: 900;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 130px; /* Reduced from 180px */
    padding-bottom: 2rem;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    color: hsl(var(--imperial));
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.hero-label::before {
    content: '';
    width: 3rem;
    height: 1px;
    background-color: currentColor;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    max-width: 900px;
    font-weight: 400;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: hsla(var(--cream), 0.75);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .hero-title {
        margin-bottom: 1rem;
    }
    .hero-description {
        margin-bottom: 1.5rem;
    }
}

/* Dishes Grid */
.dishes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .dishes-grid {
        grid-template-columns: repeat(12, 1fr);
        grid-auto-rows: 340px;
        grid-auto-flow: dense;
    }
}

.dish-card {
    position: relative;
    background-color: hsl(var(--ink));
    overflow: hidden;
    height: 100%; /* Fill grid cell */
    min-height: 300px;
}

.dish-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.dish-card:hover img {
    transform: scale(1.1);
}

.dish-card-overlay {
    position: absolute;
    inset: 0;
    background-color: hsla(var(--ink), 0.4); /* Constant protection for text readability */
    background-image: linear-gradient(to top, hsla(var(--ink), 0.9) 0%, hsla(var(--ink), 0.2) 50%, transparent 100%);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5;
}

.dish-card:hover .dish-card-overlay {
    background-color: transparent;
    background-image: linear-gradient(to top, hsla(var(--ink), 0.4) 0%, transparent 40%); /* Subtle shadow remains at bottom for text */
}

.dish-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.25rem;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Extra layer of protection for readability */
}

.dish-tag {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background-color: hsla(var(--imperial), 0.9);
    color: hsl(var(--cream));
    padding: 0.375rem 0.75rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    z-index: 10;
}

.dish-cn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-family: var(--font-cn);
    color: hsla(var(--cream), 0.4);
    font-size: 1.875rem;
}

/* Asymmetric Span Classes - Optimized for gapless fill */
@media (min-width: 1024px) {
    .span-1 { grid-column: span 7; grid-row: span 2; } /* Large Hero dish */
    .span-2 { grid-column: span 5; grid-row: span 1; }
    .span-3 { grid-column: span 5; grid-row: span 1; }
    .span-4 { grid-column: span 6; grid-row: span 1; }
    .span-5 { grid-column: span 6; grid-row: span 1; }
}

/* Happy Hour Marquee */
.marquee-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: hsla(var(--ink), 0.3);
    border-top: 1px solid hsla(var(--cream), 0.2);
    border-bottom: 1px solid hsla(var(--cream), 0.2);
    overflow: hidden;
}

.marquee {
    display: flex;
    white-space: nowrap;
    padding: 0.75rem 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    animation: marquee 40s linear infinite;
}

.marquee span {
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.5s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: hsla(var(--ink), 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: none;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
        gap: 3rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.25em;
        color: hsla(var(--cream), 0.7);
    }
    
    .nav-links a:hover {
        color: hsl(var(--cream));
    }
}

.hero-side-label {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

@media (min-width: 1024px) {
    .hero-side-label { display: flex; }
}


.section-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 5rem;
}

@media (min-width: 1024px) {
    .section-header {
        flex-direction: row;
        align-items: flex-end;
    }
}

.section-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    color: hsl(var(--ink));
    line-height: 1;
}

.section-description {
    color: hsla(var(--ink), 0.7);
    max-width: 400px;
    font-size: 1.125rem;
    line-height: 1.6;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

@media (min-width: 1024px) {
    .story-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 5rem;
    }
    .story-grid > div:first-child { grid-column: span 6; }
    .story-grid > div:last-child { grid-column: span 6; }
}

.story-image-wrap {
    position: relative;
}

.story-inset-image {
    position: absolute;
    bottom: -2rem;
    right: -1.5rem;
    width: 16rem;
    aspect-ratio: 1/1;
    border: 8px solid hsl(var(--ink));
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .story-inset-image { display: none; }
}

.happy-hour-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .happy-hour-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5rem;
    }
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .reviews-grid { grid-template-columns: repeat(4, 1fr); }
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .visit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5rem;
    }
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only { display: block; }
}

.text-center { text-align: center; }

.grain::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    opacity: 0.18;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

section {
    position: relative;
}
/* Footer Redesign */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2.5fr 1fr 1.2fr;
    }
    
    .footer-reservations {
        text-align: right;
        align-items: flex-end;
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-social-link {
    width: 44px;
    height: 44px;
    border: 1px solid hsla(var(--cream), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    border-color: hsl(var(--imperial));
    color: hsl(var(--imperial));
}

/* Menu Page Styles */
.menu-page {
    background-color: hsl(var(--ink));
    color: hsl(var(--cream));
    min-height: 100vh;
}

.menu-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--grain);
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.menu-page-header {
    position: relative;
    padding: 10rem 0 6rem;
    background-color: hsl(var(--ink));
    border-bottom: 1px solid hsla(var(--cream), 0.1);
    background-image: var(--grain);
    opacity: 1; /* Ensure grain shows here specifically */
}

.menu-section {
    position: relative;
    padding: 6rem 0;
    border-bottom: 1px solid hsla(var(--cream), 0.05);
}

.menu-category-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .menu-category-header {
        flex-direction: row;
        align-items: baseline;
        gap: 1.5rem;
    }
}

.menu-category-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: hsl(var(--imperial));
    line-height: 1;
}

.menu-category-cn {
    font-family: var(--font-cn);
    font-size: 1.5rem;
    color: hsla(var(--cream), 0.2);
    font-weight: 300;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 6rem;
}

@media (max-width: 992px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.menu-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.menu-item-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.375rem; /* 22px */
    line-height: 1.59; /* 35px */
    color: hsl(var(--gold));
    transition: all 0.3s ease;
}

.menu-item:hover .menu-item-title {
    color: hsl(var(--gold));
}

.menu-item-dots {
    display: none;
}

.menu-item-price {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: hsl(var(--gold));
}

.menu-item-desc {
    font-size: 0.9375rem;
    color: hsla(var(--cream), 0.6);
    line-height: 1.6;
    max-width: 90%;
}

.menu-beverages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

@media (max-width: 1024px) {
    .menu-beverages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .menu-beverages-grid {
        grid-template-columns: 1fr;
    }
}

/* Legal & Standard Pages */
.legal-page {
    position: relative;
    overflow: hidden;
}

.legal-content-wrapper h2 {
    color: hsl(var(--imperial));
    font-size: 2rem;
    margin: 3.5rem 0 1.5rem;
    font-family: var(--font-display);
}

.legal-content-wrapper h3 {
    color: hsl(var(--gold));
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    font-family: var(--font-display);
}

.legal-content-wrapper p {
    margin-bottom: 1.5rem;
}

.legal-content-wrapper ul {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.legal-content-wrapper li {
    margin-bottom: 0.75rem;
    list-style-type: square;
}

.legal-content-wrapper strong {
    color: hsl(var(--cream));
    font-weight: 700;
}

/* Error 404 Page */
.error-404-page {
    z-index: 10;
}

.error-dishes-grid .dish-card {
    transition: transform 0.4s ease;
}

.error-dishes-grid .dish-card:hover {
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .error-404-page {
        padding-top: 8rem;
    }
    
    .error-404-page h1 {
        font-size: 2.5rem;
    }
}

/* Home Gallery Slider */
.home-gallery-section {
    padding: 3rem 0;
}

.home-gallery-swiper {
    padding-bottom: 4rem !important;
}

.home-gallery-swiper .swiper-slide {
    height: auto;
    border: 1px solid hsla(var(--cream), 0.1);
}

.home-gallery-swiper .swiper-pagination-bullet {
    background: hsl(var(--cream));
}

.home-gallery-swiper .swiper-pagination-bullet-active {
    background: hsl(var(--imperial));
}
