/* ==========================================================================
   Catering menu: "Día de Acción de Gracias" theme — a Mexican harvest
   table: mole-brown night, maíz gold, nopal green, barro (clay) and
   talavera blue, with papel picado and falling autumn leaves.
   Every color lives in :root, so re-theming for another season
   (Navidad, Día de Muertos...) only means editing this block, plus the
   decorations inside .sky in index.html.
   ========================================================================== */

:root {
    /* backgrounds: mole / barro browns */
    --bg: #1e110b;
    --bg-rgb: 30, 17, 11;
    --bg-2: #2a1810;
    --surface: #3a2318;
    --surface-2: #4a2e20;
    --line: rgba(255, 228, 190, 0.11);

    /* accent: maíz gold (buttons, highlights) */
    --accent: #eaa53b;
    --accent-rgb: 234, 165, 59;
    --accent-2: #f6c66e;
    --accent-ink: #2b1604;

    /* alt: nopal green ("favorite" badge, added state) */
    --alt: #a9c25c;
    --alt-rgb: 169, 194, 92;
    --alt-ink: #1b2408;

    --whatsapp: #25d366;
    --danger: #ff9b8a;

    --text: #fbf1e2;
    --muted: #d4bea4;

    /* decoration colors */
    --terracotta: #c75b32;
    --cranberry: #a3283b;
    --talavera: #3c7cc4;
    --glow-1: rgba(234, 165, 59, 0.15);
    --glow-2: rgba(199, 91, 50, 0.14);

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --focus: 0 0 0 3px rgba(var(--accent-rgb), 0.55);

    --font-display: 'Yeseva One', Georgia, serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --gutter: 16px;
    --max: 1200px;
    color-scheme: dark;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px; /* keeps headings clear of the sticky toolbar */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background:
        radial-gradient(60rem 40rem at 85% -10%, var(--glow-1), transparent 60%),
        radial-gradient(50rem 40rem at -10% 40%, var(--glow-2), transparent 60%),
        radial-gradient(40rem 30rem at 100% 90%, var(--glow-1), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    overflow-x: hidden;
}

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

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.icon {
    width: 1em;
    height: 1em;
    flex: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.2s;
}

.skip-link:focus {
    transform: none;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: var(--accent-ink);
    box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.55);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.btn-whatsapp {
    width: 100%;
    background: var(--whatsapp);
    color: #06290f;
}

.send-alt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.btn-send-alt {
    min-height: 44px;
    padding: 8px 12px;
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    white-space: nowrap;
}

.btn-send-alt:hover {
    border-color: var(--accent);
}

.btn-whatsapp[aria-disabled="true"],
.btn-send-alt[aria-disabled="true"] {
    opacity: 0.5;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
    border-color: var(--accent);
}

.icon-btn .icon {
    width: 14px;
    height: 14px;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: var(--muted);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-btn:hover {
    color: var(--text);
}

.link-btn.danger:hover {
    color: var(--danger);
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pill-link:hover,
.pill-link:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.25);
}

/* ---------- header ---------- */
.site-header {
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px var(--gutter);
}

.brand {
    margin-right: auto;
    padding: 8px 0;
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--accent-2);
    text-decoration: none;
    text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.3);
}

.nav-links {
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.lang-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.8rem;
}

.lang-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-ink);
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 52px var(--gutter) 28px;
    overflow: hidden;
}

.sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Papel picado: a string of cut-paper flags in harvest colors */
.papel-picado {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0 6px;
    list-style: none;
}

.papel-picado::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 228, 190, 0.35);
}

.papel-picado li {
    flex: 1;
    max-width: 64px;
    height: 34px;
    background:
        radial-gradient(circle at 50% 38%, var(--bg) 0 3px, transparent 3.5px),
        radial-gradient(circle at 28% 62%, var(--bg) 0 2px, transparent 2.5px),
        radial-gradient(circle at 72% 62%, var(--bg) 0 2px, transparent 2.5px),
        var(--flag);
    clip-path: polygon(0 0, 100% 0, 100% 78%, 87% 100%, 75% 78%, 62% 100%, 50% 78%, 37% 100%, 25% 78%, 12% 100%, 0 78%);
    opacity: 0.92;
    transform-origin: top center;
    animation: flutter 4s ease-in-out infinite;
}

