/**
 * Preview · Direction C — Heritage Portrait Cards
 * Portrait 3:4 cards, photo fills top 65% with gradient scrim,
 * gold + sage as co-equal accents. No-photo cards get a curry-leaf
 * SVG watermark. Closest to "hotel restaurant" school.
 */

body[data-preview="heritage"] {
    --gold: #B8956A;
    --gold-soft: rgba(184, 149, 106, 0.18);
    --gold-deep: #8C6E48;
    --ink: #1F2A1B;
    --ink-soft: #4F5A4A;
    --paper: #F4EFDF;
    --paper-deep: #ECE4CD;
    --rule: rgba(31, 42, 27, 0.12);
    background: var(--paper);
    color: var(--ink);
}

/* ─── Curry-leaf watermark as data URI ─── */
body[data-preview="heritage"] {
    --leaf-watermark:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none'><path d='M100 30 Q60 60 70 110 Q80 160 100 170 Q120 160 130 110 Q140 60 100 30 Z' stroke='%23B8956A' stroke-width='1' opacity='0.18'/><path d='M100 50 L100 165' stroke='%23B8956A' stroke-width='0.5' opacity='0.18'/><path d='M100 80 Q85 85 75 100' stroke='%23B8956A' stroke-width='0.5' opacity='0.15' fill='none'/><path d='M100 80 Q115 85 125 100' stroke='%23B8956A' stroke-width='0.5' opacity='0.15' fill='none'/><path d='M100 110 Q83 115 73 130' stroke='%23B8956A' stroke-width='0.5' opacity='0.15' fill='none'/><path d='M100 110 Q117 115 127 130' stroke='%23B8956A' stroke-width='0.5' opacity='0.15' fill='none'/></svg>");
}

/* ─── Hero — full-bleed cream with serif ─── */
body[data-preview="heritage"] .hero {
    background: var(--paper-deep);
    color: var(--ink);
}
body[data-preview="heritage"] .hero::before {
    background:
        var(--leaf-watermark) center / 320px repeat,
        rgba(244, 239, 223, 0.85);
    opacity: 1;
}
body[data-preview="heritage"] .hero h1 {
    font-family: var(--font-primary);
    color: var(--ink);
    text-shadow: none;
    font-weight: 500;
}
body[data-preview="heritage"] .hero-subtitle {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.32em;
}
body[data-preview="heritage"] .hero-tagline {
    color: var(--ink-soft);
    font-style: italic;
}

/* ─── Top bar / header ─── */
body[data-preview="heritage"] .top-bar {
    background: var(--ink);
    color: var(--paper);
}
body[data-preview="heritage"] .header {
    background: var(--paper);
    border-bottom: 1px solid var(--gold-soft);
}
body[data-preview="heritage"] .nav-link.active::after {
    background: var(--gold);
}

/* ─── Section title with golden flanking rules ─── */
body[data-preview="heritage"] .section-title,
body[data-preview="heritage"] .menu-section h2 {
    font-family: var(--font-primary);
    font-weight: 500;
    text-align: center;
    color: var(--ink);
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin: 4rem auto 0.5rem;
    position: relative;
    padding: 0 1rem;
}
body[data-preview="heritage"] .menu-section .section-label,
body[data-preview="heritage"] .featured-section .section-label {
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    text-align: center;
    margin: 3rem 0 0;
}

body[data-preview="heritage"] .menu-filters {
    background: transparent;
    border-bottom: 1px solid var(--gold-soft);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}

body[data-preview="heritage"] .category-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-soft);
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
}
body[data-preview="heritage"] .category-tab:hover {
    background: var(--gold-soft);
    color: var(--ink);
}
body[data-preview="heritage"] .category-tab.active {
    background: transparent;
    color: var(--gold-deep);
    border-color: var(--gold);
}

/* ─── Grid — narrower cards, taller (3:4 portrait) ─── */
body[data-preview="heritage"] .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

