/* =====================================================================
   K&H Solutions — Components
   Baut auf design-system.css (Tokens). Premium-Basis + LCP-gated Wow.
   ===================================================================== */

/* No-JS-Schutz: ohne JS sind Reveal-Elemente sichtbar */
html:not(.js) [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  color: var(--c-heading);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-6); min-height: 72px; }
.site-header__logo { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.site-header__logo-img { height: 42px; width: auto; display: block; }
.logo-kh { font-family: var(--font-head); font-weight: 800; font-size: 1.55rem; color: var(--brand-gold); letter-spacing: 0.01em; line-height: 1; }
.logo-sub { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-heading); }
.site-nav { display: flex; gap: var(--sp-6); }
.site-nav a { font-weight: 600; color: inherit; text-decoration: none; padding: 0.4em 0; position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--brand-gold); transition: right var(--dur-2) var(--ease-out); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.site-header__cta { padding: 0.6em 1.15em; }

/* Header bleibt solide weiß (dunkles Logo sichtbar); beim Scrollen etwas mehr Schatten */
.site-header.is-scrolled { box-shadow: var(--shadow-1); }

/* Mobile-Nav */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: currentColor; transition: transform var(--dur-2), opacity var(--dur-2); }
@media (max-width: 880px) {
  .site-nav, .site-header__cta { display: none; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; color: var(--c-heading); padding: var(--sp-4) var(--gutter) var(--sp-8);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
    transform: translateY(-120%); transition: transform var(--dur-2) var(--ease-out); z-index: 49;
  }
  .nav-open .site-nav { display: flex; transform: translateY(0); }
  .site-nav a { padding: 0.9em 0; border-bottom: 1px solid var(--line); }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #0d1117; color: #fff; display: flex; align-items: center; min-height: clamp(560px, 86vh, 880px); padding-block: calc(72px + var(--sp-12)) var(--sp-16); }
.hero__bg { position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(11, 14, 19, 0.94) 0%, rgba(11, 14, 19, 0.78) 44%, rgba(11, 14, 19, 0.38) 100%),
    url("/assets/img/hero.jpg");
  background-size: cover; background-position: center right; }
/* Mobil: Der Verlauf oben ist horizontal (90deg) und für das Desktop-Layout gebaut —
   Text links im dunklen Bereich (0.94), Bild rechts sichtbar (0.38).
   Auf Schmalgeräten läuft der Text über die volle Breite und landet damit im
   38-%-Bereich, wo die Bildgrafiken durch den Fließtext schlagen.
   Deshalb hier ein vertikaler, durchgehend kräftigerer Verlauf. */
@media (max-width: 880px) {
  .hero__bg {
    background-image:
      linear-gradient(180deg, rgba(11, 14, 19, 0.90) 0%, rgba(11, 14, 19, 0.84) 50%, rgba(11, 14, 19, 0.92) 100%),
      url("/assets/img/hero.jpg");
    background-position: center;
  }
}
#hero-canvas { display: none; }
.hero__grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero .container { position: relative; z-index: 3; }
.hero__eyebrow { color: #f3c860; }
.hero h1 { font-family: var(--font-sans); font-weight: 300; color: #fff; font-size: clamp(2.2rem, 1.35rem + 3.4vw, 4.3rem); line-height: 1.1; letter-spacing: -0.01em; max-width: 20ch; margin-block: var(--sp-4) var(--sp-6); }
.hero h1 .accent { color: var(--brand-gold); font-weight: 400; }
.hero__claims { font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-200); color: #fff; margin-bottom: var(--sp-5); }
.hero__claims span { color: var(--brand-gold); }
.hero__lead { max-width: 54ch; font-weight: 300; font-size: var(--fs-200); color: rgba(255, 255, 255, 0.86); }
.hero__actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-8); }
.scroll-cue { position: absolute; left: 50%; bottom: var(--sp-6); z-index: 3; transform: translateX(-50%); color: rgba(255, 255, 255, 0.6); font-size: var(--fs-50); letter-spacing: var(--tracking-caps); text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(rgba(255,255,255,0.6), transparent); animation: cuepulse 2s var(--ease-inout) infinite; }
@keyframes cuepulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- Section-Köpfe ---------- */
.section__head { max-width: 62ch; margin-bottom: var(--sp-12); }
.section__head h2 { margin-block: var(--sp-2) var(--sp-4); }
.section__head p { color: var(--ink-700); font-size: var(--fs-200); }

