/* ═══════════════════════════════════════════════════════════════════════════
   CityFox promo site — marketing-only layout.
   Loaded AFTER component-library.css, so it reuses every design token
   (--scale-*, --surface-*, --text-*, type classes .h1–.h7 / .body-*) and only
   adds the page chrome the app doesn't have: header, hero, sections, footer.
   Mobile-first; desktop type scale + wider layout switch on at 768px.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile uses the :root (mobile) type scale. At ≥768px opt the whole site into
   the Desktop type scale — same overrides component-library.css ships under
   `.desktop-type`, but applied responsively instead of unconditionally. */
@media (min-width: 768px) {
  .site-root {
    --text-h1-size:             var(--scale-1600); /* 64 */
    --text-h1-line-height:      var(--scale-1800); /* 72 */
    --text-h2-size:             var(--scale-1200); /* 48 */
    --text-h2-line-height:      var(--scale-1400); /* 56 */
    --text-h3-size:             var(--scale-900);  /* 36 */
    --text-h3-line-height:      var(--scale-1100); /* 44 */
    --text-h4-size:             var(--scale-800);  /* 32 */
    --text-h4-line-height:      var(--scale-900);  /* 36 */
    --text-h4-letter-spacing:   -0.01em;
    --text-body-sm-line-height: var(--scale-400);  /* 16 */
  }
}

html { scroll-behavior: smooth; }
.site-root {
  background: var(--surface-page);
  color: var(--text-body);
  min-height: 100vh;
}

/* Accessible skip link — visually hidden until focused. */
.skip-link {
  position: absolute; left: var(--scale-300); top: calc(-1 * var(--scale-2400));
  z-index: 100;
  background: var(--surface-action); color: var(--text-on-color);
  padding: var(--scale-200) var(--scale-400);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 120ms ease;
}
.skip-link:focus { top: var(--scale-300); }

a { color: var(--text-action); }
.prose a { color: var(--text-action); }
.prose a:hover { color: var(--text-action-hover); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface-page);
  border-bottom: var(--border-w-sm) solid var(--border-subtle);
}
.site-header-inner {
  max-width: 1120px; margin: 0 auto;
  padding: var(--scale-300) var(--scale-400);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--scale-300);
}
.site-brand {
  display: inline-flex; align-items: center; gap: var(--scale-200);
  text-decoration: none; margin-right: auto;
}
.site-brand img { display: block; border-radius: var(--radius-sm); }
.site-brand-name {
  font-family: var(--font-family-headings); font-weight: var(--font-weight-bold);
  font-size: var(--text-h6-size); color: var(--text-headings);
}
.site-header-actions { display: inline-flex; align-items: center; gap: var(--scale-200); }
.site-nav {
  order: 3; flex-basis: 100%;
  display: flex; gap: var(--scale-100);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav-link {
  white-space: nowrap; text-decoration: none;
  color: var(--text-body);
  font-family: var(--font-family-text); font-weight: var(--font-weight-semibold);
  font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line-height);
  padding: var(--scale-200) var(--scale-300);
  border-radius: var(--radius-md);
}
.site-nav-link:hover { background: var(--surface-darker-background); }
.site-nav-link.is-current { color: var(--text-action); background: var(--surface-action-ghost-hover); }

/* App Store / Google Play badges (reused in header, hero, mission CTA). */
.store-badges { display: flex; flex-wrap: wrap; gap: var(--scale-300); }
.store-badge {
  display: inline-flex; align-items: center; gap: var(--scale-300);
  background: var(--neutral-900); color: var(--neutral-white);
  border: var(--border-w-sm) solid var(--neutral-900);
  border-radius: var(--radius-lg);
  padding: var(--scale-200) var(--scale-400);
  text-decoration: none;
}
.store-badge:hover { background: var(--neutral-800); border-color: var(--neutral-800); }
.store-badge .ph { font-size: var(--scale-800); line-height: 1; flex-shrink: 0; color: var(--neutral-white); }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge-text small { font-size: var(--text-body-xsm-size); opacity: 0.8; }
.store-badge-text strong {
  font-family: var(--font-family-headings); font-weight: var(--font-weight-bold);
  font-size: var(--text-body-md-size);
}
/* Compact variant (header): glyph + wordmark only, caption hidden. */
.store-badges.compact .store-badge { padding: var(--scale-100) var(--scale-300); gap: var(--scale-200); }
.store-badges.compact .store-badge small { display: none; }
.store-badges.compact .store-badge .ph { font-size: var(--scale-600); }
.store-badges.compact .store-badge-text strong { font-size: var(--text-body-sm-size); }
/* Header badges would crowd a phone row — phone users meet them in the hero. */
.site-header .store-badges { display: none; }