.papel-picado li:nth-child(5n + 1) { --flag: var(--terracotta); }
.papel-picado li:nth-child(5n + 2) { --flag: var(--accent); animation-delay: -1s; }
.papel-picado li:nth-child(5n + 3) { --flag: var(--alt); animation-delay: -2s; }
.papel-picado li:nth-child(5n + 4) { --flag: var(--cranberry); animation-delay: -3s; }
.papel-picado li:nth-child(5n + 5) { --flag: var(--talavera); animation-delay: -1.5s; }

/* Only as many flags as fit: extra flags hide on narrow screens */
.papel-picado li:nth-child(n + 9) {
    display: none;
}

@keyframes flutter {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Falling autumn leaves, kept to the right so they never cover the headline */
.leaf {
    position: absolute;
    top: -50px;
    width: 30px;
    height: 30px;
    opacity: 0;
    animation: leaf-fall 11s linear infinite;
}

.leaf-1 { right: 8%; color: var(--terracotta); }
.leaf-2 { right: 22%; color: var(--accent); width: 14px; height: 14px; animation-duration: 14s; animation-delay: -4s; }
.leaf-3 { right: 3%; color: var(--cranberry); width: 22px; height: 22px; animation-duration: 12s; animation-delay: -8s; }
.leaf-4 { right: 34%; color: var(--accent-2); width: 13px; height: 13px; animation-duration: 16s; animation-delay: -11s; }
.leaf-5 { right: 15%; color: var(--terracotta); width: 15px; height: 15px; animation-duration: 13s; animation-delay: -2s; }

@keyframes leaf-fall {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    10% { opacity: 0.8; }
    50% { transform: translate(-28px, 160px) rotate(160deg); }
    85% { opacity: 0.7; }
    100% { opacity: 0; transform: translate(10px, 340px) rotate(320deg); }
}

.hero-content {
    position: relative;
    max-width: 640px;
}

.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(var(--alt-rgb), 0.35);
    border-radius: 999px;
    background: rgba(var(--alt-rgb), 0.08);
    color: var(--alt);
    font-weight: 700;
    font-size: 0.8rem;
}

.hero h1 {
    margin: 14px 0 12px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.9rem, 7.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: 0;
    text-wrap: balance;
}

/* "Menú" sits on its own line under the slogan, larger and in gold */
.hero h1 span {
    display: block;
    margin-top: 2px;
    font-size: 1.6em;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 2px 0 var(--terracotta), 0 0 34px rgba(var(--accent-rgb), 0.35);
}

.lede {
    color: var(--muted);
    font-size: 1.05rem;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.facts li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-actions .icon {
    width: 16px;
    height: 16px;
}

.hero-art {
    display: none;
}

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

/* ---------- how it works ---------- */
.steps {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) 28px;
}

.steps ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
}

.step-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.steps strong {
    font-size: 1.02rem;
}

.steps p {
    color: var(--muted);
    font-size: 0.92rem;
}

/* ---------- section headings ---------- */
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;
    margin-bottom: 14px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    line-height: 1.1;
    color: var(--accent-2);
}

.section-head p {
    color: var(--muted);
    font-weight: 600;
}

/* ---------- real events strip ---------- */
.events {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) 32px;
}

.events-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 42%;
    gap: 10px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: thin;
}

.event-card {
    aspect-ratio: 3 / 4;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    scroll-snap-align: start;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.event-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.event-card:hover,
.event-card:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus), 0 0 24px rgba(var(--accent-rgb), 0.3);
}

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

