/* ─────────────────────────────────────────────────────────────────────
   Wowasist Brand Tokens — single source of truth for all surfaces.
   Direction: Editorial Travel (NYT Travel / Monocle / Tablet Hotels).
   See BRAND.md in the repo root for the full voice + wording inventory.
   Last updated: 2026-05-27.
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* ── Primary: Wowasist Teal (kept from prior brand — distinctive, recognisable) ── */
  --teal-900: #04342C;   /* Deep — headlines on accent, footer */
  --teal-700: #0F6E56;   /* Default primary — links, brand mark */
  --teal-500: #1D9E75;   /* Hover, accent fills */
  --teal-300: #5DCAA5;   /* Secondary, badges */
  --teal-100: #9FE1CB;   /* Subtle backgrounds, hover surfaces */
  --teal-50:  #E1F5EE;   /* Section surfaces */

  /* ── Ink: warm-black text stack (replaces the cold grays) ── */
  --ink-900: #161512;    /* Display headings, primary text */
  --ink-700: #2E2A24;    /* Body text */
  --ink-500: #5C5750;    /* Secondary text, captions */
  --ink-300: #9A938A;    /* Meta, kicker, faint labels */
  --rule:    #E8E2D7;    /* Hair-fine dividers — replaces hard borders */

  /* ── Surface: warm off-whites (never pure #FFFFFF) ── */
  --bg-page:    #FBF8F3; /* Page background — warm off-white */
  --bg-surface: #FFFFFF; /* Card surface — clean white inside the warm shell */
  --bg-soft:    #F4EFE6; /* Alt rows, hover, very subtle differentiation */

  /* ── Accent: amber, used SPARINGLY (max 10% of any composition) ── */
  --amber-500: #EF9F27;  /* Primary CTAs, prices, single highlight per view */
  --amber-200: #FAC775;  /* Hover */
  --amber-50:  #FAEEDA;  /* Callout/hint surfaces only */

  /* ── Semantic aliases — what UI code references (stable API) ── */
  --primary:        var(--teal-700);
  --primary-light:  var(--teal-500);
  --primary-dark:   var(--teal-900);
  --primary-bg:     var(--teal-50);
  --accent:         var(--amber-500);
  --accent-hover:   var(--amber-200);
  --accent-bg:      var(--amber-50);
  --text:           var(--ink-900);
  --text-muted:     var(--ink-500);
  --text-faint:     var(--ink-300);
  --border:         var(--rule);
  --border-faint:   var(--rule);
  --bg:             var(--bg-page);
  --bg-hover:       var(--bg-soft);

  /* ── Typography ── */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Font-feature settings for Fraunces (variable axes) */
  --display-features: "opsz" 144, "SOFT" 50;
  --display-italic-features: "opsz" 24, "SOFT" 100;

  /* ── Spacing scale (8pt grid, generous defaults) ── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-8: 48px;
  --s-10: 64px;
  --s-12: 80px;

  /* ── Editorial measure (reading width caps) ── */
  --measure-narrow: 480px;
  --measure-text:   620px;
  --measure-wide:   760px;
}

/* ─────────────────────────────────────────────────────────────────────
   Page baseline — overrides the Tailwind body defaults so the editorial
   warm off-white wins on ALL surfaces without per-page CSS changes.
   ───────────────────────────────────────────────────────────────────── */
html, body {
  background: var(--bg-page) !important;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─────────────────────────────────────────────────────────────────────
   Editorial utility classes — use these on new views (P1+).
   Co-exists with Tailwind utilities on existing views (no breakage).
   Prefix `wow-` so they're easy to grep and won't collide.
   ───────────────────────────────────────────────────────────────────── */

.wow-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  font-variation-settings: var(--display-features);
  color: var(--ink-900);
}

.wow-display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: var(--display-italic-features);
}

.wow-kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.wow-rationale {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-500);
  font-variation-settings: var(--display-italic-features);
}

