/* finanzfride.ch – Farben aus brand/farben/tonleiter.md, Schrift GT Maru (Web-Lizenz nur für finanzfride.ch) */

@font-face {
  font-family: "GT Maru Mega";
  src: url("/assets/fonts/GT-Maru-Mega-Midi.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GT Maru";
  src: url("/assets/fonts/GT-Maru-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --gruen: #152915;        /* Dunkelgrün Kern: Schrift */
  --gruen-hell2: #384A38;  /* Dunkelgrün hell 2: Linien auf Dunkelgrün */
  --wald: #46521F;         /* Waldgrün Kern: zweite Textebene auf Creme */
  --braun: #613C13;        /* Braun Kern: zweite Textebene auf Creme */
  --gold: #CA9220;         /* Gold Kern: nur Akzent, nie Lesetext auf Creme */
  --creme: #E1C493;        /* Creme Kern: Fläche */
  --creme-hell2: #FAE2B9;  /* Creme hell 2: Fläche vor der Fläche (Tab) */
  --creme-tief2: #B39C76;  /* Creme tief 2: zweite Textebene auf Dunkelgrün */

  --mega: "GT Maru Mega", "GT Maru", ui-rounded, system-ui, sans-serif;
  --bold: "GT Maru", ui-rounded, system-ui, sans-serif;
  --text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Die ganze Grössenskala der Seite */
  --gr-titel: clamp(2.6rem, 13.5vw, 8.5rem);   /* Mega: Finanzfrieden. */
  --gr-fragen: clamp(2.4rem, 8vw, 6rem);       /* Mega: die drei Fragen */
  --gr-satz: clamp(1.6rem, 5.4vw, 2.8rem);     /* Bold: Zitat und Schluss-Satz */
  --gr-vorzeile: 1.125rem;                     /* Bold 18 px: Vorzeile über den Fragen */
  --gr-text: 1.0625rem;                        /* 17 px: aller Lesetext */
  --gr-klein: 0.95rem;                         /* 15,2 px: nur Tab und Fuss */

  --rand: clamp(20px, 5vw, 64px);
  --breit: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--gruen);
  font-family: var(--text);
  font-size: var(--gr-text);
  line-height: 1.6;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gruen); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; text-wrap: pretty; }
.tab-text { text-wrap: balance; }
.satz { display: inline-block; }

.sprung { position: absolute; left: -9999px; top: 0; background: var(--gruen); color: var(--creme); padding: 10px 16px; z-index: 10; }
.sprung:focus { left: 16px; top: 16px; }

.innen { max-width: var(--breit); margin: 0 auto; padding-left: var(--rand); padding-right: var(--rand); }

/* Kopf */
.kopf {
  max-width: var(--breit); margin: 0 auto;
  padding: 20px var(--rand);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.marke { display: inline-flex; align-items: center; gap: 0.32em; text-decoration: none; font-size: 1.6rem; }
.marke-spirale { width: auto; height: 1.05em; }
.marke-wort { font-family: var(--mega); letter-spacing: -0.02em; line-height: 1; padding-bottom: 0.08em; }
.kopf-link { font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; font-size: var(--gr-text); }

/* Aufruf: ein Link mit Pfeil, keine Pille */
.weiter {
  display: inline-block;
  font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; font-size: var(--gr-text);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  padding: 10px 0;
}
.weiter span { display: inline-block; transition: transform 0.2s ease; }
.weiter:hover span { transform: translateX(4px); }

/* Bühne */
.buehne { position: relative; overflow-x: clip; padding: 8px 0 72px; }
.buehne-spirale { display: block; width: 92px; margin: 0 -26px 16px auto; }

/* Der offene Tab im Kopf: sitzt mit offener Unterkante auf einer Linie, wie ein Browser-Tab.
   Die Leiste hat eine feste Mindesthöhe, damit beim Schliessen nichts springt. */
.tableiste {
  display: flex; align-items: flex-end;
  min-height: 58px;
  border-bottom: 2px solid var(--gruen);
  padding-left: 8px;
}
.tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 0;
  max-width: calc(100% - 8px);
  margin-bottom: -2px;                 /* deckt die Linie unter dem Tab ab */
  background: var(--creme-hell2);
  border: 2px solid var(--gruen); border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 4px 0 6px 12px;
  font-size: var(--gr-klein); line-height: 1.35;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tab-zu {
  flex: none; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--gruen);
  font: 700 1.35rem/1 var(--text); cursor: pointer;
}
.tab-zu:hover { background: var(--creme); }
.tab.ist-zu { opacity: 0; transform: translateY(6px); }
.tab-danach {
  margin: 0; padding: 0 0 10px 14px;   /* genau dort, wo der Tab-Text stand */
  font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; font-size: var(--gr-klein);
  color: var(--wald);
}

.titel {
  font-family: var(--mega); font-weight: 400;
  font-size: var(--gr-titel);
  line-height: 0.95; letter-spacing: -0.02em;
  margin: 32px 0 20px;
}
.lead { font-size: var(--gr-text); max-width: 34em; }

