/* Reefy website, hand-written. Colours, spacing and radii come only from tokens/reefy-tokens.css (copied from
   docs/design at build time); the page is dark only through data-theme="dark" on html (ADR 0061). Font sizes in rem,
   so the reader's browser font size applies. */

@font-face { font-family: "Belleza"; src: url("/fonts/Belleza-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/NunitoSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/NunitoSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/NunitoSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/NunitoSans-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-wrap: break-word;
  hyphenate-limit-chars: 10 4 4;
  -webkit-hyphenate-limit-before: 4;
  -webkit-hyphenate-limit-after: 4;
  text-wrap: pretty;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1 { font-size: 2.5rem; line-height: 1.15; margin: 0 0 var(--space-5); }

a { color: var(--primary); }

:focus-visible { outline: var(--line-focus) solid var(--focus); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border-radius: var(--radius-s);
  max-width: calc(100% - 2 * var(--space-4));
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: 0.015em;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.wordmark__icon { display: block; flex: none; width: 44px; height: 44px; border-radius: 22.37%; box-shadow: var(--shadow-1); }

.lang-switch { display: flex; gap: var(--space-2); }

.lang-switch a, .lang-switch__current {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.lang-switch__current { color: var(--text-muted); }

.site-main, .site-footer { max-width: 1200px; margin: 0 auto; padding: var(--space-6) var(--space-4); }

.site-footer { color: var(--text-muted); font-size: 0.9375rem; }

/* Motion is opt-out: whoever asks the system for less sees everything still and at once. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Text pages (imprint, privacy policy): the design artifact's template, one reading column of at most 560 px. */
.legal { max-width: 35rem; margin: 0 auto; overflow-wrap: break-word; hyphens: auto; }

.legal h2 { font-size: 1.5rem; line-height: 1.25; margin: var(--space-7) 0 var(--space-3); }

.legal h3 { font-family: var(--font-sans); font-weight: 800; font-size: 1.0625rem; line-height: 1.3; margin: var(--space-5) 0 var(--space-2); }

.legal p, .legal li { line-height: 1.625; }

.legal ul { padding-left: var(--space-5); }

.legal__lede { font-size: 1.125rem; color: var(--text-muted); }

.legal__binding, .legal__stand { color: var(--text-muted); font-size: 0.9375rem; }

/* An open point must catch the eye in review and on a test deploy; it never reaches the live site (ADR 0061). */
.need { background: var(--accent); color: var(--on-accent); padding: 0 var(--space-1); border-radius: var(--radius-s); font-weight: 700; }

.legal-links { display: flex; flex-wrap: wrap; column-gap: var(--space-6); }

.legal-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }

.legal-links a[aria-current="page"] { color: var(--text); }

/* Start page after the design artifact (REEFY-61): mobile below 720 px, desktop from 720 px. Bands run full width,
   their content stays in a column of at most 1200 px; flex-basis wraps put each example under its paragraph. */
.site-main:has(> .hero) { max-width: none; padding: 0; }

::selection { background: var(--primary); color: var(--on-primary); }

sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; bottom: -0.25em; }

.nb { display: inline-block; }

.hero, .band__inner, .closing > .store-soon {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.hero { padding-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-6); }

.hero__text { display: flex; flex-direction: column; gap: var(--space-6); }

.hero__intro { display: flex; flex-direction: column; gap: 0.875rem; }

.hero__title { margin: 0; font-size: 2.5rem; font-size: clamp(2.125rem, 10.3vw, 2.5rem); line-height: 1.15; letter-spacing: 0.015em; hyphens: manual; }

.hero__lede { margin: 0; font-size: 1.125rem; line-height: 1.556; }

.store-soon { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }

.store-soon__line { margin: 0; font-size: 1.25rem; line-height: 1.4; font-weight: 800; hyphens: manual; text-wrap: balance; }

.store-soon__note { margin: 0; font-size: 0.9375rem; line-height: 1.467; font-weight: 600; color: var(--text-muted); }

.hero__icon { position: relative; display: flex; justify-content: center; }

.hero__bubbles { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

.hero__bubbles--wide { display: none; }

.bubble { fill: none; stroke: var(--primary); stroke-width: 1.5; opacity: 0.55; }

.hero__image { position: relative; display: block; width: 176px; max-width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 22.37%; box-shadow: 0 0 0 1px var(--card-edge), var(--shadow-3); }

.wave { display: block; width: 100%; height: 32px; margin-bottom: -1px; }

.wave--hero { height: 48px; margin-top: 28px; }

.wave__line { fill: none; stroke: var(--primary); stroke-width: 2; }

.wave--hero .wave__fill, .wave--surface-soft { fill: var(--surface); }

.wave--surface-soft { background: var(--surface); }

.wave--surface-soft .wave__fill, .wave--bg-soft .wave__fill { fill: var(--primary-soft); }

.wave--soft-bg, .wave--soft-primary { background: var(--primary-soft); }

.wave--soft-bg .wave__fill { fill: var(--bg); }

.wave--soft-primary .wave__fill { fill: var(--primary); }

.band--surface { background: var(--surface); }

.band--soft { background: var(--primary-soft); }

.band__inner { padding-top: var(--space-7); padding-bottom: var(--space-8); }

.cards { display: flex; flex-direction: column; gap: var(--space-6); }

.card { padding: var(--space-5); border-radius: 20px; background: var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow-1); }

.card--chart { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-5) var(--space-9); }

.card__intro { flex: 1 1 18.75rem; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }

.card__title { margin: 0; font-size: 1.5rem; line-height: 1.25; }

.card__text { margin: 0; max-width: 35rem; }

.illustration { display: block; flex: none; width: 72px; height: 72px; margin-left: -8px; }

.cards__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr)); gap: var(--space-5); }