/* Language switcher (native <details>; no JS required). */
.lang-switcher { position: relative; }
.lang-switcher > summary {
  list-style: none; cursor: pointer; user-select: none;
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher .caret { transition: transform 120ms ease; }
.lang-switcher[open] .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + var(--scale-100));
  z-index: 60; width: 180px;
  box-shadow: var(--shadow-md);
}
.lang-option {
  display: flex; align-items: center; gap: var(--scale-200);
  padding: var(--scale-300);
  color: var(--text-body); text-decoration: none;
  border-bottom: var(--border-w-sm) solid var(--border-subtle);
  font-size: var(--text-body-sm-size);
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: var(--surface-background); }
.lang-option .ph { margin-left: auto; color: var(--icon-action); }
.lang-option.is-current { color: var(--text-action); font-weight: var(--font-weight-semibold); }

/* ── Layout helpers ──────────────────────────────────────────────────────── */
.section-inner, .page-inner {
  max-width: 1120px; margin: 0 auto;
  padding-left: var(--scale-400); padding-right: var(--scale-400);
}
.narrow { max-width: 760px; }
.section { padding: var(--scale-1600) 0; }
[id] { scroll-margin-top: var(--scale-2400); }

.prose p { margin: 0 0 var(--scale-500); color: var(--text-body); }
.prose p:last-child { margin-bottom: 0; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(120% 120% at 80% -10%, var(--primary-100) 0%, var(--surface-action-background) 38%, var(--surface-page) 100%);
  border-bottom: var(--border-w-sm) solid var(--border-subtle);
}
.hero-inner {
  max-width: 880px; margin: 0 auto;
  padding: var(--scale-1800) var(--scale-400) var(--scale-2000);
  text-align: center;
}
.hero-kicker {
  display: inline-block;
  color: var(--text-action);
  letter-spacing: 0.08em;
  margin-bottom: var(--scale-400);
}
.hero .h1 { margin-bottom: var(--scale-500); }
.hero-sub {
  color: var(--text-body-light);
  max-width: 620px; margin: 0 auto var(--scale-800);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--scale-300); justify-content: center; }
.hero-cta .store-badges { justify-content: center; }
.hero-how-link {
  display: inline-flex; align-items: center; gap: var(--scale-100);
  margin-top: var(--scale-500);
  color: var(--text-action); text-decoration: none;
}
.hero-how-link:hover { color: var(--text-action-hover); }
.hero-how-link .ph { font-size: var(--scale-500); }

/* ── Generic section ─────────────────────────────────────────────────────── */
.section .h2 { text-align: center; margin-bottom: var(--scale-300); }
.section-sub { text-align: center; color: var(--text-body-light); margin: 0 auto var(--scale-1000); max-width: 560px; }
.section-what, .section-free { background: var(--surface-page); }
.section-how, .section-cities { background: var(--surface-background); }
.section-what .prose, .section-mission-teaser .prose { text-align: center; }
.section-what .h2 { margin-bottom: var(--scale-600); }

/* How it works — step cards */
.step-grid {
  list-style: none; padding: 0; margin: var(--scale-1000) 0 0;
  display: grid; gap: var(--scale-500);
  grid-template-columns: 1fr;
}
.step-card {
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-xlg);
  padding: var(--scale-600);
  box-shadow: var(--shadow-sm);
}
.step-card .h6 { margin-bottom: var(--scale-200); }
.step-card .body-md { color: var(--text-body-light); margin: 0; }
.step-icon {
  display: inline-grid; place-items: center;
  width: var(--scale-1100); height: var(--scale-1100);
  border-radius: var(--radius-lg);
  background: var(--surface-action-background); color: var(--icon-action);
  margin-bottom: var(--scale-400);
}
.step-icon .ph { font-size: var(--scale-700); }

/* Free for everyone */
.free-card { text-align: center; }
.free-card .prose { color: var(--text-body-light); margin-bottom: var(--scale-800); }
.free-points {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--scale-400);
  text-align: left;
}
.free-points li { display: flex; align-items: flex-start; gap: var(--scale-300); }
.free-points .ph { color: var(--icon-success); font-size: var(--scale-600); flex-shrink: 0; line-height: 1.4; }

