/* ============================================================
   Dahab Cafe — design system
   Primary #0B3025 · Sand #DCCDAF · Cream #F7F4EC · Charcoal #252A27
   ============================================================ */

:root {
    --color-primary: #0B3025;
    --color-secondary: #DCCDAF;
    --color-white: #FFFFFF;
    --color-cream: #F7F4EC;
    --color-dark-green: #123D30;
    --color-muted-beige: #CBB994;
    --color-text: #252A27;
    --color-text-soft: #4A524D;
    --color-line: #E7E0CF;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --container: 1180px;
    --header-h: 92px;
    --radius: 4px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 14px 40px rgba(11, 48, 37, 0.12);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--color-muted-beige); outline-offset: 3px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 2000;
    background: var(--color-secondary); color: var(--color-primary);
    padding: 12px 20px; font-weight: 600; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 720px; }
.centered { text-align: center; }

/* ---------- Typography ---------- */
.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #8C7A52;
    margin-bottom: 18px;
}
.eyebrow-light { color: var(--color-secondary); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 500;
    line-height: 1.18;
    color: var(--color-primary);
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}
.section-title em { font-style: italic; font-weight: 400; color: var(--color-dark-green); }
.section-title-light { color: var(--color-white); }
.section-title-light em { color: var(--color-secondary); }

.section-lead {
    font-size: 17px;
    line-height: 1.75;
    color: var(--color-text-soft);
    max-width: 560px;
}
.section-lead.centered { margin: 0 auto; }
.text-light { color: rgba(255, 255, 255, 0.78); }

.section { padding: 110px 0; }
.section-cream { background: var(--color-cream); }
.section-green { background: var(--color-primary); }

.section-head { margin-bottom: 56px; }
.section-cta { text-align: center; margin-top: 56px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 34px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-green { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.btn-green:hover { background: var(--color-dark-green); border-color: var(--color-dark-green); }

.btn-sand { background: var(--color-secondary); color: var(--color-primary); border-color: var(--color-secondary); }
.btn-sand:hover { background: var(--color-white); border-color: var(--color-white); }

.btn-ghost-light { background: transparent; color: var(--color-white); border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--color-white); }

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

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    transition: background var(--transition), box-shadow var(--transition);
}

.site-header::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11, 48, 37, 0.55) 0%, rgba(11, 48, 37, 0) 100%);
    transition: opacity var(--transition);
}

.site-header.scrolled {
    background: rgba(11, 48, 37, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(220, 205, 175, 0.15);
}
.site-header.scrolled::before { opacity: 0; }

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    z-index: 2;
}

.header-logo { display: flex; align-items: center; }
.header-logo-img { width: 74px; height: auto; object-fit: contain; }

.header-nav { display: flex; gap: 34px; }

.nav-link {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    transition: color var(--transition);
    position: relative;
    padding: 6px 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1.5px;
    background: var(--color-secondary);
    transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--color-white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-cta {
    padding: 11px 26px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--color-primary);
    background: var(--color-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}
.header-cta:hover { background: var(--color-white); }

/* Mobile nav */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    z-index: 10;
}
.toggle-bar {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}
.mobile-toggle.active .toggle-bar:nth-child(1) { transform: rotate(45deg) translate(5.5px, 5.5px); }
.mobile-toggle.active .toggle-bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .toggle-bar:nth-child(3) { transform: rotate(-45deg) translate(5.5px, -5.5px); }

.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--color-primary);
    z-index: 999;
    padding-top: var(--header-h);
    display: flex;
}
.mobile-menu[hidden] { display: none; }

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    padding: 40px 24px;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    color: var(--color-white);
    opacity: 0.85;
    transition: opacity var(--transition);
}
.mobile-link:hover { opacity: 1; }
.mobile-cta-link { margin-top: 18px; }

body.nav-open { overflow: hidden; }

/* ---------- Hero (home) ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 48, 37, 0.35) 0%, rgba(11, 48, 37, 0.15) 40%, rgba(11, 48, 37, 0.82) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: clamp(64px, 12vh, 130px);
    padding-top: calc(var(--header-h) + 40px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(42px, 6.5vw, 72px);
    font-weight: 500;
    line-height: 1.08;
    color: var(--color-white);
    margin-bottom: 24px;
    letter-spacing: -0.015em;
}
.hero-title em { font-style: italic; font-weight: 400; color: var(--color-secondary); }

.hero-sub {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    max-width: 520px;
    margin-bottom: 38px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Page heroes (inner pages) ---------- */
.page-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.page-hero-short { min-height: 46vh; }

.page-hero .hero-overlay {
    background: linear-gradient(180deg, rgba(11, 48, 37, 0.30) 0%, rgba(11, 48, 37, 0.20) 45%, rgba(11, 48, 37, 0.85) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: clamp(48px, 8vh, 90px);
    padding-top: calc(var(--header-h) + 48px);
}

.page-hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5.4vw, 58px);
    font-weight: 500;
    line-height: 1.12;
    color: var(--color-white);
    letter-spacing: -0.01em;
}
.page-hero-title em { font-style: italic; font-weight: 400; color: var(--color-secondary); }

