/* lunch.day v2 — terminal aesthetic, sunset-warm, glassmorphic-cards, particle-effects */

:root {
    --c-coffee: #1A0F08;
    --c-ember: #2A1810;
    --c-coral: #FF7B54;
    --c-gold: #FFB26B;
    --c-pink: #FFD56B;
    --c-cream: #FFE8D4;
    --c-green: #7FE5B0;
    --c-glass: rgba(255, 235, 210, 0.10);
    --c-glass-strong: rgba(255, 235, 210, 0.18);
    --c-line: rgba(255, 235, 210, 0.14);
    --c-shadow: 0 20px 60px rgba(255, 123, 84, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    --font-display: "Jost", "Futura", "Trebuchet MS", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--c-coffee);
    color: var(--c-cream);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    letter-spacing: 0.005em;
}

/* Sunset radial field — warmth bleeding from upper third */
.sunset-field {
    position: fixed;
    inset: -10vh -10vw 50vh -10vw;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 30% 0%, rgba(255, 123, 84, 0.55) 0%, rgba(255, 178, 107, 0.18) 30%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 10%, rgba(255, 213, 107, 0.30) 0%, transparent 50%),
        linear-gradient(180deg, rgba(42, 24, 16, 0.0) 0%, rgba(26, 15, 8, 0.95) 70%);
    filter: saturate(115%);
}

/* Particle canvas */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Terminal scanlines overlay */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(255, 123, 84, 0.030) 3px,
        transparent 4px
    );
    mix-blend-mode: screen;
    opacity: 0.6;
}

main {
    position: relative;
    z-index: 5;
}

/* ---------- SECTIONS ---------- */
.section {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(56px, 8vh, 120px) clamp(20px, 4vw, 56px);
    position: relative;
}

.section-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(40px, 6vh, 80px);
}

.section-panel {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-header {
    margin-bottom: 8px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-coral);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 123, 84, 0.4);
    border-radius: 4px;
    background: rgba(255, 123, 84, 0.06);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--c-cream);
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin-bottom: 6px;
}

.section-sub {
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255, 232, 212, 0.6);
    letter-spacing: 0.04em;
}

/* ---------- TERMINAL BAR + PROMPT ---------- */
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--c-line);
    border-radius: 10px 10px 0 0;
    background: rgba(42, 24, 16, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 720px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red    { background: #FF6259; box-shadow: 0 0 6px rgba(255, 98, 89, 0.6); }
.dot-yellow { background: #FFBD2E; box-shadow: 0 0 6px rgba(255, 189, 46, 0.6); }
.dot-green  { background: #28C840; box-shadow: 0 0 6px rgba(40, 200, 64, 0.6); }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 232, 212, 0.6);
    margin-left: 12px;
    letter-spacing: 0.04em;
}

.terminal-prompt {
    font-family: var(--font-mono);
    font-size: clamp(13px, 1.4vw, 16px);
    color: var(--c-cream);
    padding: 18px 18px 24px;
    border: 1px solid var(--c-line);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: rgba(20, 12, 6, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 720px;
    margin-bottom: 36px;
}

.prompt-sigil {
    color: var(--c-green);
    margin-right: 10px;
}

.caret {
    color: var(--c-green);
    margin-left: 1px;
    animation: caret 1s steps(2, end) infinite;
}

@keyframes caret {
    50% { opacity: 0; }
}

/* ---------- GLASSMORPHIC CARD BASE ---------- */
.glass-card {
    background: var(--c-glass);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--c-glass-strong);
    border-radius: 18px;
    box-shadow: var(--c-shadow);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 178, 107, 0.10) 0%, transparent 30%, rgba(255, 213, 107, 0.06) 100%);
    pointer-events: none;
}

.glass-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 232, 212, 0.4) 50%, transparent 100%);
    pointer-events: none;
}

/* ---------- TITLE CARD (HERO) ---------- */
.title-card {
    padding: clamp(28px, 4vw, 48px);
    max-width: 900px;
    transform: translateY(24px);
    opacity: 0;
    animation: rise 800ms var(--ease) 600ms forwards;
}

.title-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 232, 212, 0.7);
    margin-bottom: 18px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 0 0 rgba(127, 229, 176, 0.6);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(127, 229, 176, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(127, 229, 176, 0); }
    100% { box-shadow: 0 0 0 0 rgba(127, 229, 176, 0); }
}

.status-label { color: rgba(255, 232, 212, 0.55); }
.status-value { color: var(--c-green); font-weight: 500; }

.wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(56px, 11vw, 156px);
    line-height: 0.96;
    letter-spacing: -0.04em;
    color: var(--c-cream);
    background: linear-gradient(180deg, #FFE8D4 0%, #FFB26B 70%, #FF7B54 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 18px;
    text-shadow: 0 0 60px rgba(255, 178, 107, 0.20);
}

.tagline {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(15px, 1.3vw, 19px);
    color: rgba(255, 232, 212, 0.85);
    margin-bottom: 32px;
    max-width: 560px;
}

.title-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px dashed var(--c-line);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: clamp(20px, 2.4vw, 30px);
    color: var(--c-coral);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: rgba(255, 232, 212, 0.55);
}