.events-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* ---------- toolbar (sticky search + chips) ---------- */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(var(--bg-rgb), 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.toolbar-inner {
    display: grid;
    gap: 10px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px var(--gutter) 10px;
}

.search {
    position: relative;
    display: block;
}

.search .icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.search input {
    width: 100%;
    min-height: 46px;
    padding: 10px 18px 10px 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 1rem; /* 16px stops iOS from zooming in */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search input::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

.search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
}

/* Category bar: "All" is pinned on the left; the categories scroll
   (swipe, trackpad, or the ‹ › arrows, which hide when everything fits) */
.chips {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.chip-scroll {
    position: relative; /* offsetParent for centering the active chip */
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
    padding: 2px 2px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
    display: none;
}

/* Fade the edge that has more chips behind it */
.chips.can-left .chip-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px);
    mask-image: linear-gradient(90deg, transparent, #000 32px);
}

.chips.can-right .chip-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}

.chips.can-left.can-right .chip-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}

.chip-all {
    position: relative;
    margin-right: 6px;
}

/* Small divider between the pinned "All" chip and the scrolling ones */
.chip-all::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: -8px;
    width: 1px;
    background: var(--line);
}

.chip-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--accent-2);
    transition: border-color 0.2s, opacity 0.2s;
}

.chip-arrow .icon {
    width: 14px;
    height: 14px;
}

.chip-arrow:hover:not(:disabled) {
    border-color: var(--accent);
}

.chip-arrow:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.chip-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.chips.no-overflow .chip-arrow {
    display: none;
}

.chip {
    flex: none;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover {
    border-color: var(--accent);
}

.chip:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.results-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px var(--gutter) 0;
}

.result-count {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.view-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.85rem;
    transition: background-color 0.2s, color 0.2s;
}

.view-btn .icon {
    width: 14px;
    height: 14px;
}

.view-btn:hover {
    color: var(--text);
}

.view-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.view-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-ink);
}

/* ---------- menu ---------- */
.menu {
    max-width: var(--max);
    margin: 0 auto;
    padding: 10px var(--gutter) 40px;
}

.menu-section {
    padding-top: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dish {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.dish:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: var(--shadow), 0 0 26px rgba(var(--accent-rgb), 0.18);
}

.dish-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--surface-2);
}

.dish-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

button.dish-media:hover img,
button.dish-media:focus-visible img {
    transform: scale(1.06);
}

button.dish-media:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--accent);
}

.dish-media.is-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), 0.22), transparent 70%), var(--surface-2);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.placeholder-art {
    width: 44px;
    height: 44px;
    opacity: 0.9;
}

.badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.4;
}

.badge-video {
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.badge-photos {
    right: 8px;
    top: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.badge-video .icon {
    width: 10px;
    height: 10px;
}

.badge-popular {
    top: 8px;
    left: 8px;
    background: var(--alt);
    color: var(--alt-ink);
}

.dish-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.dish-body h3 {
    flex: 1;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
}

.add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.6);
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-2);
    font-weight: 800;
    font-size: 0.92rem;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.add-btn .icon {
    width: 13px;
    height: 13px;
}

.add-btn:hover {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.4);
}

.add-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.add-btn.is-added {
    border-color: var(--alt);
    background: var(--alt);
    color: var(--alt-ink);
}

.add-btn.is-added:hover {
    box-shadow: 0 0 18px rgba(var(--alt-rgb), 0.4);
}

.badge-inline {
    display: none;
}

/* ---------- list view (names only, no photos) ---------- */
.menu.is-list .grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 760px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.menu.is-list .dish {
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.menu.is-list .dish {
    margin-bottom: -1px; /* last row's divider tucks under the list's edge */
    border-bottom: 1px solid var(--line);
}

.menu.is-list .dish:hover {
    transform: none;
    background: var(--surface-2);
    box-shadow: none;
}

.menu.is-list .dish-media {
    display: none; /* hidden images aren't downloaded, so list view is lighter on data */
}

.menu.is-list .dish-body {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 16px;
}

.menu.is-list .dish-body h3 {
    font-size: 1rem;
}

.menu.is-list .add-btn {
    flex: none;
    width: auto;
    min-width: 116px;
}

.menu.is-list .badge-inline {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--alt);
    color: var(--alt-ink);
    font-size: 0.7rem;
    font-weight: 800;
    vertical-align: 2px;
}