/* ---------- Split layout ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: center;
}
.split-reverse .split-copy { order: 1; }
.split-reverse .split-media { order: 2; }

.split-media {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    max-height: 620px;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }

.split-copy p { margin-bottom: 18px; color: var(--color-text-soft); font-size: 16.5px; }
.split-copy .btn { margin-top: 14px; }

.section-green .split-copy p { color: rgba(255, 255, 255, 0.78); }

/* ---------- Category cards ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.category-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-line);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: var(--color-muted-beige);
}

.category-media { aspect-ratio: 4 / 3; overflow: hidden; }
.category-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card:hover .category-media img { transform: scale(1.05); }

.category-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }

.category-name {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.category-desc { font-size: 14.5px; color: var(--color-text-soft); margin-bottom: 18px; flex: 1; }

.category-link {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 3px;
    align-self: flex-start;
}
.category-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1.5px;
    background: var(--color-muted-beige);
    transform: scaleX(0.4);
    transform-origin: left;
    transition: transform var(--transition);
}
.category-card:hover .category-link::after { transform: scaleX(1); }

/* ---------- Preview grid (home gallery) ---------- */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 16px;
}

.preview-item {
    border-radius: var(--radius);
    overflow: hidden;
}
.preview-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.preview-item:hover img { transform: scale(1.04); }
.preview-tall { grid-row: span 2; }

/* ---------- Visit CTA ---------- */
.visit-cta { text-align: center; }
.visit-inner { max-width: 680px; margin: 0 auto; }
.visit-inner .section-lead { margin: 0 auto 34px; }
.visit-inner .hero-actions { justify-content: center; }

/* ---------- Menu page ---------- */
.menu-intro { padding: 72px 0 40px; }

.menu-section { padding: 84px 0; }

.menu-section-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}

.menu-section-media {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    max-height: 560px;
}
.menu-section-media img { width: 100%; height: 100%; object-fit: cover; }

.menu-section-title { margin-bottom: 12px; }
.menu-section-intro { color: var(--color-text-soft); margin-bottom: 34px; font-size: 16.5px; }

.menu-list { border-top: 1px solid var(--color-line); }

.menu-item {
    padding: 22px 4px;
    border-bottom: 1px solid var(--color-line);
}

.menu-item-name {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.menu-item-desc { font-size: 14.5px; color: var(--color-text-soft); line-height: 1.65; }

/* ---------- Gallery page ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    padding: 0;
    display: block;
    width: 100%;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(11, 48, 37, 0);
    transition: background var(--transition);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover::after { background: rgba(11, 48, 37, 0.22); }
.gallery-item:focus-visible { outline-offset: 4px; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    z-index: 1500;
    background: rgba(11, 48, 37, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.lightbox[hidden] { display: none; }

.lightbox-figure {
    max-width: min(1100px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: var(--color-white);
    font-size: 28px;
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
    background: rgba(255, 255, 255, 0.08);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-close { top: 22px; right: 22px; font-size: 32px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact page ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.contact-details { margin-top: 38px; display: grid; gap: 30px; }

.contact-detail-title {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #8C7A52;
    margin-bottom: 10px;
}

.contact-detail p { color: var(--color-text); font-size: 16.5px; }

.contact-link {
    color: var(--color-primary);
    font-weight: 500;
    border-bottom: 1.5px solid var(--color-muted-beige);
    padding-bottom: 2px;
    transition: border-color var(--transition);
}
.contact-link:hover { border-color: var(--color-primary); }

.contact-socials { display: flex; gap: 22px; }

.hours-list { max-width: 420px; }
.hours-list li {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-line);
    font-size: 15.5px;
    color: var(--color-text);
}

.contact-media {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    position: sticky;
    top: calc(var(--header-h) + 24px);
}
.contact-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Values (about) ---------- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.value-card {
    background: var(--color-white);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 38px 30px;
}

.value-mark {
    display: block;
    width: 34px; height: 3px;
    background: var(--color-muted-beige);
    margin-bottom: 24px;
}

.value-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.value-card p { font-size: 14.5px; color: var(--color-text-soft); line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.72);
    padding: 76px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(220, 205, 175, 0.18);
}

.footer-logo-img { width: 96px; height: auto; object-fit: contain; margin-bottom: 20px; }

.footer-tagline { font-size: 14.5px; line-height: 1.75; max-width: 360px; }

.footer-heading {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; }
.footer-col a { transition: color var(--transition); align-self: flex-start; }
.footer-col a:hover { color: var(--color-white); }
.footer-hours { margin-top: -4px; }

.footer-bottom {
    padding: 26px 0;
    text-align: center;
    font-size: 12.5px;
    letter-spacing: 0.4px;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .header-nav, .header-cta { display: none; }
    .mobile-toggle { display: flex; }

    .split, .split-reverse { grid-template-columns: 1fr; gap: 44px; }
    .split-reverse .split-copy { order: 2; }
    .split-reverse .split-media { order: 1; }
    .split-media { aspect-ratio: 16 / 10; max-height: 440px; }

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

    .preview-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
    .preview-tall { grid-row: span 1; }

    .menu-section-grid { grid-template-columns: 1fr; gap: 36px; }
    .menu-section-media { aspect-ratio: 16 / 9; max-height: 380px; }

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

    .contact-grid { grid-template-columns: 1fr; }
    .contact-media { position: static; aspect-ratio: 16 / 10; }

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

    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: left; }
}

@media (max-width: 640px) {
    :root { --header-h: 72px; }
    .container { padding: 0 20px; }

    .header-logo-img { width: 58px; }

    .section { padding: 76px 0; }
    .menu-section { padding: 60px 0; }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }

    .hero-title { font-size: clamp(36px, 10vw, 48px); }
    .hero-sub { font-size: 15.5px; }

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

    .preview-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }

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

    .mobile-link { font-size: 26px; }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .hours-list li { flex-direction: column; gap: 4px; }
}
