/* CityFlow Homepage
   Farbsystem uebernommen aus der CityFlow-App (cityflow-adf15.web.app):
   --accent #087f63, --accent-soft #e4f4ec, --border #c6dad3, Hintergrund #eaf3ef, Text #183b42 */

:root {
  --ink: #183b42;
  --muted: #4a6667;
  --bg: #eaf3ef;
  --surface: #ffffff;
  --accent: #087f63;
  --accent-deep: #09684f;
  --accent-soft: #e4f4ec;
  --line: #c6dad3;
  --sun: #e8a92a;
  --water: #3d93b3;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 280px;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: var(--accent-deep); }

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

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(234, 243, 239, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
.main-nav { display: none; margin-left: auto; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.main-nav a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.header-inner .btn { margin-left: auto; }
@media (min-width: 720px) { .main-nav + .btn { margin-left: 8px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 2px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--accent-deep); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }

/* Hero */
.hero { background: var(--bg); padding-block: clamp(36px, 6vw, 80px); scroll-margin-top: 70px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(2.05rem, 1.1rem + 4vw, 3.6rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  text-wrap: balance; margin-bottom: 22px;
}
.lead { font-size: clamp(1.05rem, 0.9rem + 0.55vw, 1.25rem); line-height: 1.55; max-width: 60ch; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 28px 0 0; font-size: 0.95rem; color: var(--muted); }

.hero-figure { margin: 0; }
.hero-figure figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

/* Karten-Illustration */
.map-wrap {
  position: relative; container-type: inline-size;
  aspect-ratio: 640 / 520;
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: #f2f8f4;
}
.route-map { display: block; width: 100%; height: 100%; }

.pin, .tag { position: absolute; display: block; line-height: 1.25; white-space: nowrap; }
.pin {
  padding: 0.5em 0.8em; border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
  font-size: clamp(11px, 2.35cqw, 14px);
  box-shadow: 0 2px 6px rgba(24, 59, 66, 0.12);
}
.pin b, .pin small { display: block; }
.pin b { font-weight: 700; }
.pin small { font-size: 0.88em; color: var(--muted); }
.pin-weather { left: 3%; top: 4%; padding-left: 2em; }
.pin-weather .sun {
  position: absolute; left: 0.7em; top: 50%; width: 0.85em; height: 0.85em; margin-top: -0.425em;
  border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 0.22em rgba(232, 169, 42, 0.25);
}
.pin-comfort { right: 4%; top: 2%; background: var(--accent); border-color: var(--accent); color: #fff; }
.pin-comfort small { color: #d6f1e6; }
.pin-fast { left: 29.5%; top: 62.5%; }

.tag {
  font-size: clamp(11px, 2.1cqw, 13px); font-weight: 600;
  padding: 0.3em 0.7em; border-radius: 99px;
  background: #fff; border: 1px solid var(--line);
  transform: translateX(-50%);
}
.tag-start { left: 17.2%; top: 55%; }
.tag-end { left: 81.25%; top: 67.5%; }
.tag-park {
  left: 65.6%; top: 30.5%; background: none; border: 0; padding: 0;
  font-style: italic; font-weight: 500; color: #3f7a5f;
}

/* Auf schmaler Karte entfaellt das Parklabel, damit nichts kollidiert */
@container (max-width: 440px) { .tag-park { display: none; } }

/* Einmalige Animation beim Laden: die Routen werden gezeichnet */
.route path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw 1.1s ease-out both; }
.route-fast path { animation-delay: 0.3s; }
.route-comfort path { animation-duration: 1.6s; animation-delay: 1s; }
.pin, .tag-start, .tag-end { animation: appear 0.5s ease-out both; }
.pin-weather, .tag-start, .tag-end { animation-delay: 0.2s; }
.pin-fast { animation-delay: 1.3s; }
.pin-comfort { animation-delay: 2.4s; }
.fountains { animation: appear 0.5s ease-out 2s both; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route path, .pin, .tag, .fountains { animation: none; stroke-dashoffset: 0; }
}

/* App ausprobieren */
.try { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(36px, 5vw, 56px); }
.try-grid { display: grid; gap: 28px; align-items: center; }
.try h2 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); font-weight: 800; margin-bottom: 14px; }
.try-text p { max-width: 56ch; }
.muted { color: var(--muted); }
.qr-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
  width: fit-content;
}
.qr-card img { display: block; width: 176px; height: 176px; }
.qr-link { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.95rem; }
.qr-link a { font-weight: 600; }
.copy-btn {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent-deep);
}
.copy-btn:hover { border-color: var(--accent); }
.copy-status { min-height: 1.2em; font-size: 0.85rem; color: var(--accent-deep); }

/* Sektionen */
.section { padding-block: clamp(56px, 8vw, 104px); scroll-margin-top: 64px; }
.section-mint { background: var(--bg); }
.section h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { margin-bottom: 0; }

/* Projekt */
.split { display: grid; gap: 44px; }
.split-intro .lead { margin-bottom: 1.1em; }
.split-intro p:last-child { margin-bottom: 0; }
.factor-group { margin-bottom: 28px; }
.factor-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-sun { background: var(--sun); }
.dot-green { background: var(--accent); }
.factor-list, .tech-overview dl { margin: 0; }
.factor-list > div, .tech-overview dl > div {
  display: grid; gap: 2px 20px; padding: 14px 0; border-top: 1px solid var(--line);
}
.factor-list > div:last-child, .tech-overview dl > div:last-child { border-bottom: 1px solid var(--line); }
.factor-list dt, .tech-overview dt { font-weight: 700; }
.factor-list dd, .tech-overview dd { margin: 0; color: var(--muted); }
.callout {
  margin: 8px 0 0; padding: 18px 20px; background: #fff;
  border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
}

/* So funktioniert es */
.how { display: grid; gap: 56px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 34px 64px; counter-increment: step; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 20px; top: 50px; bottom: 8px; width: 2px; background: var(--line);
}
.steps h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; margin: 6px 0 8px; }
.steps p { max-width: 60ch; margin-bottom: 10px; }
.steps .tech {
  margin: 0; padding-left: 12px; border-left: 3px solid var(--line);
  font-size: 0.95rem; color: var(--muted);
}