.wow-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.wow-card {
  background: var(--bg-surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.wow-btn-text {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  background: none;
  border: 0;
  padding: var(--s-2) 0;
  cursor: pointer;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
.wow-btn-text:hover { border-bottom-color: var(--ink-900); }
.wow-btn-text.primary { color: var(--primary); }
.wow-btn-text.primary:hover { border-bottom-color: var(--primary); }
.wow-btn-text.muted { color: var(--ink-300); }
.wow-btn-text .arrow { display: inline-block; margin-left: 4px; transition: transform 120ms ease; }
.wow-btn-text:hover .arrow { transform: translateX(2px); }

/* ─────────────────────────────────────────────────────────────────────
   Tab bar — editorial underline style (replaces pill-tabs).
   ───────────────────────────────────────────────────────────────────── */

.wow-tabbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--s-5);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-6);
}

.wow-tabs {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.wow-tab {
  background: none;
  border: 0;
  padding: var(--s-3) 0 var(--s-4);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  cursor: pointer;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 120ms ease;
}
.wow-tab:hover { color: var(--ink-900); }
.wow-tab.is-active { color: var(--ink-900); font-weight: 600; }
.wow-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink-900);
}

/* ─────────────────────────────────────────────────────────────────────
   "Diese Woche" — editorial layout (one editorial card per row).
   ───────────────────────────────────────────────────────────────────── */

.wow-thisweek {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.wow-thisweek-head {
  padding: var(--s-8) 0 var(--s-10);
  max-width: var(--measure-text);
}

.wow-thisweek-title {
  font-size: 44px;
  margin: var(--s-2) 0 var(--s-3);
}

.wow-thisweek-sub {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-500);
  margin: 0;
  max-width: var(--measure-text);
}

.wow-context-band {
  display: inline-block;
  margin-top: var(--s-5);
  padding: var(--s-2) 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-500);
  font-variation-settings: var(--display-italic-features);
}

/* Tips-suggest staging strip (KI-Vorschläge before adoption) */
.wow-tips-suggest {
  margin: var(--s-6) 0 var(--s-10);
  padding-top: var(--s-5);
  border-top: 2px solid var(--amber-500);
  background: linear-gradient(180deg, var(--amber-50) 0%, transparent 220px);
}
.wow-tips-suggest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-5);
}

.wow-thisweek-empty {
  padding: var(--s-12) var(--s-5);
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.wow-thisweek-empty .wow-rationale {
  font-size: 17px;
  margin: 0 auto var(--s-6);
  max-width: var(--measure-text);
}

/* Editorial card variant used in the "Diese Woche" stack */

.wow-card-stack {
  background: var(--bg-surface);
  border-top: 1px solid var(--rule);
  margin-bottom: 0;
}
.wow-card-stack:last-of-type { border-bottom: 1px solid var(--rule); }

.wow-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}
.wow-card-fallback {
  display: block;
}

.wow-card-body {
  padding: var(--s-8) var(--s-8) var(--s-6);
}

.wow-card-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 var(--s-3);
}
.wow-card-meta .dot { color: var(--ink-300); margin: 0 var(--s-2); }

.wow-card-title {
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 var(--s-3);
}

.wow-card-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-300);
  margin: 0 0 var(--s-6);
}
.wow-card-sub .dot { color: var(--ink-300); margin: 0 var(--s-2); }

.wow-card-lede {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-900);
  margin: 0 0 var(--s-6);
  max-width: var(--measure-text);
}

.wow-card-rationale {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
  margin-bottom: var(--s-6);
}
.wow-card-rationale .wow-kicker { margin-bottom: var(--s-2); }

.wow-card-actions {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
  align-items: center;
}

/* Lead card (first of stack) — slightly larger title to anchor the section */
.wow-card-stack.is-lead .wow-card-title { font-size: 48px; }
.wow-card-stack.is-lead .wow-card-body { padding-top: var(--s-10); }