.add-btn-lg {
    width: auto;
    min-height: 46px;
    padding: 10px 20px;
    font-size: 1rem;
}

/* ---------- empty state ---------- */
.empty {
    max-width: 420px;
    margin: 0 auto;
    padding: 30px var(--gutter) 60px;
    text-align: center;
    color: var(--muted);
}

.empty p {
    margin-bottom: 16px;
}

.empty strong {
    color: var(--text);
}

.empty-art {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    animation: bob 3s ease-in-out infinite;
}

/* ---------- footer ---------- */
.site-footer {
    padding: 36px var(--gutter) 110px; /* room for the floating button */
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    text-align: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-2);
}

.footer-tagline {
    margin-top: 4px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 720px;
    margin: 20px auto 0;
}

.footer-legal,
.footer-copy {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-legal a {
    display: inline-block;
    padding: 11px 4px;
}

.footer-copy {
    margin-top: 6px;
}

/* ---------- floating party list button ---------- */
.fab {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 10px 8px 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 800;
    box-shadow: var(--shadow);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.fab-art {
    width: 26px;
    height: 26px;
}

.fab-count {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.fab.has-items {
    background: var(--accent);
    border-color: var(--accent-2);
    color: var(--accent-ink);
    box-shadow: var(--shadow), 0 0 28px rgba(var(--accent-rgb), 0.5);
}

.fab.has-items .fab-count {
    background: var(--accent-ink);
    color: var(--accent-2);
}

.fab:focus-visible {
    outline: none;
    box-shadow: var(--focus), var(--shadow);
}

.fab.bump {
    animation: bump 0.45s ease;
}

@keyframes bump {
    30% { transform: scale(1.14); }
    60% { transform: scale(0.96); }
}

/* ---------- dialogs ---------- */
dialog {
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
}

dialog::backdrop {
    background: rgba(var(--bg-rgb), 0.78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Party list: bottom sheet on phones, side panel from 768px */
.drawer {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    margin: 0;
    padding-top: env(safe-area-inset-top);
    border-radius: 22px 22px 0 0;
    background: var(--bg-2);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.drawer[open] {
    display: flex;
    flex-direction: column;
    animation: sheet-up 0.28s ease;
}

/* A fixed height (not just max-height) so the list area always gets the
   space left over by the header and buttons, including in iOS Safari */
.drawer:not(.is-empty) {
    height: 88vh;
    height: 88dvh;
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px 20px;
    border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--accent-2);
}

.drawer-body {
    flex: 1;
    min-height: 0;
    padding: 12px 16px;
    overflow-x: hidden; /* never side-scroll the list, whatever a browser does with an input */
    overflow-y: auto;
    overscroll-behavior: contain;
}

.drawer-empty {
    padding: 24px 0;
    text-align: center;
    color: var(--muted);
}

.drawer-empty strong {
    color: var(--accent-2);
}

.picked-count {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.picked-count[hidden] {
    display: none;
}

.picked {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.picked:empty {
    display: none;
}

.picked li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
        'art name remove'
        'art size remove';
    align-items: center;
    gap: 4px 10px;
    padding: 6px 6px 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.picked img,
.picked-art {
    grid-area: art;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.picked-art {
    padding: 6px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25), transparent 70%), var(--surface-2);
}

.picked-name {
    grid-area: name;
    font-weight: 800;
    line-height: 1.25;
}

.size-select {
    grid-area: size;
    justify-self: start;
    width: 100%;
    max-width: 180px;
    min-width: 0;
    min-height: 32px;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 0.85rem;
    font-weight: 700;
}

.picked .icon-btn {
    grid-area: remove;
}

/* One column on phones; two side by side once there's room. Columns use
   minmax(0, 1fr) because a plain 1fr grows to fit its input's minimum
   width (iOS Safari's date input is wide) and pushed the list sideways. */
.event-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.event-form[hidden] {
    display: none;
}

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 700;
    font-size: 0.88rem;
}

.optional {
    color: var(--muted);
    font-weight: 600;
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0; /* date inputs otherwise overflow their column on phones */
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1rem;
}

.field textarea {
    resize: vertical;
}

/* iOS Safari: drop the native date-field styling that ignores width,
   and keep the date text left-aligned like the other fields */
.field input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 46px;
}

.field input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

@media (min-width: 400px) {
    .event-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.field input:focus,
.field textarea:focus,
.size-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
}

.drawer-foot {
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
}

.drawer.is-empty .drawer-foot {
    display: none;
}

.drawer-secondary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 2px;
    margin-top: 4px;
}

.drawer-secondary .link-btn {
    padding: 6px 7px;
    font-size: 0.85rem;
}

/* Photo / video viewer */
.lightbox {
    width: min(960px, 100% - 24px);
    margin: auto;
    overflow: visible; /* prev/next arrows sit outside the photo on wide screens */
}

.lightbox[open] {
    animation: pop 0.22s ease;
}

@keyframes pop {
    from { opacity: 0; transform: scale(0.96); }
}

.lb-figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    box-shadow: var(--shadow);
}

.lb-media {
    display: grid;
    place-items: center;
    background: #000;
}

.lb-media img,
.lb-media video {
    width: 100%;
    max-height: 68vh;
    max-height: 68dvh;
    object-fit: contain;
}

.lb-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 16px;
}

.lb-cat {
    color: var(--alt);
    font-weight: 700;
    font-size: 0.85rem;
}

.lb-figure h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.15;
}

