/* crewmade.io – gemeinsames Stylesheet v3. Tokens und Komponenten 1:1 aus design/v3/v3.css.
   Klassen-Übersicht und Kopiervorlagen: _partials.md.
   Lesespalte 680px, Produktbilder bis 760px, Raster 980px. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #FFFFFF; --putz: #F4F4F1; --ink: #1C1B19; --ink2: #5F5E5A; --line: rgba(28,27,25,.10);
  --accent: #234E52; --accent-hover: #1B3F42; --accent-ink: #FFFFFF; --link: #1E5A5E; --warm: #BC6B27;
  --mark-l: #234E52; --mark-r: #BC6B27;
  --werk: #1F2224; --werk-ink: #F2F1EE; --werk-ink2: #A9ABA8; --werk-line: rgba(242,241,238,.14);
  --screen: #FFFFFF;
  --shadow: 0 30px 60px -28px rgba(28,27,25,.28), 0 1px 0 rgba(28,27,25,.04);
  --lift: 0 18px 40px -22px rgba(28,27,25,.30);
  --ease: cubic-bezier(.2,.7,.2,1);
  --a-meister: #2563EB; --a-prakti: #4A2AE8; --a-innung: #B3261E; --a-fix: #B37800;
  --menu-bg: #FFFFFF; --error: #9A5520;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F10; --putz: #1A1B1C; --ink: #F2F1EE; --ink2: #A3A39E; --line: rgba(242,241,238,.12);
    --accent: #2E6F74; --accent-hover: #38858B; --link: #8ECBCD; --warm: #E0904B; --mark-l: #FFFFFF; --mark-r: #E0904B;
    --werk: #151718; --screen: #1F2122;
    --shadow: 0 30px 60px -28px rgba(0,0,0,.7); --lift: 0 18px 40px -22px rgba(0,0,0,.75);
    --a-meister: #7AA2F7; --a-prakti: #9C8BFF; --a-innung: #F08A82; --a-fix: #FFC24D;
    --menu-bg: #1A1B1C; --error: var(--warm);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F10; --putz: #1A1B1C; --ink: #F2F1EE; --ink2: #A3A39E; --line: rgba(242,241,238,.12);
  --accent: #2E6F74; --accent-hover: #38858B; --link: #8ECBCD; --warm: #E0904B; --mark-l: #FFFFFF; --mark-r: #E0904B;
  --werk: #151718; --screen: #1F2122;
  --shadow: 0 30px 60px -28px rgba(0,0,0,.7); --lift: 0 18px 40px -22px rgba(0,0,0,.75);
  --a-meister: #7AA2F7; --a-prakti: #9C8BFF; --a-innung: #F08A82; --a-fix: #FFC24D;
  --menu-bg: #1A1B1C; --error: var(--warm);
  color-scheme: dark;
}

/* Basis */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
/* Fußzeile bei kurzen Seiten (404, Kontakt) unten am Fenster */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.center { text-align: center; }
.sub { font-size: 1.1875rem; line-height: 1.45; color: var(--ink2); max-width: 36em; margin-inline: auto; }
.more::after { content: " ›"; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 980px; background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: 1rem; white-space: nowrap; }
.pill:hover { background: var(--accent-hover); text-decoration: none; }
.pill.small { min-height: 32px; padding: 5px 14px; font-size: .875rem; }
.actions { display: flex; gap: 10px 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
.actions .more { font-size: 1.0625rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--app, var(--accent)); display: inline-block; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 40; background: var(--bg); color: var(--ink); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; }
.skip:focus { top: 12px; }
section { scroll-margin-top: 72px; }

/* App-Akzente: --app für Punkte und Text */
.app--meistercrew { --app: var(--a-meister); }
.app--prakticrew { --app: var(--a-prakti); }
.app--meineinnung { --app: var(--a-innung); }
.app--fixcrew { --app: var(--a-fix); }

