/* yda – Website. Schriften, Farben, Abstände und Bewegungen wie in der App (index.html der App). */

@font-face { font-family: "YdaSans"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "YdaSans"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "YdaSans"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Source Serif 4 und Inter (SIL Open Font License) – lokal, damit nichts an fremde Server geht */
@font-face { font-family: "YdaSourceSerif"; src: url("fonts/source-serif-4-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "YdaSourceSerif"; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #FFFFFF;
  --ink: #111111;
  --grey: #8A8A8A;
  --hair: #E4E4E4;
  --green: #3DBA67;
  --blue: #2F5BEA;
  --sans: "YdaSans", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "YdaSourceSerif", "Tinos", "Times New Roman", Times, serif;
  --content: 860px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Dunkelmodus: folgt dem System, der Knopf oben rechts übersteuert ihn (wie in der App) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #111111; --ink: #FFFFFF; --grey: #8A8A8A; --hair: #2A2A2A; --blue: #7C9BFF; }
}
:root[data-theme="dark"] { --paper: #111111; --ink: #FFFFFF; --grey: #8A8A8A; --hair: #2A2A2A; --blue: #7C9BFF; }

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; transition: background-color .25s ease, color .25s ease; background: var(--paper); color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100%; display: flex; flex-direction: column;
}
.col { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 56px; }
em, .it { font-family: var(--serif); font-style: normal; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--ink); color: var(--paper); }
a { color: var(--blue); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
a:hover { border-bottom-width: 2px; }

/* ---------- Kopfzeile wie in der App ---------- */
.folio {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 24px; flex-shrink: 0;
  font: 200 16px/17.4px var(--sans); padding-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hair);
}
.folio > span:nth-child(2) { color: var(--grey); text-align: center; }
.folio > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folio > span:last-child { text-align: right; }

/* ---------- Begrüssung: Masse 1:1 aus der App ---------- */
main { flex: 1 0 auto; }                 /* Unterseite: wächst mit, Fusszeile bleibt unten */
/* Startseite: Begrüssung mittig im freien Raum, ohne dass oben etwas abgeschnitten wird */
body.start { height: 100%; }
body.start main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.start .welcome { margin: auto 0; }
.welcome h1 { font: 700 72px/72px var(--sans); letter-spacing: -1.6px; margin: 0; position: relative; padding-left: 80px; }
.welcome h1 em { font-family: var(--serif); font-weight: 300; font-style: normal; font-size: 1.075em; line-height: 0; }
.welcome h1 .smoke { position: absolute; left: -11px; top: -5px; width: 84px; height: 84px; }
.welcome .slogan { margin: 6px 0 0 80px; height: 30px; font: 400 24px/30px var(--sans); letter-spacing: -.3px; white-space: nowrap; }

.js .welcome .ch { visibility: hidden; }
.js .welcome .ch.on { visibility: visible; }
.welcome .caret { display: inline-block; width: 0; height: 0; position: relative; }
.welcome .caret::after { content: ""; position: absolute; left: 3px; bottom: -8px; width: 3px; height: 60px; background: var(--ink);
                         animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.welcome .caret.gone { display: none; }
.welcome .caret2 { display: inline-block; width: 0; height: 0; position: relative; opacity: 0; }
.welcome.typed .caret2 { opacity: 1; }
.welcome .caret2::after { content: ""; position: absolute; left: 2px; bottom: -5px; width: 2px; height: 26px; background: var(--ink);
                          animation: blink 1s steps(1) infinite; }

/* ---------- Fusszeile: Fliesstext wie ydas Antworten ---------- */
.foot { flex-shrink: 0; padding-top: 14px; padding-bottom: 18px; border-top: 1px solid var(--hair);
        display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
        font: 400 16px/24px var(--serif); }
.js .foot { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease) .2s, transform .6s var(--ease) .2s; }
.js body.typed .foot, .js .foot.show { opacity: 1; transform: none; }
.foot .copied { font: 200 12px/17.4px var(--sans); color: var(--grey); margin-left: 10px; opacity: 0; transition: opacity .2s ease; }
.foot .copied.on { opacity: 1; }

/* ---------- Über yda ---------- */
.page { padding-top: 56px; padding-bottom: 72px; }
.page .lede { font: 200 24px/34px var(--serif); margin: 0; max-width: 620px; }
.page section { margin: 0; }
/* Zeilenhöhe > 1 und Abstand darunter: sonst stösst die Unterlänge des y an den Einleitungssatz */
.page h1 { font: 300 72px/1.18 var(--serif); letter-spacing: -.5px; }
.page h1 .ipa { font: 400 18px/1 var(--serif); color: var(--grey); margin-left: 14px; letter-spacing: 0; }
.page h2 { font: 700 15px/21px var(--sans); margin: 0 0 12px; letter-spacing: -.1px; }
.page p { font: 200 16px/24px var(--serif); margin: 0 0 14px; }
.page ul { margin: 0; padding-left: 18px; font: 400 16px/24px var(--serif); }
.page li { margin-bottom: 4px; }
.page .rule { height: 1px; background: var(--hair); margin: 50px 0; }
.page .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 50px 56px; }
.page .claim { font: 300 34px/1.3 var(--serif); margin: 0; }
.page .claim b { font: 700 34px/1.3 var(--sans); letter-spacing: -.6px; }
.page .back { font: 400 12px/17.4px var(--sans); }

