/* Detox Handy, Webseite. Farben aus dem Design „Salbei“ der App (ui/theme/Design.kt), Schriften wie in der App. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #111714;
  --surface: #1b2420;
  --text: #e6eeea;
  --muted: #a9b8b0;
  --accent: #6fc2a5;
  --on-accent: #111714;
  --outline: #2e3a34;
  --divider: #27322d;
  --strong-outline: #4a5852;
  --accent-container: #1f3a31;
  --on-accent-container: #bfe6d7;
  --breath-bg: #14231e;
  --breath-ring: #1e3c33;
  --breath-core: #2a5a4b;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page: 70rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 1.0625rem/1.65 var(--sans);
  hyphens: auto;
  overflow-wrap: break-word;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, .wordmark, .statement {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.012em;
  hyphens: manual;
}

p { margin: 0 0 1rem; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: .6rem 1rem; background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-decoration: none; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 1rem; }

/* Kopf und Fuß */

.site-head-in, .site-foot, .wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Kopfzeile als eigenes Band über die ganze Breite, damit man sie sofort als Menü erkennt */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--strong-outline);
}
.site-head-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  column-gap: 2rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.5rem; color: var(--text); text-decoration: none;
  padding: .75rem 0;
}
.wordmark img { width: 1.75rem; height: 1.75rem; }
.site-head nav { display: flex; flex-wrap: wrap; column-gap: 1.75rem; }
.site-head nav a {
  color: var(--text); text-decoration: none; font-size: .975rem;
  padding: 1.15rem 0 1rem;
  /* Balken unter der aktuellen Seite sitzt auf der Linie des Bands */
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.site-head nav a:hover { color: var(--accent); }
.site-head nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }

.site-foot {
  margin-top: 6rem;
  padding-top: 2rem; padding-bottom: 3rem;
  /* Linie nur so breit wie der Inhalt, nicht über den Seitenrand hinaus */
  background: linear-gradient(var(--divider), var(--divider)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  color: var(--muted); font-size: .95rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem;
}
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }

/* Startseite */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 2rem 4rem;
  padding-top: clamp(2rem, 7vw, 5.5rem);
  padding-bottom: 2rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.04;
  margin: 0 0 1.75rem;
  max-width: 13ch;
}
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.55; max-width: 32rem; }
.lead + .lead { color: var(--muted); }
.meta { margin-top: 2rem; color: var(--muted); font-size: .975rem; }
.meta strong { color: var(--on-accent-container); font-weight: 700; }

/* Atemkreis hinter dem Handy: 4 s ein, 6 s aus, wie in der App */
.breath {
  position: relative;
  display: grid; place-items: center;
  padding: 2.5rem 0;
}
.breath::before, .breath::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  translate: -50% -50%;
  animation: breathe 10s ease-in-out infinite;
}
.breath::before { width: min(34rem, 118%, 94vw); aspect-ratio: 1; background: var(--breath-bg); }
.breath::after  { width: min(24rem, 84%, 70vw);  aspect-ratio: 1; background: var(--breath-ring); opacity: .55; animation-delay: -.4s; }
@keyframes breathe {
  0%   { scale: .84; }
  40%  { scale: 1; }
  100% { scale: .84; }
}

.phone {
  position: relative; z-index: 1;
  width: clamp(14rem, 25vw, 19rem);
  border-radius: 1.9rem;
  border: 1px solid var(--outline);
  background: var(--bg);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 2.5rem 5rem;
  padding-top: clamp(4rem, 9vw, 7.5rem);
}
.feature.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.feature.flip .shot { order: -1; }
.feature .shot { display: flex; justify-content: center; }
.feature h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.feature .text { max-width: 36rem; }
.feature .text > p:first-of-type { font-size: 1.15rem; }

.rules { margin: 1.75rem 0 1.5rem; padding: 0; }
.rules div {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .25rem 1.25rem;
  padding: .8rem 0; border-top: 1px solid var(--divider);
}
.rules div:last-child { border-bottom: 1px solid var(--divider); }
.rules dt { font-weight: 700; }
.rules dd { margin: 0; color: var(--muted); }

.plain { list-style: none; margin: 1.5rem 0; padding: 0; }
.plain li { padding: .55rem 0 .55rem 1.4rem; position: relative; }
.plain li::before {
  content: ""; position: absolute; left: 0; top: 1.1rem;
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent);
}
.plain li strong { color: var(--text); }

.note {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  background: var(--accent-container); color: var(--on-accent-container);
  border-radius: 12px;
}

/* Großer Satz ohne Bild */
.principle { padding-top: clamp(5rem, 11vw, 9rem); }
.statement {
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 1.08;
  margin: 0 0 2rem;
  max-width: 21ch;
}
.statement span { color: var(--accent); display: block; }
.principle .cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem;
  max-width: 56rem; margin-left: clamp(0rem, 8vw, 7rem);
}

.more { padding-top: clamp(4rem, 9vw, 7.5rem); }
.more .grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2.5rem 5rem; align-items: start;
}
.more h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.1; margin: 0 0 1rem; }
.more .plain { columns: 2 17rem; column-gap: 3rem; margin-top: .5rem; }
.more .plain li { break-inside: avoid; }
.more .shot { display: flex; justify-content: center; }
.more .phone { width: clamp(12rem, 20vw, 15.5rem); }

.privacy { padding-top: clamp(4rem, 9vw, 7.5rem); }
.privacy .box {
  border-top: 1px solid var(--divider);
  padding-top: 3rem;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem 5rem;
}
.privacy h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.1; margin: 0; max-width: 14ch; }

.coming { padding-top: clamp(4rem, 9vw, 7rem); }
.coming p { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.3; max-width: 30ch; margin: 0; }
.coming p span { color: var(--muted); }

@media (max-width: 52rem) {
  .hero, .feature, .feature.flip, .more .grid, .privacy .box, .principle .cols { grid-template-columns: minmax(0, 1fr); }
  .feature .shot, .feature.flip .shot { order: 1; }   /* auf dem Handy immer erst der Text */
  .principle .cols { margin-left: 0; }
  .hero { padding-top: 1.5rem; }
  .phone { width: min(17rem, 78vw); }
  .rules div { grid-template-columns: minmax(0, 1fr); }
  /* Kopfzeile: Schriftzug oben, Menü darunter, Abstände knapper */
  .wordmark { padding: 1rem 0 .1rem; }
  .site-head nav { column-gap: 1.25rem; }
  .site-head nav a { padding: .6rem 0 .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .breath::before, .breath::after { animation: none; }
}

/* Impressum und Datenschutz */

.legal { max-width: 46rem; padding-top: 2.5rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 1rem; }
.legal h2 {
  font-size: 1.5rem; line-height: 1.25;
  margin: 2.75rem 0 .75rem; padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}
.legal h3 { font-size: 1.075rem; margin: 1.75rem 0 .4rem; }
.legal p, .legal ul { margin: 0 0 1rem; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .3rem 0; }
.legal li::marker { color: var(--accent); }
.legal a { overflow-wrap: anywhere; }

@media print {
  :root { --bg: #fff; --text: #111; --muted: #444; --accent: #1d5c47; --divider: #ccc; color-scheme: light; }
  .site-head nav, .skip { display: none; }
  .site-head { background: none; border-bottom: 0; }
  .site-foot { margin-top: 2rem; }
}
