/* ==========================================================================
   Cardan Solutions — Basis für alle Demo-Websites (erfundene Betriebe)
   Jede Demo setzt ihre Farben und Schriften über die Variablen in :root
   und ergänzt eigene Abschnitte in einem <style> im Kopf der Seite.
   ========================================================================== */
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f3;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5d606b;
  --line: rgba(0, 0, 0, 0.1);
  --brand: #1f4fd1;
  --brand-ink: #ffffff;
  --accent: #ffcc00;
  --accent-ink: #16181d;
  --radius: 14px;
  --btn-radius: 999px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --system: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-body: var(--sans);
  --font-head: var(--sans);
  --head-weight: 750;
  --head-case: none;
  --head-track: -0.035em;
  --gutter: 20px;
  --nav-h: 72px;
}
@media (min-width: 760px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; overflow-x: clip; /* hidden renderebbe il body un contenitore di scorrimento e sticky non funzionerebbe */ -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); letter-spacing: var(--head-track); line-height: 1.08; }
h1 { font-size: clamp(38px, 6vw, 70px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.2vw, 48px); }
h3 { font-size: 21px; letter-spacing: -0.015em; line-height: 1.25; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.lead { font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.sec { padding-block: clamp(64px, 9vw, 112px); }
.sec--alt { background: var(--surface); }
.sec-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }
.sec-head .eyebrow { margin-bottom: 0; }

/* Demo-Hinweis ganz oben */
.demo-bar { position: relative; z-index: 60; background: #111114; color: rgba(255, 255, 255, 0.82); font-family: var(--system); font-size: 13px; line-height: 1.4; text-align: center; padding: 8px var(--gutter); }
.demo-bar b { color: #fff; }
.demo-bar a { color: #ffb49d; text-underline-offset: 3px; }
.is-shot .demo-bar { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px;
  border-radius: var(--btn-radius); border: 2px solid transparent; font-weight: 650; font-size: 16px; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s; white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* Kopfzeile */
.d-nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg, var(--bg)); border-bottom: 1px solid var(--nav-line, var(--line)); }
.d-nav__in { display: flex; align-items: center; gap: 24px; min-height: var(--nav-h); }
.d-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.d-logo svg { width: 38px; height: 38px; flex: none; }
.d-logo span { white-space: nowrap; }
.d-logo b { display: block; font-family: var(--font-head); font-size: 18px; line-height: 1.1; letter-spacing: -0.02em; }
.d-logo small { display: block; font-size: 12.5px; color: var(--nav-muted, var(--muted)); line-height: 1.2; }
.d-links { display: flex; gap: 4px; }
.d-links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 15.5px; font-weight: 550; white-space: nowrap; }
.d-links a:hover { background: var(--nav-hover, rgba(0, 0, 0, 0.05)); }
.d-burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--nav-line, var(--line)); background: transparent; align-items: center; justify-content: center; }
.d-burger span, .d-burger span::before, .d-burger span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.25s; }
.d-burger span::before, .d-burger span::after { content: ""; position: absolute; left: 0; }
.d-burger span::before { top: -6px; }
.d-burger span::after { top: 6px; }
.d-nav.is-open .d-burger span { background: transparent; }
.d-nav.is-open .d-burger span::before { transform: translateY(6px) rotate(45deg); }
.d-nav.is-open .d-burger span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 640px) { .d-nav__cta { display: none !important; } }
@media (max-width: 1080px) {
  .d-burger { display: inline-flex; }
  .d-nav__in { gap: 14px; }
  .d-links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px var(--gutter) 18px;
    background: var(--nav-bg, var(--bg)); border-bottom: 1px solid var(--nav-line, var(--line));
    box-shadow: 0 24px 30px -24px rgba(0, 0, 0, 0.35); display: none;
  }
  .d-nav.is-open .d-links { display: flex; }
  .d-links a { font-size: 18px; padding: 13px 4px; border-radius: 0; border-bottom: 1px solid var(--nav-line, var(--line)); }
}

/* Raster und Karten */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; }
.card p { color: var(--muted); font-size: 16px; }
.ic { width: 50px; height: 50px; border-radius: calc(var(--radius) * 0.8); display: grid; place-items: center; background: var(--ic-bg, var(--surface)); color: var(--ic-ink, var(--brand)); margin-bottom: 6px; }
.ic svg { width: 26px; height: 26px; }
.checks { display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.steps { counter-reset: step; }
.steps > li { counter-increment: step; position: relative; }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chip { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px; }
  h1, h2, h3, p, li, dt, dd, summary, .btn { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
  .btn { white-space: normal; text-align: center; }
}

/* Status „geöffnet / geschlossen" */
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c2c4cc; flex: none; }
.status.is-open::before { background: #22b45e; box-shadow: 0 0 0 4px rgba(34, 180, 94, 0.2); }

/* Öffnungszeiten */
.hours { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; font-size: 16px; }
.hours dt { color: var(--muted); }
.hours dd { font-weight: 600; text-align: right; }

/* Formular */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: calc(var(--radius) * 0.7); border: 1px solid var(--field-line, rgba(0, 0, 0, 0.18));
  background: var(--field-bg, #fff); font-size: 16px; font-weight: 400;
}
.form textarea { min-height: 120px; resize: vertical; }
.form small { color: var(--muted); font-size: 13.5px; }
@media (max-width: 620px) { .form .row { grid-template-columns: minmax(0, 1fr); } }

/* Fußzeile */
.d-foot { background: var(--foot-bg, #15161a); color: rgba(255, 255, 255, 0.7); padding: 48px 0 32px; font-size: 15px; }
.d-foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.d-foot b { color: #fff; }
.d-foot h4 { color: #fff; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.d-foot a { color: rgba(255, 255, 255, 0.85); }
.d-credits { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.5); }
.d-foot .d-credits a { color: inherit; }
.d-foot__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 13.5px; }
@media (max-width: 760px) { .d-foot__grid { grid-template-columns: minmax(0, 1fr); } }

/* Aktionsleiste auf dem Handy */
.d-actions { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .d-actions {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bar-bg, rgba(255, 255, 255, 0.96)); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .d-actions a { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border-radius: 12px; text-decoration: none; font-size: 12.5px; font-weight: 650; background: var(--surface); }
  .d-actions a:first-child { background: var(--brand); color: var(--brand-ink); }
  .d-actions svg { width: 21px; height: 21px; }
}

/* Hinweis bei Demo-Aktionen */
.d-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; width: max-content; max-width: calc(100% - 32px); transform: translate(-50%, 20px);
  padding: 13px 18px; border-radius: 14px; background: #16161a; color: #fff; font-family: var(--system); font-size: 14.5px; line-height: 1.4;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.d-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .d-toast { bottom: calc(92px + env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
