/* ==========================================================================
   KI Kurse Zug — site stylesheet
   Design tokens + shared components, distilled from the Claude Design system
   "ki-kurse-zug-design-system". Single brand typeface: Inter. Brand Blue
   #0056D6 carries every call to action; neutrals do the heavy lifting.
   ========================================================================== */

:root {
  /* ---- Palette ---- */
  --blue-600: #0056D6;   /* Brand Blue — primary, actions, links */
  --blue-700: #0045AC;   /* hover / pressed */
  --blue-50:  #E8F0FE;   /* tinted blue surface */
  --blue-tint:#EFF3FB;   /* ghost / secondary hover */

  --black:    #030303;   /* Near-Black — headings, dark surfaces */
  --gray-700: #333333;   /* Text Gray — body */
  --gray-500: #5B6470;   /* muted body */
  --gray-400: #C2C2C2;   /* Mid Gray — input borders */
  --gray-200: #EEF0F3;   /* card hairline */
  --gray-100: #F5F5F5;   /* Light Gray — section backgrounds */
  --white:    #FFFFFF;

  --amber:    #FFD54F;   /* Accent only — dark text on top */
  --ice:      #F1FFFE;   /* Soft section background */

  /* ---- Type ---- */
  --font-sans: 'Inter', system-ui, 'Helvetica Neue', Arial, sans-serif;

  /* ---- Radius ---- */
  --radius-sm: 5px;      /* buttons / inputs */
  --radius-lg: 10px;     /* cards */
  --radius-xl: 16px;     /* feature panels */
  --radius-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 2px 6px rgba(3, 3, 3, .08);
  --shadow-md: 0 6px 20px rgba(3, 3, 3, .10);
  --shadow-blue: 0 10px 28px rgba(0, 86, 214, .22);

  --focus-ring: 0 0 0 4px rgba(0, 86, 214, .22);
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--blue-600); color: #fff; }
a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Buttons — distilled from the design system Button component
   Primary = Brand-Blue fill · Secondary = white fill + blue border · 5px radius
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn i, .btn svg { width: 1.05em; height: 1.05em; }

/* sizes */
.btn--sm { font-size: 15px; padding: 9px 16px; }
.btn--md { font-size: 16px; padding: 12px 22px; }
.btn--lg { font-size: 17px; padding: 15px 26px; }

/* Mobile: stretch CTAs to a common width so stacked buttons look balanced.
   Scoped by .btn--block (opt-in) and any .btn inside a flex container that wraps
   under 600px — at phone widths primary actions get full container width. */
@media (max-width: 600px) {
  .btn { width: 100%; max-width: 360px; }
  .btn--sm { width: auto; } /* keep header "Jetzt anfragen" compact */
}

/* variants */
.btn--primary { background: var(--blue-600); color: #fff; }
.btn--primary:hover { background: var(--blue-700); }
.btn--primary:active { transform: translateY(1px); }

.btn--secondary { background: #fff; color: var(--blue-600); border-color: var(--blue-600); }
.btn--secondary:hover { background: var(--blue-tint); }

.btn--ghost { background: transparent; color: var(--blue-600); }
.btn--ghost:hover { background: var(--blue-tint); }

/* ==========================================================================
   Eyebrow / overline chip
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: #fff;
  border: 1px solid #E1ECFF;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  box-shadow: 0 1px 2px rgba(3, 3, 3, .06);
}

/* ==========================================================================
   Sticky translucent navigation
   ========================================================================== */
header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #F0F1F3;
  transition: box-shadow .25s ease;
}
header.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
header.nav .brand { display: flex; align-items: center; text-decoration: none; }
header.nav .brand img { height: 34px; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.link { font-size: 15px; font-weight: 500; color: var(--black); text-decoration: none; transition: color .15s ease; }
.nav-links a.link:hover { color: var(--blue-600); }
.back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--black); text-decoration: none; padding: 9px 14px; border-radius: var(--radius-sm); transition: background .15s ease; }
.back:hover { background: var(--blue-tint); }
@media (max-width: 760px) { .nav-links a.link { display: none; } }

/* ==========================================================================
   Image slot — real <img> with on-brand gradient fallback behind it.
   Drop a photo at the referenced path and it covers the placeholder.
   ========================================================================== */
.img-slot {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0A4FB8 0%, #031F52 100%);
  border-radius: var(--radius-lg);
}
.img-slot > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1; /* a loaded photo covers the placeholder label beneath it */
}
.img-slot__ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
}

/* ==========================================================================
   Shared footer
   ========================================================================== */