/* Kopfzeile: Wortmarke, Produkt-Menü, Anmelden, Pilot werden, Menü-Knopf (mobil) */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
header.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
header.bar .wrap { height: 52px; display: flex; align-items: center; gap: 22px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; flex: none; }
.mark:hover { text-decoration: none; }
.mark svg { width: 26px; height: 26px; }
.mark svg path { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.mark .ml { stroke: var(--mark-l); } .mark .mr { stroke: var(--mark-r); }
.mark b { font-weight: 600; color: var(--warm); }
.nav { display: flex; gap: 22px; margin-inline: auto; font-size: .9rem; }
.nav a { color: var(--ink); opacity: .78; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav a[aria-current="page"] { font-weight: 600; }

/* Aufklapper „Anmelden“ und Menü (details/summary, funktionieren ohne JS; site.js schließt bei Klick daneben/Escape) */
.login, .menu { position: relative; }
.login summary, .menu summary { list-style: none; cursor: pointer; }
.login summary::-webkit-details-marker, .menu summary::-webkit-details-marker { display: none; }
.login summary { font-size: .9rem; color: var(--ink); opacity: .78; white-space: nowrap; }
.login summary:hover, .login[open] summary { opacity: 1; }
.login-menu, .menu-panel { position: absolute; right: 0; top: calc(100% + 12px); background: var(--menu-bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; z-index: 25; }
.login-menu { min-width: 250px; max-width: calc(100vw - 32px); }
.login-menu a, .menu-panel a:not(.pill) { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; color: var(--ink); }
.login-menu a:hover, .menu-panel a:not(.pill):hover { background: var(--putz); text-decoration: none; }
.login-menu small, .menu-panel small { color: var(--ink2); margin-left: auto; padding-left: 12px; font-size: .8rem; }
.menu { display: none; }
.menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; border-radius: 10px; color: var(--ink); }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu[open] .menu-btn { background: var(--putz); }
.menu-panel { width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; }
.menu-head { font-size: .8rem; color: var(--ink2); padding: 12px 12px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.menu-panel .pill { margin-top: 8px; }
@media (min-width: 861px) { header.bar .login + .pill { margin-left: -6px; } }
@media (max-width: 860px) {
  .nav, .login { display: none; }
  .menu { display: block; }
  header.bar .wrap { gap: 12px; }
  .mark { margin-right: auto; }
}

/* Bänder */
.band { padding-block: clamp(64px, 9vw, 112px); }
.band.putz { background: var(--putz); }
.band.slim { padding-block: clamp(48px, 6vw, 72px); }
.head { display: grid; gap: 14px; max-width: 760px; margin-inline: auto; margin-bottom: clamp(32px, 5vw, 48px); text-align: center; }
.head h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); line-height: 1.08; }
.head h2 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); line-height: 1.1; }
.head p { color: var(--ink2); }
.app { font-size: 1.0625rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }

/* Auftakt */
.hero { padding-block: clamp(56px, 8vw, 96px) clamp(40px, 5vw, 56px); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.02; letter-spacing: -.035em; }
.hero .sub { margin-top: 18px; font-size: clamp(1.125rem, 2.2vw, 1.375rem); }
.hero .actions { margin-top: 28px; }

/* Vierer-Raster */
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--putz); border-radius: 28px; padding: 36px 32px 0; display: grid; gap: 8px; min-width: 0; overflow: hidden; color: var(--ink); text-align: center; justify-items: center; align-content: start; }
.band.putz .tile { background: var(--bg); }
.tile h3 { font-size: 1.625rem; line-height: 1.1; display: inline-flex; align-items: center; gap: 10px; }
.tile p { color: var(--ink2); max-width: 28em; }
.tile .links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: 1rem; }
/* .peek: Bildausschnitt unten in der Kachel, oberer Teil des Bildschirmfotos sichtbar */
/* Bildausschnitt immer am Kachelboden, damit Bilder nebeneinander auf einer Höhe beginnen */
.tile { grid-template-rows: auto auto auto 1fr; }
.tile .peek { align-self: end; margin-top: 20px; height: 220px; overflow: hidden; width: 100%; display: flex; justify-content: center; align-items: flex-start; }
.tile .peek picture { display: contents; }
.tile .peek img { display: block; margin-inline: auto; width: min(260px, 80%); height: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--screen); box-shadow: var(--shadow); }
.tenant { margin-top: 24px; text-align: center; color: var(--ink2); font-size: .95rem; }

