/* Sommer KI-Baukalkulator – Landingpage. Schriften liegen lokal, es werden keine fremden Server geladen. */
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --asphalt: #262a2e;
  --asphalt-soft: #3a4046;
  --beton: #eceeec;
  --papier: #fbfbf8;
  --markierung: #f5c211; /* Verkehrsgelb der Baustellenmarkierung */
  --blau: #1f5a8a;       /* Blau der Anwendung */
  --text: #1d2125;
  --leise: #59626b;
  --linie: #cfd4d3;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 1.0625rem/1.55 var(--body); color: var(--text); background: var(--beton); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7vw, 5.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
.section-lead { max-width: 62ch; margin-top: 14px; color: var(--leise); }

.button { display: inline-block; background: var(--markierung); color: var(--asphalt); font-weight: 600; text-decoration: none; padding: 12px 20px; border-radius: 4px; border: 2px solid var(--asphalt); }
.button:hover { background: #ffd43b; }
.button-dark { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.button-dark:hover { background: #000; }
.link { font-weight: 500; }

/* Kopf */
.top { background: var(--beton); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand-sign { width: 26px; height: 26px; background: var(--markierung); border: 2px solid var(--asphalt); transform: rotate(45deg); border-radius: 3px; flex: none; }
.brand-name { font: 700 1.35rem/1 var(--display); }
.brand-name span { font-weight: 600; color: var(--leise); }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.top nav a:hover { text-decoration: underline; }
.top .button { padding: 8px 14px; font-size: 0.98rem; }

/* Einstieg */
.hero { padding-block: clamp(40px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.lead { margin-top: 24px; font-size: 1.2rem; max-width: 54ch; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }

/* Kalkulationsblatt */
.sheet { margin: 0; background: var(--papier); border: 1px solid var(--asphalt); box-shadow: 8px 8px 0 var(--asphalt); font-size: 0.98rem; }
.sheet > * { padding-inline: 20px; }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; background: var(--asphalt); color: #fff; padding-block: 9px; font-weight: 500; font-size: 0.9rem; }
.sheet-head span:last-child { color: var(--markierung); }
.sheet-label { font-weight: 600; font-size: 0.86rem; color: var(--leise); margin-bottom: 4px; text-align: left; }
.sheet-request, .sheet-question { padding-block: 14px; border-bottom: 1px solid var(--linie); }
.sheet-note { color: var(--leise); font-size: 0.9rem; margin-top: 4px; }
.sheet-answer { margin-top: 6px; font-weight: 600; }
.sheet-answer span { font-weight: 500; font-size: 0.86rem; background: #dff0e3; color: #1d5a31; padding: 2px 8px; border-radius: 3px; margin-left: 8px; }
.sheet-table { width: 100%; border-collapse: collapse; padding: 0; font-variant-numeric: tabular-nums; }
.sheet-table caption { padding: 14px 20px 2px; }
.sheet-table th, .sheet-table td { padding: 9px 8px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.sheet-table th:first-child, .sheet-table td:first-child { padding-left: 20px; width: 3.2em; }
.sheet-table th:last-child, .sheet-table td:last-child { padding-right: 20px; }
.sheet-table thead th { font-size: 0.86rem; color: var(--leise); font-weight: 600; }
.sheet-table .num { text-align: right; white-space: nowrap; }
.sheet-table tfoot th, .sheet-table tfoot td { border-bottom: 0; border-top: 2px solid var(--asphalt); font-weight: 600; font-size: 1.1rem; padding-block: 12px; }
.sheet-table mark { background: linear-gradient(transparent 55%, var(--markierung) 55%); color: inherit; padding-inline: 2px; }
.sheet-foot { padding-block: 10px 14px; color: var(--leise); font-size: 0.9rem; border-top: 1px solid var(--linie); }

/* Einmaliger Ablauf beim Laden: Anfrage, Rückfrage, Positionen, Summe */
@media (prefers-reduced-motion: no-preference) {
  .sheet-request, .sheet-question, .sheet-table tbody tr, .sheet-table tfoot tr, .sheet-foot { opacity: 0; animation: einblenden 0.4s ease-out forwards; }
  .sheet-request { animation-delay: 0.2s; }
  .sheet-question { animation-delay: 0.8s; }
  .sheet-table tbody tr:nth-child(1) { animation-delay: 1.4s; }
  .sheet-table tbody tr:nth-child(2) { animation-delay: 1.6s; }
  .sheet-table tbody tr:nth-child(3) { animation-delay: 1.8s; }
  .sheet-table tbody tr:nth-child(4) { animation-delay: 2s; }
  .sheet-table tfoot tr { animation-delay: 2.5s; }
  .sheet-foot { animation-delay: 2.9s; }
  @keyframes einblenden { to { opacity: 1; } }
}

/* Ablauf auf Asphalt, die Schritte liegen an einer Leitlinie */
.road { background: var(--asphalt); color: #fff; padding-block: clamp(56px, 8vw, 96px); }
.road .section-lead { color: #c3c9ce; }
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; counter-reset: schritt; position: relative; }
.steps::before { content: ''; position: absolute; left: 0; right: 0; top: 21px; height: 6px; background: repeating-linear-gradient(90deg, #fff 0 44px, transparent 44px 76px); opacity: 0.85; }
.steps li { counter-increment: schritt; position: relative; padding-top: 68px; }
.steps li::before { content: counter(schritt); position: absolute; top: 0; left: 0; width: 48px; height: 48px; display: grid; place-items: center; background: var(--markierung); color: var(--asphalt); font: 700 1.7rem/1 var(--display); border-radius: 50%; box-shadow: 0 0 0 8px var(--asphalt); }
.steps h3 { color: #fff; }
.steps p { margin-top: 8px; color: #c9cfd4; font-size: 0.98rem; }

/* Videos: Text und Aufnahme wechseln die Seite */
.films { padding-block: clamp(56px, 8vw, 96px); }
.film { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(40px, 6vw, 72px); }
.film-flip { grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr); }
.film-flip .film-text { order: 2; }
.film-step { display: inline-block; font: 700 1.05rem/1 var(--display); background: var(--markierung); color: var(--asphalt); padding: 6px 10px 5px; border: 2px solid var(--asphalt); border-radius: 3px; margin-bottom: 14px; }
.film h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
.film-text > p:not(.film-step) { margin-top: 12px; color: var(--asphalt-soft); }
.film-points { list-style: none; margin: 16px 0 0; padding: 0; font-variant-numeric: tabular-nums; }
.film-points li { padding: 8px 0; border-top: 1px solid var(--linie); font-weight: 500; }
.film-frame { margin: 0; border: 1px solid var(--asphalt); box-shadow: 8px 8px 0 var(--asphalt); background: #fff; }
.film-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #f6f7f9; }

/* Baustelle und Handy */
.site { padding-block: clamp(56px, 8vw, 96px); }
.site-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.inputs { list-style: none; margin: 24px 0 0; padding: 0; }
.inputs li { padding: 12px 0 12px 22px; border-top: 1px solid var(--linie); position: relative; }
.inputs li:first-child { border-top: 2px solid var(--asphalt); }
.inputs li::before { content: ''; position: absolute; left: 0; top: 22px; width: 12px; height: 4px; background: var(--markierung); outline: 1px solid var(--asphalt); }
.phones { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: end; }
.phone { border: 6px solid var(--asphalt); border-radius: 22px; background: #fff; }
.phone:nth-child(2) { margin-bottom: 36px; }
.sketch { border: 1px solid var(--asphalt); box-shadow: 5px 5px 0 var(--asphalt); align-self: center; }
.phones figcaption { grid-column: 1 / -1; color: var(--leise); font-size: 0.95rem; margin-top: 4px; }

.origin { margin-top: 28px; color: var(--leise); font-size: 0.98rem; max-width: 52ch; padding-top: 14px; border-top: 1px solid var(--linie); }
.contact-who { font-weight: 600; }
.foot-home { margin-left: 0 !important; }

/* Bilder aus der Anwendung */
.shots { padding-block: clamp(56px, 8vw, 96px); }
.shot-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.shot { margin: 0; }
.shot-wide { grid-column: 1 / -1; }
.shot img { border: 1px solid var(--asphalt); background: #fff; width: 100%; }
.shot figcaption { margin-top: 10px; color: var(--leise); font-size: 0.96rem; max-width: 70ch; }

/* Textabschnitte */
.plain { padding-block: clamp(56px, 8vw, 96px); background: var(--papier); border-block: 1px solid var(--linie); }
.two-col { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.facts { margin: 0; }
.facts div { padding-block: 16px; border-top: 1px solid var(--linie); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; }
.facts div:first-child { border-top: 2px solid var(--asphalt); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--asphalt-soft); }

/* Zwei Wege */
.ways { padding-block: clamp(56px, 8vw, 96px); }
.way-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--asphalt); background: var(--papier); }
.way { padding: clamp(22px, 3vw, 36px); }
.way + .way { border-left: 1px solid var(--asphalt); }
.way p { margin-top: 12px; }
.way ul { margin: 18px 0 0; padding: 0; list-style: none; }
.way li { padding: 8px 0 8px 22px; border-top: 1px solid var(--linie); position: relative; }
.way li::before { content: ''; position: absolute; left: 0; top: 17px; width: 12px; height: 4px; background: var(--markierung); outline: 1px solid var(--asphalt); }
.pilot { margin-top: 24px; max-width: 70ch; color: var(--asphalt-soft); }

/* Fragen */
.faq details { border-top: 1px solid var(--linie); }
.faq details:first-child { border-top: 2px solid var(--asphalt); }
.faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 2px; top: 10px; font: 600 1.7rem/1.2 var(--display); }
.faq details[open] summary::after { content: '–'; }
.faq p { padding-bottom: 18px; max-width: 66ch; color: var(--asphalt-soft); }

/* Kontakt */
.contact { background: var(--markierung); padding-block: clamp(48px, 7vw, 80px); border-block: 2px solid var(--asphalt); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.contact p { margin-top: 14px; max-width: 56ch; }
.contact a { color: var(--asphalt); }
.contact .button-dark { color: #fff; }
.contact-box p { margin-top: 12px; }

.foot { background: var(--asphalt); color: #c9cfd4; padding-block: 22px; font-size: 0.95rem; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot a { color: #fff; margin-left: 18px; }

/* Rechtstexte */
.legal { padding-block: 56px; background: var(--papier); min-height: 70vh; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 2.6rem; margin-bottom: 20px; }
.legal h2 { font-size: 1.5rem; margin: 28px 0 8px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal .stand { color: var(--leise); margin-top: 28px; }
.legal p { margin-bottom: 12px; }
.legal .todo { background: #fff3c4; border: 1px solid var(--asphalt); padding: 12px 14px; }

@media (max-width: 900px) {
  .top nav { display: none; }
  .hero-grid, .two-col, .contact-grid, .film, .site-grid { grid-template-columns: minmax(0, 1fr); }
  .film-flip { grid-template-columns: minmax(0, 1fr); }
  .film-flip .film-text { order: 0; }
  .film-frame { box-shadow: 5px 5px 0 var(--asphalt); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 40px; }
  .steps::before { left: 21px; right: auto; top: 0; bottom: 0; width: 6px; height: auto; background: repeating-linear-gradient(180deg, #fff 0 44px, transparent 44px 76px); }
  .steps li { padding: 0 0 0 72px; min-height: 48px; }
  .shot-grid, .way-grid { grid-template-columns: minmax(0, 1fr); }
  .way + .way { border-left: 0; border-top: 1px solid var(--asphalt); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .top .button { display: none; }
  .sheet { box-shadow: 5px 5px 0 var(--asphalt); font-size: 0.93rem; }
  .sheet > *, .sheet-table caption { padding-inline: 14px; }
  .sheet-table th:first-child, .sheet-table td:first-child { padding-left: 14px; width: 2.4em; }
  .sheet-table th:last-child, .sheet-table td:last-child { padding-right: 14px; }
}
