/* vhs Rhein — Vorschau Chatbot-Layout
   Tokens 1:1 aus dem Mockup (const THEMES = { light, dark }). */

:root,
:root[data-theme="light"] {
  --base: #F7F5F2;
  --scheme: light;
  --scroll: rgba(23,24,27,.18) transparent;
  --glow: radial-gradient(60% 55% at 74% 12%, rgba(249,168,110,.55), transparent 70%), radial-gradient(50% 50% at 8% 62%, rgba(253,226,176,.6), transparent 72%);
  --grid: linear-gradient(to right, rgba(23,24,27,.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(23,24,27,.045) 1px, transparent 1px);
  --header: #FFFFFF;
  --ink: #17181B;
  --ink2: #3A3D42;
  --muted: #5E6167;
  --muted2: #82868C;
  --line: rgba(23,24,27,.07);
  --line2: rgba(23,24,27,.14);
  --pill: rgba(255,255,255,.82);
  --panel: #FFFFFF;
  --panelLine: rgba(23,24,27,.04);
  --bubble: #F5F3F0;
  --card: #FFFFFF;
  --tile: rgba(255,255,255,.86);
  --soft: #F3F2F0;
  --inputSoft: #F6F4F1;
  --toggleBg: #F3F2F0;
  --accentInk: #B45309;
  --badgeBg: #FDF0DC;
  --badgeFg: #B45309;
  --badgeOffBg: #F1F1F2;
  --badgeOffFg: #82868C;
  --shadowOpen: 0 40px 90px -30px rgba(64,36,8,.45), 0 4px 14px rgba(23,24,27,.06);
  --shadowClosed: 0 18px 40px -22px rgba(23,24,27,.45);
  --shadowFloat: 0 60px 120px -30px rgba(64,36,8,.5), 0 8px 24px rgba(23,24,27,.08);
  --lightOp: 1;
  --darkOp: 0;
  --haloOp: .7;
}

:root[data-theme="dark"] {
  --base: #131316;
  --scheme: dark;
  --scroll: rgba(255,255,255,.18) transparent;
  --glow: radial-gradient(60% 55% at 74% 10%, rgba(240,130,26,.28), transparent 70%), radial-gradient(50% 50% at 6% 64%, rgba(249,168,60,.14), transparent 72%);
  --grid: linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  --header: #18181B;
  --ink: #F4F2EF;
  --ink2: #D4D2CE;
  --muted: #A6A8AD;
  --muted2: #8C8F95;
  --line: rgba(255,255,255,.07);
  --line2: rgba(255,255,255,.14);
  --pill: rgba(34,34,38,.8);
  --panel: #1D1D21;
  --panelLine: rgba(255,255,255,.08);
  --bubble: #2A2A2F;
  --card: #232327;
  --tile: rgba(32,32,36,.82);
  --soft: #2A2A2F;
  --inputSoft: #26262B;
  --toggleBg: #26262B;
  --accentInk: #F3A04C;
  --badgeBg: rgba(240,130,26,.16);
  --badgeFg: #F6B26A;
  --badgeOffBg: #2A2A2F;
  --badgeOffFg: #8C8F95;
  --shadowOpen: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(240,130,26,.10);
  --shadowClosed: 0 18px 40px -20px rgba(0,0,0,.8);
  --shadowFloat: 0 70px 130px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(240,130,26,.14);
  --lightOp: 0;
  --darkOp: 1;
  --haloOp: .85;
}

/* Feste Mockup-Werte (themenunabhängig) */
:root {
  --orange: #F0821A;
  --orange-2: #F9A83C;
  --orange-ink: #E2740E;
  --grad: linear-gradient(135deg, #F0821A, #F9A83C);
  --expo: cubic-bezier(.16,1,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --font: Archivo, system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  color-scheme: var(--scheme);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--base);
  color: var(--ink);
  transition: background 500ms ease;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange-ink); }
input::placeholder { color: #9A9EA4; }
button { font: inherit; }

/* ---------- Hintergrund: Verlauf, Glow, Raster ---------- */
.page { position: relative; min-height: 100vh; overflow: hidden; background: var(--base); transition: background 500ms ease; }
.bg { position: absolute; inset: 0; pointer-events: none; }
.bg-light { background: linear-gradient(120deg,#FDF2DE 0%,#FBE3CB 32%,#F9CDB0 58%,#EFEFF1 100%); opacity: var(--lightOp); transition: opacity 500ms ease; }
.bg-dark  { background: linear-gradient(125deg,#17130F 0%,#1D1510 38%,#23150E 60%,#131316 100%); opacity: var(--darkOp); transition: opacity 500ms ease; }
.bg-glow  { background: var(--glow); transition: opacity 500ms ease; }
.bg-grid  {
  background-image: var(--grid);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
}

/* ---------- Obere Leiste (Chatbot an/aus) ---------- */
.topbar {
  position: relative; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px;
  padding: 8px 20px;
  background: #17181B; color: #C9CBCF;
  font-family: var(--mono); font-size: 12.5px;
}
.bot-toggle {
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; color: #E9E8E6;
  font-family: var(--mono); font-size: 12.5px; cursor: pointer; padding: 4px 0;
}
.bot-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #3A3B40; transition: background 300ms ease; }
.bot-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: transform 360ms var(--spring); }
.bot-label { color: #8C8F95; }
:root[data-bot="an"] .bot-track { background: var(--orange); }
:root[data-bot="an"] .bot-knob { transform: translateX(18px); }
.bot-toggle:focus-visible, .theme-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 999px; }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px clamp(20px,4vw,64px);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  transition: background 500ms ease;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { color: inherit; }
.brand-tile {
  width: 46px; height: 46px; border-radius: 12px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -.02em;
}
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); transition: color 500ms ease; }
.site-nav { display: flex; align-items: center; gap: clamp(14px,2.4vw,38px); color: var(--ink2); }
.nav-link { font-size: 15px; font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
.theme-toggle {
  position: relative; width: 64px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--toggleBg);
  cursor: pointer; padding: 0; transition: background 400ms ease;
}
.theme-knob {
  position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; border-radius: 999px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px -2px rgba(240,130,26,.7);
  transition: transform 480ms var(--spring);
}
:root[data-theme="dark"] .theme-knob { transform: translateX(26px); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
.round-icon { width: 38px; height: 38px; border-radius: 999px; background: var(--grad); display: flex; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(40px,6vw,76px) clamp(20px,4vw,64px) 0;
}
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 22px; border-radius: 999px;
  font-family: var(--mono); font-size: 14px;
  background: var(--pill); color: var(--ink2); border: 1px solid var(--line);
  text-align: center;
}
.badge-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--orange); flex: none; }
.headline {
  margin: 26px 0 0; max-width: 14ch; text-align: center;
  font-size: clamp(44px,6.6vw,88px); line-height: .98; font-weight: 800; letter-spacing: -.035em;
  text-wrap: balance; color: var(--ink); transition: color 500ms ease;
}
.headline-accent {
  display: block;
  background: linear-gradient(90deg,#E2600C,#F3902A 45%,#FBC15C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead {
  margin: 26px 0 0; max-width: 56ch; text-align: center;
  font-size: 17px; line-height: 1.55; text-wrap: pretty; color: var(--muted);
}

/* Platz der Suchfeld-Pille. Eingeklappt 600px wie im Mockup (closedW),
   aufgeklappt 760px (wideW, Effekt „Schweben"). */
.ask {
  position: relative; width: 100%; max-width: 600px; margin: 38px 0 0;
  min-height: 66px;
  transition: max-width 500ms var(--expo);
}
.ask.is-open { max-width: 760px; }
.ask-halo {
  position: absolute; top: -60px; left: 50%; width: min(860px,100vw); height: 600px;
  z-index: 0; pointer-events: none;
  background: radial-gradient(50% 45% at 50% 40%, rgba(240,130,26,.36), rgba(249,168,60,.1) 55%, transparent 75%);
  filter: blur(34px);
  opacity: 0; transform: translateX(-50%) scale(.7);
  transition: opacity 360ms ease, transform 600ms ease;
}
.ask.is-open .ask-halo {
  opacity: var(--haloOp); transform: translateX(-50%) scale(1);
  transition: opacity 800ms ease 100ms, transform 1100ms var(--expo);
}
#kufer-assistent { position: relative; z-index: 1; width: 100%; min-height: 66px; }

/* Chatbot aus: normales Suchfeld (Mockup-Pille) */
.search-pill {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 78px; padding: 0 16px;
  border-radius: 999px; background: var(--panel);
  border: 1px solid var(--panelLine); box-shadow: var(--shadowClosed);
  transition: background 500ms ease, box-shadow 500ms ease;
  margin: 0;
}
.search-icon { flex: none; margin-left: 14px; }
.search-pill input {
  flex: 1; min-width: 0; height: 46px; border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 16px; padding: 0 14px 0 10px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.search-pill input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-pill:focus-within { box-shadow: var(--shadowClosed), 0 0 0 3px rgba(240,130,26,.28); }
.pill-btn {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 118px; height: 46px; border: none; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-family: var(--font); font-size: 15.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(240,130,26,.8);
  transition: transform 260ms var(--expo), box-shadow 260ms var(--expo);
}
.pill-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(240,130,26,.85); }

.popular {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px;
  margin: 34px 0 0; font-family: var(--mono); font-size: 15px; color: var(--muted);
}
.popular a { border-bottom: 1px solid var(--line2); }

/* ---------- Fachbereiche (Platzhalter-Karten) ---------- */
.fields { position: relative; z-index: 5; padding: clamp(56px,7vw,96px) clamp(20px,4vw,64px) 80px; }
.fields-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--orange-ink); }
.fields h2 { margin: 10px 0 0; font-size: clamp(28px,3.4vw,40px); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.all-link { font-size: 15px; font-weight: 600; border-bottom: 2px solid var(--orange); padding-bottom: 2px; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile {
  padding: 22px; border-radius: 18px; min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); background: var(--tile);
  transition: background 500ms ease, border-color 260ms var(--expo), transform 260ms var(--expo);
}
.tile:hover { color: inherit; border-color: var(--orange); transform: translateY(-2px); }
.tile-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--soft); color: var(--ink2);
}
.tile-title { display: block; font-size: 16px; font-weight: 700; text-wrap: pretty; color: var(--ink); }
.tile-count { display: block; font-family: var(--mono); font-size: 12.5px; margin-top: 6px; color: var(--muted2); }

/* ---------- Responsiv ---------- */
@media (max-width: 760px) {
  .nav-link { display: none; }
  .site-header { gap: 12px; padding: 14px 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .fields { padding-left: 16px; padding-right: 16px; }
  .badge { font-size: 12.5px; padding: 9px 16px; }
  .lead { font-size: 16px; }
}
@media (max-width: 480px) {
  .round-icon { display: none; }
  .search-pill { height: 64px; padding: 0 9px; gap: 6px; }
  .search-icon { margin-left: 8px; }
  .search-pill input { padding-left: 6px; }
  .pill-btn { width: 96px; height: 44px; font-size: 15px; }
  .popular { font-size: 13.5px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
