/* Scenario landing (breakfast / lunch / dinner) — PREMIUM UI.
   Layered on top of kiosk.css. No HTML/JS changes: cards are rendered by
   scenario.js into the existing .sc-card > .sc-card-photo + .sc-card-body
   structure; here we reposition pieces with CSS to achieve an
   image-forward "restaurant card" look (title overlaid on photo, gold
   price badge, stagger-in on load).

   NO food photos are available in the project (static/images is empty,
   menu.json items have no image field). The "cinematic restaurant" feel
   is built entirely from layered warm gradients + a reusable SVG noise
   texture (--sc-noise) that sells grain/depth. Per-role card tints give
   each card a distinct food mood even without photos. */

.page-scenario {
    overflow-x: hidden;
    /* Film-grain noise as a tiny data-URL SVG — reused as an overlay on
       the hero and the card photo fallbacks to add "printed-menu" depth
       without pulling a raster texture file. */
    --sc-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch' seed='7'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.85  0 0 0 0 0.70  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    /* Warm "candlelight" tint used by buttons/price glow */
    --sc-gold: #e8c274;
    --sc-gold-bright: #fbe9c4;
    --sc-gold-deep: #c99a4a;
}

/* ============ TOPBAR (scoped to .page-scenario — mirrors page-menu/wine) ============ */

body.page-scenario .page-topbar {
    position: sticky;
    top: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 14px clamp(18px, 2vw, 28px);
    background:
        linear-gradient(180deg, rgba(15,15,18,0.94) 0%, rgba(15,15,18,0.78) 100%);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 1px 0 rgba(232, 194, 116, 0.08),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

body.page-scenario .topbar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.page-scenario .topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 52px;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
body.page-scenario .topbar-btn-back {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
body.page-scenario .topbar-btn-back:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text);
}
body.page-scenario .topbar-btn-home {
    color: #1a1306;
    background: linear-gradient(180deg, var(--sc-gold-bright) 0%, var(--sc-gold) 55%, var(--sc-gold-deep) 100%);
    border: 1px solid transparent;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 8px 22px rgba(201, 154, 74, 0.4),
        0 0 30px rgba(232, 194, 116, 0.2);
}
body.page-scenario .topbar-btn-home:hover {
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 10px 28px rgba(201, 154, 74, 0.55),
        0 0 44px rgba(232, 194, 116, 0.35);
}
body.page-scenario .topbar-btn:active { transform: scale(0.97); }

body.page-scenario .topbar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    min-width: 0;
}
body.page-scenario .topbar-sub {
    font-size: clamp(10px, 0.85vw, 12px);
    letter-spacing: 0.3em;
    color: var(--text-dim);
    text-transform: uppercase;
}
body.page-scenario .topbar-brand {
    font-family: "Playfair Display", "Georgia", serif;
    font-weight: 700;
    font-size: clamp(22px, 2.2vw, 30px);
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, #f7e2bd 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
body.page-scenario .topbar-page {
    font-family: "Playfair Display", "Georgia", serif;
    font-style: italic;
    font-size: clamp(13px, 1.1vw, 16px);
    color: var(--text);
    letter-spacing: 0.05em;
    margin-top: 2px;
}
body.page-scenario .topbar-lang {
    position: static;
    padding: 4px;
    background: rgba(20, 20, 24, 0.6);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: flex-end;
}
body.page-scenario .topbar-lang button {
    padding: 10px 12px;
    min-width: 44px;
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    color: var(--text-dim);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
body.page-scenario .topbar-lang button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}
body.page-scenario .topbar-lang button.active,
body.page-scenario .topbar-lang button[aria-pressed="true"] {
    background: rgba(201, 154, 74, 0.18);
    color: #f7e2bd;
}

.sc-root {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 0;
    padding-bottom: 28px;
}

/* ============ HERO — 2-column premium layout ============ */

.sc-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -16px; /* absorb .container top padding to sit flush under topbar */
    min-height: 220px;
    height: clamp(220px, 24vw, 260px);
    padding: 28px clamp(20px, 4vw, 56px) 28px;
    overflow: hidden;
    isolation: isolate;
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: stretch;
    opacity: 0;
    transform: translateY(10px);
    animation: sc-fade-up 320ms ease-out forwards;
    /* default (lunch-ish neutral) */
    background:
        radial-gradient(900px 360px at 85% -20%, rgba(212, 175, 107, 0.22), transparent 60%),
        linear-gradient(135deg, #17171a 0%, #0b0b0d 100%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

/* Film-grain noise layer — sits above the gradient, below the content.
   Low opacity so it only adds "texture" without reading as dirty. */
.sc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--sc-noise);
    background-size: 180px 180px;
    opacity: 0.18;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}