@keyframes rise {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scroll-hint {
    margin-top: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 232, 212, 0.55);
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

.scroll-arrow {
    display: inline-block;
    animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

/* ---------- MENU CARDS ---------- */
.section-panel .card {
    padding: 28px;
    transition: transform 380ms var(--ease), filter 380ms var(--ease), opacity 380ms var(--ease), box-shadow 380ms var(--ease);
    cursor: pointer;
    transform: translateY(24px);
    opacity: 0;
}

.card.in-view {
    transform: translateY(0);
    opacity: 1;
}

.card:hover {
    transform: translateY(-2px) scale(1.015);
    filter: brightness(1.08) saturate(110%);
    box-shadow: 0 30px 80px rgba(255, 123, 84, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.card-id { color: var(--c-gold); }

.card-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 500;
}

.card-status.running {
    color: var(--c-green);
    background: rgba(127, 229, 176, 0.10);
    border: 1px solid rgba(127, 229, 176, 0.30);
}

.card-status.queued {
    color: var(--c-gold);
    background: rgba(255, 178, 107, 0.10);
    border: 1px solid rgba(255, 178, 107, 0.30);
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.5vw, 30px);
    color: var(--c-cream);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.card-body {
    font-size: 15px;
    color: rgba(255, 232, 212, 0.78);
    margin-bottom: 18px;
}

.data-list {
    list-style: none;
    margin-bottom: 22px;
    border-top: 1px solid var(--c-line);
}

.data-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 232, 212, 0.75);
    border-bottom: 1px dashed var(--c-line);
    letter-spacing: 0.02em;
}

.data-list li span:first-child {
    color: rgba(255, 232, 212, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.data-list li span:last-child {
    color: var(--c-cream);
}

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
}

.btn-execute {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--c-cream);
    background: linear-gradient(135deg, var(--c-coral) 0%, #E85B30 100%);
    border: 1px solid rgba(255, 232, 212, 0.20);
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 220ms var(--ease), filter 220ms var(--ease), box-shadow 220ms var(--ease);
    box-shadow: 0 6px 18px rgba(255, 123, 84, 0.30);
}

.btn-execute:hover {
    transform: translateY(-1px);
    filter: brightness(1.10);
    box-shadow: 0 10px 26px rgba(255, 123, 84, 0.42);
}

.btn-execute.btn-ghost {
    background: transparent;
    color: var(--c-coral);
    border: 1px solid rgba(255, 123, 84, 0.40);
    box-shadow: none;
}

.btn-execute.btn-ghost:hover {
    background: rgba(255, 123, 84, 0.10);
    color: var(--c-cream);
}

.card-tick {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 232, 212, 0.45);
    letter-spacing: 0.06em;
}

#menu, #uptime {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

#menu .section-header,
#uptime .section-header,
#reservations .section-header,
#commands .section-header {
    grid-column: 1 / -1;
}

/* ---------- RESERVATIONS BOARD ---------- */
.reservation-board {
    padding: 24px clamp(20px, 3vw, 36px);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 600ms var(--ease), opacity 600ms var(--ease);
}

.reservation-board.in-view {
    transform: translateY(0);
    opacity: 1;
}

.board-row {
    display: grid;
    grid-template-columns: 90px 1fr 90px 110px;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px dashed var(--c-line);
    font-family: var(--font-display);
    font-size: 15px;
}

.board-head {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 232, 212, 0.50);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-top: 6px;
}

.board-row .mono {
    font-family: var(--font-mono);
    color: var(--c-gold);
}

.state {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid;
    justify-self: end;
    min-width: 90px;
}

.state.seated  { color: var(--c-green); background: rgba(127, 229, 176, 0.08); border-color: rgba(127, 229, 176, 0.30); }
.state.plating { color: var(--c-coral); background: rgba(255, 123, 84, 0.10);  border-color: rgba(255, 123, 84, 0.30); }
.state.queued  { color: var(--c-gold);  background: rgba(255, 178, 107, 0.08); border-color: rgba(255, 178, 107, 0.30); }

.board-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 232, 212, 0.70);
}

.board-foot strong {
    color: var(--c-coral);
    font-weight: 500;
}

/* ---------- METRICS ---------- */
.uptime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.metric-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 600ms var(--ease), opacity 600ms var(--ease);
}

.metric-card.in-view {
    transform: translateY(0);
    opacity: 1;
}

.metric-card.wide {
    grid-column: 1 / -1;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 232, 212, 0.55);
}

.metric-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 4vw, 56px);
    color: var(--c-cream);
    letter-spacing: -0.02em;
    line-height: 1;
}

.metric-value .unit {
    font-family: var(--font-mono);
    font-size: 0.4em;
    color: var(--c-coral);
    margin-left: 4px;
    letter-spacing: 0;
    font-weight: 500;
}

.metric-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 232, 212, 0.08);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--c-line);
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-coral), var(--c-gold), var(--c-pink));
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 178, 107, 0.5);
}

.metric-foot {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 232, 212, 0.50);
    letter-spacing: 0.06em;
}

.incident-list {
    list-style: none;
    margin-top: 4px;
}