/* Bildschirmfotos im Rahmen: .phone (Handy, 9:19,5) und .desk (Schreibtisch, 16:10) */
.phone, .desk { margin: 0 auto; background: var(--screen); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.phone { max-width: 320px; border-radius: 36px; padding: 10px; }
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
.desk { max-width: 760px; border-radius: 14px; padding: 8px; }
.desk img { display: block; width: 100%; height: auto; border-radius: 8px; }
.stage { max-width: 760px; margin-inline: auto; }

/* Fakten in drei Spalten */
.facts { margin-top: clamp(36px, 5vw, 56px); display: grid; gap: 24px 32px; max-width: 900px; margin-inline: auto; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts div { border-top: 1px solid var(--line); padding-top: 14px; }
.facts b { display: block; font-weight: 600; margin-bottom: 4px; }
.facts span { color: var(--ink2); font-size: .95rem; }

/* Werkstatt-Band: Zusammenspiel in drei Schritten */
.werk, .band.werk { background: var(--werk); color: var(--werk-ink); }
.werk .head h2 { color: var(--werk-ink); }
.werk .head p { color: var(--werk-ink2); }
.werk a { color: var(--werk-ink); }
.chain { margin-top: clamp(32px, 5vw, 48px); display: grid; gap: 24px; max-width: 900px; margin-inline: auto; }
@media (min-width: 720px) { .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.link { display: grid; gap: 8px; align-content: start; }
.link .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .875rem; background: var(--werk-line); color: var(--werk-ink); }
.link h3 { font-size: 1.125rem; }
.link p { color: var(--werk-ink2); font-size: .95rem; }

/* Vertrauens-Zeile */
.trust { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; font-weight: 600; font-size: .975rem; }
.trust span { white-space: nowrap; }

/* Pilot-Aufruf */
.offers { margin-top: clamp(32px, 5vw, 48px); display: grid; gap: 16px; }
@media (min-width: 720px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer { background: var(--bg); border-radius: 28px; padding: 36px 32px; display: grid; gap: 12px; align-content: start; }
.band:not(.putz) .offer { background: var(--putz); }
.offer h3 { font-size: 1.25rem; }
.offer .amount { font-size: 2.5rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.offer .amount small { display: block; font-size: 1rem; font-weight: 400; color: var(--ink2); letter-spacing: 0; margin-top: 8px; }
.offer p { color: var(--ink2); }
.offer .pill, .offer .more { justify-self: start; margin-top: 4px; }

/* Produktseite */
.product-hero { padding-block: clamp(56px, 8vw, 96px) 0; }
.product-hero h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: -.03em; margin-top: 12px; }
.product-hero .sub { margin-top: 16px; }
.product-hero .actions { margin-top: 26px; }
.product-hero .stage { margin-top: clamp(40px, 6vw, 64px); }
.features { display: grid; gap: clamp(56px, 8vw, 96px); }
.feature { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) { .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } .feature.flip > :is(.phone, .desk) { order: -1; } }
.feature h2 { font-size: clamp(1.6rem, 3.2vw, 2.125rem); line-height: 1.12; }
.feature p { color: var(--ink2); margin-top: 10px; max-width: 32em; }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 680px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink2); font-weight: 400; flex: none; transition: transform .2s ease-out; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink2); margin-top: 10px; }

