/* =========================================================================
   craftivo — Integrationen (Messe-Showcase)
   Eigenständige, offline-taugliche Seite. Optimiert für iPad (Querformat).
   Markenfarbe #B12A2D · Schrift Geist · Radius 14px
   ========================================================================= */

/* ---------- Fonts (lokal gebündelt, Umlaute via latin-Subset) ---------- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  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';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens: Light ---------- */
:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --bg: #f5f5f8;
  --bg-elev: #ffffff;
  --bg-roadmap: #eeeef2;
  --ink: #14161c;
  --text: #3c4250;
  --muted: #5b626e;
  --border: #e6e7ec;
  --border-strong: #d6d8e0;

  --primary: #b12a2d;
  --primary-ink: #9a2427;
  --primary-contrast: #ffffff;
  --primary-tint: rgba(177, 42, 45, 0.08);
  --primary-tint-2: rgba(177, 42, 45, 0.13);

  --live: #126e34;
  --live-bg: rgba(22, 163, 74, 0.12);
  --live-dot: #16a34a;

  --soon: #9a4708;
  --soon-bg: rgba(217, 119, 6, 0.12);
  --soon-dot: #d97706;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(16, 18, 24, 0.04), 0 2px 6px rgba(16, 18, 24, 0.05);
  --shadow-md: 0 6px 16px rgba(16, 18, 24, 0.07), 0 2px 6px rgba(16, 18, 24, 0.05);
  --shadow-lg: 0 18px 50px rgba(16, 18, 24, 0.12), 0 4px 14px rgba(16, 18, 24, 0.06);

  --container: 1240px;
  --pad-inline: clamp(20px, 4vw, 56px);
}

/* ---------- Design tokens: Dark ---------- */
[data-theme='dark'] {
  --bg: #0b0d12;
  --bg-elev: #14171f;
  --bg-roadmap: #0f1218;
  --ink: #f3f4f7;
  --text: #c3c8d2;
  --muted: #8b93a1;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.17);

  --primary: #e2554f;
  --primary-ink: #f08b86;
  --primary-contrast: #ffffff;
  --primary-tint: rgba(226, 85, 79, 0.14);
  --primary-tint-2: rgba(226, 85, 79, 0.22);

  --live: #4ade80;
  --live-bg: rgba(34, 197, 94, 0.16);
  --live-dot: #34d399;

  --soon: #fbbf24;
  --soon-bg: rgba(245, 158, 11, 0.16);
  --soon-dot: #fbbf24;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.15rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 { color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
strong { font-weight: 650; color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

.icon {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor;
  flex: none;
}

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--primary); color: var(--primary-contrast);
  padding: 12px 18px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; min-height: 44px;
  z-index: 200; transition: top 0.2s ease; font-weight: 600;
}
.skip-link:focus { top: 16px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 30px; width: auto; }
.footer-logo { height: 32px; }
/* Logo-Variante je nach Theme */
.brand-logo--light { display: none; }
[data-theme='dark'] .brand-logo--dark { display: none; }
[data-theme='dark'] .brand-logo--light { display: block; }

.theme-toggle {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle:active { transform: scale(0.94); }
.theme-icon-moon { display: none; }
[data-theme='dark'] .theme-icon-sun { display: none; }
[data-theme='dark'] .theme-icon-moon { display: block; }

/* ---------- Eyebrow / shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .icon { font-size: 1.05rem; }
.eyebrow--live { color: var(--live); }
.eyebrow--soon { color: var(--soon); }

.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot--live {
  background: var(--live-dot);
  box-shadow: 0 0 0 4px var(--live-bg);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--live-bg); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .status-dot--live { animation: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  min-height: min(92vh, 880px);
  padding-block: clamp(48px, 8vh, 110px) clamp(70px, 10vh, 130px);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-glow {
  position: absolute; top: -22%; right: -10%;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at center,
    var(--primary-tint-2) 0%, transparent 62%);
  filter: blur(8px);
}
.hero-mark {
  position: absolute; left: -7%; bottom: -16%;
  width: clamp(280px, 42vw, 620px);
  opacity: 0.05; transform: rotate(-8deg);
}
[data-theme='dark'] .hero-mark { opacity: 0.10; }
.hero::after { /* fade into next section */
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1;
}

.hero-inner { max-width: 980px; }
.eyebrow--hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--primary-ink);
  padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.eyebrow--hero .icon { font-size: 1.1rem; }

.hero-title {
  margin-top: 26px;
  font-size: clamp(2.5rem, 1.4rem + 5.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.hero-title-accent { color: var(--primary); }
.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.5;
  color: var(--text);
}

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 12px 22px;
  margin-top: 30px;
}
.hero-trust li {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; color: var(--ink);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
}
.hero-trust .icon { font-size: 1.35em; color: var(--primary); stroke-width: 2.2; }

.legend {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  margin-top: 34px; padding: 14px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.legend-item strong { color: var(--ink); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.legend-dot--live { background: var(--live-dot); box-shadow: 0 0 0 4px var(--live-bg); }
.legend-dot--soon { background: var(--soon-dot); box-shadow: 0 0 0 4px var(--soon-bg); }
.legend-sep { width: 1px; height: 22px; background: var(--border-strong); }
/* Trenner ausblenden, sobald die Legende umbricht (kein freischwebender Strich) */
@media (max-width: 560px) { .legend-sep { display: none; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 14px;
}
.scroll-hint .icon { font-size: 1.5rem; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint .icon { animation: none; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(60px, 8vw, 116px); position: relative; }
.section--roadmap {
  background: var(--bg-roadmap);
  border-top: 1px solid var(--border);
}
.section-head { max-width: 760px; margin-bottom: clamp(34px, 5vw, 56px); }
.section-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3rem);
  font-weight: 800;
}
.section-lead {
  margin-top: 16px;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--text); line-height: 1.55;
}

/* ---------- Bento (Verfügbar) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start; /* Karten an ihrer eigenen Höhe ausrichten — keine leeren Flächen */
  gap: clamp(16px, 1.6vw, 24px);
}
.card--featured-wide { grid-column: span 8; }
.card--featured { grid-column: span 4; }
.card--available:not(.card--featured-wide):not(.card--featured) { grid-column: span 4; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 2.2vw, 32px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) {
  .card--available:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}