.incident-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--c-line);
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255, 232, 212, 0.80);
    letter-spacing: 0.02em;
}

.incident-list li:last-child { border-bottom: 0; }

.severity {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 3px 10px;
    border-radius: 4px;
    min-width: 56px;
    text-align: center;
    border: 1px solid;
}

.severity.ok   { color: var(--c-green); background: rgba(127, 229, 176, 0.08); border-color: rgba(127, 229, 176, 0.30); }
.severity.warn { color: var(--c-gold);  background: rgba(255, 178, 107, 0.10); border-color: rgba(255, 178, 107, 0.34); }
.severity.info { color: var(--c-coral); background: rgba(255, 123, 84, 0.10);  border-color: rgba(255, 123, 84, 0.30); }

/* ---------- COMMANDS / MAN PAGE ---------- */
.commands {
    padding: 28px;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 600ms var(--ease), opacity 600ms var(--ease);
}

.commands.in-view {
    transform: translateY(0);
    opacity: 1;
}

.man-page {
    font-family: var(--font-mono);
    font-size: clamp(13px, 1.1vw, 15px);
    line-height: 1.65;
    color: rgba(255, 232, 212, 0.85);
    white-space: pre-wrap;
    overflow-x: auto;
}

.man-h {
    color: var(--c-coral);
    font-weight: 500;
    letter-spacing: 0.10em;
}

.man-page .opt {
    color: var(--c-gold);
}

.man-page var {
    color: var(--c-pink);
    font-style: italic;
}

/* ---------- ZOOM-FOCUS STATE ---------- */
body[data-focus] .card,
body[data-focus] .reservation-board,
body[data-focus] .commands {
    transition: transform 480ms var(--ease), filter 480ms var(--ease), opacity 480ms var(--ease);
}

body[data-focus] .card:not([data-id]),
body[data-focus] .reservation-board:not([data-id]) {
    /* placeholder for safety */
}

body[data-focus="menu"]    [data-id]:not([data-id="menu"]),
body[data-focus="menu-2"]  [data-id]:not([data-id="menu-2"]),
body[data-focus="menu-3"]  [data-id]:not([data-id="menu-3"]),
body[data-focus="reservations"] [data-id]:not([data-id="reservations"]) {
    filter: blur(4px) brightness(0.55);
    opacity: 0.45;
    transform: scale(0.985);
}

body[data-focus="menu"]    [data-id="menu"],
body[data-focus="menu-2"]  [data-id="menu-2"],
body[data-focus="menu-3"]  [data-id="menu-3"],
body[data-focus="reservations"] [data-id="reservations"] {
    transform: scale(1.04);
    filter: brightness(1.10) saturate(115%);
    box-shadow: 0 40px 100px rgba(255, 123, 84, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    z-index: 30;
    position: relative;
}

/* ---------- TELEMETRY FOOTER ---------- */
.telemetry {
    margin-top: 80px;
    padding: 32px clamp(20px, 4vw, 56px) 56px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    border-top: 1px solid var(--c-line);
    position: relative;
    z-index: 5;
}

.telemetry-head {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 232, 212, 0.65);
    margin-bottom: 18px;
    letter-spacing: 0.10em;
    flex-wrap: wrap;
}

.telemetry-led {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-coral);
    box-shadow: 0 0 10px var(--c-coral);
    animation: pulse 2s ease-in-out infinite;
}

.telemetry-title { color: var(--c-coral); text-transform: uppercase; letter-spacing: 0.14em; }
.telemetry-host  { color: rgba(255, 232, 212, 0.45); margin-left: auto; }

.telemetry-list {
    list-style: none;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--c-line);
    border-radius: 10px;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255, 232, 212, 0.85);
    line-height: 1.8;
    min-height: 180px;
    overflow: hidden;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

.telemetry-list li {
    display: flex;
    gap: 16px;
    align-items: baseline;
    border-bottom: 1px dashed rgba(255, 232, 212, 0.06);
    padding: 4px 0;
    opacity: 0;
    transform: translateX(-6px);
    animation: slidein 380ms var(--ease) forwards;
}

.telemetry-list li:last-child { border-bottom: 0; }

.telemetry-list .ts   { color: var(--c-coral); }
.telemetry-list .code { color: var(--c-gold); text-transform: uppercase; letter-spacing: 0.10em; }
.telemetry-list .meta { color: rgba(255, 232, 212, 0.65); }

@keyframes slidein {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.telemetry-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 232, 212, 0.40);
    letter-spacing: 0.10em;
    flex-wrap: wrap;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .section-hero { min-height: 100vh; padding-top: 32px; }
    .terminal-bar, .terminal-prompt { max-width: 100%; }
    .title-card-stats { grid-template-columns: 1fr 1fr; }
    .board-row {
        grid-template-columns: 70px 1fr 80px;
        font-size: 13px;
    }
    .board-row .state { grid-column: 2 / 4; justify-self: start; min-width: 80px; }
    .board-head .state { display: none; }
    .telemetry-host { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 480px) {
    .title-card-stats { grid-template-columns: 1fr; }
    .data-list li { font-size: 11px; }
    .card-foot { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
