/* Base elements and the stage of the start page. The tokens come from tokens.css, chat and voice mode from chat.css.
   js/start.js sets <html data-theme> (light or dark) before the first paint; <html lang> comes from the server with
   the address (German under /, English under /en/). */

/* ---------- Base elements ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-page); color: var(--c-text-body); font: 16px/1.5 var(--font); overflow-wrap: break-word; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
h1, h2, h3 { color: var(--c-text); }
button, input, textarea { color: inherit; font: inherit; }
a { color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Page: the stage from the approved demo. The four services live in leistungen.css. ---------- */
/* The type families come from schriften.css (self-hosted, the policy of the server allows no other source). */
/* Language and theme: two small switches at the top left of the page. They scroll away with the stage. */
.schalter { position: absolute; z-index: 2; top: 14px; left: 16px; display: flex; align-items: center; gap: 2px; }
.schalter button {
  appearance: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 0;
  background: none; color: var(--tinte); cursor: pointer; font: 500 12px / 1 var(--mono); letter-spacing: 0.08em;
}
.schalter button:hover { background: var(--c-accent-soft); }
.schalter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.schalter .halb { fill: currentColor; stroke: none; }

/* The blurred words of the stage reach past the edge while they melt. */
body { overflow-x: hidden; }
/* The page moves aside when the chat docks next to it. Sizes that follow the width use cqw, the width of
   .site, where the demo used vw: with the chat closed both are the same, with the chat docked the stage
   shrinks with the space that is left. */
.site { position: relative; container-type: inline-size; min-height: 100dvh; color: var(--tinte); transition: margin-right var(--dur-slow) var(--ease); }
/* The stage does not fill the window: headline and button stand high, and the film below starts in the
   first screen. */
.buehne {
  display: grid; justify-items: center;
  gap: 1.4rem; padding: clamp(5.5rem, 16vh, 10rem) 1rem clamp(2.5rem, 7vh, 4.5rem); text-align: center;
}
.zeile {
  font: 800 min(7.6cqw, 7.4rem) / 1 Unbounded, system-ui, sans-serif; letter-spacing: -0.03em;
  display: grid; justify-items: center; gap: 0.16em;
}
#fest { white-space: nowrap; }
/* Three things lie on top of each other in the word: the yellow stroke, the old word and the new one. */
#wort { display: grid; min-width: 62cqw; height: 1.25em; white-space: nowrap; }
/* The word is drawn by an SVG that lies over the text (buehne.js); the HTML text stays for the measures. */
.text { position: relative; grid-area: 1 / 1; display: grid; }
.text span { grid-area: 1 / 1; justify-self: center; color: transparent; forced-color-adjust: none; }
.wort-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wort-svg text { font: inherit; letter-spacing: inherit; fill: currentColor; text-anchor: middle; dominant-baseline: central; }
#wort .strich { grid-area: 1 / 1; justify-self: center; align-self: center; box-sizing: content-box; height: 0.95em; padding: 0 0.28em; transform: rotate(-1.6deg); }
#wort .strich svg { display: block; width: 100%; height: 100%; overflow: visible; }
#wort .strich path { fill: none; stroke: var(--marker); stroke-width: 25; stroke-dasharray: 1; }
.angebot { font: 500 clamp(1rem, 1.6cqw, 1.3rem) / 1.3 var(--font); letter-spacing: 0.01em; opacity: 0.8; }
.knopf {
  appearance: none; padding: 0.85rem 1.3rem; border: 1.5px solid var(--tinte); border-radius: var(--radius-pill);
  background: var(--tinte); color: var(--grund); font: 600 0.95rem / 1 var(--font); cursor: pointer;
}
.knopf:focus-visible { outline: 3px solid var(--gelb); outline-offset: 3px; }
@container (max-width: 820px) {
  .zeile { font-size: 8.6cqw; }
}

/* Footer of the page: name and year, two ways to reach the site owner, the two legal pages. */
.fuss {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.8rem 2rem;
  margin: 0 5cqw; padding: 1.6rem 0 2.2rem; border-top: 1px solid var(--haar);
  color: var(--tinte); font: 400 0.8125rem / 1.5 var(--mono);
}
.fuss__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; padding: 0; list-style: none; }
.fuss a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fuss a:hover { text-decoration-thickness: 2px; }

@media (min-width: 1024px) {
  /* Page and chat share the window half and half. */
  .chat-docked .site { margin-right: 50%; }
}