.lb-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.lb-nav {
    position: absolute;
    top: 34%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
}

.lb-nav:hover {
    border-color: var(--accent);
}

.lb-nav[hidden] {
    display: none;
}

.lb-prev {
    left: 10px;
}

.lb-next {
    right: 10px;
}

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px);
    z-index: 30;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast:empty {
    display: none;
}

/* ---------- larger screens ---------- */
@media (min-width: 600px) {
    :root {
        --gutter: 24px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .events-strip {
        grid-auto-columns: 200px;
    }

    .papel-picado li:nth-child(n + 9) {
        display: block;
    }

    .papel-picado li:nth-child(n + 15) {
        display: none;
    }

    .leaf {
        width: 38px;
        height: 38px;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 72px var(--gutter) 40px;
    }

    .steps ol {
        grid-template-columns: repeat(3, 1fr);
    }

    .toolbar-inner {
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
        align-items: center;
    }

    .drawer,
    .drawer:not(.is-empty) {
        inset: 0 0 0 auto;
        width: 420px;
        height: 100%;
        max-height: none;
        border-radius: 22px 0 0 22px;
    }

    @keyframes sheet-up {
        from { transform: translateX(100%); }
    }

    .lb-nav {
        top: 50%;
        transform: translateY(-50%);
    }

    .lb-prev {
        left: -6px;
    }

    .lb-next {
        right: -6px;
    }
}

@media (min-width: 960px) {
    .hero {
        min-height: 400px;
    }

    .papel-picado li:nth-child(n + 15) {
        display: block;
    }

    .hero-art {
        display: block;
        position: absolute;
        right: 90px;
        bottom: 28px;
        width: 220px;
        height: 220px;
        filter: drop-shadow(0 10px 30px rgba(var(--accent-rgb), 0.3));
        animation: bob 5s ease-in-out infinite;
    }
}

@media (min-width: 1100px) {
    .lb-prev {
        left: -60px;
    }

    .lb-next {
        right: -60px;
    }
}

/* ---------- reduced motion: no animations or transitions ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- welcome intro (index.html #intro) ----------
   Thanksgiving welcome: warm candlelit glow, papel picado and string lights,
   a harvest table along the bottom, the folk-art guajolote and "Bienvenidos"
   easing forward in 3D, then a soft fade into the menu (~2.8s).
   Plays once per visit, never on deep links; tap, Esc or Enter skips it. */
.intro-seen .intro {
    display: none;
}

.intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--gutter) var(--gutter) clamp(96px, 17vw, 190px);
    overflow: hidden;
    cursor: pointer;
    background:
        radial-gradient(34rem 26rem at 50% 45%, rgba(var(--accent-rgb), 0.24), transparent 70%),
        radial-gradient(28rem 22rem at 12% 100%, rgba(199, 91, 50, 0.26), transparent 65%),
        radial-gradient(28rem 22rem at 88% 100%, rgba(163, 40, 59, 0.2), transparent 65%),
        radial-gradient(120% 90% at 50% 45%, var(--bg-2), var(--bg) 70%);
    perspective: 1000px;
    animation: intro-out 0.5s cubic-bezier(0.4, 0, 0.2, 1) 2.3s forwards;
}