@media (max-width: 640px) {
  .wow-card-body { padding: var(--s-6) var(--s-5) var(--s-5); }
  .wow-thisweek-title { font-size: 32px; }
  .wow-card-title { font-size: 28px; }
  .wow-card-stack.is-lead .wow-card-title { font-size: 32px; }
}

/* ─────────────────────────────────────────────────────────────────────
   Image fallback — visually rich block when no source_image_url.
   Used by Diese-Woche cards, Events thumbs/grid, Modal hero.
   ───────────────────────────────────────────────────────────────────── */

.wow-card-fallback,
.wow-events-thumb-fallback,
.wow-modal-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  text-align: center;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.35) 100%);
  background-blend-mode: overlay;
}
.wow-events-thumb-fallback {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.wow-card-fallback,
.wow-modal-fallback {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
}

/* ─────────────────────────────────────────────────────────────────────
   View toggle (Liste / Kacheln) — editorial underline switch.
   ───────────────────────────────────────────────────────────────────── */

.wow-viewtoggle {
  display: flex;
  gap: 0;
}
.wow-viewtoggle button {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-300);
  cursor: pointer;
  transition: all 120ms ease;
}
.wow-viewtoggle button:hover { color: var(--ink-700); }
.wow-viewtoggle button.is-active {
  color: var(--ink-900);
  border-bottom-color: var(--ink-900);
}

/* ─────────────────────────────────────────────────────────────────────
   Alle-Events — editorial list view (one event per row, dense).
   ───────────────────────────────────────────────────────────────────── */

.wow-events {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.wow-events-head {
  padding: var(--s-5) 0 var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.wow-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.wow-events-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  align-items: start;
  transition: background 120ms ease;
}
.wow-events-row:hover { background: var(--bg-soft); }

.wow-events-thumb img,
.wow-events-thumb-fallback {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}

.wow-events-content { padding-top: 2px; min-width: 0; }

.wow-events-title {
  font-size: 22px;
  line-height: 1.2;
  margin: var(--s-1) 0 var(--s-2);
}

.wow-events-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-300);
  margin: 0;
}
.wow-events-meta .dot { margin: 0 var(--s-2); }
.wow-events-meta .wow-events-when { color: var(--ink-500); font-weight: 500; }

.wow-events-status {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
  padding-top: var(--s-4);
  white-space: nowrap;
}
.wow-events-status [data-status="approved"] { color: var(--primary); }
.wow-events-status [data-status="rejected"] { color: var(--ink-300); }
.wow-events-status [data-status="pending"] { color: var(--ink-500); }

@media (max-width: 640px) {
  .wow-events-row { grid-template-columns: 80px 1fr; }
  .wow-events-thumb img, .wow-events-thumb-fallback { width: 80px; height: 60px; }
  .wow-events-status { grid-column: 1 / -1; padding-top: 0; padding-left: 96px; margin-top: -8px; }
  .wow-events-title { font-size: 18px; }
}

/* ─────────────────────────────────────────────────────────────────────
   Alle-Events — Kacheln/grid alternative.
   ───────────────────────────────────────────────────────────────────── */

.wow-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-5);
}

.wow-grid-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 150ms ease, border-color 150ms ease;
}
.wow-grid-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-300);
}

.wow-grid-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.wow-grid-card-img img,
.wow-grid-card-img .wow-events-thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}

.wow-grid-card-body {
  padding: var(--s-4) var(--s-4) var(--s-5);
}

.wow-grid-card-title {
  font-size: 19px;
  line-height: 1.2;
  margin: var(--s-1) 0 var(--s-2);
}

/* ─────────────────────────────────────────────────────────────────────
   Detail modal (editorial slide-over).
   ───────────────────────────────────────────────────────────────────── */

.wow-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.wow-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 21, 18, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.wow-modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
}
.wow-modal-close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-page);
  color: var(--ink-500);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 120ms ease;
  z-index: 1;
}
.wow-modal-close:hover { color: var(--ink-900); border-color: var(--ink-900); }

.wow-modal-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}

.wow-modal-body {
  padding: var(--s-8) var(--s-8) var(--s-10);
}