body[data-preview="heritage"] .menu-item-card {
    background: var(--paper);
    border: 1px solid var(--gold-soft);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(31, 42, 27, 0.05);
    transition: box-shadow 320ms ease, transform 320ms ease, border-color 320ms ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
body[data-preview="heritage"] .menu-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(31, 42, 27, 0.12);
    border-color: var(--gold);
}

/* Portrait image with gradient scrim overlaid by name */
body[data-preview="heritage"] .menu-item-image {
    aspect-ratio: 3 / 4;
    background: var(--paper-deep);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}
body[data-preview="heritage"] .menu-item-image img {
    transition: transform 600ms ease;
}
body[data-preview="heritage"] .menu-item-card:hover .menu-item-image img {
    transform: scale(1.04);
}

/* Scrim that fades the photo's bottom into ink for text legibility */
body[data-preview="heritage"] .menu-item-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(31, 42, 27, 0.05) 60%,
        rgba(31, 42, 27, 0.78) 92%,
        rgba(31, 42, 27, 0.92) 100%
    );
    pointer-events: none;
}

/* No-photo state: cream background + watermark + roman name in gold */
body[data-preview="heritage"] .menu-item-image:has(img[src$="placeholder.svg"]) {
    background:
        var(--leaf-watermark) center / 75% no-repeat,
        var(--paper-deep);
    aspect-ratio: 3 / 4;
}
body[data-preview="heritage"] .menu-item-image:has(img[src$="placeholder.svg"])::after {
    background: linear-gradient(
        to bottom,
        transparent 65%,
        rgba(244, 239, 223, 0.8) 92%,
        rgba(244, 239, 223, 0.95) 100%
    );
}
body[data-preview="heritage"] .menu-item-image img[src$="placeholder.svg"] {
    display: none;
}

/* Name overlay on bottom of image */
body[data-preview="heritage"] .menu-item-name-overlay {
    /* In case markup adds a name overlay later; for now content is below */
}

/* ─── Content section (below image) ─── */
body[data-preview="heritage"] .menu-item-content {
    padding: 1rem 1.1rem 1.2rem;
    flex: 1;
}
body[data-preview="heritage"] .menu-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    padding: 0;
    margin: 0 0 0.5rem;
    gap: 0.3rem;
}
body[data-preview="heritage"] .menu-item-name {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}
body[data-preview="heritage"] .menu-item-price {
    font-family: var(--font-secondary);
    font-feature-settings: "tnum", "lnum";
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gold-deep);
    letter-spacing: 0.04em;
}
body[data-preview="heritage"] .menu-item-description {
    font-family: var(--font-primary);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink-soft);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 320ms ease, opacity 320ms ease;
    margin: 0;
}
body[data-preview="heritage"] .menu-item-card:hover .menu-item-description {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.4rem;
}