.card--small { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3) var(--space-5); }

.card__body { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }

.topic { display: flex; flex-direction: column; gap: var(--space-5); }

.topic__title { margin: 0; font-size: 1.75rem; line-height: 1.286; text-wrap: balance; }

.topic__text { margin: 0; max-width: 35rem; }

.topic__pairs { display: flex; flex-direction: column; gap: var(--space-7); }

.pair { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) 4rem; }

.pair__text, .pair__column { flex: 1 1 26.25rem; min-width: 0; max-width: 35rem; margin: 0; }

.pair__column { display: flex; flex-direction: column; gap: var(--space-4); }

.pair__column p { margin: 0; }

.lead { display: block; margin-bottom: var(--space-2); font-size: 1.25rem; line-height: 1.4; font-weight: 800; hyphens: manual; text-wrap: balance; }

.sunk { flex: 1 1 26.25rem; min-width: 0; padding: var(--space-4); border-radius: 20px; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--sink); }

.units { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); }

.units__step { display: inline-flex; align-items: center; gap: var(--space-2); }

.units__eq { color: var(--text-muted); }

.unit-chip { padding: 0.5625rem 0.75rem; display: inline-flex; align-items: baseline; gap: var(--space-1); border-radius: 14px; background: var(--card); border: 1px solid var(--border); }

.empty-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.5rem), 1fr)); grid-template-rows: auto auto; gap: var(--space-3) 0.875rem; }

.empty-fields__case { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: var(--space-3); }

.empty-fields__trace { display: flex; flex-direction: column; gap: 0.375rem; }

.empty-fields__trace svg { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--card); }

.mk-reading { fill: var(--accent); }

.export-path { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3) var(--space-4); }

.export-path__image { display: block; flex: 1 1 60px; min-width: 60px; max-width: 88px; height: auto; aspect-ratio: 1 / 1; }

.export-path__steps { margin: 0; padding: 0; min-width: 0; list-style: none; display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }

.export-path__step { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }

.export-path__arrow { display: block; margin-left: 14px; }