.tech-overview { margin-top: 56px; }
.tech-overview h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }

/* Team */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 64px; }
.team li { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.avatar {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); color: var(--accent-deep);
  font-weight: 800; font-size: 1.2rem; letter-spacing: 0.02em;
}
.team h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.team .role { margin: 4px 0 0; font-weight: 700; color: var(--accent-deep); }
.team .topic { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.team p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--ink); color: #cfe3dc; padding-top: 56px; }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-grid { display: grid; gap: 36px; }
.logo-light { color: #fff; display: inline-block; margin-bottom: 12px; }
.logo-light span { color: #6fd3b3; }
.footer-about p { margin: 0; font-size: 0.95rem; line-height: 1.7; }
.footer-links a { display: block; padding: 4px 0; text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer-credits p { margin: 0 0 6px; font-size: 0.9rem; color: #b3cfc6; }
.footer-bottom { margin-top: 40px; padding-block: 22px 28px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-bottom p { margin: 0; font-size: 0.9rem; color: #b3cfc6; }
.footer-bottom a { color: #fff; }

/* Ab Tablet */
@media (min-width: 560px) {
  .factor-list > div, .tech-overview dl > div { grid-template-columns: minmax(150px, 36%) 1fr; }
}
@media (min-width: 720px) {
  .main-nav { display: flex; }
  .try-grid { grid-template-columns: 1fr auto; gap: 56px; }
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 1.2fr; gap: 48px; }
}
@media (min-width: 840px) {
  .team { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .split { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; }
  .split-intro { position: sticky; top: 96px; }
  .how { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 72px; align-items: start; }
}

/* Kleine Handys */
@media (max-width: 420px) {
  .steps li { padding-left: 56px; }
  .steps li::before { width: 38px; height: 38px; }
  .steps li:not(:last-child)::after { left: 18px; top: 46px; }
  .team li { grid-template-columns: 52px 1fr; gap: 16px; }
  .avatar { width: 52px; height: 52px; font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}