footer.ft { background: var(--black); color: rgba(255, 255, 255, .86); padding: 64px 0 36px; }
footer.ft .ft-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 48px; }
footer.ft .ft-brand { max-width: 340px; }
footer.ft .ft-brand img { height: 32px; margin-bottom: 18px; display: block; }
footer.ft .ft-brand p { margin: 0; font-size: 14px; line-height: 1.6; }
footer.ft .ft-contact { flex: 1; min-width: 280px; max-width: 440px; margin-left: auto; }
footer.ft .ft-contact .lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
footer.ft .ft-contact .lbl i { width: 16px; height: 16px; }
footer.ft .ft-contact h3 { margin: 10px 0 0; font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
footer.ft .ft-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; color: rgba(255, 255, 255, .95); }
footer.ft .ft-row i { width: 17px; height: 17px; color: var(--amber); flex: none; }
footer.ft .ft-row a { color: rgba(255, 255, 255, .95); text-decoration: none; }
footer.ft .ft-row a:hover { color: #fff; }
footer.ft .ft-cta { margin-top: 22px; }
footer.ft .ft-legal { display: flex; gap: 20px; margin-top: 20px; }
footer.ft .ft-legal a { color: rgba(255, 255, 255, .9); text-decoration: none; font-size: 14px; }
footer.ft .ft-legal a:hover { color: #fff; }
footer.ft .ft-copy { display: block; margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .72); }

/* mobile footer: single column, contact/CTA on top, brand + legal at the bottom behind a divider */
@media (max-width: 600px) {
  footer.ft { padding: 48px 0 40px; }
  footer.ft .ft-top { flex-direction: column; align-items: stretch; gap: 0; }
  footer.ft .ft-contact { order: -1; min-width: 0; max-width: none; margin-left: 0; }
  footer.ft .ft-contact h3 { margin-top: 0; }
  footer.ft .ft-cta { margin-top: 20px; }
  footer.ft .ft-cta .btn { width: 100%; justify-content: center; }
  footer.ft .ft-brand { max-width: none; margin-top: 34px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .12); }
}

/* ==========================================================================
   Scroll-reveal animation primitives (CSS-driven, JS adds nicer timing)
   ========================================================================== */
@keyframes kkz-float  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes kkz-safe   { to { opacity: 1; transform: none; } }
@keyframes kkz-chip   { 0%,100% { transform: translateY(0); box-shadow: 0 2px 6px rgba(3,3,3,.06); } 50% { transform: translateY(-6px); box-shadow: 0 14px 26px rgba(255,179,0,.55); } }
@keyframes kkz-wiggle { 0%,84%,100% { transform: rotate(0); } 87% { transform: rotate(-4deg); } 90% { transform: rotate(3.2deg); } 93% { transform: rotate(-2.2deg); } 96% { transform: rotate(1.2deg); } }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease; animation: kkz-safe .01s linear 2.8s forwards; }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-line] { opacity: 0; transform: scaleX(0); transform-origin: left; transition: opacity .6s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); animation: kkz-safe .01s linear 2.8s forwards; }
[data-line].is-in { opacity: 1; transform: scaleX(1); }

[data-reveal-group="proc"] > div:first-child > span:first-child { transform: scale(.78); transition: transform 1s cubic-bezier(.2,.8,.25,1); transition-delay: var(--proc-delay, 0ms); }
[data-reveal-group="proc"].proc-anim > div:first-child > span:first-child { transform: scale(1); }
[data-reveal-group="proc"] > div:first-child > span:last-child { opacity: 0; transform: scale(.4); transition: opacity .55s ease, transform .7s cubic-bezier(.3,1.3,.5,1); transition-delay: calc(var(--proc-delay, 0ms) + .45s); }
[data-reveal-group="proc"].proc-anim > div:first-child > span:last-child { opacity: 1; transform: scale(1); }

@property --pie { syntax: '<percentage>'; initial-value: 0%; inherits: false; }
[data-pie] { transition: --pie 1.9s cubic-bezier(.2,.7,.2,1) .25s; }
[data-pie].pie-go { --pie: var(--pie-final, 0%); }

[data-riskchip] { animation: kkz-chip 2.6s ease-in-out infinite; will-change: transform; }
[data-riskchip]:nth-of-type(2) { animation-delay: .45s; }
[data-riskchip]:nth-of-type(3) { animation-delay: .9s; }
[data-riskchip]:nth-of-type(4) { animation-delay: 1.35s; }

[data-wiggle] { animation: kkz-wiggle 3.6s ease-in-out infinite; transform-origin: left center; }

.founder { transition: transform .18s ease; }
.founder:hover { z-index: 10; transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  /* Only the scroll-reveal fade-ins respect reduced-motion (content shows instantly).
     The ambient neural-net drift, counters, marquee and decorative pulses keep running
     by design — they're slow, decorative, and don't convey information. */
  [data-reveal], [data-line] { opacity: 1 !important; transform: none !important; animation: none !important; }
}