/* Bottom vignette — keeps text legible and deepens the bottom edge */
.sc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 65%),
        linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Scenario-specific palettes — layered over a shared seaside watercolor
   (hero-seaside.jpg, derived from the wine-list page "Salt in the air,
   wine in my hand, peace in my heart"). The image is the deepest layer
   — it reads as a painterly seascape; corner spotlights + a darkening
   band tint it into three distinct moods without swapping the asset. */

.sc-hero {
    /* Shared image layer — kept on the :root rule so every scenario
       starts with the same seascape and only the tint changes. The
       darkening linear-gradient is repeated below with per-scenario
       tinted spotlights on top. */
    background-color: #120a06;
}

.page-scenario--breakfast .sc-hero {
    /* MORNING SUN — amber / toasted honey over a pale-dawn seascape */
    background:
        radial-gradient(900px 400px at 100% -20%, rgba(255, 185, 90, 0.55), transparent 60%),
        radial-gradient(800px 380px at 0% 110%, rgba(230, 130, 55, 0.40), transparent 65%),
        linear-gradient(160deg, rgba(20, 10, 4, 0.35) 0%, rgba(20, 10, 4, 0.72) 100%),
        url("/static/images/scenario/hero-seaside.jpg") center 30%/cover no-repeat,
        linear-gradient(135deg, #2e1d0f 0%, #150a04 100%);
}
.page-scenario--lunch .sc-hero {
    /* GOLDEN HOUR — olive / wheat / sunlit linen over the same seascape */
    background:
        radial-gradient(900px 400px at 100% -20%, rgba(220, 195, 140, 0.48), transparent 60%),
        radial-gradient(800px 380px at 0% 110%, rgba(160, 170, 120, 0.34), transparent 65%),
        linear-gradient(160deg, rgba(17, 14, 8, 0.32) 0%, rgba(17, 14, 8, 0.70) 100%),
        url("/static/images/scenario/hero-seaside.jpg") center 30%/cover no-repeat,
        linear-gradient(135deg, #241f16 0%, #11100a 100%);
}
.page-scenario--dinner .sc-hero {
    /* CANDLELIGHT — bordeaux / wine / deep ember; the seascape sinks
       under heavier reds so it reads as evening. */
    background:
        radial-gradient(900px 400px at 100% -20%, rgba(205, 55, 80, 0.58), transparent 60%),
        radial-gradient(800px 380px at 0% 110%, rgba(90, 30, 45, 0.60), transparent 65%),
        linear-gradient(160deg, rgba(8, 3, 6, 0.45) 0%, rgba(8, 3, 6, 0.82) 100%),
        url("/static/images/scenario/hero-seaside.jpg") center 30%/cover no-repeat,
        linear-gradient(135deg, #1a0810 0%, #08030a 100%);
}

.sc-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(20px, 3vw, 28px);
    align-items: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(8px, 1vw, 16px);
}

.sc-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* ============ HERO — RIGHT BRAND BLOCK (placeholder) ============ */

.sc-hero-brand {
    position: relative;
    align-self: stretch;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%),
        radial-gradient(320px 180px at 85% 15%, rgba(232, 194, 116, 0.18), transparent 60%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.25);
    min-height: 160px;
}

.sc-hero-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 120% 120%, rgba(232, 194, 116, 0.12), transparent 60%);
    pointer-events: none;
}

.sc-hero-brand-frame {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: clamp(14px, 1.6vw, 22px) clamp(14px, 2vw, 24px);
    text-align: center;
}

.sc-hero-brand-kicker {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(240, 209, 140, 0.82);
}

.sc-hero-brand-mark {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(56px, 7vw, 92px);
    line-height: 0.9;
    background: linear-gradient(180deg, #fbe9c4 0%, #e8c274 55%, #c99a4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.01em;
    text-shadow: 0 6px 24px rgba(201, 154, 74, 0.25);
}

.sc-hero-brand-rule {
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 194, 116, 0.7), transparent);
    margin: 2px 0 4px;
}

.sc-hero-brand-tag {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.sc-hero-eyebrow {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--sc-gold);
    opacity: 0.9;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.sc-hero-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.02;
    color: #fff;
    margin: 0;
    letter-spacing: 0.005em;
    /* Layered shadow: hard dark base for legibility over any gradient,
       soft warm gold aura for the candle-lit glow. */
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(232, 194, 116, 0.18);
}

.sc-hero-sub {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 17px);
    color: rgba(255, 255, 255, 0.78);
    margin: 2px 0 0;
    max-width: 640px;
    line-height: 1.45;
}