.export-path__arrow path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chip { display: inline-block; min-height: 0; cursor: default; padding: 0.4375rem 0.75rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); font-size: 0.9375rem; line-height: 1.333; font-weight: 700; hyphens: manual; }

.closing { background: var(--primary); color: var(--on-primary); }

.closing > .store-soon { padding-top: var(--space-6); padding-bottom: var(--space-8); }

.store-soon--closing .store-soon__note { color: var(--on-primary); }

.closing ::selection { background: var(--on-primary); color: var(--primary); }

/* KH sample chart. Geometry in px like the app chart, whose canvas text does not follow the font size either
   (ADR 0053); day positions per class because the CSP allows no inline style. */
.kh-figure { flex: 2 1 27.5rem; min-width: 0; margin: 0; padding-top: var(--space-5); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.875rem; }

.kh-head { display: flex; flex-direction: column; gap: 2px; }

.kh-muted, .kh-caption { color: var(--text-muted); }

.kh-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

.kh { position: relative; min-width: var(--kh-min, 232px); height: 226px; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums lining-nums; }

.kh-band { position: absolute; left: 40px; right: var(--kh-r, 92px); top: 10px; height: 176px; border-radius: 6px; background: var(--status-gradient); }

.kh-grid { position: absolute; left: 40px; top: 0; width: calc(100% - 40px); height: 226px; overflow: visible; }

.kh-ax { position: absolute; left: 0; width: 36px; text-align: right; font-weight: 700; color: var(--text-muted); }

.kh-ax--100 { top: 26px; }
.kh-ax--85 { top: 74px; }
.kh-ax--80 { top: 90px; }
.kh-ax--75 { top: 106px; }
.kh-ax--60 { top: 154px; }

.kh-zone { position: absolute; z-index: 1; right: var(--kh-zr, 0); width: var(--kh-zw, 84px); text-align: var(--kh-za, left); font-weight: 800; color: var(--text); white-space: nowrap; }

.kh-zone--mirror { display: var(--kh-zb, block); right: 0; width: 84px; text-align: left; }

.kh-zone--top { top: 14px; }
.kh-zone--upper { top: 50px; }
.kh-zone--target { top: 90px; margin-top: var(--kh-zs, 0); }
.kh-zone--lower { top: 130px; }
.kh-zone--bottom { top: 166px; }

.kh-plot { position: absolute; left: 40px; right: var(--kh-r, 92px); top: 10px; height: 176px; }

.kh-plot > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.kh-mk { position: absolute; left: var(--x); top: var(--y); margin: -9px 0 0 -9px; overflow: visible; }

.kh-days { position: absolute; left: 40px; right: var(--kh-r, 92px); top: 196px; height: 6px; }

.kh-tick { position: absolute; left: var(--x); top: 0; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: var(--text-muted); }

.kh-gap { position: absolute; left: var(--x); top: -1px; width: 8px; height: 8px; margin-left: -4px; border: 1.75px solid var(--text-muted); border-radius: 50%; }

.kh-gap-label { position: absolute; left: var(--x); top: 14px; transform: translateX(-50%); white-space: nowrap; font-weight: 700; color: var(--text-muted); }

.kh-d1 { --x: 6%; --y: 91.2px; }
.kh-d2 { --x: 17%; --y: 62.4px; }
.kh-d3 { --x: 28%; --y: 84.8px; }
.kh-d4 { --x: 39%; }
.kh-d5 { --x: 50%; --y: 126.4px; }
.kh-d6 { --x: 61%; --y: 161.6px; }
.kh-d7 { --x: 72%; --y: 142.4px; }
.kh-d8 { --x: 83%; --y: 123.2px; }
.kh-d9 { --x: 94%; --y: 100.8px; }

.legend svg.legend-wide { width: 30px; }

/* Narrow chart below 390 px page width (artifact note n-narrow): band over the full width, the upper zone names
   inside the band, the mirrored lower ones left to the legend. */