/* ---------- Pain / Zitate ---------- */
.pain__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--sp-6); }
.quote-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand-gold); border-radius: var(--radius); padding: var(--sp-8); box-shadow: var(--shadow-1); }
.quote-card q { display: block; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-300); color: var(--c-heading); line-height: var(--lh-snug); margin-bottom: var(--sp-3); quotes: "\201E" "\201C"; }
.quote-card p { color: var(--ink-700); }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
@media (max-width: 760px) { .services__grid { grid-template-columns: 1fr; } }
.service-card { position: relative; display: block; overflow: hidden; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-8) var(--sp-8) var(--sp-12); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2), border-color var(--dur-2); }
.service-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand-gold), var(--brand-blue)); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-3) var(--ease-out); }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: rgba(229,168,0,0.5); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__num { position: absolute; top: var(--sp-4); right: var(--sp-6); font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--bg-soft); }
.service-card h3 { margin-bottom: var(--sp-3); max-width: 18ch; }
.service-card p { color: var(--ink-700); margin-bottom: var(--sp-4); }
.service-card__more { font-weight: 600; color: var(--brand-blue); }

/* ---------- Founders ---------- */
.founders__inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-16); align-items: center; }
@media (max-width: 880px) { .founders__inner { grid-template-columns: 1fr; gap: var(--sp-8); } }
.founders__img img { border-radius: var(--radius-lg); box-shadow: var(--shadow-2); width: 100%; object-fit: cover; }
.founders__text p { color: var(--ink-700); margin-bottom: var(--sp-4); }
.founders__names { display: flex; gap: var(--sp-8); flex-wrap: wrap; margin-top: var(--sp-6); }
.founders__names a { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-200); color: var(--c-heading); text-decoration: none; }
.founders__names span { display: block; font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-50); color: var(--ink-500); }

/* ---------- Partners ---------- */
.partners__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-8) var(--sp-12); align-items: center; }
/* min-height 44px: Die Partner-Logos sind Links. Ohne die Mindesthöhe sind sie
   auf dem Handy nur 28 px hoch und damit schwer zu treffen. */
a.partners__item { text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
.partners__item img { max-height: 44px; width: auto; margin-inline: auto; filter: grayscale(1); opacity: 0.65; transition: filter var(--dur-2), opacity var(--dur-2); }
.partners__item:hover img { filter: none; opacity: 1; }
.partners__item span { display: block; text-align: center; font-size: var(--fs-50); color: var(--ink-500); margin-top: var(--sp-2); }

/* ---------- CTA-Band ---------- */
.cta-band { text-align: center; position: relative; overflow: hidden; }
.cta-band__inner { max-width: 660px; margin-inline: auto; display: grid; gap: var(--sp-4); justify-items: center; position: relative; z-index: 1; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% 0%, rgba(229,168,0,0.16), transparent 70%); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-footer); border-top: 1px solid var(--line); padding-block: var(--sp-16) var(--sp-8); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-8); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); } }
.site-footer .logo-kh { font-size: 1.6rem; color: var(--brand-gold-ink); }
.site-footer p { color: var(--ink-700); margin-top: var(--sp-2); }
.site-footer__nap { font-size: var(--fs-50); line-height: 1.8; }
.site-footer__nav, .site-footer__legal { display: flex; flex-direction: column; gap: var(--sp-2); }
.site-footer a { color: var(--ink-700); text-decoration: none; }
.site-footer a:hover { color: var(--brand-blue); }
.site-footer__bottom { margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--line); color: var(--ink-500); font-size: var(--fs-50); }

/* Touch-Ziele: Auf Schmalgeräten muss jedes antippbare Element mindestens 44 px hoch sein.
   Betraf 11 Elemente — Footer-Navigation und Rechtslinks (24 px), Telefon und E-Mail (16 px).
   Lighthouse meldet das nicht; gemessen wurde manuell bei 390 px Breite. */
@media (max-width: 880px) {
  .site-footer__nav a,
  .site-footer__legal a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer__nap a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-header__logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ---------- Dezenter Custom-Cursor (nur Pointer:fine, kein reduced-motion) ---------- */
.cursor-dot { position: fixed; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-gold); pointer-events: none; z-index: 200; transform: translate(-50%, -50%); transition: width 0.18s var(--ease-out), height 0.18s var(--ease-out), background-color 0.18s; will-change: transform; }
.cursor-dot.is-hover { width: 38px; height: 38px; background: rgba(229, 168, 0, 0.28); }
body:not(.has-cursor) .cursor-dot { display: none; }

/* ---------- Inner-Page-Hero (kompakt) ---------- */
.page-hero { position: relative; overflow: hidden; background: #0d1117; color: #fff; padding-block: calc(72px + var(--sp-12)) var(--sp-12); }
.page-hero__bg { position: absolute; inset: 0; z-index: 0; background:
  linear-gradient(120deg, rgba(11, 14, 19, 0.97) 0%, rgba(11, 14, 19, 0.72) 100%),
  radial-gradient(60% 120% at 92% 0%, rgba(229, 168, 0, 0.20), transparent 60%),
  radial-gradient(50% 90% at 100% 100%, rgba(4, 107, 210, 0.18), transparent 60%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; color: rgba(255, 255, 255, 0.10); }
.page-hero h1 { font-family: var(--font-sans); font-weight: 300; color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); line-height: 1.12; max-width: 24ch; margin-top: var(--sp-2); }
.page-hero__lead { max-width: 62ch; color: rgba(255, 255, 255, 0.85); font-weight: 300; font-size: var(--fs-200); margin-top: var(--sp-4); }
.breadcrumb { font-size: var(--fs-50); color: rgba(255, 255, 255, 0.6); margin-bottom: var(--sp-4); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Prosa / Zwei-Spalter ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: var(--sp-8); } }
.prose p { margin-bottom: var(--sp-4); color: var(--ink-700); }
.prose h2 { margin-bottom: var(--sp-4); }