.card--featured-wide, .card--featured { border-color: var(--primary-tint-2); }
.card--featured-wide::before, .card--featured::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--primary), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5; pointer-events: none;
}
.card--ai {
  background:
    radial-gradient(120% 90% at 100% 0%, var(--primary-tint) 0%, transparent 55%),
    var(--bg-elev);
}

.card-top {
  display: flex; gap: 12px;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: clamp(16px, 1.8vw, 22px);
}
.card-icon {
  flex: none;
  width: clamp(48px, 4vw, 58px); height: clamp(48px, 4vw, 58px);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: clamp(24px, 2.2vw, 30px);
  border-radius: 15px;
  background: var(--primary-tint);
  color: var(--primary);
  stroke-width: 2.1;
}
.card-icon--ai {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #ff8a3d));
  color: #fff;
}
.card-icon--muted { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }

.card-title, .card-text, .feature-list li { overflow-wrap: break-word; }
.card-title { font-size: clamp(1.2rem, 0.9rem + 0.9vw, 1.4rem); font-weight: 700; }
.card--featured-wide .card-title { font-size: clamp(1.4rem, 1rem + 1.1vw, 1.7rem); }
.card-text { margin-top: 9px; color: var(--text); font-size: 1.02rem; line-height: 1.5; }

/* ---------- Feature list ---------- */
.feature-list { margin-top: 22px; display: grid; gap: 14px; }
.feature-list--2col { grid-template-columns: 1fr 1fr; gap: 16px 26px; }
.feature-list li {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: 1rem; line-height: 1.45; color: var(--text);
}
.feature-icon {
  flex: none; margin-top: 1px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  border-radius: 9px;
  background: var(--primary-tint);
  color: var(--primary);
  stroke-width: 2.1;
}

/* ---------- Badges ---------- */
.badge {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge .icon { font-size: 0.95rem; stroke-width: 2.4; }
.badge--live { background: var(--live-bg); color: var(--live); }
.badge--soon { background: var(--soon-bg); color: var(--soon); }
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live-dot);
  animation: pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .badge-dot { animation: none; } }

/* ---------- Roadmap grid + cards ---------- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 1.6vw, 22px);
}
.card--roadmap {
  background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
  border: 1.5px dashed var(--border-strong);
  box-shadow: none;
}
.card--roadmap .card-title { color: var(--ink); opacity: 0.95; }
.card--roadmap .card-text { font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding-block: clamp(40px, 5vw, 64px) 28px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: center; justify-content: space-between;
}
.footer-cta { max-width: 56ch; }
.footer-cta .footer-logo { margin-bottom: 18px; }
.footer-claim { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); color: var(--ink); font-weight: 500; }
.footer-hint {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 0.95rem;
}
.footer-hint .icon { font-size: 1.2em; color: var(--primary); }

.footer-qr {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) { .footer-qr:hover { border-color: var(--primary); transform: translateY(-2px); } }
.qr-frame {
  background: #fff; padding: 8px; border-radius: 10px; line-height: 0;
  box-shadow: var(--shadow-sm);
}
.qr-frame img { width: 112px; height: 112px; }
.qr-label { display: flex; flex-direction: column; gap: 4px; }
.qr-label-top { color: var(--muted); font-size: 0.9rem; }
.qr-label-url {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 700; font-size: 1.15rem;
}
.qr-label-url .icon { font-size: 1em; color: var(--primary); }

.footer-base {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  justify-content: space-between;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.9rem;
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* sanfte Staffelung innerhalb der Grids */
.js .bento .reveal:nth-child(2) { transition-delay: 0.06s; }
.js .bento .reveal:nth-child(3) { transition-delay: 0.12s; }
.js .bento .reveal:nth-child(4) { transition-delay: 0.18s; }
.js .bento .reveal:nth-child(5) { transition-delay: 0.24s; }
.js .roadmap-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.js .roadmap-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.js .roadmap-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */

/* iPad Querformat ist die Referenz (~1180–1366px) und nutzt das 12er-Bento. */

/* Schmaleres Querformat / kleine Laptops */
@media (max-width: 1180px) {
  .feature-list--2col { gap: 14px 22px; }
}

/* iPad Hochformat & Tablets */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--featured-wide { grid-column: 1 / -1; }
  .card--featured { grid-column: span 1; }
  .card--available:not(.card--featured-wide):not(.card--featured) { grid-column: span 1; }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
}

/* großes Handy / kleines Tablet */
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .card--featured-wide, .card--featured,
  .card--available:not(.card--featured-wide):not(.card--featured) { grid-column: 1 / -1; }
  .feature-list--2col { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-block: 56px 80px; }
  .legend { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .scroll-hint { display: none; }
}

/* Vollbild-/Kiosk: respektiere die Safe-Areas auf dem iPad */
@supports (padding: env(safe-area-inset-top)) {
  .site-header { padding-top: env(safe-area-inset-top); }
}

@media print {
  .site-header, .scroll-hint, .theme-toggle { display: none; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
