/* Hallmark · macrostructure: custom (tab-bar-led) · tone: warm late-night · anchor hue: espresso 50° + MUVE blue 234°
 * theme: custom — studied from the Muve app (appTheme.ts darkTokens) · paper oklch(20.4% 0.008 50) · accent oklch(85.4% 0.061 234)
 * display: Muve (bubble lettering, hero/closing only) + Nunito 900 · body: Nunito · nav: N5 floating glass pill · footer: hairline row
 * enrichment: app UI rendered in CSS glass (no phone frame) · axes: dark / rounded-sans / cool accent on warm paper
 */

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-3xl);
  padding-block: var(--space-4xl) var(--space-3xl);
}
.hero__copy { min-width: 0; }
.hero__mark { width: min(100%, 34rem); margin-bottom: var(--space-2xl); filter: drop-shadow(0 18px 40px oklch(0% 0 0 / 0.35)); }
.hero__title {
  font-weight: 900; font-size: var(--text-2xl); letter-spacing: -0.015em; line-height: 1.05;
  max-width: 16ch;
}
.hero__lede { margin-top: var(--space-lg); max-width: var(--measure); color: var(--color-text-2); font-size: var(--text-lg); font-weight: 600; }
.hero__lede strong { color: var(--color-text); font-weight: 800; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-2xl); }

/* The deck — the app's HeroDeck card stack */
.hero__deck { position: relative; justify-self: center; width: min(100%, 22rem); aspect-ratio: 3 / 4.1; }
.deck-card { position: absolute; inset: 0; border-radius: var(--radius-lg); }
.deck-card--back { transform: translate(8%, -6%) rotate(7deg) scale(0.92); opacity: 0.45; }
.deck-card--mid { transform: translate(4%, -3%) rotate(3.5deg) scale(0.96); opacity: 0.7; }
.deck-card--front {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-glass-strong);
  box-shadow: 0 30px 80px oklch(0% 0 0 / 0.45);
  transform: rotate(-2deg);
}
.deck-card__art {
  flex: 1; position: relative; padding: var(--space-md);
  background:
    radial-gradient(60% 55% at 70% 30%, oklch(78% 0.13 60 / 0.9), transparent 70%),
    radial-gradient(50% 50% at 25% 75%, oklch(52% 0.12 20 / 0.8), transparent 70%),
    radial-gradient(40% 40% at 85% 85%, oklch(45% 0.08 300 / 0.7), transparent 70%),
    var(--color-page-deep);
}
.deck-card__body { padding: var(--space-lg); display: grid; gap: var(--space-xs); }
.deck-card__when { color: var(--color-text-3); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.02em; }
.deck-card__title { font-weight: 900; font-size: var(--text-lg); line-height: 1.15; }
.deck-card__who { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-text-2); font-size: var(--text-xs); font-weight: 700; }
.deck-card__actions { display: flex; gap: var(--space-xs); margin-top: var(--space-xs); }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill);
  background: var(--color-glass); border: var(--rule);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: var(--text-xs); font-weight: 800;
}
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-live); box-shadow: 0 0 0 3px oklch(78% 0.15 160 / 0.25); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.25rem; padding: 0 var(--space-md); border-radius: var(--radius-pill);
  background: var(--color-fill); color: var(--color-text); font-size: var(--text-sm); font-weight: 800; white-space: nowrap;
}
.pill--down { background: var(--color-cta); color: var(--color-cta-text); }
.pill--wide { width: 100%; min-height: 2.75rem; }

.faces { display: inline-flex; }
.faces i {
  width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--color-page);
  background: linear-gradient(135deg, oklch(72% 0.09 55), oklch(48% 0.08 30));
}
.faces i + i { margin-left: -0.5rem; }
.faces i:nth-child(2) { background: linear-gradient(135deg, var(--color-accent), oklch(55% 0.08 250)); }
.faces i:nth-child(3) { background: linear-gradient(135deg, oklch(80% 0.07 90), oklch(50% 0.06 140)); }
.faces i:nth-child(4) { background: linear-gradient(135deg, oklch(70% 0.1 20), oklch(42% 0.09 350)); }
.faces i:nth-child(5) { background: linear-gradient(135deg, oklch(75% 0.05 300), oklch(45% 0.07 280)); }

/* ---------- Inside: the tab bar ---------- */
.inside { padding-block: var(--space-3xl); }
.inside__title { font-weight: 900; font-size: var(--text-2xl); letter-spacing: -0.015em; max-width: 18ch; }

.tabbar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  width: min(100%, 34rem); margin-top: var(--space-2xl); padding: var(--space-xs);
  border-radius: var(--radius-pill); background: var(--color-glass-strong);
}
.tabbar[hidden] { display: none; }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  min-height: 2.75rem; padding: 0 var(--space-2xs); border-radius: var(--radius-pill);
  color: var(--color-text-3); font: 800 var(--text-sm) / 1 var(--font-body); white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.tab:hover { color: var(--color-text); }