/* ---------- Feature-Liste (Was wir für Sie tun) ---------- */
.feature-list { display: grid; gap: var(--sp-4); }
.feature-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand-gold); border-radius: var(--radius); padding: var(--sp-6); }
.feature-item h3 { font-size: var(--fs-200); margin-bottom: var(--sp-2); }
.feature-item p { color: var(--ink-700); margin: 0; }

/* ---------- FAQ (native <details>, FAQPage-Schema separat) ---------- */
.faq { display: grid; gap: var(--sp-3); max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 var(--sp-6); transition: box-shadow var(--dur-2); }
.faq details[open] { box-shadow: var(--shadow-1); }
.faq summary { cursor: pointer; list-style: none; padding: var(--sp-5) 0; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-200); color: var(--c-heading); display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-gold); font-size: 1.5em; line-height: 1; transition: transform var(--dur-2) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding-bottom: var(--sp-5); margin: 0; color: var(--ink-700); max-width: 72ch; }
.faq details > p + p { padding-top: var(--sp-2); }

/* ---------- Case (Erfolgsgeschichte) ---------- */
.case-meta { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-50); color: var(--ink-500); margin-bottom: var(--sp-8); }
.case-meta strong { color: var(--c-heading); font-weight: 600; }
.case-shot { margin: 0; }
.case-shot img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.case-shot figcaption { font-size: var(--fs-50); color: var(--ink-500); margin-top: var(--sp-3); }
.case-result { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: center; }
@media (max-width: 860px) { .case-result { grid-template-columns: 1fr; gap: var(--sp-8); } }

/* ---------- Case-Cards (Übersicht) ---------- */
.cases-group { margin-bottom: var(--sp-16); }
.cases-group > h2 { margin-bottom: var(--sp-8); }
.cases__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: var(--sp-6); }
.case-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2), border-color var(--dur-2); }
.case-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: rgba(229,168,0,0.5); }
.case-card__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--dark), var(--dark-2)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--dur-3) var(--ease-out); }
.case-card:hover .case-card__media img { transform: scale(1.04); }
.case-card__media .case-card__initials { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: rgba(255,255,255,0.22); letter-spacing: 0.04em; }
.case-card__body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.case-card__body h3 { font-size: var(--fs-200); }
.case-card__sector { font-size: var(--fs-50); color: var(--ink-500); }
.case-card__body p { color: var(--ink-700); font-size: var(--fs-100); }
.case-card__foot { margin-top: auto; padding-top: var(--sp-3); display: flex; align-items: center; justify-content: space-between; }
.case-card__cta { font-weight: 600; color: var(--brand-blue); }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3em 0.7em; border-radius: 99px; }
.badge--live { background: rgba(16, 142, 70, 0.1); color: #0c7a3c; }
.badge--progress { background: rgba(229, 168, 0, 0.14); color: var(--brand-gold-deep); }

/* ---------- Kontakt-Formular ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--sp-16); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: var(--sp-8); } }
.form { display: grid; gap: var(--sp-4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 0.4rem; font-weight: 600; font-size: var(--fs-50); color: var(--c-heading); }
.form input[type="text"], .form input[type="email"], .form textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.85em 1em; background: #fff;
  font-weight: 400; transition: border-color var(--dur-1), box-shadow var(--dur-1); width: 100%;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.15); }
.form textarea { min-height: 150px; resize: vertical; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); }
.form legend { font-weight: 600; font-size: var(--fs-50); color: var(--c-heading); padding-inline: 0.4em; }
.form .check { display: flex; align-items: flex-start; gap: 0.6em; font-weight: 400; font-size: var(--fs-100); color: var(--ink-700); }
.form .check input { margin-top: 0.3em; accent-color: var(--brand-gold); width: 1.05em; height: 1.05em; flex: none; }
.form__status { font-weight: 600; min-height: 1.5em; display: flex; align-items: center; gap: 0.6em; }
.form__status.is-ok { color: #0c7a3c; }
.form__status.is-err { color: #b3261e; }
.form__status.is-busy { color: var(--ink-700); }

/* Sanduhr während des Sendens: schlichter Ring in Markengold. */
.spinner {
  width: 1.15em; height: 1.15em; flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* Honigtopf gegen Spam-Bots: aus dem Blickfeld, aber im Zugänglichkeitsbaum. */
.form__trap {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.contact-aside { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-8); }
.contact-aside h3 { margin-bottom: var(--sp-3); }
.contact-aside p { color: var(--ink-700); margin-bottom: var(--sp-4); }
.contact-aside a { font-weight: 600; }