/* Drei Fragen: eine grosse Ebene, eine kleine */
.fragen { background: var(--gruen); color: var(--creme); padding: 64px 0 56px; }
.vorzeile {
  font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em;
  font-size: var(--gr-vorzeile); line-height: 1.3; color: var(--creme-tief2);
  margin: 0 0 24px; text-wrap: balance;
}
.fragen-liste { list-style: none; padding: 0; margin: 0 0 40px; }
.fragen-liste li {
  font-family: var(--mega); font-weight: 400;
  font-size: var(--gr-fragen); line-height: 1.0; letter-spacing: -0.02em;
  padding: 0.22em 0; text-wrap: balance;
  border-top: 2px solid var(--gruen-hell2);
}
.fragen-liste li:last-child { border-bottom: 2px solid var(--gruen-hell2); }
.fragen-fuss { color: var(--creme-tief2); font-size: var(--gr-text); max-width: 34em; margin: 0; }

/* Haltung */
.haltung { padding: 72px 0 56px; }
.haltung-raster { display: grid; gap: 28px; }
.zitat, .schluss-satz {
  font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em;
  font-size: var(--gr-satz); line-height: 1.1; margin: 0;
  text-wrap: balance;
}
.zitat { max-width: 15em; }
.haltung-text { max-width: 34em; }
.haltung-text .zweite { color: var(--braun); margin-bottom: 0; }
.haltung-bild { margin: 0; }   /* Platz für ein späteres Foto (siehe README) */

/* Schluss: Satz und Aufruf stehen frei, darunter dieselbe Linie wie unter dem Tab */
.schluss { padding: 24px 0 8px; }
.schluss-satz { max-width: 22em; margin-bottom: 8px; }
.schluss .innen::after { content: ""; display: block; height: 2px; background: var(--gruen); margin-top: 40px; }

/* Fuss */
.fuss {
  max-width: var(--breit); margin: 0 auto;
  padding: 24px var(--rand) 56px;
  font-size: var(--gr-klein); color: var(--wald);
}
.fuss p { margin: 0 0 6px; }
.fuss-marke { font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; color: var(--gruen); margin-bottom: 12px !important; }

/* Einfache Unterseiten (Impressum, 404, später Landingpages) */
.seite { max-width: 46em; margin: 0 auto; padding: 32px var(--rand) 72px; }
.seite h1 { font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; font-size: var(--gr-satz); line-height: 1.1; margin: 16px 0 24px; }
.seite h2 { font-family: var(--bold); font-weight: 700; letter-spacing: -0.04em; font-size: var(--gr-vorzeile); margin: 32px 0 8px; }
.luecke { background: var(--gold); color: var(--gruen); padding: 0 6px; border-radius: 4px; font-weight: 700; }
.hinweis { border: 2px dashed var(--braun); padding: 12px 16px; border-radius: 8px; color: var(--braun); }

/* Ab Tablet */
@media (min-width: 760px) {
  :root { --gr-titel: clamp(3.5rem, 9vw, 8.5rem); }   /* neben der Spirale: schmaler als auf dem Handy */
  .marke { font-size: 1.9rem; }
  .tableiste { padding-left: 12px; }
  .tab { padding: 4px 4px 6px 16px; gap: 4px; max-width: calc(100% - 24px); }
  .tab-danach { padding-left: 18px; }
  .buehne { padding: 56px 0 112px; }
  .buehne-spirale { position: absolute; margin: 0; width: clamp(190px, 27vw, 420px); right: -4vw; top: 50%; transform: translateY(-50%); }
  .buehne-text > :not(.titel) { max-width: min(36rem, calc(100vw - 27vw - 2 * var(--rand) - 24px)); }
  .titel { margin-top: 40px; }
  .fragen { padding: 104px 0 96px; }
  .vorzeile { margin-bottom: 32px; }
  .fragen-liste li { padding: 0.18em 0; }
  .haltung { padding: 120px 0 64px; }
  .schluss { padding-top: 48px; }
  .schluss .innen::after { margin-top: 64px; }
}

/* Haltung zweispaltig erst ab 1024 px; darunter einspaltig wie auf dem Handy */
@media (min-width: 1024px) {
  .haltung-raster {
    grid-template-columns: 7fr 5fr; column-gap: 64px; row-gap: 32px;
    grid-template-areas: "zitat text";
  }
  .haltung-raster:has(.haltung-bild) { grid-template-areas: "zitat bild" "zitat text"; }
  .zitat { grid-area: zitat; align-self: start; }
  .haltung-bild { grid-area: bild; }
  .haltung-text { grid-area: text; align-self: start; padding-top: 0; }
}

/* Unter 760 px: Fragen grösser, «Wo will ich hin?» bleibt einzeilig */
@media (max-width: 759.98px) {
  :root { --gr-fragen: clamp(2.4rem, 12vw, 6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .tab, .weiter span { transition: none; }
}