.wow-modal-section {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
  margin-top: var(--s-6);
}

.wow-modal-foot {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
  margin-top: var(--s-8);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-300);
}
.wow-modal-quality b {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-900);
  font-weight: 400;
  font-size: 16px;
}

.wow-modal-status {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wow-modal-status[data-status="approved"] { color: var(--primary); }
.wow-modal-status[data-status="pending"]  { color: var(--ink-500); }
.wow-modal-status[data-status="rejected"] { color: var(--ink-300); }

@media (max-width: 640px) {
  .wow-modal-body { padding: var(--s-6) var(--s-5) var(--s-8); }
}

/* ─────────────────────────────────────────────────────────────────────
   Global editorial overrides — applied across ALL existing Tailwind
   surfaces (Events grid, Highlights, Calendar, Map, Tips, Analytics).
   These tame the "AI-slob" defaults without rewriting each view.
   Higher-specificity + !important required to beat compiled Tailwind.
   ───────────────────────────────────────────────────────────────────── */

/* Kill the bright indigo brand colour everywhere — remap to editorial teal */
.bg-indigo-50  { background-color: var(--teal-50) !important; }
.bg-indigo-100 { background-color: var(--teal-50) !important; }
.bg-indigo-600 { background-color: var(--primary) !important; }
.bg-indigo-700 { background-color: var(--primary-dark) !important; }
.hover\:bg-indigo-700:hover { background-color: var(--primary-dark) !important; }
.text-indigo-500 { color: var(--ink-300) !important; }
.text-indigo-600 { color: var(--primary) !important; }
.text-indigo-700 { color: var(--primary-dark) !important; }
.border-indigo-200 { border-color: var(--rule) !important; }
.border-indigo-300 { border-color: var(--primary) !important; }
.ring-indigo-300 { --tw-ring-color: var(--primary) !important; }

/* Tame bright reds — only use red for truly destructive actions */
.text-red-500 { color: var(--ink-300) !important; }
.text-red-600 { color: var(--ink-500) !important; }

/* Tame emerald / amber count-up colours on dashboards */
.text-emerald-600 { color: var(--ink-900) !important; }
.text-amber-500   { color: var(--ink-700) !important; }

/* Cards lose their loud shadow + thick rounding */
.bg-white.rounded-xl.border,
.bg-white.rounded-2xl.border {
  border-color: var(--rule) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
.hover\:shadow-md:hover { box-shadow: 0 1px 0 var(--rule) !important; }

/* Pill-style category/status badges → flatter editorial labels */
.rounded-full.text-xs {
  border-radius: 2px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-weight: 600 !important;
}

/* Status-bar coloured strip on top of event cards — remove */
.bg-white.rounded-xl.border > .h-1,
.bg-white.rounded-2xl.border > .h-1 { display: none !important; }

/* "Neue Events suchen" + other primary CTAs — kill the indigo pill button */
button.bg-indigo-600.text-white {
  background-color: transparent !important;
  color: var(--primary) !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--primary) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ─────────────────────────────────────────────────────────────────────
   Legacy aliases — pre-rebrand variable names some code may still use.
   Safe to remove once a grep confirms no references remain.
   ───────────────────────────────────────────────────────────────────── */
:root {
  --alcion-teal-900: var(--teal-900);
  --alcion-teal-600: var(--teal-700);
  --alcion-teal-400: var(--teal-500);
  --alcion-teal-200: var(--teal-300);
  --alcion-teal-100: var(--teal-100);
  --alcion-teal-50:  var(--teal-50);
  --alcion-amber-400: var(--amber-500);
  --alcion-amber-200: var(--amber-200);
  --alcion-amber-50:  var(--amber-50);
  --alcion-charcoal:  var(--ink-900);
  --alcion-gray-600:  var(--ink-500);
  --alcion-gray-400:  var(--ink-300);
  --alcion-gray-100:  var(--rule);
  --alcion-gray-50:   var(--bg-soft);
  --alcion-white:     var(--bg-surface);
}
