/* ========================================
   REX & ROSE COFFEE AND TEA
   Bold Editorial · Midnight Blue & Mint
   ======================================== */

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

:root {
    --midnight: #0F172A;
    --midnight-light: #1E293B;
    --midnight-mid: #334155;
    --mint: #2DD4BF;
    --mint-dark: #14B8A6;
    --mint-light: #5EEAD4;
    --cream: #F8FAFC;
    --cream-dark: #F1F5F9;
    --white: #FFFFFF;
    --text-dark: #0F172A;
    --text-light: #F8FAFC;
    --text-muted: #64748B;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
}

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mint-dark);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: var(--midnight);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.text-mint {
    color: var(--mint-dark);
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--mint);
    color: var(--midnight);
    border-color: var(--mint);
}

.btn-primary:hover {
    background: var(--mint-dark);
    border-color: var(--mint-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--midnight);
    transform: translateY(-2px);
}

.btn-map {
    margin-top: 1.5rem;
    background: var(--midnight);
    color: var(--white);
    border-color: var(--midnight);
}

.btn-map:hover {
    background: var(--midnight-light);
    border-color: var(--midnight-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

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

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--white);
}

.logo-tag {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mint);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mint);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--white);
}

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

.btn-nav {
    padding: 0.625rem 1.5rem !important;
    background: var(--mint);
    color: var(--midnight) !important;
    border-radius: 50px;
    font-weight: 600 !important;
}

.btn-nav::after {
    display: none !important;
}

.btn-nav:hover {
    background: var(--mint-light);
    transform: translateY(-1px);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* Mobile menu overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--midnight);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-link {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--white);
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--mint);
}

.mobile-link--phone {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--mint);
    margin-top: 0.5rem;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--midnight);
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.7) 0%,
        rgba(15, 23, 42, 0.5) 50%,
        rgba(15, 23, 42, 0.85) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding-top: 72px;
}

.hero-eyebrow {
    color: var(--mint);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease forwards;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--white);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s 0.15s ease both;
}

.hero-headline em {
    color: var(--mint);
    font-style: italic;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    animation: fadeUp 0.8s 0.3s ease both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s 0.45s ease both;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeUp 0.8s 0.6s ease both;
}

.hero-scroll svg {
    animation: bounce 2s infinite;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

/* --- Sections --- */
.section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

/* --- About --- */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
}

.about-img-secondary img {
    width: 240px;
    height: 300px;
    object-fit: cover;
}

.about-badge {
    position: absolute;
    top: -1rem;
    right: 2rem;
    background: var(--midnight);
    color: var(--white);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
}

.about-badge svg {
    color: var(--mint);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--cream-dark);
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--midnight);
    line-height: 1;
    margin-bottom: 0.375rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Menu --- */
.menu {
    background: var(--cream);
}

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

.menu-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.menu-card-img {
    overflow: hidden;
    height: 220px;
}

.menu-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.menu-card:hover .menu-card-img img {
    transform: scale(1.05);
}

.menu-card-body {
    padding: 2rem;
}

.menu-card-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--midnight);
}

.menu-card-body > p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.9375rem;
}

.menu-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.menu-list li span:first-child {
    font-weight: 500;
    color: var(--midnight);
}

.menu-list li span:last-child {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* --- Gallery --- */
.gallery {
    background: var(--white);
    padding-bottom: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 260px);
    gap: 1.25rem;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.gallery-item--tall {
    grid-row: span 2;
}

.gallery-item:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 4; }
.gallery-item:nth-child(3) { grid-column: span 4; }
.gallery-item:nth-child(4) { grid-column: span 4; }
.gallery-item:nth-child(5) { grid-column: span 4; grid-row: span 2; }

/* --- Testimonial --- */
.testimonial {
    background: var(--midnight);
    padding: 5rem 0;
}

.testimonial-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-quote {
    margin: 0 auto 1.5rem;
    opacity: 0.4;
}

.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-style: italic;
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--mint);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--white);
    font-size: 1rem;
}

.author-detail {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- Visit --- */
.visit {
    background: var(--cream);
}

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

.visit-info {
    padding: 3rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.visit-info .section-title {
    margin-bottom: 2rem;
}

.info-block {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--cream);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mint-dark);
}

.info-block h4 {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--midnight);
    margin-bottom: 0.375rem;
}

.info-block p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-block a {
    color: var(--mint-dark);
    transition: var(--transition);
}

.info-block a:hover {
    color: var(--midnight);
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 420px;
}

/* --- Footer --- */
.footer {
    background: var(--midnight);
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--mint) !important;
    margin-top: 0.75rem;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mint);
    margin-bottom: 1.25rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
}

.footer-contact a {
    color: var(--mint);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--mint-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8125rem;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .about-grid {
        gap: 3rem;
    }

    .menu-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-img-secondary {
        right: 1rem;
        bottom: -1.5rem;
    }

    .about-img-secondary img {
        width: 180px;
        height: 225px;
    }

    .menu-categories {
        grid-template-columns: 1fr;
    }

    .menu-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item img {
        height: 220px;
    }

    .visit-grid {
        grid-template-columns: 1fr;
    }

    .visit-info {
        padding: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
