/* Dearly Kept — Website
   Design-Tokens gespiegelt aus Postkarte/Features/Shared/DesignSystem/Palette.swift
   und AccentChoice.swift (Akzent = Salbei). Aendern sich die Tokens in der App,
   hier mitziehen. */

:root {
  color-scheme: light dark;

  --paper:      #F6F1E7;
  --surface:    #FCF9F2;
  --elevated:   #FFFFFF;
  --ink:        #2A2622;
  --ink-2:      #6B6358;
  --hairline:   #E4DCCD;
  --accent:     #4FB8A8;
  --accent-ink: #FFFFFF;
  --shadow:     0 2px 8px rgba(42, 38, 34, .12);
  --shadow-lg:  0 12px 40px rgba(42, 38, 34, .14);

  --serif: ui-serif, "New York", Iowan Old Style, Georgia, Times New Roman, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --w: 68rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #1B1916;
    --surface:  #26231F;
    --elevated: #302C27;
    --ink:      #ECE5D8;
    --ink-2:    #A99F90;
    --hairline: #3A352F;
    --accent:   #67C9B8;
    --accent-ink: #14211F;
    --shadow:    0 2px 8px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 .75rem; }
h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
p  { margin: 0 0 1rem; }

a { color: var(--ink); text-underline-offset: .2em; text-decoration-color: var(--hairline); }
a:hover { text-decoration-color: var(--accent); }

.wrap { max-width: var(--w); margin-inline: auto; padding-inline: 1.5rem; }
.narrow { max-width: 44rem; }

.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34rem; }
.prose { max-width: 40rem; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */

header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
header.site .wrap { display: flex; align-items: center; gap: 1rem; height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.1rem; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: var(--shadow); }
nav.site { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
nav.site a { font-size: .95rem; color: var(--ink-2); text-decoration: none; }
nav.site a:hover { color: var(--ink); }
@media (max-width: 40rem) { nav.site a.hide-s { display: none; } }

/* ---------- Sprachumschalter ---------- */

.lang { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface); }
.lang button {
  font: inherit; font-size: .82rem; cursor: pointer; padding: .2rem .7rem;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Abschnitte ---------- */

section { padding: clamp(3rem, 8vw, 6rem) 0; }
section + section { border-top: 1px solid var(--hairline); }
.section-head { max-width: 38rem; margin-bottom: 2.5rem; }
.eyebrow { font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; font-weight: 600; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 56rem) { .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.hero-art { display: flex; justify-content: center; }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: 999px; font-size: .98rem; font-weight: 500;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--hairline); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Geraeterahmen ---------- */

.phone {
  width: min(270px, 72vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 2.4rem;
  padding: .55rem;
  background: linear-gradient(160deg, #3a352f, #14120f);
  box-shadow: var(--shadow-lg);
  flex: none;
}
.phone > .screen {
  width: 100%; height: 100%;
  border-radius: 2rem;
  overflow: hidden;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Platzhalter, solange keine echten Screenshots vorliegen */
.shot-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 1.5rem;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--hairline) 45%, transparent) 12px 13px),
    var(--surface);
  color: var(--ink-2);
}
.shot-placeholder .ph-title { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.shot-placeholder .ph-hint { font-size: .74rem; line-height: 1.4; }

/* ---------- Screenshot-Galerie ---------- */

.shots { display: flex; gap: 2.5rem; overflow-x: auto; padding: .5rem .25rem 1.5rem; scroll-snap-type: x mandatory; justify-content: safe center; }
.shots .phone { width: min(230px, 66vw); }
.shots figure { margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; gap: .85rem; align-items: center; }
.shots figcaption { font-size: .92rem; color: var(--ink-2); max-width: 270px; text-align: center; }

/* ---------- Funktionsraster ---------- */

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card .ico { font-size: 1.4rem; line-height: 1; margin-bottom: .8rem; display: block; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Preise ---------- */

.tiers { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); align-items: start; }
.tier { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); position: relative; }
.tier.featured { border-color: var(--accent); }
.tier .badge {
  position: absolute; top: -.7rem; left: 1.5rem;
  background: var(--accent); color: var(--accent-ink);
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .7rem; border-radius: 999px;
}
.price { font-family: var(--serif); font-size: 2rem; margin: .4rem 0 .1rem; }
.price small { font-family: var(--sans); font-size: .9rem; font-weight: 400; color: var(--ink-2); }
.tier ul { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.tier li { padding-left: 1.4rem; position: relative; margin-bottom: .5rem; font-size: .95rem; }
.tier li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }

/* ---------- FAQ ---------- */

.faq { max-width: 44rem; }
.faq details { border-bottom: 1px solid var(--hairline); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .85rem 0 0; color: var(--ink-2); }

/* ---------- Rechtstexte ---------- */

.legal { padding-top: 3rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.legal h2:first-of-type { margin-top: 1.5rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .5rem; }
.legal .updated { font-size: .9rem; color: var(--ink-2); margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline); }

.contact-box {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  margin: 1.5rem 0;
}
.contact-box a { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; color: var(--accent); }

/* ---------- Fusszeile ---------- */

footer.site { border-top: 1px solid var(--hairline); padding: 3rem 0; background: var(--surface); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: baseline; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
footer.site a { font-size: .93rem; color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
footer.site .copy { font-size: .88rem; color: var(--ink-2); margin-left: auto; }

/* Im Dunkeln braucht der Geraeterahmen eine Kante, sonst verschwindet
   er im Hintergrund, solange kein Screenshot darin liegt. */
@media (prefers-color-scheme: dark) {
  .phone { box-shadow: var(--shadow-lg), 0 0 0 1px var(--hairline); }
}

/* ---------- Sprachsichtbarkeit ----------
   Wird von assets/lang.js ueber html[lang] gesteuert. Ohne JavaScript bleibt
   die im Markup gesetzte Sprache (deutsch) sichtbar. */
html[lang="de"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="de"] { display: none !important; }

/* Screenshot liegt ueber dem Platzhalter; fehlt die Datei, entfernt
   assets/shots.js das Bild und der Platzhalter wird sichtbar. */
.phone .screen img[data-shot] { position: absolute; inset: 0; }

/* ---------- kleine Abstandshelfer ---------- */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.contact-box .label { margin: 0 0 .35rem; }
.contact-box .note  { margin: .75rem 0 0; }
