/*
 * Home page (hotel list) — localtable v2 "modern alpine luxe".
 * Consumes tokens.css. No raw hex.
 */

/* ============ Hero ============ */
.home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--paper) 0%, var(--surface-sunk) 100%);
    padding-block: clamp(48px, 8vw, 104px) clamp(88px, 12vw, 168px);
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.home-hero__inner { position: relative; z-index: 2; }
.home-hero__eyebrow {
    font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink-soft); margin: 0 0 var(--s4);
}
.home-hero__title {
    margin: 0 auto; max-width: 20ch;
    font-size: var(--fs-display); font-weight: 300;
    font-variation-settings: 'opsz' var(--opsz-display);
    letter-spacing: -0.025em; line-height: 1.04; color: var(--ink);
    text-wrap: balance;
}
.home-hero__sub {
    margin: var(--s5) auto 0; max-width: 52ch;
    font-size: 1.16rem; color: var(--ink-soft); line-height: 1.5;
}
.home-hero__ridge {
    position: absolute; left: 0; right: 0; bottom: -1px; width: 100%;
    height: clamp(90px, 12vw, 150px); z-index: 1; display: block;
}
.home-hero__ridge .ridge-back { fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.home-hero__ridge .ridge-front { fill: color-mix(in srgb, var(--ink) 13%, transparent); }

/* ============ Map centerpiece ============ */
.map-section { padding: var(--s7) 0 var(--s6); }
.map-shell {
    position: relative;
    border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden; box-shadow: var(--sh-2);
}
.provider-map {
    width: 100%; height: clamp(300px, 44vh, 460px);
    background: var(--surface-sunk); z-index: 1;
}
.map-badge {
    position: absolute; top: var(--s4); right: var(--s4); z-index: 500;
    display: flex; align-items: center; gap: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(6px);
    border: 1px solid var(--line); border-radius: var(--r-pill);
    padding: 8px 16px; box-shadow: var(--sh-1);
}
.map-badge__count { font-weight: 600; font-size: 1.15rem; color: var(--dining); font-variant-numeric: tabular-nums; }
.map-badge__label { font-size: 0.85rem; color: var(--ink); }

/* Leaflet overrides — themed, terracotta pins */
.leaflet-container { font-family: var(--font-serif); background: var(--surface-sunk); }
.lt-pin span {
    display: block; width: 18px; height: 18px; border-radius: 50%;
    background: var(--dining); border: 3px solid var(--surface); box-shadow: var(--sh-2);
    transition: transform 0.15s ease;
}
.lt-pin:hover span { transform: scale(1.18); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); }
.lt-pop { padding: 2px; }
.lt-pop strong { font-size: 1.05rem; font-weight: 600; font-variation-settings: 'opsz' 40; }
.lt-pop__cat { color: var(--ink-soft); font-size: 0.85rem; margin-top: 2px; }
.lt-pop__price { font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.lt-pop__link { display: inline-block; margin-top: 8px; color: var(--dining); font-weight: 600; text-decoration: none; }
.lt-pop__link:hover { text-decoration: underline; }
.leaflet-bar a { color: var(--ink); background: var(--surface); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--surface-sunk); }

/* ============ Body ============ */
.home-body { padding-top: var(--s5); }

/* Controls: date + filters */
.controls {
    display: grid; gap: var(--s5); margin-bottom: var(--s7);
    align-items: start;
}
@media (min-width: 860px) { .controls { grid-template-columns: minmax(280px, 360px) 1fr; } }

.date-picker-section {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1); padding: var(--s5);
}
.date-picker-label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--ink-soft); margin-bottom: var(--s3); }
.date-picker-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.date-picker-row input[type="date"] { max-width: 210px; }
.date-display { font-weight: 600; color: var(--ink); }
.date-display.today { color: var(--dining); }

.filters-form { display: flex; flex-direction: column; gap: var(--s3); justify-content: center; }
.price-filter, .feature-filters { display: flex; gap: var(--s2); flex-wrap: wrap; }
.price-filter-btn, .feature-filter-btn {
    font-family: var(--font-serif); font-size: 0.9rem;
    padding: 8px 15px; min-height: 40px; cursor: pointer;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--r-pill);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.price-filter-btn:hover, .feature-filter-btn:hover { border-color: var(--ink-soft); }
.price-filter-btn.active, .feature-filter-btn.active {
    background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}

