/* Website FidusK9 Coaching – Farben wie App und Dashboard (packages/shared/src/theme.ts) */
:root {
  --bg: #F5F7F3;
  --surface: #FFFFFF;
  --text: #17261E;
  --muted: #5D6B63;
  --border: #DCE4DE;
  --border-strong: #B8C6BC;
  --primary: #2E6B4E;
  --primary-dark: #1F4A36;
  --primary-soft: #E4EFE8;
  --deep: #1F3A2D;
  --warning-soft: #FCEBD8;
  --warning: #8A4106;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 880px; }
.muted { color: var(--muted); }
.big { font-size: 18px; }
.small { font-size: 15px; }
.placeholder { background: var(--warning-soft); color: var(--warning); padding: 0 6px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.draft { background: var(--warning-soft); color: var(--warning); text-align: center; padding: 8px 16px; font-weight: 600; font-size: 15px; }

/* Kopf und Fuß */
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.top nav a:not(.btn) { color: var(--text); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--primary); text-decoration: underline; }
.foot { background: var(--deep); color: #fff; margin-top: 0; }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; padding-top: 32px; padding-bottom: 32px; }
.foot-brand { font-weight: 700; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: #fff; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; border: 1.5px solid var(--primary); }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-small { min-height: 44px; padding: 9px 18px; }
.btn-dark { background: var(--text); border-color: var(--text); }
.btn-outline { background: var(--surface); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-muted { background: var(--surface); color: var(--muted); border-color: var(--border); font-weight: 500; }
.btn-muted:hover { background: var(--surface); color: var(--muted); border-color: var(--border); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Startseite */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 32px; padding-bottom: 72px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.08; }
.lead { font-size: 19px; color: var(--muted); }
.badge { background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.kicker { color: var(--primary); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }

.devices { flex: 1 1 520px; position: relative; min-width: 0; height: 470px; }
.browser { position: absolute; left: 0; top: 28px; right: 196px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgba(23, 38, 30, 0.08); }
.browser-bar { height: 30px; flex: none; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.browser-bar span { width: 9px; height: 9px; border-radius: 99px; background: var(--border-strong); }
.browser-bar em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-bar em b { color: var(--text); }
.shot-title { font-size: 13px; color: var(--muted); }
.shot-title b { color: var(--text); }
.phone-title { position: absolute; right: 0; top: 450px; width: 210px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.devices-solo { height: auto; }
.devices-solo .browser { position: static; }
.browser-screen, .phone-screen { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.browser-screen { aspect-ratio: 1040 / 705; flex: none; }
.browser-screen { background: #fff; }
.browser-screen img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.phone { position: absolute; right: 0; top: 0; width: 210px; height: 442px; background: var(--text); border-radius: 32px; padding: 9px; display: flex; box-shadow: 0 12px 32px rgba(23, 38, 30, 0.18); }
.phone-screen { border-radius: 24px; background: var(--bg); }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 16px; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #fff, #fff 12px, var(--bg) 12px, var(--bg) 24px); }

.band-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-green { background: var(--primary); color: #fff; }
.band-green h2 { color: #fff; }
.band-green .card { color: var(--text); border: none; }
.section { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.section-small { padding-top: 56px; padding-bottom: 56px; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.section h2 { font-size: clamp(28px, 3.5vw, 36px); }

/* Funktionen-Slider */
.slider { display: flex; flex-direction: column; gap: 24px; }
.tabs { position: relative; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.tab { flex: none; width: 150px; min-height: 44px; text-align: left; padding: 10px; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; background: var(--surface); border: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.tab:hover { border-color: var(--border-strong); }
.tab[aria-selected="true"] { background: var(--primary-soft); border-color: var(--primary); }
.tab-thumb { display: block; width: 100%; height: 54px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; object-position: top left; background: repeating-linear-gradient(45deg, #fff, #fff 8px, #E7ECE8 8px, #E7ECE8 16px); }
.slides { position: relative; }
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; display: flex; flex-wrap: wrap; gap: 36px; align-items: center; margin-bottom: 20px; }
.js .panel { margin-bottom: 0; }
.js .panel[hidden] { display: none; }
.panel-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h3 { font-size: 30px; line-height: 1.2; }
.panel .devices { flex: 1.7 1 560px; height: 470px; }
.slider-nav { display: flex; gap: 10px; margin-top: 16px; }
.round { width: 48px; height: 48px; padding: 0; border-radius: 999px; border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.round:hover { background: var(--primary-soft); }
.round-filled { background: var(--primary); color: #fff; }
.round-filled:hover { background: var(--primary-dark); }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.check { flex: none; margin-top: 1px; }

/* Karten */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.card h3 { font-size: 22px; }
.dots, .steps { margin: 0; padding-left: 22px; line-height: 1.85; }
.note { background: var(--primary-soft); border-radius: var(--radius); padding: 26px 30px; display: flex; flex-direction: column; gap: 8px; }
.note h2 { font-size: 20px; }

/* Unterseiten */
.page { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; }
.page h1 { font-size: clamp(32px, 4vw, 42px); }
.page .card h2 { font-size: 22px; }
.faq { display: flex; flex-direction: column; gap: 4px; }
.faq h3 { font-size: 17px; }
.text { display: flex; flex-direction: column; gap: 10px; }
.text h2 { font-size: 22px; margin-top: 8px; }

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

@media (max-width: 640px) {
  body { font-size: 16px; }
  /* Handy: Dashboard und App untereinander, nichts verdeckt */
  .devices, .panel .devices { height: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
  .browser, .phone { position: static; }
  .browser { width: 100%; }
  .phone { width: 190px; height: 400px; border-radius: 28px; }
  .phone-title { position: static; width: auto; margin-top: -8px; }
  .phone-screen { border-radius: 19px; }
  .panel { padding: 22px; }
  .panel h3 { font-size: 24px; }
}

/* Bilder zum Vergrößern */
.zoom { all: unset; position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.zoom img { transition: transform .2s ease; }
.zoom:hover img { transform: scale(1.02); }
.zoom:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.zoom-hint { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(23, 38, 30, 0.82); color: #fff; font-size: 12.5px; font-weight: 600; pointer-events: none; transition: background .2s ease; }
.browser .zoom-hint { right: auto; left: 8px; }
.phone .zoom-hint { padding: 6px; right: 6px; bottom: 6px; }
.zoom:hover .zoom-hint, .zoom:focus-visible .zoom-hint { background: var(--primary); }
.lightbox { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(18, 30, 23, 0.93); }
/* Rahmen so breit wie das Bild: Überschrift und „Schließen“ enden bündig mit dem Bild */
.lightbox-frame { display: inline-grid; grid-template-columns: auto; gap: 12px; }
.lightbox-top { width: 0; min-width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; color: #fff; }
.lightbox img { display: block; max-width: min(1200px, 82vw); max-height: 76vh; width: auto; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lightbox-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lightbox-caption { color: #fff; font-size: 20px; font-weight: 700; }
.lightbox-count { color: #C9D6CE; font-size: 14px; font-weight: 500; }
.lightbox.single .lightbox-nav, .lightbox.single .lightbox-count { display: none; }
.lightbox-close { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: none; background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.lightbox-nav { position: fixed; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }
@media (max-width: 640px) {
  .lightbox-caption { font-size: 17px; }
  .lightbox img { max-width: 94vw; max-height: 70vh; }
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* Probleme und Lösungen */
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.08; }
.subtitle { font-size: clamp(20px, 2vw, 24px); line-height: 1.35; font-weight: 600; color: var(--primary); margin: 0; }
.hero .lead { font-size: 17px; }
.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.why-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; }
.why-item summary { list-style: none; cursor: default; }
.why-item summary::-webkit-details-marker { display: none; }
.why-item[open] summary { margin-bottom: 16px; }
.why-item h3 { display: flex; align-items: center; gap: 12px; font-size: 21px; margin: 0; }
.why-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.why-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.why-problem, .why-solution { border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.why-problem { background: #f4f3ef; }
.why-solution { background: var(--primary-soft, #e4efe8); }
.why-problem p, .why-solution p { margin: 0; line-height: 1.55; }
.why-label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.why-solution .why-label { color: var(--primary); }
@media (max-width: 760px) {
  .why-pair { grid-template-columns: 1fr; }
  .why-item { padding: 20px; }
}

/* Kopfzeile: Menü-Knopf nur am Handy */
.menu-toggle { display: none; }
.top-row { flex-wrap: nowrap; }
.top-row nav { margin-left: auto; }

@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .brand { font-size: 17px; gap: 8px; margin-right: auto; }
  .top-signin { order: 2; }
  .top-row { flex-wrap: wrap; }
  .menu-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
  .menu-toggle::before { content: "☰"; font-size: 20px; line-height: 1; }
  .top-signin { padding: 9px 13px; font-size: 15px; }
  .menu-toggle[aria-expanded="true"]::before { content: "✕"; font-size: 15px; }
  .js .top nav { order: 4; display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 6px 0 2px; border-top: 1px solid var(--border); }
  .js .top nav.open { display: flex; }
  .top nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); text-decoration: none; }
  .top nav a:not(.btn):last-child { border-bottom: none; }

  /* Einstieg: kompakter, Knöpfe volle Breite, Bilder übereinander gestaffelt */
  .hero { gap: 28px; padding-top: 16px; padding-bottom: 40px; }
  .hero-text { gap: 16px; }
  .hero h1 { font-size: 34px; }
  .subtitle { font-size: 19px; }
  .hero .lead { font-size: 16px; }
  .hero .buttons { width: 100%; flex-direction: column; align-items: stretch; }
  .hero .buttons .btn { justify-content: center; text-align: center; }
  .hero .devices { position: relative; display: block; width: 100%; height: auto; padding-bottom: 56px; margin-bottom: -16px; }
  .hero .devices .browser { width: 88%; }
  .hero .devices .phone { position: absolute; right: 0; top: auto; bottom: 0; width: 132px; height: 278px; border-radius: 22px; padding: 6px; }
  .hero .devices .phone-screen { border-radius: 16px; }
  .hero .devices .phone-title { display: none; }

  /* Abschnitte weniger hoch */
  .section { padding-top: 44px; padding-bottom: 44px; gap: 22px; }
  .section h2 { font-size: 26px; }

  /* Probleme und Lösungen: aufklappbar, erstes offen */
  .why-list { gap: 10px; }
  .why-item { padding: 16px 18px; }
  .why-item summary { cursor: pointer; }
  .why-item h3 { font-size: 17px; }
  .why-item summary h3::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .15s; }
  .why-item:not([open]) summary h3::after { transform: rotate(-90deg); }
  .why-num { width: 28px; height: 28px; font-size: 14px; }
  .why-problem, .why-solution { padding: 12px 14px; }
}

/* Lange Namen in den Funktions-Kacheln (z. B. „Benachrichtigungen“) trennen statt über den Rand laufen */
.tab > span:last-child { min-width: 0; max-width: 100%; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }

@media (max-width: 640px) {
  /* Einstieg am Handy: erst Text, dann Bilder, darunter die Knöpfe */
  .hero { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; }
  .hero-text { display: contents; }
  .hero > .devices { order: 1; margin-top: 8px; flex: none; }
  .hero .buttons { order: 2; margin-top: 4px; }
  .tab { font-size: 14px; }
}

/* Logo mit Schriftzug wie im Dashboard: Logo so hoch wie die zwei Zeilen daneben */
.brand img { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.brand-title { display: block; font-size: 17px; line-height: 20px; font-weight: 700; }
@media (max-width: 640px) {
  .brand img { width: 36px; height: 36px; }
  .brand-title { font-size: 15px; line-height: 18px; }
}