/* Formular (Pilot) */
.form { display: grid; gap: 18px; max-width: 680px; }
.form .field { display: grid; gap: 6px; }
.form label, .form legend { font-weight: 600; font-size: .95rem; }
.form .hint { color: var(--ink2); font-size: .875rem; font-weight: 400; }
.form input[type="text"], .form input[type="email"], .form input:not([type]), .form textarea, .form select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 12px; padding: 12px 14px; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.form legend { padding: 0; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.form .row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.form .pill { justify-self: start; }
.form button { cursor: pointer; border: 0; font: inherit; }
.form button:disabled { opacity: .5; cursor: not-allowed; }
.form input, .form textarea, .form fieldset { scroll-margin-top: 96px; }
.form .check .dot { margin-right: -2px; }
.form .error { color: var(--error); font-weight: 600; font-size: .9rem; }
.form .error[hidden] { display: none; }
.direct { margin-top: 28px; color: var(--ink2); }

/* Zielgruppen, Pilot, Kontakt */
.facts.four { max-width: 980px; }
@media (min-width: 640px) { .facts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .facts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts address { color: var(--ink2); font-size: .95rem; font-style: normal; }
@media (min-width: 720px) and (max-width: 939px) { .grid.three > :last-child { grid-column: 1 / -1; } }
@media (min-width: 940px) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.three .tile { padding-inline: 24px; } .grid.three .tile h3 { font-size: 1.5rem; } }
.narrow .wrap { max-width: calc(680px + 32px); }
.narrow .facts { max-width: 680px; }
.product-hero.narrow, .product-hero.pad { padding-bottom: clamp(40px, 6vw, 64px); }
.price-line { margin-top: 28px; font-size: 2.5rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.price-line small { display: block; font-size: 1rem; font-weight: 400; color: var(--ink2); letter-spacing: 0; margin-top: 8px; }
.note { margin-top: 28px; color: var(--ink2); font-size: .95rem; }
.narrow .form { margin-inline: auto; }

/* Rechtstexte und Textseiten: Lesespalte 680px */
.legal { padding-block: clamp(48px, 7vw, 80px) clamp(64px, 9vw, 104px); }
.legal .wrap { max-width: calc(680px + 32px); }
.legal h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.1; margin-bottom: 28px; }
.legal h2 { font-size: 1.375rem; line-height: 1.2; margin: 40px 0 12px; }
.legal h3 { font-size: 1.125rem; margin: 24px 0 8px; }
.legal p, .legal ul, .legal ol, .legal address { margin: 0 0 14px; }
.legal address { font-style: normal; }
.legal ul, .legal ol { padding-left: 20px; }
.legal .muted { color: var(--ink2); }

/* Fußzeile */
footer.foot { background: var(--putz); border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink2); }
footer.foot .wrap { padding-block: 22px; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; }
footer.foot nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
footer.foot a { color: var(--ink2); }
footer.foot a:hover { color: var(--ink); }

/* Über uns, 404 */
.product-hero h1 em { font-style: normal; color: var(--ink2); }
.head + .facts { margin-top: 0; }
@media (min-width: 640px) { .facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tenant a { font-weight: 600; }

/* Bewegung: kurz (180–360 ms), ease-out, nichts blinkt. Startzustand ist immer sichtbar
   (animation-fill-mode: backwards bzw. @starting-style) – ohne JS und ohne Animation fehlt nichts. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; animation-timing-function: ease-out; }
header.bar { view-transition-name: bar; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Einstieg: einmalig beim Laden, gestaffelt */
:is(.hero, .product-hero) :is(h1, .sub, .actions) { animation: rise .28s var(--ease) backwards; }
:is(.hero, .product-hero) .sub { animation-delay: .04s; }
:is(.hero, .product-hero) .actions { animation-delay: .08s; }

/* Aufklapper Anmelden/Menü und FAQ */
details[open] > .menu-panel, details[open] > .login-menu { animation: panel-in .2s ease-out; }
.faq details[open] > p { animation: fade-in .22s ease-out; }

/* Knöpfe und Kacheln */
.pill { transition: background-color .18s ease-out, color .18s ease-out, transform .18s ease-out; }
.pill:active { transform: scale(.98); }
.tile { transition: transform .28s var(--ease), box-shadow .28s var(--ease); }
a.tile:hover { text-decoration: none; }
.tile .peek img { transition: transform .28s var(--ease); }
/* Nur mit echtem Zeiger: angetippte Kacheln am Handy bleiben nicht angehoben */
@media (hover: hover) {
  a.tile:hover { transform: translateY(-3px); box-shadow: var(--lift); }
  a.tile:hover .peek img { transform: translateY(-6px); }
}

/* Bildschirmfotos blenden beim ersten Zeichnen ein; ohne Unterstützung sofort sichtbar */
.phone img, .desk img { opacity: 1; transition: opacity .32s ease-out; }
@starting-style { .phone img, .desk img { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  a.tile:hover, a.tile:hover .peek img, .pill:active { transform: none; }
}