/* Card grid */
.hotel-list { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
@media (min-width: 640px) { .hotel-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hotel-list { grid-template-columns: repeat(3, 1fr); } }

.hotel-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1); overflow: hidden; text-decoration: none; color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hotel-card::before { content: ''; display: block; height: 5px; background: var(--dining); }
.hotel-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-strong); }
.hotel-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hotel-card.no-menu { opacity: 0.72; }
.hotel-card.no-menu::before { background: var(--line-strong); }

.hotel-card-header { display: flex; gap: var(--s3); align-items: center; padding: var(--s5) var(--s5) 0; }
.hotel-card-logo { width: 52px; height: 52px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; }
.hotel-card-icon {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    background: var(--dining-tint); color: var(--dining); font-size: 1.4rem; font-weight: 600;
}
.hotel-card-title-area h2 { margin: 0; font-size: 1.2rem; font-weight: 600; font-variation-settings: 'opsz' 48; letter-spacing: -0.01em; }
.hotel-card-category { font-size: var(--fs-small); color: var(--ink-soft); margin-top: 2px; }
.hotel-card-body { padding: var(--s3) var(--s5); flex: 1; }
.hotel-card-description { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.hotel-card-footer {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s4) var(--s5); border-top: 1px solid var(--line);
}
.hotel-card-price { font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.hotel-card-price strong { font-weight: 600; }
.hotel-card-status { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ok); }
.hotel-card-status.unavailable { color: var(--ink-soft); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.status-dot.status-unavailable { background: var(--ink-soft); }

.special-event-badge {
    position: absolute; top: var(--s3); right: var(--s3); z-index: 2;
    background: var(--dining); color: var(--on-accent);
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
    padding: 4px 10px; border-radius: var(--r-pill);
}

.text-muted { color: var(--ink-soft); }
.link-accent { color: var(--accent); }

/* How it works */
.how-it-works {
    display: flex; align-items: center; justify-content: center; gap: var(--s5); flex-wrap: wrap;
    margin: var(--s8) auto 0; max-width: 640px; padding: var(--s5);
    background: var(--surface-sunk); border-radius: var(--r-lg);
}
.how-step { display: flex; align-items: center; gap: var(--s3); }
.how-step-icon {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--line-strong);
    color: var(--dining); font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.how-step-text { font-size: 0.95rem; color: var(--ink); }
.how-step-arrow { color: var(--ink-soft); font-size: 1.1rem; opacity: 0.55; }

/* ============ Place chooser ============ */
.chooser { max-width: 640px; margin: 0 auto; display: grid; gap: var(--s6); }
.chooser__near { justify-self: center; }
.chooser__group .eyebrow { margin-bottom: var(--s3); }
.chooser__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.chooser__item {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
    padding: var(--s4) var(--s5); text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.chooser__item:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-strong); text-decoration: none; }
.chooser__name { font-size: 1.15rem; font-weight: 600; font-variation-settings: 'opsz' 48; }
.chooser__count { font-size: var(--fs-small); color: var(--ink-soft); white-space: nowrap; }

/* ============ Nearby ring ============ */
.nearby { margin-top: var(--s6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-sunk); }
.nearby summary {
    cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; color: var(--ink-soft);
    list-style: none;
}
.nearby summary::-webkit-details-marker { display: none; }
.nearby summary::before { content: '+ '; color: var(--dining); }
.nearby[open] summary::before { content: '\2212\00a0'; }
.nearby__list { list-style: none; margin: 0; padding: 0 var(--s5) var(--s4); display: grid; gap: var(--s2); }
.nearby__item {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
    padding: var(--s3) var(--s4); text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.nearby__item:hover { border-color: var(--line-strong); text-decoration: none; }
.nearby__name { font-weight: 600; }
.nearby__meta { font-size: var(--fs-small); color: var(--ink-soft); white-space: nowrap; }

/* Muted (nearby) map pins */
.lt-pin--muted span { background: var(--line-strong); opacity: 0.85; }

/* Empty state */
.empty-state { grid-column: 1 / -1; text-align: center; padding: var(--s8) var(--s5); color: var(--ink-soft); }
.empty-state-title { color: var(--ink); }
.empty-state-text { margin-top: var(--s3); }
.empty-state-hint { font-size: var(--fs-small); }

/* ============ Motion ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.home-hero__eyebrow { animation: fadeUp 0.6s ease both; }
.home-hero__title { animation: fadeUp 0.7s ease 0.05s both; }
.home-hero__sub { animation: fadeUp 0.7s ease 0.12s both; }
.map-shell { animation: fadeUp 0.7s ease 0.18s both; }
@media (prefers-reduced-motion: reduce) {
    .home-hero__eyebrow, .home-hero__title, .home-hero__sub, .map-shell { animation: none; }
    .lt-pin span { transition: none; }
}