/* ─── Signature ribbon top-right ─── */
body[data-preview="heritage"] .item-badges {
    position: absolute;
    top: 0;
    left: auto;
    right: 0;
    flex-direction: column;
    gap: 0;
    align-items: flex-end;
    z-index: 3;
}
body[data-preview="heritage"] .item-badge {
    background: transparent;
    color: var(--paper);
    padding: 0;
    font-size: 0;
}
body[data-preview="heritage"] .item-badge i { display: none; }
body[data-preview="heritage"] .badge-signature {
    background: var(--gold);
    color: var(--paper);
    padding: 0.3rem 0.7rem 0.35rem;
    font-family: var(--font-secondary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-radius: 0;
}
body[data-preview="heritage"] .badge-signature::before {
    content: "Signature";
    font-size: 0.6rem;
}
body[data-preview="heritage"] .badge-vegetarian,
body[data-preview="heritage"] .badge-vegan,
body[data-preview="heritage"] .badge-spicy {
    background: rgba(244, 239, 223, 0.95);
    color: var(--ink);
    border: 1px solid var(--gold-soft);
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0.3rem 0.3rem 0 0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body[data-preview="heritage"] .badge-vegetarian::before { content: "ⓥ"; font-size: 0.85rem; }
body[data-preview="heritage"] .badge-vegan::before      { content: "ⓥᵍ"; font-size: 0.65rem; }
body[data-preview="heritage"] .badge-spicy::before      { content: "🌶"; font-size: 0.75rem; }

/* ─── Quick-add: gold circle ─── */
body[data-preview="heritage"] .item-quick-add {
    all: unset;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(140, 110, 72, 0.3);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 250ms ease, transform 250ms ease;
}
body[data-preview="heritage"] .item-quick-add::before { content: "＋"; }
body[data-preview="heritage"] .item-quick-add i { display: none; }
body[data-preview="heritage"] .menu-item-card:hover .item-quick-add {
    opacity: 1;
    transform: scale(1);
}

/* ─── Reservation page — full-bleed hero card ─── */
body[data-preview="heritage"] .reservation-hero {
    background:
        linear-gradient(rgba(31, 42, 27, 0.55), rgba(31, 42, 27, 0.65)),
        var(--leaf-watermark) center / 400px repeat,
        var(--paper-deep);
    color: var(--paper);
    padding: 6rem 1.5rem 7rem;
    border-bottom: 4px solid var(--gold);
}
body[data-preview="heritage"] .reservation-hero h1 {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: clamp(2.6rem, 5vw, 4rem);
    color: var(--paper);
}
body[data-preview="heritage"] .reservation-hero p {
    color: var(--paper);
    opacity: 0.85;
    font-style: italic;
}

body[data-preview="heritage"] .reservation-page {
    margin-top: -4rem;
}
body[data-preview="heritage"] .res-card {
    background: var(--paper);
    border: 1px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(31, 42, 27, 0.2);
}
body[data-preview="heritage"] .res-card-header {
    background: var(--paper-deep);
    border-bottom: 1px solid var(--gold-soft);
    padding: 1.5rem 2rem;
}
body[data-preview="heritage"] .res-card-header h2 {
    font-family: var(--font-primary);
    color: var(--ink);
}
body[data-preview="heritage"] .res-card-header i {
    color: var(--gold);
}

body[data-preview="heritage"] .res-input,
body[data-preview="heritage"] .res-select,
body[data-preview="heritage"] .res-textarea {
    background: var(--paper);
    border: none;
    border-bottom: 1px solid var(--gold-soft);
    border-radius: 0;
    padding: 0.7rem 0.5rem;
    color: var(--ink);
}
body[data-preview="heritage"] .res-input:focus,
body[data-preview="heritage"] .res-select:focus,
body[data-preview="heritage"] .res-textarea:focus {
    border-bottom-color: var(--gold);
    box-shadow: none;
}
body[data-preview="heritage"] .res-form-group label i {
    color: var(--gold);
}

body[data-preview="heritage"] .res-chip {
    background: var(--paper-deep);
    border: 1px solid var(--gold-soft);
    color: var(--ink-soft);
    border-radius: 999px;
}
body[data-preview="heritage"] .res-chip:hover {
    background: var(--paper);
    border-color: var(--gold);
}
body[data-preview="heritage"] .res-chip.selected {
    background: var(--gold);
    color: var(--paper);
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(140, 110, 72, 0.3);
}

body[data-preview="heritage"] .res-info-bar {
    background: var(--paper-deep);
    border: 1px solid var(--gold-soft);
}
body[data-preview="heritage"] .res-info-bar i { color: var(--gold); }

body[data-preview="heritage"] .res-submit-btn {
    background: var(--gold);
    color: var(--paper);
    border: 1px solid var(--gold);
    box-shadow: 0 4px 14px rgba(140, 110, 72, 0.3);
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
body[data-preview="heritage"] .res-submit-btn:hover:not(:disabled) {
    background: var(--gold-deep);
    transform: translateY(-1px);
}

/* ─── Featured section: same heritage feel ─── */
body[data-preview="heritage"] .featured-item-card {
    background: var(--paper);
    border: 1px solid var(--gold-soft);
}