.intro.is-leaving {
    animation: intro-out 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* candle glow that breathes behind the words */
.intro::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: min(90vw, 760px);
    aspect-ratio: 1.6;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(246, 198, 110, 0.28), rgba(234, 165, 59, 0.1) 55%, transparent);
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    animation: intro-glow 2.4s ease-out forwards;
}

.intro-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* handmade paper grain */
.intro-sky::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.09;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.9 0 0 0 0 0.75 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.intro .papel-picado li {
    height: 44px;
    max-width: 80px;
    opacity: 0;
    animation: intro-flag 0.5s ease-out calc(var(--d, 0) * 1s) forwards, flutter 4s ease-in-out 0.5s infinite;
}

.intro .papel-picado li:nth-child(5n + 2) { --d: 0.05; }
.intro .papel-picado li:nth-child(5n + 3) { --d: 0.1; }
.intro .papel-picado li:nth-child(5n + 4) { --d: 0.15; }
.intro .papel-picado li:nth-child(5n + 5) { --d: 0.2; }

/* string of warm lights under the flags; they switch on one by one */
.intro-lights {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    margin: 0;
    padding: 0 4%;
    list-style: none;
}

.intro-lights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 228, 190, 0.22);
}

.intro-lights li {
    position: relative;
    width: 11px;
    height: 15px;
    margin-top: 3px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background: #ffd98a;
    box-shadow: 0 0 10px 3px rgba(255, 196, 92, 0.65), 0 0 26px 8px rgba(255, 170, 60, 0.25);
    opacity: 0.15;
    animation: intro-bulb 0.45s ease-out calc(0.3s + var(--b, 0) * 1s) forwards, intro-flicker 2.2s ease-in-out calc(0.9s + var(--b, 0) * 1s) infinite;
}

.intro-lights li::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 3px;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: #5a3a28;
}

