/* ==========================================================================
   Pfotentagebuch – Website Stylesheet
   Farben und Tokens stammen aus der App (lib/app/theme/app_colors.dart,
   docs/design/brand_tokens.md). Keine externen Ressourcen: keine Web-Fonts,
   keine CDNs, keine Tracker – so bleibt die Datenschutzerklaerung wahr.
   ========================================================================== */

:root {
  /* Marke */
  --mint-50:  #F0FBF7;
  --mint-100: #D7F4EA;
  --mint-200: #B8E9DB;
  --mint-300: #91D8C7;
  --mint-400: #78D7C4;
  --mint-500: #2E9B86;
  --mint-700: #006B5F;
  --mint-800: #005047;
  --mint-900: #00382F;

  --coral-100: #FFDAD6;
  --coral-300: #FFB4AB;
  --coral-500: #FF7168;
  --coral-700: #A83F37;

  --cream-50:  #FFFBF8;
  --cream-100: #FFF3E6;
  --cream-200: #F8E4CE;

  /* Rollen – Light */
  --bg: var(--cream-50);
  --bg-soft: var(--cream-100);
  --surface: #FFFFFF;
  --surface-alt: #FFF7F0;
  --brand-surface: var(--mint-100);
  --primary: var(--mint-700);
  --primary-hover: var(--mint-800);
  --on-primary: #FFFFFF;
  --accent: var(--coral-700);
  --accent-soft: var(--coral-100);
  --text: #1B1C1A;
  --text-muted: #454A47;
  --outline: #C3C9C5;
  --outline-strong: #747976;
  --shadow: 0 1px 2px rgba(27, 28, 26, .06), 0 8px 24px rgba(27, 28, 26, .06);
  --shadow-lg: 0 2px 4px rgba(27, 28, 26, .06), 0 18px 48px rgba(27, 28, 26, .10);

  /* Layout */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --maxw-text: 760px;
  --space: 1rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111916;
    --bg-soft: #0B100E;
    --surface: #18211E;
    --surface-alt: #1C2522;
    --brand-surface: #1C2522;
    --primary: var(--mint-400);
    --primary-hover: var(--mint-300);
    --on-primary: #00382F;
    --accent: var(--coral-300);
    --accent-soft: #2A211F;
    --text: #E1E5E1;
    --text-muted: #C3C8C4;
    --outline: #414844;
    --outline-strong: #8D938F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .40), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 48px rgba(0, 0, 0, .45);
  }
}

/* --------------------------------------------------------------- Basis -- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem); }
p  { margin: 0 0 1.1em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: .75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: var(--maxw-text); margin-bottom: 2.5rem; }
.section__head p { color: var(--text-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .6rem;
}

.lead { font-size: 1.1875rem; color: var(--text-muted); }

/* ------------------------------------------------------------- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease,
              transform .18s ease;
}
.btn:active { transform: translateY(1px); }

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

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--outline);
}
.btn--ghost:hover { background: var(--brand-surface); border-color: var(--primary); }

.btn--disabled {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--outline);
  cursor: default;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

/* -------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg); /* Rueckfall fuer Browser ohne color-mix */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--outline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .5rem .9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-block;
  padding: .55rem .8rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .96rem;
}
.nav a:hover { background: var(--brand-surface); color: var(--text); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--brand-surface); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--outline);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1.25rem 1rem;
    max-width: var(--maxw);
    margin-inline: auto;
  }
  .nav a {
    display: block;
    padding: .85rem .75rem;
    border-radius: var(--radius-sm);
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(60rem 30rem at 78% -12%, var(--brand-surface) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: .35em; }
.hero__claim { max-width: 34ch; }

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--outline);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero__art {
  display: grid;
  place-items: center;
}
.hero__art img {
  width: min(320px, 78%);
  border-radius: 28%;
  box-shadow: var(--shadow-lg);
}

.store-note {
  margin-top: .9rem;
  font-size: .9rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .hero__art img { width: min(200px, 55%); }
}

/* --------------------------------------------------------------- Cards -- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { margin-bottom: 0; color: var(--text-muted); }

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--brand-surface);
  color: var(--primary);
}
.card__icon svg { width: 24px; height: 24px; }

.card--accent .card__icon { background: var(--accent-soft); color: var(--accent); }

/* --------------------------------------------------------- Feature-List -- */

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text-muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--brand-surface);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: .34rem;
  top: .72em;
  width: .48rem;
  height: .26rem;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- Table -- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 34rem;
}
caption {
  text-align: left;
  padding: 1rem 1.25rem 0;
  color: var(--text-muted);
  font-size: .9rem;
}
th, td {
  text-align: left;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
}
thead th {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-alt);
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--primary); font-weight: 600; }
td.no  { color: var(--text-muted); }

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

.faq { display: grid; gap: .75rem; max-width: var(--maxw-text); }

details.qa {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 0 1.25rem;
}
details.qa[open] { border-color: var(--primary); }
details.qa > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2.25rem 1.1rem 0;
  font-weight: 600;
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after {
  content: "";
  position: absolute;
  right: .35rem;
  top: 1.45rem;
  width: .6rem;
  height: .6rem;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
details.qa[open] > summary::after { transform: rotate(-135deg); top: 1.65rem; }
details.qa > div { padding-bottom: 1.1rem; color: var(--text-muted); }
details.qa > div > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- Notes -- */

.note {
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  background: var(--brand-surface);
  border: 1px solid var(--outline);
}
.note--accent { background: var(--accent-soft); }
.note > *:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }

.cta {
  text-align: center;
  background: var(--brand-surface);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid var(--outline);
}
.cta p { max-width: 52ch; margin-inline: auto; color: var(--text-muted); }
.cta .btn-row { justify-content: center; }

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

.legal { max-width: var(--maxw-text); }
.legal h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--outline);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
.legal h3 { margin-top: 1.75rem; }
.legal ul, .legal ol { padding-left: 1.35rem; }
.legal li { margin-bottom: .45rem; }
.legal address {
  font-style: normal;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc h2 {
  font-size: 1rem;
  margin: 0 0 .75rem;
  border: 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .35rem; break-inside: avoid; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

.page-head {
  padding: clamp(2.5rem, 5vw, 4rem) 0 1rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
.page-head p { color: var(--text-muted); max-width: var(--maxw-text); margin-bottom: 0; }
.updated { font-size: .9rem; color: var(--text-muted); }

/* -------------------------------------------------------------- Footer -- */

.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--outline);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer p { color: var(--text-muted); font-size: .94rem; }
.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--outline);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--text-muted);
}

.disclaimer {
  font-size: .92rem;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------- Utils -- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