/* Cities strip */
.city-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--scale-400);
  grid-template-columns: repeat(2, 1fr);
}
.city-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--scale-300);
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--scale-500);
  text-align: center;
}
.city-card img { width: 72px; height: 72px; object-fit: contain; }
.city-card-link {
  display: flex; flex-direction: column; align-items: center; gap: var(--scale-300);
  width: 100%; text-decoration: none; color: inherit;
}
.city-card-link:hover span { color: var(--text-action); }

/* City page */
.section-city-hero .section-inner { padding-top: var(--scale-1000); }
.back-link {
  display: inline-flex; align-items: center; gap: var(--scale-200);
  color: var(--text-action); text-decoration: none; margin-bottom: var(--scale-800);
}
.back-link:hover { color: var(--text-action-hover); }
.back-link .ph { font-size: var(--scale-500); }
.city-hero-head {
  display: flex; align-items: center; gap: var(--scale-500);
  margin-bottom: var(--scale-500);
}
.city-hero-coat { object-fit: contain; flex-shrink: 0; }
.city-hero-intro { color: var(--text-body-light); margin: 0; }

/* Places list */
.section-places .section-inner { text-align: center; }
.places-list {
  list-style: none; padding: 0; margin: var(--scale-600) 0 0;
  display: flex; flex-wrap: wrap; gap: var(--scale-200) var(--scale-400);
  justify-content: center;
}
.places-item {
  padding: var(--scale-100) var(--scale-400);
  background: var(--surface-background);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-full, 999px);
  color: var(--text-body);
}