@media (max-width: 389.98px) {
  .kh { --kh-r: 0px; --kh-min: 190px; --kh-zr: 8px; --kh-zw: auto; --kh-za: right; --kh-zs: -10px; --kh-zb: none; }
}

@media (min-width: 720px) {
  .site-header { min-height: 80px; padding: var(--space-4) var(--space-8); }
  .wordmark { font-size: 2rem; gap: var(--space-3); }
  .wordmark__icon { width: 48px; height: 48px; }
  .hero, .band__inner, .closing > .store-soon { padding-left: var(--space-8); padding-right: var(--space-8); }
  .hero { padding-top: var(--space-7); flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-8) 4rem; }
  .hero__text { flex: 1 1 21.25rem; min-width: 0; gap: var(--space-7); }
  .hero__intro { gap: var(--space-5); }
  .nw { white-space: nowrap; }
  .hero__title { font-size: 4rem; font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1.1; }
  .hero__lede { max-width: 36.25rem; font-size: 1.25rem; line-height: 1.5; }
  .store-soon { gap: var(--space-2); }
  .store-soon__line { font-size: 1.5rem; line-height: 1.33; }
  /* Desktop artboard: the icon sits inset in a square box and the bubbles rise outside it, never behind it. */
  .hero__icon { flex: 0 0 32%; min-width: 220px; max-width: 352px; aspect-ratio: 1 / 1; align-items: center; }
  .hero__image { width: 90.91%; }
  .hero__bubbles--narrow { display: none; }
  .hero__bubbles--wide { display: block; }
  .wave { height: 40px; }
  .wave--hero { height: 72px; margin-top: var(--space-8); }
  .band__inner { padding-top: var(--space-8); padding-bottom: 3.5rem; }
  .cards { gap: var(--space-7); }
  .card--chart { padding: var(--space-7); }
  .card--chart .kh-figure { padding-top: 0; border-top: 0; }
  .card--small { padding: var(--space-6); flex-wrap: nowrap; }
  .illustration { width: 96px; height: 96px; margin-left: 0; }
  .card--chart .illustration { margin-left: -11px; }
  .topic__title { font-size: 2.25rem; line-height: 1.222; }
  .lead { font-size: 1.5rem; line-height: 1.333; }
  .sunk { padding: var(--space-6) 1.75rem; }
  .export-path { gap: var(--space-4) var(--space-7); }
  .export-path__image { flex-basis: 104px; min-width: 104px; max-width: 168px; }
  .chip { padding: var(--space-2) 0.875rem; font-size: 1rem; }
  .closing > .store-soon { padding-top: 1.75rem; padding-bottom: var(--space-9); }
}

/* Order of the staggered steps (artboard "Animation je Abschnitt"); a class, because the CSP allows no inline style. */
.i-0 { --i: 0; }
.i-1 { --i: 1; }
.i-2 { --i: 2; }
.i-3 { --i: 3; }
.i-4 { --i: 4; }
.i-5 { --i: 5; }

/* Motion of the artboard "Animation je Abschnitt", only transform and opacity, only for whoever does not ask the
   system for less. The markup is the final state: without site.js the class js is missing and nothing is hidden. The
   hero and the badge block carry no reveal, so they never move. The wave and the sample chart stay still: a drawing
   chart would suggest the app animates its chart (owner decision, REEFY-62). */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 480ms ease-out, transform 480ms ease-out; transition-delay: calc(var(--i, 0) * 80ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }

  .bubble { transform-box: fill-box; animation: rf-bubble 12s linear infinite; animation-delay: calc(var(--i) * -2.3s); }
}

@keyframes rf-bubble {
  0% { opacity: 0; transform: translateY(0); }
  15%, 70% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-140px); }
}

@media print {
  article, figure, .closing { break-inside: avoid; }
  .closing { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* A section not yet scrolled into view prints too. */
  .js .reveal { opacity: 1; transform: none; }
}