.sc-hero-price {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(232, 194, 116, 0.16);
    border: 1px solid rgba(232, 194, 116, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #f7e2bd;
    align-self: flex-start;
    letter-spacing: 0.04em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 6px 18px rgba(232, 194, 116, 0.15);
}

/* ============ CARD GRID ============ */

.sc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* Column count follows the actual rendered card count (set by scenario.js
   as data-count on the grid). Prevents "dead" empty columns when a slot
   is dropped — e.g. breakfast (3 cards) or a dinner without wine. */
.sc-grid[data-count="1"] { grid-template-columns: 1fr; }
.sc-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.sc-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.sc-grid[data-count="4"] { grid-template-columns: repeat(4, 1fr); }

.sc-grid--empty {
    min-height: 120px;
}

/* ============ CARD (image-forward) ============ */

.sc-card {
    position: relative;
    display: block; /* neutralise the JS-set flex column */
    aspect-ratio: auto;
    min-height: 300px;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 14px 36px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition:
        transform 220ms cubic-bezier(0.22, 0.9, 0.3, 1),
        box-shadow 220ms ease,
        border-color 220ms ease;
    /* stagger entrance */
    opacity: 0;
    transform: translateY(10px);
    animation: sc-fade-up 360ms cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
}

.sc-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(232, 194, 116, 0.4);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.35),
        0 22px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(232, 194, 116, 0.22),
        0 0 36px rgba(232, 194, 116, 0.1);
}

/* Press state: 0.96 → 1 bounce via cubic-bezier, matches spec. */
.sc-card--pressed {
    transform: scale(0.96);
    border-color: rgba(232, 194, 116, 0.6);
    box-shadow:
        0 0 0 2px rgba(232, 194, 116, 0.45),
        0 10px 28px rgba(0, 0, 0, 0.5);
    transition:
        transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 140ms ease,
        border-color 140ms ease;
}

.sc-card:focus-visible {
    outline: 2px solid rgba(232, 194, 116, 0.75);
    outline-offset: 3px;
}

/* Photo fills the whole card. Default fallback is a warm neutral — each
   role below retints it so cards without a real photo still read as
   "food mood", not as empty placeholders. */
.sc-card-photo {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    background: linear-gradient(135deg, #2a2118 0%, #161210 100%) center/cover no-repeat;
    /* CRITICAL: role-based rules below use `background:` shorthand which
       resets size/position to defaults; we !important them so JS-injected
       photos crop correctly. Without these, background-size falls back to
       `auto` and the photo shows top-left at native size, not cover. */
    background-size: cover !important;
    background-position: 50% 80% !important;
    background-repeat: no-repeat !important;
    border-bottom: 0;
    transition:
        transform 500ms cubic-bezier(0.22, 0.9, 0.3, 1),
        filter 300ms ease;
    z-index: 0;
    /* Aggressive brightness lift — restaurant photos shot intentionally
       dim with candlelight ambience need significant boost to read on
       a 257×300 thumbnail. */
    filter: brightness(1.20) saturate(1.18) contrast(1.06);
}

/* Per-role warm fallback moods (only apply when no bg image is set —
   inline style from scenario.js overrides this). */
.sc-card[data-role="starter"] .sc-card-photo {
    background:
        radial-gradient(80% 60% at 20% 20%, rgba(180, 220, 140, 0.18), transparent 70%),
        linear-gradient(135deg, #2b3320 0%, #141a10 100%);
}
.sc-card[data-role="main"] .sc-card-photo {
    background:
        radial-gradient(80% 60% at 80% 20%, rgba(220, 110, 60, 0.25), transparent 70%),
        linear-gradient(135deg, #3a1e14 0%, #17090a 100%);
}
.sc-card[data-role="drink"] .sc-card-photo {
    background:
        radial-gradient(80% 60% at 20% 30%, rgba(240, 200, 130, 0.28), transparent 70%),
        linear-gradient(135deg, #2d2318 0%, #14100a 100%);
}
.sc-card[data-role="extra"] .sc-card-photo {
    background:
        radial-gradient(80% 60% at 80% 80%, rgba(240, 190, 130, 0.2), transparent 70%),
        linear-gradient(135deg, #2a241b 0%, #15120d 100%);
}

/* Noise grain disabled on real-photo cards — was making every photo look
   muddy due to mix-blend-mode: overlay at small render sizes. */
.sc-card-photo::before {
    content: none;
}

.sc-card:hover .sc-card-photo {
    transform: scale(1.04);
    filter: saturate(1.12) brightness(1.02);
}

/* Bottom fade — only enough to keep title/desc/price readable, photo top
   65% stays untouched. Was 0.35→0.78→0.95 (heavy); now 0→0.20→0.65
   starting only below 65%. */
.sc-card-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.20) 78%,
        rgba(0, 0, 0, 0.65) 100%
    );
    pointer-events: none;
}

/* Caption zone — pinned to the bottom of the card. Title / desc / price
   are three flex rows, each with a reserved height, so the price can never
   land on top of the title (the previous bug: .sc-card-price was
   position:absolute inside an absolutely positioned body, which made
   top:10px resolve against the body's own top edge — right on the title). */
.sc-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
    z-index: 2;
    pointer-events: none;
}

/* Role kicker — sits above the title, signals the slot in the dining
   sequence (starter / main / drink / extra). Kept small, uppercase, a
   soft gold accent tied to the hero eyebrow and price pill. */
.sc-card-role {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(240, 209, 140, 0.82);
    line-height: 1.1;
    margin: 0;
    text-shadow:
        0 1px 6px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(232, 194, 116, 0.22);
}

.sc-card-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: clamp(17px, 1.5vw, 22px);
    color: #fff;
    line-height: 1.18;
    letter-spacing: 0.005em;
    text-shadow:
        0 2px 14px rgba(0, 0, 0, 0.85),
        0 0 24px rgba(0, 0, 0, 0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* reserve exactly 2 lines so the title zone never grows/shrinks */
    min-height: 2.36em;
    max-height: 2.36em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sc-card-desc {
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.4em;
    max-height: 1.4em;
    overflow-wrap: anywhere;
    letter-spacing: 0.01em;
}

/* Price: gold pill anchored bottom-right of the caption. Stronger
   glow ties it to the hero eyebrow and the "Главная" topbar button. */
.sc-card-price {
    position: static;
    align-self: flex-end;
    margin: 4px 0 0 0;
    padding: 5px 11px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--sc-gold-bright) 0%, var(--sc-gold-deep) 100%);
    color: #0b0b0d;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.01em;
    line-height: 1.2;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 4px 14px rgba(201, 154, 74, 0.45),
        0 0 22px rgba(232, 194, 116, 0.25);
    pointer-events: none;
    white-space: nowrap;
}

