/* somary.app: Startseite (de und en). Farben, Schriften und Radien wie in der App (docs/Design.md). */

/* Schriften liegen auf dem eigenen Server: kein Abruf bei Google Fonts, keine Daten an Dritte */
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif_400Regular.woff2") format("woff2"),
       url("fonts/InstrumentSerif_400Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans_400Regular.woff2") format("woff2"),
       url("fonts/InstrumentSans_400Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans_600SemiBold.woff2") format("woff2"),
       url("fonts/InstrumentSans_600SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* Tokens: hell */
:root {
  --bg: #F5F2EC;
  --surface: #FFFFFF;
  --surface-2: #EDE9E1;
  --border: #D5CFC4;
  --hairline: #E8E3D9;
  --text: #1A1814;
  --muted: #6B655A;
  --faint: #8A8478;
  --accent: #BC4428;
  --accent-pressed: #A23A22;
  --on-accent: #FFFFFF;
  --bezel: #1A1814;
  --tint: 14%;
  --faded: .42;
  --tile-old: #E2A5BD;
  /* Somary Plus: warmer Stein, hell und dunkel gleich */
  --plus: #6E625A;
  --plus-deep: #5D534C;
  --on-plus: #FBF7F1;
  --on-plus-muted: #EDE6DD;
  /* Bereichsfarben (Nutzerdaten in der App): nur Flächen, nie Text */
  --red: #C84B2F;
  --orange: #C87A2F;
  --yellow: #D4A843;
  --teal: #3AA88E;
  --blue: #2A5FC8;
  --purple: #7B3AC8;
  --pink: #C83A7B;
  --green: #2A7A4B;
  color-scheme: light;
}

/* Tokens: dunkel */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #201E1B;
    --surface-2: #2A2724;
    --border: #4A453E;
    --hairline: #38342E;
    --text: #F2EEE6;
    --muted: #ABA497;
    --faint: #726C62;
    --accent: #E2643F;
    --accent-pressed: #EC7B58;
    --on-accent: #121110;
    --bezel: #000000;
    --tint: 20%;
    --faded: .55;
    --tile-old: #76284B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110;
  --surface: #201E1B;
  --surface-2: #2A2724;
  --border: #4A453E;
  --hairline: #38342E;
  --text: #F2EEE6;
  --muted: #ABA497;
  --faint: #726C62;
  --accent: #E2643F;
  --accent-pressed: #EC7B58;
  --on-accent: #121110;
  --bezel: #000000;
  --tint: 20%;
  --faded: .55;
  --tile-old: #76284B;
  color-scheme: dark;
}

/* Grundlage */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Keine automatische Trennung: sie zerlegte den Namen („So-mary“) */
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: break-word;
}
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: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 400; margin: 0; hyphens: manual; -webkit-hyphens: manual; }
h2, h3 { font-family: "Instrument Serif", Georgia, serif; text-wrap: balance; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 380px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--border);
}
.skip:focus { top: 16px; }

/* Marke (Kopf mit Kacheln, docs/Symbol.md) */
.mark { display: block; width: 36px; height: 36px; }
.mark .old { fill: var(--tile-old); }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.home { display: inline-flex; align-items: center; min-width: 48px; min-height: 48px; border-radius: 12px; }
.nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  color: var(--text); text-decoration: none; font-size: 16px; border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); }
.nav .lang { border: 1px solid var(--border); margin-left: 8px; padding: 0 16px; }
@media (max-width: 759px) { .nav .section-link { display: none; } }

/* Hero */
.hero { border-bottom: 1px solid var(--hairline); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 24px; }
.hero-text { min-width: 0; padding-bottom: 8px; }
.name {
  display: block;
  font: 400 clamp(88px, 20vw, 184px)/.86 "Instrument Serif", Georgia, serif;
  letter-spacing: -.015em;
  margin-left: -.04em;
}
.tagline {
  display: block; margin-top: 14px;
  font: 400 clamp(30px, 6vw, 46px)/1.1 "Instrument Serif", Georgia, serif;
}
.lead { margin-top: 28px; max-width: 34em; font-size: clamp(18px, 2.2vw, 20px); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 14px 28px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 18px; line-height: 1.2; text-decoration: none; text-align: center;
}
.button:hover { background: var(--accent-pressed); }
.fine { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Hinweis auf den geschlossenen Test (beim Start von 2.0.0 entfernen) */
.notice {
  margin-top: 28px; max-width: 34em; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  font-size: 16px; line-height: 1.5;
}
.notice strong { display: block; font-weight: 600; margin-bottom: 2px; }
.notice a { color: var(--text); font-weight: 600; white-space: nowrap; }

/* Band wie auf „Heute“: jede Kachel eine ausgefüllte Angabe, die neuesten kräftig und rechts */
.band {
  display: flex; justify-content: flex-end; gap: 6px; overflow: hidden;
  height: 30px; padding: 4px 0; margin-top: 30px; max-width: 34em; min-width: 0;
}
.band i { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--c); opacity: var(--faded); }
.band i.new { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .band i.new { animation: tile-in 420ms cubic-bezier(.2, .8, .3, 1.2) both; }
  .band i.new:nth-last-child(7) { animation-delay: 500ms; }
  .band i.new:nth-last-child(6) { animation-delay: 610ms; }
  .band i.new:nth-last-child(5) { animation-delay: 720ms; }
  .band i.new:nth-last-child(4) { animation-delay: 830ms; }
  .band i.new:nth-last-child(3) { animation-delay: 940ms; }
  .band i.new:nth-last-child(2) { animation-delay: 1050ms; }
  .band i.new:nth-last-child(1) { animation-delay: 1160ms; }
  @keyframes tile-in { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
.c-red { --c: var(--red); }
.c-orange { --c: var(--orange); }
.c-yellow { --c: var(--yellow); }
.c-teal { --c: var(--teal); }
.c-blue { --c: var(--blue); }
.c-purple { --c: var(--purple); }
.c-pink { --c: var(--pink); }
.c-green { --c: var(--green); }

/* Gerät: Bildschirm mit dunklem Rahmen, unten angeschnitten */
.device {
  border: 9px solid var(--bezel); border-bottom: 0;
  border-radius: 40px 40px 0 0; overflow: hidden; background: var(--bezel);
}
.device img { border-radius: 31px 31px 0 0; }
.hero-phone { height: 440px; overflow: hidden; width: min(300px, 82vw); justify-self: center; }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding-top: 40px; }
  .hero-text { padding-bottom: 72px; }
  .hero-phone { align-self: end; width: 330px; height: 600px; justify-self: end; margin-right: 12px; }
}