/* ---------- Hell/Dunkel-Knopf wie in der App ---------- */
.theme { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink);
         font: 400 12px/1 var(--sans); }
.theme svg { width: 16px; height: 16px; display: block; transition: opacity .2s; }
.theme .slash { color: var(--grey); }
.theme .sun, .theme .moon { opacity: .3; }
html:not([data-theme="dark"]) .theme .sun { opacity: 1; }
html[data-theme="dark"] .theme .moon { opacity: 1; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .theme .sun { opacity: .3; }
                                      html:not([data-theme="light"]) .theme .moon { opacity: 1; } }
html[data-theme="light"] .theme .sun { opacity: 1; }
html[data-theme="light"] .theme .moon { opacity: .3; }
.theme:hover svg { opacity: 1; }
.theme:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.folio > span:last-child { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }

/* ---------- Eigener Cursor: kleiner, gefüllter Rauchpunkt (1:1 aus der App) ---------- */
@media (hover: hover) and (pointer: fine) {
  html.dotcur, html.dotcur * { cursor: none !important; }
  html.dotcur input:not([type=checkbox]):not([type=radio]):not([type=range]), html.dotcur textarea,
  html.dotcur [contenteditable="true"] { cursor: text !important; }
}
#dot { position: fixed; left: 0; top: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; z-index: 2147483647;
  pointer-events: none; background: radial-gradient(circle at 50% 50%, #fff 0 52%, rgba(255,255,255,.75) 68%, rgba(255,255,255,0) 100%);
  mix-blend-mode: difference; filter: blur(.35px); opacity: 0; will-change: transform;
  border-radius: 48% 52% 46% 54% / 53% 47% 55% 45%; animation: dotwob 2.6s ease-in-out infinite alternate;
  transition: opacity .15s ease, width .18s ease, height .18s ease, margin .18s ease; }
#dot.on { opacity: 1; }
#dot.big { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
#dot.down { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
@keyframes dotwob {
  0%   { border-radius: 48% 52% 46% 54% / 53% 47% 55% 45%; }
  50%  { border-radius: 55% 45% 52% 48% / 46% 56% 44% 54%; }
  100% { border-radius: 45% 55% 49% 51% / 50% 44% 56% 50%; }
}

@media (max-width: 900px) {
  .col { padding: 0 40px; }
  .welcome h1 { font-size: 48px; line-height: 48px; }
  .page { padding-top: 48px; padding-bottom: 64px; }
  .page h1 { font-size: 52px; }
  .page .lede { font-size: 21px; line-height: 31px; }
  .page .grid { gap: 54px 48px; }
  .page .claim, .page .claim b { font-size: 26px; }
}

/* ---------- iPhone: mehr Luft, Ring über dem Titel, nichts wird abgeschnitten ---------- */
@media (max-width: 560px) {
  .col { padding: 0 32px; }
  /* Raster → Flex: die mittlere Spalte fällt auf dem Handy weg, sonst rutscht der Knopf in die Mitte */
  .folio { display: flex; justify-content: space-between; align-items: center;
           padding-top: 20px; padding-bottom: 12px; gap: 14px; }
  .folio > span { text-align: left; }
  .folio .tag { display: none; }                  /* „Lokales KI-Werkzeug …“ – auf dem Handy zu lang */

  .welcome h1 { font-size: 36px; line-height: 44px; letter-spacing: -.6px; padding: 66px 0 0; }
  .welcome h1 .smoke { width: 64px; height: 64px; left: -13px; top: -8px; }
  .welcome h1 em { font-size: 1.05em; }
  .welcome .caret::after { height: 36px; bottom: -4px; width: 2px; }
  .welcome .slogan { margin: 14px 0 0; font-size: 17px; line-height: 24px; height: 48px;
                     white-space: normal; letter-spacing: 0; }
  .welcome .caret2::after { height: 19px; bottom: -3px; }

  .foot { flex-direction: column; align-items: flex-start; gap: 4px;
          padding-top: 16px; padding-bottom: 18px; font-size: 16px; line-height: 26px; }

  .page { padding-top: 40px; padding-bottom: 56px; }
  .page h1 { font-size: 44px; margin-bottom: 14px; }
  .page h1 .ipa { font-size: 16px; margin-left: 10px; }
  .page .lede { font-size: 19px; line-height: 29px; }
  .page .rule { margin: 42px 0; }
  .page .grid { gap: 50px; }                      /* eine Spalte: klarer Abstand zwischen den Abschnitten */
  .page h2 { margin-bottom: 14px; }
  .page p, .page ul { font-size: 17px; line-height: 27px; }
  .page li { margin-bottom: 8px; }
  .page .claim, .page .claim b { font-size: 24px; line-height: 1.35; }
}

@media (max-width: 380px) {
  .col { padding: 0 26px; }
  .welcome h1 { font-size: 31px; line-height: 39px; padding-top: 60px; }
  .welcome h1 .smoke { width: 58px; height: 58px; }
  .welcome .caret::after { height: 31px; }
  .welcome .slogan { font-size: 16px; line-height: 23px; height: 69px; }
  .page h1 { font-size: 38px; }
  .page .claim, .page .claim b { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  #dot { animation: none; }
  .welcome .caret::after, .welcome .caret2::after { animation: none; }
}
