/* KIWIBLAU Folien-Baukasten. Tokens from the brand book (chapter 04, 05, 08). */
@font-face { font-family: "Work Sans"; src: url("/fonts/WorkSans-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/fonts/WorkSans-Variable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --creme: #fcfaf4; --weiss: #fffefb; --dunst-licht: #fff3e8; --lavendel-hell: #e7e2fb; --linie: #e3dcea;
  --dunst-pfirsich: #ffc8a2; --dunst-rose: #f6a6cf; --dunst-flieder: #d2b4f0; --dunst-gold: #f7cf8a; --lavendel: #ba94e0;
  --pflaume: #6c4b86; --aubergine-gedaempft: #655b78; --aubergine: #413460; --aubergine-grau: #413744;
  --nacht-mitte: #4a3566; --nacht: #2a2140;
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  color: var(--aubergine);
  background: var(--creme);
}
* { box-sizing: border-box; }
body { margin: 0; letter-spacing: .04em; font-size: 15px; line-height: 1.5; }
h1, h2, h3 { letter-spacing: -.02em; margin: 0; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 2px; }

/* The link with Saum: the only "button" in the system. */
.link {
  display: inline-block; font-weight: 500; letter-spacing: .02em; color: var(--pflaume); background: none; border: 0;
  border-bottom: 2px solid var(--dunst-rose); padding: 0 0 2px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.link::after { content: "\00a0\2192"; font-weight: 400; display: inline-block; transition: transform .2s ease-out; }
.link:hover { border-bottom-width: 4px; padding-bottom: 0; }
.link:hover::after { transform: translateX(.2em); }
.link.plain::after { content: none; }
.link[disabled] { opacity: .4; cursor: default; }
.wortmarke { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; white-space: nowrap; }

/* ---------- Login ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(420px, 100%); background: var(--dunst-licht); border-radius: 16px; padding: 36px; display: grid; gap: 16px; }
.login h1 { font-size: 36px; font-weight: 700; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--aubergine-gedaempft); }
input, select, textarea {
  width: 100%; border: 0; border-radius: 8px; background: rgb(65 52 96 / .05); padding: 10px 12px; min-height: 44px; font-weight: 400;
  outline: 2px solid transparent;
}
input:focus, select:focus, textarea:focus { outline-color: var(--aubergine); }
textarea { min-height: 88px; resize: vertical; }
.error { color: var(--aubergine); font-weight: 600; min-height: 1.5em; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-rows: auto 1fr; height: 100svh; }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--linie); }
.top .grow { flex: 1; }
.top input.title { max-width: 420px; font-weight: 600; }
.status { font-size: 13px; color: var(--aubergine-gedaempft); }
.work { display: grid; grid-template-columns: 220px 1fr 360px; min-height: 0; }
.rail { border-right: 1px solid var(--linie); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.thumb { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; aspect-ratio: 16 / 9; flex-shrink: 0; background: var(--lavendel-hell); }
.thumb[aria-current="true"] { border-color: var(--aubergine); }
.thumb .num { position: absolute; left: 6px; bottom: 4px; font-size: 11px; font-weight: 600; color: var(--aubergine); background: var(--creme); border-radius: 4px; padding: 0 4px; z-index: 2; }
.stage { display: grid; place-items: center; padding: 32px; overflow: hidden; background: #f3efe6; min-width: 0; }
.stage .frame { width: 100%; max-width: 1400px; aspect-ratio: 16 / 9; position: relative; box-shadow: 0 0 0 1px var(--linie); border-radius: 4px; overflow: hidden; }
.panel { border-left: 1px solid var(--linie); overflow: auto; padding: 20px; display: grid; gap: 16px; align-content: start; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--aubergine-gedaempft); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.curves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.curves button { border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 16 / 9; }
.curves button img { width: 100%; height: 100%; display: block; object-fit: fill; }
.curves button[aria-pressed="true"] { border-color: var(--aubergine); }
.hint { font-size: 12px; color: var(--aubergine-gedaempft); }
.decks { padding: 48px; max-width: 1100px; margin: 0 auto; display: grid; gap: 32px; }
.decks h1 { font-size: 48px; font-weight: 700; }
.decklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.deckcard { background: var(--dunst-licht); border-radius: 16px; padding: 8px; display: grid; gap: 8px; text-decoration: none; color: inherit; }
.deckcard .preview { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--lavendel-hell); }
.deckcard .meta { padding: 8px 12px 12px; display: grid; gap: 2px; }
.deck-open { display: grid; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.deck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 0 12px 12px; }
.deck-actions button { min-height: 44px; }
.deck-error { margin: 0 12px 8px; font-size: 12px; }
.deck-error:empty { display: none; }
.deckcard strong { font-weight: 600; }

/* ---------- Slides: drawn at 1920 × 1080, scaled into any box ---------- */
.slide-box { position: absolute; inset: 0; container-type: size; overflow: hidden; }
.slide {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0;
  transform: scale(calc(100cqw / 1920px)); /* fallback overridden by JS when cq units unsupported */
  overflow: hidden; font-family: "Work Sans", sans-serif;
  --bg: var(--creme); --fg: var(--aubergine); --sub: var(--aubergine-gedaempft); --accent: var(--pflaume);
  background: var(--bg); color: var(--fg); letter-spacing: .02em;
}
.slide.s-warm { --bg: var(--dunst-licht); }
.slide.s-ruhig { --bg: var(--lavendel-hell); --sub: var(--pflaume); }
.slide.s-dunkel { --bg: var(--aubergine); --fg: var(--dunst-licht); --sub: var(--dunst-flieder); --accent: var(--dunst-pfirsich); }
.slide .curve { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.slide:not(.has-farbe) .shadow-text { --fg: var(--dunst-licht); --head: var(--dunst-licht); --sub: var(--dunst-flieder); --accent: var(--dunst-rose); }
.slide .shadow-text { color: var(--fg); }
.slide .foot { position: absolute; left: 96px; right: 96px; bottom: 56px; display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); z-index: 3; }
.slide .shadow-text .foot, .slide .foot.on-shadow { color: var(--dunst-flieder); }
.slide .eyebrow { font-size: 22px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.slide .t-title, .slide .t-statement, .slide .t-num { color: var(--head, var(--fg)); }
.slide .t-title { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.slide .t-statement { font-size: 120px; font-weight: 700; line-height: .95; letter-spacing: -.035em; }
.slide .t-lead { font-size: 60px; font-weight: 300; line-height: 1.12; letter-spacing: -.01em; }
.slide .t-text { font-size: 36px; font-weight: 400; line-height: 1.35; color: var(--sub); }
.slide .t-num { font-size: 320px; font-weight: 700; line-height: .9; letter-spacing: -.04em; }
.slide .pad { position: absolute; inset: 96px 96px 152px; display: flex; flex-direction: column; z-index: 2; }
.slide .wm { font-size: 30px; }
.slide .list { list-style: none; margin: 56px 0 0; padding: 0; display: grid; }
.slide .list li { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 24px; align-items: baseline; padding: 28px 0; border-top: 2px solid color-mix(in srgb, var(--fg) 20%, transparent); }
.slide .list li:last-child { border-bottom: 2px solid color-mix(in srgb, var(--fg) 20%, transparent); }
.slide .list .n { font-size: 36px; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; }
.slide .list .k { font-size: 44px; font-weight: 600; letter-spacing: -.01em; }
.slide .list .v { font-size: 36px; color: var(--sub); }
.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; margin-top: auto; margin-bottom: auto; }
.slide .cols h3 { font-size: 22px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
.slide .card { position: absolute; inset: 24px; border-radius: 24px; background: var(--dunst-licht); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
.slide.s-dunkel .card { background: var(--nacht-mitte); }
.slide .card .inner { position: relative; border-radius: 16px; overflow: hidden; }
.slide .card .txt { padding: 64px; display: flex; flex-direction: column; gap: 32px; }
.slide .card .foot { left: 72px; right: 72px; bottom: 48px; }
.slide .agenda li { grid-template-columns: 220px 1fr; }

/* ---------- Present ---------- */
.present { position: fixed; inset: 0; background: #000; z-index: 100; display: grid; place-items: center; }
.present .frame { width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; position: relative; }

/* ---------- Print: one slide per page ---------- */
#print { display: none; }
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { background: none; }
  .app, .decks, .present { display: none !important; }
  #print { display: block; }
  #print .page { width: 1920px; height: 1080px; position: relative; break-after: page; overflow: hidden; }
  #print .slide { transform: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
input[type="range"], input[type="checkbox"] { accent-color: var(--aubergine); }

/* Radio groups as segmented choices: all options visible, one checked. */
.choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.choice legend { font-size: 13px; font-weight: 600; color: var(--aubergine-gedaempft); padding: 0; margin-bottom: 6px; width: 100%; }
.choice label { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.choice span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px;
  background: rgb(65 52 96 / .05); color: var(--aubergine); font-weight: 500; font-size: 14px; letter-spacing: .02em;
  outline: 2px solid transparent; transition: background-color .15s;
}
.choice label:hover span { background: rgb(65 52 96 / .1); }
.choice input:checked + span { background: var(--aubergine); color: var(--dunst-licht); }
.choice input:focus-visible + span { outline-color: var(--aubergine); outline-offset: 2px; }

/* Colour choice per slide: swatches showing ground and headline colour. */
.swatches { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.swatches legend { font-size: 13px; font-weight: 600; color: var(--aubergine-gedaempft); padding: 0; margin-bottom: 6px; }
.swatches label { cursor: pointer; display: block; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.swatches span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-weight: 700; font-size: 15px; letter-spacing: 0; box-shadow: inset 0 0 0 1px rgb(65 52 96 / .12); }
.swatches span.auto { font-size: 11px; font-weight: 600; background: rgb(65 52 96 / .05); color: var(--aubergine); text-align: center; line-height: 1.1; }
.swatches input:checked + span { outline: 2px solid var(--aubergine); outline-offset: 2px; }
.swatches input:focus-visible + span { outline: 2px solid var(--aubergine); outline-offset: 2px; }
.slide.has-farbe .card { background: color-mix(in srgb, var(--bg) 88%, var(--fg)); }

/* Per-slide alignment and logo (override the layout's inline defaults). */
.slide.ah-links :is(.pad, .card .txt) { align-items: flex-start !important; text-align: left !important; }
.slide.ah-mitte :is(.pad, .card .txt) { align-items: center !important; text-align: center !important; }
.slide.ah-rechts :is(.pad, .card .txt) { align-items: flex-end !important; text-align: right !important; }
.slide.av-oben :is(.pad, .card .txt) { justify-content: flex-start !important; padding-top: 0 !important; }
.slide.av-mitte :is(.pad, .card .txt) { justify-content: center !important; padding-top: 0 !important; }
.slide.av-unten :is(.pad, .card .txt) { justify-content: flex-end !important; padding-top: 0 !important; }
.slide.no-logo .wm, .slide.no-logo .foot span:first-child { visibility: hidden; }
.slide:is(.av-mitte, .av-unten) .pad > .wm { position: absolute; top: 0; }

/* Per-slide text colours. */
.slide.has-th, .slide.has-th .shadow-text { --head: var(--th); }
.slide.has-tt, .slide.has-tt .shadow-text { --fg: var(--tt); --sub: var(--tt); --accent: var(--tt); }
.slide.has-tt .foot { color: var(--tt) !important; }
