/* Byways — Farbwelt aus app/lib/theme.dart, damit Website und App zusammengehören. */

:root {
  --cream: #f2efe9;
  --cream-deep: #e9e5dc;
  --forest: #1f3d2e;
  --forest-light: #2f5a44;
  --ink: #1a1d1b;
  --muted: #6b7280;
  --hairline: #e6e2d9;

  /* Zugangsstufen — dieselben Werte wie die Wege-Ebene in der App. */
  --free: #2f4858;
  --unclear: #dda15e;
  --forestry: #c1663c;
  --blocked: #a5303a;

  --measure: 68ch;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-light); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: var(--measure); }

/* ---------- Kopf ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 239, 233, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--forest);
  text-decoration: none;
}

.brand img { display: block; width: 30px; height: 30px; }

.site-head nav {
  display: flex;
  gap: 22px;
  font-size: 0.94rem;
}

.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover { color: var(--forest); }

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

.hero {
  position: relative;
  padding: 96px 0 84px;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(47, 90, 68, 0.16), transparent 62%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

/* Text links, Logo rechts. Das Logo trägt die Aussage mit (ein Weg, der sich
   durch das B schlängelt), deshalb bekommt es echten Platz statt einer
   Briefmarke in der Kopfzeile. */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.hero-logo img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-left: auto;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 14ch;
}

.hero .lead {
  margin: 0 0 32px;
  font-size: clamp(1.08rem, 2.1vw, 1.28rem);
  color: #3d4642;
  max-width: 54ch;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 22px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(31, 61, 46, 0.09);
  color: var(--forest);
  font-size: 0.79rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 620;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.14s ease, background 0.14s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--forest-light); color: var(--cream); }

.btn-ghost { border-color: rgba(31, 61, 46, 0.28); color: var(--forest); }
.btn-ghost:hover { background: rgba(31, 61, 46, 0.06); }

.cta-note { font-size: 0.9rem; color: var(--muted); margin: 14px 0 0; }

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

section { padding: 76px 0; }
section + section { border-top: 1px solid var(--hairline); }

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
}

h3 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 680; letter-spacing: -0.01em; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

.section-lead { font-size: 1.08rem; color: #3d4642; max-width: var(--measure); }

/* ---------- Kartenraster ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.card {
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.card p { font-size: 0.97rem; color: #4a534e; }

.card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(31, 61, 46, 0.09);
  color: var(--forest);
}

/* ---------- Schritte ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 28px;
  margin-top: 40px;
  counter-reset: step;
}

.step { counter-increment: step; }

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.93rem;
  font-weight: 700;
}

.step p { font-size: 0.97rem; color: #4a534e; }

/* ---------- Legende der Zugangsstufen ---------- */

.legend { margin-top: 36px; display: grid; gap: 2px; max-width: 640px; }

.legend-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  align-items: center;
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--hairline);
}

.legend-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.legend-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.legend-row + .legend-row { border-top: none; }

.legend-row .swatch { height: 5px; border-radius: 3px; }
.legend-row strong { display: block; font-size: 0.98rem; font-weight: 650; }
.legend-row span { font-size: 0.9rem; color: var(--muted); }

/* ---------- Ehrliche Grenzen ---------- */

.notice {
  padding: 28px 30px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--unclear);
  border-radius: var(--radius);
  margin-top: 32px;
}

.notice h3 { margin-bottom: 10px; }
.notice p { font-size: 0.97rem; color: #4a534e; }

/* ---------- Beta-Aufruf ---------- */

.beta {
  background: var(--forest);
  color: var(--cream);
  border-radius: 0;
}

.beta h2 { color: var(--cream); }
.beta p { color: rgba(242, 239, 233, 0.82); }
.beta .btn-primary { background: var(--cream); color: var(--forest); }
.beta .btn-primary:hover { background: #fff; color: var(--forest); }
.beta a { color: var(--cream); }

/* ---------- Fuß ---------- */

.site-foot {
  padding: 44px 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
  color: var(--muted);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--forest); text-decoration: underline; }

.attribution { width: 100%; margin: 22px 0 0; font-size: 0.85rem; line-height: 1.6; }

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

.legal { padding: 60px 0 84px; }
.legal .wrap { max-width: 760px; }

.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  font-weight: 780;
}

.legal .updated { margin: 0 0 40px; color: var(--muted); font-size: 0.92rem; }

.legal h2 {
  margin: 44px 0 14px;
  font-size: 1.32rem;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.legal h3 { margin: 28px 0 8px; font-size: 1.04rem; }
.legal p, .legal li { font-size: 1rem; }
.legal ul { margin: 0 0 18px; padding-left: 22px; }
.legal li { margin-bottom: 7px; }

.legal .box {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom: 26px;
}

.legal .box p { margin-bottom: 0; }
.legal .box p + p { margin-top: 10px; }

.legal .box.warn { border-left: 3px solid var(--blocked); }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}

.legal th { font-weight: 650; background: rgba(31, 61, 46, 0.045); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.back-link { display: inline-block; margin-bottom: 28px; font-size: 0.93rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--forest); }

/* ---------- Dunkles Systemthema ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #15181a;
    --cream-deep: #101315;
    --ink: #ecebe4;
    --muted: #9aa0a6;
    --hairline: #2c3134;
    --forest: #7fbb9b;
    --forest-light: #a3d3ba;
  }

  body { background: var(--cream); color: var(--ink); }
  .site-head { background: rgba(21, 24, 26, 0.92); }
  .card, .legend-row, .notice, .legal .box { background: #1e2224; }
  .legal th { background: rgba(127, 187, 155, 0.07); }
  .hero { background: linear-gradient(180deg, #15181a 0%, #101315 100%); }
  .hero .lead, .section-lead, .card p, .step p, .notice p { color: #b9c0bc; }
  .btn-primary { background: var(--forest); color: #10231a; }
  .btn-primary:hover { background: var(--forest-light); color: #10231a; }
  .step::before { background: var(--forest); color: #10231a; }
  .beta { background: #1c3a2c; }
  .beta h2, .beta a { color: #e7f2ec; }
  .beta p { color: rgba(231, 242, 236, 0.78); }
  .beta .btn-primary { background: #e7f2ec; color: #10231a; }
  .card .icon { background: rgba(127, 187, 155, 0.13); color: var(--forest); }
  .eyebrow { background: rgba(127, 187, 155, 0.14); color: var(--forest); }
}

/* Ab hier passen Text und Logo nicht mehr nebeneinander: Das Logo wandert über
   die Überschrift und wird klein, damit die Aussage zuerst gelesen wird. */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 128px; margin: 0; }
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 56px 0 56px; }
  .site-head nav { display: none; }
  .legend-row { grid-template-columns: 58px 1fr; gap: 14px; }
  .hero-logo img { max-width: 104px; }
}