/* ============ STAGGER ENTRANCE ============ */

@keyframes sc-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sc-card:nth-child(1)  { animation-delay:  40ms; }
.sc-card:nth-child(2)  { animation-delay:  80ms; }
.sc-card:nth-child(3)  { animation-delay: 120ms; }
.sc-card:nth-child(4)  { animation-delay: 160ms; }
.sc-card:nth-child(5)  { animation-delay: 200ms; }
.sc-card:nth-child(6)  { animation-delay: 240ms; }
.sc-card:nth-child(7)  { animation-delay: 280ms; }
.sc-card:nth-child(8)  { animation-delay: 320ms; }
.sc-card:nth-child(9)  { animation-delay: 360ms; }
.sc-card:nth-child(10) { animation-delay: 400ms; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sc-hero,
    .sc-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .sc-card:hover,
    .sc-card:hover .sc-card-photo {
        transform: none;
    }
}

/* ============ INFO STRIP ============ */

.sc-info {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-info-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
}

.sc-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(232, 194, 116, 0.12);
    color: #e8c274;
    font-size: 13px;
    font-weight: 600;
}

/* ============ ACTIONS ============ */

.sc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.sc-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    height: 56px;
    padding: 0 20px;
    border-radius: 12px;
    min-width: 0;
    transition:
        transform 160ms ease,
        box-shadow 200ms ease,
        background 200ms ease,
        color 200ms ease,
        border-color 200ms ease;
}

.sc-btn:active {
    transform: scale(0.98);
}

.sc-btn-primary {
    background: linear-gradient(135deg, var(--sc-gold-bright) 0%, var(--sc-gold-deep) 100%);
    color: #0b0b0d;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 10px 26px rgba(201, 154, 74, 0.38),
        0 0 32px rgba(232, 194, 116, 0.18);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sc-btn-primary:hover {
    background: linear-gradient(135deg, #fdefd2 0%, #d9ad5e 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 14px 36px rgba(201, 154, 74, 0.55),
        0 0 48px rgba(232, 194, 116, 0.35);
    transform: translateY(-1px);
}

.sc-btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(232, 194, 116, 0.55);
    color: var(--sc-gold);
    box-shadow:
        0 0 0 1px rgba(232, 194, 116, 0.25),
        0 10px 24px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(232, 194, 116, 0.1);
    transform: translateY(-1px);
}

/* ============ RESPONSIVE ============ */

/* Topbar: collapse 3-col to stacked on tablet+mobile (mirrors menu/wine) */
@media (max-width: 960px) {
    body.page-scenario .page-topbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 14px;
    }
    body.page-scenario .topbar-nav { justify-content: center; gap: 10px; }
    body.page-scenario .topbar-btn { min-width: 130px; }
    body.page-scenario .topbar-center { order: -1; }
    body.page-scenario .topbar-lang { justify-content: center; }
}

