/* CaliCAD-Website: an aurora.tech angelehnt. Heller Ton-Look, dunkle Schrift, eine Akzentfarbe.
   Im Hero steht der Greifarm als echtes 3D-Netz aus der STEP-Baugruppe. */

@font-face { font-family: "Stack Sans Headline"; src: url("schriften/stack-sans-headline-latin.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Stack Sans Text"; src: url("schriften/stack-sans-text-latin.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --ton: #e2ecec;
  --surface: #f0f6f6;
  --ink: #08201f;
  --muted: #4f6464;
  --leise: #889c9b;
  --accent: #007c80;
  --accent-ink: #ffffff;
  --navy: #08201f;
  --navy-ink: #e8f2f1;
  --mass: #35d0c8;
  --ring: #00a3a6;
  --lehm: #e1e9e9;
  --knopf-hover: var(--ink);
  --zweit-bg: var(--ink);
  --zweit-ink: var(--bg);
  --plan-knopf-bg: var(--accent);
  --plan-knopf-ink: var(--accent-ink);
  --radius: 6px;

  --display: "Stack Sans Headline", system-ui, sans-serif;
  --text: "Stack Sans Text", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  --step-head: clamp(2.75rem, 1.4rem + 4.2vw, 5.5rem);
  --step-display: clamp(5rem, 2rem + 9vw, 10.5rem);

  --pad: clamp(20px, 3.4vw, 56px);
  --abstand: clamp(112px, 13vw, 192px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body) / 1.5 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, .feld h3 { font-family: var(--display); font-weight: 500; font-size: var(--step-head); letter-spacing: -0.035em; line-height: 1; }
h3 { font-family: var(--display); font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; }

.unsichtbar, .sprung:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprung:focus { position: fixed; left: 16px; top: 16px; z-index: 20; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.knopf:hover { background: var(--knopf-hover); color: var(--bg); }
.knopf:active { transform: scale(0.97); }
.knopf .pfeil { display: inline-block; transition: transform 220ms var(--ease-out); }
.knopf:hover .pfeil { transform: translateX(4px); }
.knopf.klein { min-height: 42px; padding: 0 16px; font-size: var(--step-small); }
.knopf.zweit { background: var(--zweit-bg); color: var(--zweit-ink); }
.knopf.zweit:hover { background: var(--accent); color: var(--accent-ink); }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Kopf ---------- */
.kopf { position: absolute; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; gap: 32px; height: 84px; padding: 0 var(--pad); }
.marke { font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.04em; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 28px; font-size: var(--step-small); }
.nav a, .nav-anmelden { text-decoration: none; font-size: var(--step-small); font-weight: 500; transition: color 200ms ease; }
.nav a, .nav-anmelden { text-underline-offset: 6px; }
.nav a:hover, .nav-anmelden:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.held { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; min-height: max(100svh, 720px); padding: 0 var(--pad); background: var(--ton); overflow: hidden; }
.held-text { position: relative; z-index: 2; grid-column: 1 / 7; align-self: center; padding: 140px 0 120px; }
.held h1 span { display: block; white-space: nowrap; }
.held .lead { margin-top: 36px; max-width: 34ch; }
.held .aktionen { margin-top: 44px; }

.modell { position: absolute; top: 0; bottom: 0; left: 34%; right: 0; z-index: 1; }
.modell-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: opacity 600ms ease; }
.js .modell-bild, .modell.bereit .modell-bild { opacity: 0; }
.js .modell.ohne-3d .modell-bild { opacity: 1; }
.modell-leinwand { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity 900ms ease; }
.modell.bereit .modell-leinwand { opacity: 1; }
.modell-leinwand.zieht { cursor: grabbing; }
.modell-leinwand:focus-visible { outline-offset: -6px; }

.punkt { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; opacity: 0; transition: opacity 400ms ease; }
.modell.bereit .punkt { opacity: 1; }
.punkt::before, .punkt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--accent-ink); transition: transform 220ms var(--ease-out); }
.punkt::after { transform: rotate(90deg); }
.punkt[aria-expanded="true"]::before { transform: rotate(45deg); }
.punkt[aria-expanded="true"]::after { transform: rotate(135deg); }
.punkt:hover { background: var(--ink); }
.info { position: absolute; right: var(--pad); bottom: 132px; z-index: 3; width: min(320px, calc(100% - 2 * var(--pad))); padding: 18px 20px; border-radius: var(--radius); background: var(--bg); font-size: 1rem; box-shadow: 0 18px 40px -18px rgba(11, 21, 38, 0.35); } /* taste-skill-ignore: schwebende Karte über dem Modell */
.info b { display: block; font-family: var(--display); font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 6px; }

.kennzahlen { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 22px var(--pad); background: rgba(255, 255, 255, 0.55); font-size: var(--step-small); color: var(--muted); }
.kennzahlen b { display: block; font-family: var(--display); font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; color: var(--ink); }

/* ---------- Aussage ---------- */
.aussage { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; padding: var(--abstand) var(--pad); }
.aussage-bilder { grid-column: 2 / 6; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.aussage-bilder img { width: 100%; height: auto; border-radius: var(--radius); object-fit: cover; }
.aussage-bilder img:nth-child(1) { grid-column: 1 / 3; aspect-ratio: 16 / 10; object-position: 50% 50%; }
.aussage-bilder img:nth-child(2) { aspect-ratio: 1; object-position: 50% 55%; }
.aussage-bilder img:nth-child(3) { aspect-ratio: 1; object-position: 45% 70%; margin-top: 64px; }
.aussage-text { grid-column: 7 / -1; position: sticky; top: 22vh; align-self: start; display: grid; gap: 32px; }
.aussage-text p { font-family: var(--display); font-weight: 500; font-size: clamp(1.375rem, 1.1rem + 0.7vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.25; color: var(--ink); max-width: 30em; }
.js .aussage-text p[data-fuellen] { color: var(--leise); transition: color 700ms ease; }
.js .aussage-text p[data-fuellen].voll { color: var(--ink); }

/* ---------- Maker: Galerie, die seitwärts läuft ----------
   Ohne Skript, auf dem Telefon und bei reduzierter Bewegung ist die Spur ein waagrechter Wisch-Streifen.
   Auf breiten Bildschirmen hält seite.js den Abschnitt fest und schiebt die Spur mit dem Scrollen. */
.maker { position: relative; background: var(--surface); }
.maker-buehne { padding: var(--abstand) 0 calc(var(--abstand) * 0.7); overflow: hidden; }
.maker-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; padding: 0 var(--pad); }
.maker-kopf p { max-width: 38ch; }
/* Die Galerie endet an den Seitenrändern, nicht am Bildschirmrand: so steht kein Text an der Kante */
.maker-fenster { margin: 56px var(--pad) 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline-offset: 4px; }
.maker-fenster::-webkit-scrollbar { display: none; }
.maker-spur { display: flex; align-items: flex-end; gap: 32px; width: max-content; margin: 0; padding: 0; list-style: none; }
.werk { scroll-snap-align: start; display: grid; align-content: end; gap: 10px; }
.werk img { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; transition: transform 700ms var(--ease-out); }
.werk:hover img { transform: scale(1.015); }
.werk.hoch { width: clamp(280px, 30vw, 440px); }
.werk.hoch img { aspect-ratio: 4 / 5; }
.werk.breit { width: clamp(320px, 44vw, 660px); }
.werk.breit img { aspect-ratio: 3 / 2; }
.werk.versetzt { align-self: flex-start; }
.werk:nth-child(1) img { object-position: 50% 30%; }
.werk:nth-child(2) img { object-position: 60% 25%; }
.werk:nth-child(3) img { object-position: 58% 40%; }
.werk:nth-child(4) img { object-position: 66% 40%; }
.werk:nth-child(5) img { object-position: 60% 50%; }
.werk h3 { font-size: var(--step-lead); }
.werk p { max-width: 36ch; }
.werk .ort { color: var(--muted); font-size: var(--step-small); }
.werk.du { align-self: stretch; width: clamp(300px, 34vw, 500px); align-content: end; gap: 20px; padding: 40px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }
.werk.du h3 { font-size: var(--step-head); }
.werk.du .knopf { justify-self: start; }
.knopf.hell { background: var(--accent-ink); color: var(--accent); }
.knopf.hell:hover { background: var(--ink); color: var(--bg); }

/* Festgehalten: die Bühne klebt, die Spur fährt; die Höhe des Abschnitts setzt seite.js aus der Spurlänge */
.maker.gepinnt .maker-buehne { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 0; }
.maker.gepinnt .maker-fenster { overflow: hidden; scroll-snap-type: none; }
.maker.gepinnt .maker-spur { will-change: transform; }

/* ---------- Ausprobieren ---------- */
.ausprobieren { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: center; padding: var(--abstand) var(--pad); }
.probe-text { grid-column: 1 / 5; }
.probe-text p { margin-top: 24px; max-width: 40ch; }
.app { grid-column: 6 / -1; border-radius: var(--radius); overflow: hidden; background: #161c28; color: #c8d0dc; font-size: 13px; }
.app-leiste { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; background: #0f141e; }
.app-leiste b { color: #fff; font-weight: 500; }
.app-leiste .status { margin-left: auto; color: #7d889a; font-variant-numeric: tabular-nums; }
.app-flaechen { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #0f141e; }
.app-ansicht { position: relative; height: 300px; display: grid; place-items: center; background-color: #161c28; background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px); /* taste-skill-ignore: Raster des CAD-Ansichtsfensters */ background-size: 20px 20px; }
.ansicht-name { position: absolute; left: 12px; top: 10px; color: #7d889a; }
.zeichnung { width: 88%; height: 82%; overflow: visible; }
.zeichnung .kante { stroke: #0b0f17; stroke-width: 1.1; fill: none; }
.zeichnung .f1 { fill: #c9d3e0; }
.zeichnung .f2 { fill: #8e9bb0; }
.zeichnung .f3 { fill: #66748b; }
.zeichnung .loch { fill: #2c3546; }
.zeichnung path.f1.kante, .zeichnung path.loch.kante { stroke: #0b0f17; }
[data-skizze] .kante { stroke: #e9edf3; stroke-width: 1.3; }
.zeichnung .mass { stroke: var(--mass); stroke-width: 1; fill: none; }
.zeichnung .pfeil { fill: var(--mass); }
.zeichnung .masszahl, .zeichnung .masszahl-aktiv { fill: var(--mass); font: 500 13px var(--text); }
.zeichnung .mittel { stroke: #e0675f; stroke-width: 0.8; stroke-dasharray: 10 3 2 3; fill: none; }
.zeichnung .glyphe-rahmen { fill: #161c28; stroke: var(--mass); stroke-width: 0.8; }
.zeichnung .glyphe { fill: var(--mass); font: 500 8px var(--text); }
.zeichnung .griff { fill: var(--mass); transition: r 160ms var(--ease-out); }
.zeichnung .ziehgriff { cursor: ew-resize; outline: none; touch-action: none; }
.zeichnung .ziehgriff:hover .griff, .zeichnung .ziehgriff:focus-visible .griff { r: 9; }
.zeichnung .ziehgriff:focus-visible .mass { stroke-width: 2; }
.zeichnung .verdeckt { display: none; }
.app-regler { display: flex; align-items: center; gap: 16px; padding: 12px 14px; background: #0f141e; }
.app-regler input { flex: 1; accent-color: var(--mass); height: 28px; }
.app-regler output { min-width: 4.5ch; text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
.ohne-skript { display: none; }
html:not(.js) .ohne-skript { display: block; width: 100%; height: 100%; object-fit: contain; }

.probe-text .werte { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 36px 0 40px; color: var(--muted); }
.werte b { font-family: var(--display); font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ---------- Ablauf ---------- */
.ablauf { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: start; padding: var(--abstand) var(--pad) calc(var(--abstand) + 12px); background: var(--ton); }
.ablauf-text { grid-column: 1 / 6; }
.ablauf-text p { margin-top: 24px; max-width: 36ch; }
.ablauf-video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 48px; border-radius: var(--radius); }
.zettel { grid-column: 8 / 12; position: relative; padding: 8px 32px 0; background: var(--bg); color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; border-radius: var(--radius) var(--radius) 0 0; }
.zettel::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 0H16L8 12Z' fill='%23ffffff'/%3E%3C/svg%3E") repeat-x; background-size: 16px 12px; }
.zettel h3 { font-family: var(--text); font-weight: 500; font-size: 16px; letter-spacing: 0; margin: 28px 0 10px; }
.zeile { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; }
.zeile span:last-child, .ergebnis span:last-child { white-space: nowrap; }
.zeile i { flex: 1; min-width: 24px; height: 4px; align-self: center; margin-top: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%238a94a6'/%3E%3C/svg%3E") repeat-x; background-size: 8px 4px; }
.ergebnis { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; margin: 28px -32px 0; padding: 0 32px; background: var(--accent); color: var(--accent-ink); }

/* ---------- Fragen ---------- */
.fragen { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; padding: var(--abstand) var(--pad) calc(var(--abstand) * 0.6); }
.fragen h2 { grid-column: 1 / 5; }
.fragen-text { grid-column: 5 / -1; columns: 2; column-gap: 56px; }
.fragen-text p { max-width: 52ch; margin-bottom: 22px; break-inside: avoid; line-height: 1.55; }
.fragen-text b { font-weight: 500; }

/* ---------- Schluss ---------- */
.schluss { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 24px; align-items: center; padding: calc(var(--abstand) * 0.6) var(--pad) var(--abstand); }
.schluss-text { grid-column: 1 / 6; }
.schluss-text p { margin-top: 24px; max-width: 36ch; }
.schluss .aktionen { margin-top: 36px; }
.schluss-bild { grid-column: 7 / -1; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* ---------- Fuß ---------- */
.fuss { background: var(--navy); color: var(--navy-ink); padding: 80px var(--pad) 32px; overflow: hidden; }
.fuss-oben { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px 24px; }
.fuss nav { grid-column: 1 / 7; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.fuss nav a { font-family: var(--display); font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; text-decoration: none; transition: transform 220ms var(--ease-out), color 200ms ease; }
.fuss nav:hover a { color: var(--leise); }
.fuss nav a:hover, .fuss nav a:focus-visible { color: var(--navy-ink); transform: translateX(10px); }
.fuss-bloecke { grid-column: 8 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; font-size: var(--step-small); }
.fuss-bloecke a { color: var(--navy-ink); }
.fuss-marke { margin-top: 96px; font-family: var(--display); font-weight: 600; font-size: 21vw; letter-spacing: -0.06em; line-height: 0.8; white-space: nowrap; margin-left: -0.04em; }
.credits { margin-top: 48px; max-width: 60ch; color: var(--leise); font-size: var(--step-small); }
.credits a { color: var(--leise); }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .maker-kopf { display: block; }
  .maker-kopf p { margin-top: 20px; }
  .werk.du h3 { font-size: var(--step-lead); }
  .held-text { grid-column: 1 / 8; }
  .modell { left: 28%; }
  .kennzahlen { grid-template-columns: repeat(2, 1fr); }
  .aussage-bilder { grid-column: 1 / 6; }
  .aussage-text { grid-column: 7 / -1; }
  .probe-text, .app { grid-column: 1 / -1; }
  .app { margin-top: 48px; }
  .ablauf-text { grid-column: 1 / 7; }
  .zettel { grid-column: 8 / -1; padding: 8px 20px 0; }
  .ergebnis { margin: 28px -20px 0; padding: 0 20px; }
  .fragen h2 { grid-column: 1 / -1; margin-bottom: 40px; }
  .fragen-text { grid-column: 1 / -1; }
  .schluss-text, .schluss-bild { grid-column: 1 / -1; }
}

/* ---------- Galerie zum Wischen: unter 900 px hält seite.js den Abschnitt nicht fest ---------- */
@media (max-width: 899px) {
  .maker-fenster { margin-top: 40px; }
  .maker-spur { gap: 20px; }
  .werk.hoch, .werk.breit, .werk.du { width: min(78vw, 520px); }
  .werk.breit img { aspect-ratio: 4 / 5; }
  .werk.versetzt { align-self: flex-end; }
  .werk.du { padding: 28px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
  .kopf { height: 68px; gap: 16px; }
  .nav-anmelden { display: none; }
  .held { display: flex; flex-direction: column; min-height: 0; padding: 0; }
  .held-text { padding: 112px var(--pad) 0; }
  .modell { position: relative; left: auto; height: 66svh; min-height: 400px; margin-top: 8px; }
  .info { bottom: 16px; right: var(--pad); }
  .kennzahlen { position: static; grid-template-columns: 1fr 1fr; padding: 20px var(--pad); }
  .aussage, .ausprobieren, .ablauf, .fragen, .schluss, .fuss-oben { display: flex; flex-direction: column; }
  .aussage { gap: 48px; }
  .aussage-text { position: static; }
  .aussage-bilder img:nth-child(3) { margin-top: 32px; }
  .zettel { margin-top: 56px; }
  .fragen-text { columns: 1; }
  .fuss-bloecke { grid-template-columns: 1fr; }
}