/* Abschnitte */
.section { padding: 88px 0; }
.section + .section { padding-top: 0; }
.section-title { font-size: clamp(40px, 6.4vw, 60px); line-height: 1.02; letter-spacing: -.01em; }
.section-lead { margin-top: 18px; max-width: 36em; font-size: clamp(18px, 2.2vw, 20px); color: var(--muted); }

/* Funktionen: Text neben einem Bildschirm auf einer Fläche in der Bereichsfarbe */
.features { display: grid; gap: 72px; margin: 56px 0 0; padding: 0; list-style: none; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.feature h3 { font-size: clamp(30px, 4vw, 40px); line-height: 1.08; }
.feature p { margin-top: 14px; max-width: 32em; }
.feature p + p { margin-top: 12px; }
.tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--plus); color: var(--on-plus); font-size: 14px; font-weight: 600; line-height: 1.4;
}
.panel {
  position: relative; overflow: hidden; border-radius: 24px;
  aspect-ratio: 5 / 5.4;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--c) var(--tint), var(--surface));
  border: 1px solid var(--hairline);
  border-color: color-mix(in srgb, var(--c) calc(var(--tint) + 8%), var(--surface));
}
.panel .device { position: absolute; left: 50%; top: 9%; width: min(68%, 280px); transform: translateX(-50%); }
@media (min-width: 900px) { .panel .device { width: min(62%, 280px); } }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .feature:nth-child(even) .panel { order: -1; }
  .feature .feature-text { padding: 0 8px; }
}

/* Privat: Angaben wie in einem Eintrag der App (Beschriftung klein, Wert darunter, Haarlinien) */
.private-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 56px; align-items: start; }
.cards { display: grid; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 8px 22px; }
.card h3 { font-size: 27px; line-height: 1.15; padding: 16px 0 10px; }
.facts { margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--hairline); }
.facts dt { color: var(--muted); font-size: 15px; line-height: 1.4; }
.facts dd { margin: 2px 0 0; line-height: 1.5; }
.aside { margin-top: 4px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 36em; }
@media (min-width: 900px) {
  .private-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .private-grid .panel { position: sticky; top: 24px; }
}

/* Somary Plus: eigene Fläche in warmem Stein wie in der App */
.plus { background: var(--plus); color: var(--on-plus); padding: 88px 0; }
.plus :focus-visible { outline-color: var(--on-plus); }
.plus a { color: var(--on-plus); }
.plus-tiles { display: flex; gap: 6px; margin-bottom: 24px; }
.plus-tiles i { width: 16px; height: 16px; border-radius: 5px; background: var(--c); }
.plus .section-lead { color: var(--on-plus-muted); }
.plus-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 48px; }
.plus h3 { font-size: 27px; line-height: 1.15; }
.plus-list { margin: 16px 0 0; }
.plus-list div { padding: 14px 0; border-top: 1px solid rgba(251, 247, 241, .22); }
.plus-list dt { font-weight: 600; }
.plus-list dd { margin: 2px 0 0; color: var(--on-plus-muted); }
.price-card { background: var(--plus-deep); border-radius: 18px; padding: 26px 24px; }
.price-card .price { margin-top: 12px; color: var(--on-plus); font: 400 clamp(34px, 4.6vw, 42px)/1.1 "Instrument Serif", Georgia, serif; }
.price-card .price span { display: block; }
.price-card p { margin-top: 14px; color: var(--on-plus-muted); font-size: 16px; line-height: 1.55; }
.free { margin-top: 20px; border: 1px solid rgba(251, 247, 241, .3); border-radius: 18px; padding: 22px 24px; }
.free p { margin-top: 10px; color: var(--on-plus-muted); }
@media (min-width: 900px) {
  .plus-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}

/* Häufige Fragen */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.faq-aside { margin-top: 16px; color: var(--muted); max-width: 22em; }
.faq-list { border-bottom: 1px solid var(--hairline); }
.faq-list details { border-top: 1px solid var(--hairline); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 14px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 19px; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: translateY(-3px) rotate(45deg);
}
.faq-list details[open] summary::after { transform: translateY(3px) rotate(225deg); }
@media (prefers-reduced-motion: no-preference) { .faq-list summary::after { transition: transform 180ms ease; } }
.faq-list details p { padding: 0 32px 22px 0; max-width: 36em; }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
}

/* Fuß */
.foot { border-top: 1px solid var(--hairline); padding: 48px 0 40px; font-size: 16px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand span { font: 400 30px/1 "Instrument Serif", Georgia, serif; }
.foot-about { margin-top: 12px; color: var(--muted); max-width: 26em; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 4px 32px; margin: 0; padding: 0; list-style: none; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.foot-note { margin-top: 36px; color: var(--muted); font-size: 15px; }
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .foot-links { grid-template-columns: repeat(3, minmax(0, max-content)); }
}

/* Nur für Screenreader */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nowrap { white-space: nowrap; }