.tab[aria-selected="true"] { color: var(--color-accent); background: var(--color-fill-soft); }
.tab--center { display: grid; place-items: center; }
.tab--center .tab__ring {
  display: grid; place-items: center; width: 3.75rem; height: 3.75rem; margin-block: -0.75rem;
  border-radius: 50%; background: var(--color-glass); border: 1px solid var(--color-glass-edge-strong);
  -webkit-backdrop-filter: blur(var(--blur-glass)); backdrop-filter: blur(var(--blur-glass));
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tab--center[aria-selected="true"] { background: none; }
.tab--center[aria-selected="true"] .tab__ring { background: var(--color-accent); color: var(--color-cta-text); border-color: transparent; }
.tab:focus-visible { border-radius: var(--radius-pill); }

/* Panels stack in one grid cell so switching tabs never changes page height */
.panels { margin-top: var(--space-2xl); }
.panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-3xl);
}
.panel + .panel { margin-top: var(--space-3xl); }
.tabs-ready .panels { display: grid; }
.tabs-ready .panel { grid-area: 1 / 1; margin: 0; visibility: hidden; opacity: 0; transition: opacity var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med); }
.tabs-ready .panel.is-active { visibility: visible; opacity: 1; transition: opacity var(--dur-med) var(--ease-out); }

.panel__copy { min-width: 0; }
.panel__word { font-family: var(--font-display); font-weight: 400; font-size: var(--text-display); line-height: 0.95; letter-spacing: 0.01em; }
.panel__head { margin-top: var(--space-lg); font-weight: 900; font-size: var(--text-xl); line-height: 1.15; }
.panel__text { margin-top: var(--space-sm); max-width: var(--measure); color: var(--color-text-2); font-size: var(--text-lg); }

.panel__show { min-width: 0; padding: var(--space-lg); min-height: 17rem; display: flex; flex-direction: column; justify-content: center; gap: var(--space-md); }

/* Tonight rows */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.rows li { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm); border-radius: var(--radius-md); background: var(--color-fill-soft); }
.rows b { display: block; font-weight: 800; }
.rows small { display: block; color: var(--color-text-3); font-size: var(--text-xs); font-weight: 700; }
.rows__thumb { flex-shrink: 0; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-sm); }
.rows__thumb--a { background: radial-gradient(circle at 30% 30%, oklch(78% 0.13 60), oklch(40% 0.09 30)); }
.rows__thumb--b { background: radial-gradient(circle at 70% 30%, oklch(75% 0.14 40), oklch(38% 0.08 10)); }
.rows__thumb--c { background: radial-gradient(circle at 40% 60%, var(--color-accent), oklch(40% 0.06 250)); }

/* Map */
.panel__show--map {
  position: relative; overflow: hidden;
  background:
    linear-gradient(var(--color-fill-soft) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    linear-gradient(90deg, var(--color-fill-soft) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    radial-gradient(70% 60% at 60% 45%, var(--color-ember), transparent 70%),
    var(--color-glass-strong);
}
.pin { position: absolute; width: 1.1rem; height: 1.1rem; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--color-cta); box-shadow: 0 6px 16px oklch(0% 0 0 / 0.4); }
.pin--a { left: 22%; top: 30%; }
.pin--b { left: 64%; top: 22%; }
.pin--d { left: 74%; top: 62%; }
.pin--you { left: 44%; top: 56%; width: 1rem; height: 1rem; border-radius: 50%; transform: none; background: var(--color-accent); box-shadow: 0 0 0 0.5rem var(--color-accent-soft); }

/* Plans itinerary */
.itinerary { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.itinerary li { display: flex; align-items: baseline; gap: var(--space-md); padding: var(--space-sm) var(--space-md); border-left: 2px solid var(--color-accent); background: var(--color-fill-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.itinerary time { color: var(--color-accent); font-weight: 900; font-variant-numeric: tabular-nums; min-width: 3ch; }
.itinerary span { font-weight: 800; }

/* Chat bubbles */
.bubbles { display: grid; gap: var(--space-xs); }
.bubble { justify-self: start; max-width: 80%; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--space-2xs); background: var(--color-fill); font-weight: 700; }
.bubble--me { justify-self: end; border-radius: var(--radius-md) var(--radius-md) var(--space-2xs) var(--radius-md); background: var(--color-accent); color: var(--color-cta-text); }

/* You */
.panel__show--you { align-items: center; }
.avatar--lg { width: 5.5rem; height: 5.5rem; border-radius: 50%; border: 3px solid var(--color-glass-edge-strong); background: linear-gradient(135deg, oklch(72% 0.09 55), oklch(42% 0.08 30)); }
.faces--row i { width: 2.25rem; height: 2.25rem; }
.faces--row i + i { margin-left: -0.6rem; }

/* ---------- Close ---------- */
.close { display: grid; justify-items: center; gap: var(--space-2xl); padding-block: var(--space-4xl) var(--space-2xl); text-align: center; }
.close__title { font-family: var(--font-display); font-weight: 400; font-size: var(--text-display); line-height: 1; max-width: 12ch; }

/* ---------- Motion (entrance only, once) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise var(--dur-slow) var(--ease-out) both; }
  .hero__copy > :nth-child(2) { animation-delay: 60ms; }
  .hero__copy > :nth-child(3) { animation-delay: 120ms; }
  .hero__copy > :nth-child(4) { animation-delay: 180ms; }
  .deck-card--front { animation: settle 900ms var(--ease-out) 200ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes settle { from { opacity: 0; transform: translateY(24px) rotate(4deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-3xl); min-height: 0; padding-block: var(--space-2xl) var(--space-3xl); }
  .hero__deck { width: min(78%, 20rem); }
  .panel { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
}
@media (max-width: 30rem) {
  .hero__actions .btn { width: 100%; }
  .tab { font-size: var(--text-xs); }
  .tab--center .tab__ring { width: 3.25rem; height: 3.25rem; }
  .panel__show { padding: var(--space-md); }
}