/* Hero collapses to 1-col under tablet width; brand block stays as a slim
   decorative side-card so the composition still reads as deliberate. */
@media (max-width: 900px) {
    .sc-grid,
    .sc-grid[data-count="4"],
    .sc-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .sc-hero {
        padding: 24px 20px;
        height: auto;
        min-height: 220px;
    }
    .sc-hero-inner {
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: flex-start;
    }
    .sc-hero-brand {
        min-height: 92px;
        align-self: stretch;
    }
    .sc-hero-brand-frame {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        text-align: left;
    }
    .sc-hero-brand-mark { font-size: 44px; }
    .sc-hero-brand-rule {
        width: 1px;
        height: 28px;
        background: linear-gradient(180deg, transparent, rgba(232, 194, 116, 0.7), transparent);
        margin: 0;
    }
}

@media (max-width: 600px) {
    .sc-grid,
    .sc-grid[data-count] { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    body.page-scenario .topbar-btn { min-width: 0; flex: 1 1 0; }
}

@media (max-width: 400px) {
    .sc-grid,
    .sc-grid[data-count] { grid-template-columns: 1fr; }
    .sc-actions { grid-template-columns: 1fr; }
}


/* ============================================================================
   STAGE 17D — SCENARIO PAGES PREMIUM POLISH (additive, scoped to .page-scenario)
   Reuses --s17-* tokens defined in :root in kiosk.css (Stage 17A).
   Touches only:
     * .sc-card / .sc-card-photo  — transition ease + sticky-hover fix
     * .sc-card-title / .sc-hero-title  — DE/TR/HU long-word safety
     * .sc-info / .sc-info-icon  — radius + gold tint
     * .sc-btn  — transition ease + focus ring
     * .sc-grid--empty  — premium loading state
   Untouched: hero photos, brand placeholder, palette, layout grid, topbar,
   sc-card-price (gold pill kept as-is — already premium for this context),
   scenario.js, JS-injected card structure, business logic.
   Reversible: delete this block.
   ============================================================================ */

/* ---- 1. Hero + card title — language safety (DE / TR / HU compounds) ---- */
.page-scenario .sc-hero-title {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}
.page-scenario .sc-card-title {
    hyphens: auto;
}

/* ---- 2. Card + photo transitions — unify ease with Stage 17 system ---- */
.page-scenario .sc-card {
    transition:
        transform 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}
.page-scenario .sc-card-photo {
    transition:
        transform 600ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        filter 320ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}

/* ---- 3. Sticky :hover fix — touch devices skip lift, get press-scale ---- */
@media (hover: none) {
    .page-scenario .sc-card:hover {
        transform: none;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.3),
            0 14px 36px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
    .page-scenario .sc-card:hover .sc-card-photo {
        transform: none;
        filter: brightness(1.20) saturate(1.18) contrast(1.06);
    }
    .page-scenario .sc-card:active {
        transform: scale(0.985);
    }
}

/* ---- 4. Info strip — unified radius + gold tint border ---- */
.page-scenario .sc-info {
    border-radius: var(--s17-radius-card, 18px);
    border-color: var(--s17-line, rgba(230, 162, 58, 0.20));
}
.page-scenario .sc-info-icon {
    background: rgba(230, 162, 58, 0.16);
    color: var(--accent-2, #f0d28b);
}

/* ---- 5. Action buttons — Stage 17 motion ease + a11y focus ring ---- */
.page-scenario .sc-btn {
    transition:
        transform 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        background 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        color 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
        filter 220ms var(--s17-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}
.page-scenario .sc-btn:focus-visible {
    outline: 2px solid var(--accent-2, #f0d28b);
    outline-offset: 3px;
}

/* ---- 6. Empty grid state — premium dashed gold placeholder while
        scenario.js fetches /data/menu.json ---- */
.page-scenario .sc-grid--empty {
    border-radius: var(--s17-radius-card, 18px);
    border: 1px dashed var(--s17-line, rgba(230, 162, 58, 0.20));
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.015) 0%,
        rgba(0, 0, 0, 0.20) 100%);
}

/* ============================================================================
   END STAGE 17D POLISH
   ============================================================================ */