.intro-lights li:nth-child(3n + 2) { background: #fff1d6; }
.intro-lights li:nth-child(3n) { background: #f6a85a; box-shadow: 0 0 10px 3px rgba(246, 140, 70, 0.6), 0 0 26px 8px rgba(199, 91, 50, 0.25); }
.intro-lights li:nth-child(2) { --b: 0.05; } .intro-lights li:nth-child(3) { --b: 0.1; }
.intro-lights li:nth-child(4) { --b: 0.15; } .intro-lights li:nth-child(5) { --b: 0.2; }
.intro-lights li:nth-child(6) { --b: 0.25; } .intro-lights li:nth-child(7) { --b: 0.3; }
.intro-lights li:nth-child(8) { --b: 0.35; } .intro-lights li:nth-child(9) { --b: 0.4; }
.intro-lights li:nth-child(10) { --b: 0.45; } .intro-lights li:nth-child(11) { --b: 0.5; }
.intro-lights li:nth-child(12) { --b: 0.55; } .intro-lights li:nth-child(13) { --b: 0.6; }
.intro-lights li:nth-child(14) { --b: 0.65; }

.intro-lights li:nth-child(n + 9) {
    display: none;
}

@media (min-width: 700px) {
    .intro .papel-picado li:nth-child(n + 9),
    .intro-lights li:nth-child(n + 9) {
        display: block;
    }
}

/* leaves drifting down */
.intro-leaf {
    position: absolute;
    top: -40px;
    width: 34px;
    height: 34px;
    opacity: 0;
    animation: intro-leaf 3s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

.il-1 { left: 6%; color: var(--terracotta); }
.il-2 { left: 19%; color: var(--accent); width: 24px; height: 24px; animation-delay: 0.4s; animation-duration: 3.2s; }
.il-3 { left: 31%; color: var(--cranberry); width: 27px; height: 27px; animation-delay: 0.15s; }
.il-4 { left: 45%; color: var(--accent-2); width: 20px; height: 20px; animation-delay: 0.6s; animation-duration: 2.8s; }
.il-5 { left: 58%; color: var(--terracotta); width: 30px; height: 30px; animation-delay: 0.25s; animation-duration: 3.3s; }
.il-6 { left: 70%; color: var(--accent); animation-delay: 0.05s; animation-duration: 3.1s; }
.il-7 { left: 81%; color: var(--cranberry); width: 23px; height: 23px; animation-delay: 0.5s; }
.il-8 { left: 92%; color: var(--accent-2); width: 28px; height: 28px; animation-delay: 0.2s; animation-duration: 3.2s; }

/* harvest table: pumpkins, corn, chiles and ollas along the bottom */
.intro-table {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: clamp(96px, 17vw, 190px);
    filter: drop-shadow(0 -6px 18px rgba(0, 0, 0, 0.35));
    transform: translateY(100%);
    animation: intro-table 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.intro-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform-style: preserve-3d;
    animation: intro-sway 2.8s cubic-bezier(0.37, 0, 0.63, 1) both;
}

.intro-turkey {
    width: clamp(60px, 15vw, 96px);
    height: clamp(60px, 15vw, 96px);
    margin-bottom: 4px;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
    opacity: 0;
    animation: intro-turkey 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards, bob 3s ease-in-out 0.8s infinite;
}

.intro-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 12vw, 7.5rem);
    line-height: 1;
    color: var(--accent-2);
    white-space: nowrap;
    transform-style: preserve-3d;
}

/* each letter: warm extruded gold, built from stacked shadows */
.intro-title span {
    display: inline-block;
    text-shadow:
        0 1px 0 #ecaa45, 0 2px 0 #e39a33, 0 3px 0 #d48a2a, 0 4px 0 #c78024,
        0 5px 0 #b87421, 0 6px 0 #a8681c, 0 7px 0 #965a18, 0 8px 0 #844d14,
        0 9px 0 #713f10, 0 10px 0 #5e330c, 0 11px 0 #4b2809,
        0 12px 4px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(246, 198, 110, 0.35),
        0 22px 30px rgba(0, 0, 0, 0.6);
    transform-origin: 50% 100%;
    opacity: 0;
    animation: intro-letter 0.8s cubic-bezier(0.22, 1, 0.36, 1) calc(0.25s + var(--i) * 0.045s) forwards;
}

.intro-sub {
    margin: 0.5em 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 5vw, 2.6rem);
    color: var(--text);
    text-wrap: balance;
    text-shadow:
        0 1px 0 #e8c9a3, 0 2px 0 #d9774a, 0 3px 0 #c75b32, 0 4px 0 #ad4c29,
        0 5px 0 #923f22, 0 6px 0 #77321b, 0 7px 0 #5c2714,
        0 8px 3px rgba(0, 0, 0, 0.45),
        0 16px 22px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform-origin: 50% 0;
    animation: intro-sub 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}

.intro-sub::before,
.intro-sub::after {
    content: '';
    display: inline-block;
    width: 1.4em;
    height: 3px;
    margin: 0 0.5em 0.25em;
    vertical-align: middle;
    border-radius: 2px;
    background: var(--alt);
    box-shadow: 0 3px 0 #5f7330, 0 6px 8px rgba(0, 0, 0, 0.4);
}

/* sign-off: holiday greeting + business name under a thin gold rule */
.intro-signoff {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 1.2em 0 0;
    padding: 0.75em 1.6em 0;
    border-top: 1px solid rgba(var(--accent-rgb), 0.45);
    opacity: 0;
    animation: intro-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.05s forwards;
}