/* Route grid */
.route-grid {
  list-style: none; padding: 0; margin: var(--scale-800) 0 0;
  display: grid; gap: var(--scale-500);
  grid-template-columns: 1fr;
}
.route-card {
  display: flex; gap: var(--scale-500);
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.route-img {
  width: 120px; min-height: 100px; object-fit: cover;
  flex-shrink: 0; display: block;
}
.route-body {
  padding: var(--scale-500) var(--scale-500) var(--scale-500) 0;
  display: flex; flex-direction: column; gap: var(--scale-200);
}
.route-badges { display: flex; flex-wrap: wrap; gap: var(--scale-100); }
.badge {
  display: inline-block;
  padding: var(--scale-50) var(--scale-300);
  border-radius: var(--radius-sm);
  font-size: var(--text-body-xsm-size); font-weight: 600; line-height: 1.6;
}
.badge-complexity-easy     { background: var(--surface-success-background); color: var(--text-success); }
.badge-complexity-intermediate { background: var(--surface-warning-background, #fff7e0); color: var(--text-warning, #a06a00); }
.badge-complexity-master   { background: var(--surface-danger-background, #fde8e8); color: var(--text-danger, #b91c1c); }
.badge-round               { background: var(--surface-background); color: var(--text-body-light); }
.badge-category            { background: var(--surface-background); color: var(--text-body-light); }
.route-name { margin: 0; }
.route-stops { color: var(--text-body-light); }

/* Also explore */
.also-explore-list {
  list-style: none; padding: 0; margin: var(--scale-600) 0 0;
  display: flex; flex-wrap: wrap; gap: var(--scale-400);
}
.also-explore-item {
  display: flex; align-items: center; gap: var(--scale-300);
  padding: var(--scale-300) var(--scale-500);
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none; color: inherit;
}
.also-explore-item:hover span { color: var(--text-action); }
.also-explore-item img { object-fit: contain; flex-shrink: 0; }

/* Mission teaser */
.mission-teaser { text-align: center; }
.mission-teaser .prose { color: var(--text-body-light); margin-bottom: var(--scale-800); }
.mission-teaser .cf-btn { text-decoration: none; }

/* ── Content pages (mission / faq / impressum / contact) ─────────────────── */
.page { padding: var(--scale-1200) 0 var(--scale-1800); }
.page-head { margin-bottom: var(--scale-1000); }
.page-lead { color: var(--text-body-light); margin: 0; }
.prose-block { margin-bottom: var(--scale-1000); }
.prose-block .prose { color: var(--text-body); }

.mission-quote {
  margin: 0 0 var(--scale-1200); padding: var(--scale-700);
  background: var(--surface-action-background);
  border-radius: var(--radius-xlg);
  text-align: center;
}
.mission-quote .ph { font-size: var(--scale-900); color: var(--icon-action); display: block; margin-bottom: var(--scale-200); }
.mission-quote .h4 { margin: 0; color: var(--text-headings); }

.cta-band {
  margin-top: var(--scale-1200); padding: var(--scale-800);
  background: var(--surface-background);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-xlg);
  text-align: center;
}
.cta-band .body-lg { color: var(--text-body-light); margin: 0 auto var(--scale-600); max-width: 480px; }
.cta-band .store-badges { justify-content: center; }

/* FAQ accordion */
.faq-list { display: grid; gap: var(--scale-300); }
.faq-item {
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0 var(--scale-500);
}
.faq-item > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: var(--scale-300);
  padding: var(--scale-500) 0;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .h6 { margin: 0; }
.faq-caret { margin-left: auto; color: var(--icon-default); font-size: var(--scale-600); transition: transform 150ms ease; flex-shrink: 0; }
.faq-item[open] .faq-caret { transform: rotate(180deg); }
.faq-answer { padding-bottom: var(--scale-500); color: var(--text-body-light); }
.faq-answer p { margin: 0 0 var(--scale-300); }
.faq-answer p:last-child { margin-bottom: 0; }

/* ── Contact form ────────────────────────────────────────────────────────── */
.contact-form { display: grid; gap: var(--scale-500); max-width: 560px; }
.contact-form .cf-field,
.contact-form .cf-textarea { width: 100%; }
.contact-form select.cf-textarea-input {
  appearance: none; -webkit-appearance: none;
  cursor: pointer; background: transparent;
}
.contact-form .cf-field .caret { margin-left: auto; color: var(--icon-default); pointer-events: none; }
.consent-row { display: flex; align-items: flex-start; gap: var(--scale-300); cursor: pointer; }
.consent-box { width: var(--scale-500); height: var(--scale-500); margin-top: var(--scale-50); accent-color: var(--surface-action); flex-shrink: 0; }
.consent-row .body-sm { color: var(--text-body-light); }
.contact-form button[type="submit"] { justify-self: start; }

.contact-side { margin-top: var(--scale-1000); display: grid; gap: var(--scale-600); max-width: 560px; }
.info-note {
  display: flex; gap: var(--scale-300); align-items: flex-start;
  background: var(--surface-information);
  border: var(--border-w-sm) solid var(--border-information);
  border-radius: var(--radius-lg);
  padding: var(--scale-400);
  color: var(--text-information);
}
.info-note .ph { font-size: var(--scale-600); flex-shrink: 0; color: var(--icon-information); }
.contact-direct .h6 { margin-bottom: var(--scale-100); }
.contact-direct .body-md { color: var(--text-body-light); margin: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface-darker-background);
  border-top: var(--border-w-sm) solid var(--border-subtle);
  margin-top: var(--scale-800);
}
.site-footer-inner {
  max-width: 1120px; margin: 0 auto;
  padding: var(--scale-1200) var(--scale-400);
  display: grid; gap: var(--scale-800);
  grid-template-columns: 1fr;
}
.site-footer-brand .site-brand { margin-bottom: var(--scale-300); }
.site-footer-tagline { color: var(--text-body-light); max-width: 320px; margin: 0; }
.site-footer-h {
  font-family: var(--font-family-text); font-weight: var(--font-weight-semibold);
  font-size: var(--text-body-xsm-size); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-label); margin: 0 0 var(--scale-300);
}
.site-footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--scale-200); }
.site-footer-col a {
  color: var(--text-body); text-decoration: none;
  font-size: var(--text-body-sm-size);
}
.site-footer-col a:hover { color: var(--text-action); text-decoration: underline; }
.site-footer-bar {
  border-top: var(--border-w-sm) solid var(--border-default);
  max-width: 1120px; margin: 0 auto;
  padding: var(--scale-400);
  display: flex; flex-wrap: wrap; gap: var(--scale-300); justify-content: space-between;
  color: var(--text-label);
}
.site-footer-bar a { color: var(--text-label); text-decoration: none; }
.site-footer-bar a:hover { color: var(--text-action); }

/* ── Desktop ─────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .site-nav { order: 0; flex-basis: auto; margin: 0 auto; overflow: visible; }
  .site-header .store-badges { display: flex; }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .free-points { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .section { padding: var(--scale-2000) 0; }
  .hero-inner { padding-top: var(--scale-2200); padding-bottom: var(--scale-2400); }
  .site-footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .route-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .step-grid { grid-template-columns: repeat(4, 1fr); }
  .city-grid { grid-template-columns: repeat(5, 1fr); }
  .route-grid { grid-template-columns: repeat(3, 1fr); }
}