.intro-holiday {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 4.2vw, 1.7rem);
    color: var(--accent-2);
    text-shadow:
        0 1px 0 #d48a2a, 0 2px 0 #ad671d, 0 3px 0 #7e4612, 0 4px 0 #5e330c,
        0 5px 2px rgba(0, 0, 0, 0.4), 0 10px 16px rgba(0, 0, 0, 0.5);
}

.intro-brand {
    font-size: clamp(0.78rem, 2.8vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--alt);
    text-shadow: 0 1px 0 #3d4a1c, 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* visible skip hint, sits just above the table */
.intro-skip {
    position: absolute;
    left: 50%;
    bottom: calc(clamp(96px, 17vw, 190px) + 14px);
    padding: 8px 18px;
    border: 1px solid rgba(255, 228, 190, 0.25);
    border-radius: 999px;
    font: 700 0.85rem/1 var(--font-body);
    letter-spacing: 0.03em;
    color: var(--text);
    background: rgba(var(--bg-rgb), 0.55);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transform: translateX(-50%);
    opacity: 0;
    animation: intro-fade 0.5s ease-out 0.8s forwards;
}

.intro-skip:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

@keyframes intro-glow {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes intro-flag {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 0.92; transform: translateY(0); }
}

@keyframes intro-bulb {
    0% { opacity: 0.15; }
    60% { opacity: 1; }
    100% { opacity: 0.9; }
}

@keyframes intro-flicker {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.6; }
}

@keyframes intro-leaf {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    12% { opacity: 0.85; }
    45% { transform: translate(-30px, 36vh) rotate(130deg); }
    75% { transform: translate(24px, 66vh) rotate(240deg); opacity: 0.75; }
    100% { opacity: 0; transform: translate(-10px, 90vh) rotate(330deg); }
}

@keyframes intro-table {
    to { transform: translateY(0); }
}

@keyframes intro-turkey {
    from { opacity: 0; transform: translateY(18px) scale(0.6) rotate(-8deg); }
    to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes intro-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes intro-fade {
    to { opacity: 1; }
}

@keyframes intro-letter {
    from { opacity: 0; transform: translateZ(-240px) translateY(20px) rotateX(-70deg); }
    to { opacity: 1; transform: translateZ(0) translateY(0) rotateX(0); }
}

@keyframes intro-sub {
    from { opacity: 0; transform: translateY(18px) rotateX(55deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes intro-sway {
    0% { transform: rotateY(-10deg) rotateX(5deg) scale(0.96); }
    100% { transform: rotateY(6deg) rotateX(-2deg) scale(1.03); }
}

@keyframes intro-out {
    to { opacity: 0; visibility: hidden; transform: scale(1.04); }
}

/* phones: shallower extrusion keeps small letters crisp */
@media (max-width: 600px) {
    .intro-sub::before,
    .intro-sub::after {
        display: none;
    }

    .intro-title span {
        text-shadow:
            0 1px 0 #e39a33, 0 2px 0 #c78024, 0 3px 0 #a8681c, 0 4px 0 #844d14,
            0 5px 0 #5e330c, 0 6px 3px rgba(0, 0, 0, 0.45),
            0 0 20px rgba(246, 198, 110, 0.3), 0 12px 18px rgba(0, 0, 0, 0.55);
    }

    .intro-sub {
        text-shadow:
            0 1px 0 #d9774a, 0 2px 0 #c75b32, 0 3px 0 #923f22, 0 4px 0 #5c2714,
            0 5px 2px rgba(0, 0, 0, 0.45), 0 10px 14px rgba(0, 0, 0, 0.5);
    }
}

/* short landscape screens: drop the table so nothing overlaps the words */
@media (max-height: 500px) {
    .intro {
        padding-bottom: var(--gutter);
    }

    .intro-table,
    .intro-turkey {
        display: none;
    }

    .intro-skip {
        bottom: 14px;
    }
}

/* reduced motion: skip the intro entirely */
@media (prefers-reduced-motion: reduce) {
    .intro {
        display: none;
    }
}
