/*
 * lp/stilfinder – bezahlte Google-Ads-Landingpage.
 * .sfx-*  = Seiten-Layout (Hero, Trust, Content-Sections, FAQ).
 * .sfx-tool-* = Einbettung des Stilfinder-Tools inkl. Mobile-Vollbild.
 */

:root {
  --sfx-ink: #1f2937;
  --sfx-paper: #fbfaf7;
  --sfx-paper2: #f5f1eb;
  --sfx-oak: #8c6a4f;
  --sfx-oak-dark: #6f5039;
  --sfx-nut: #c49a7a;
  --sfx-graphit: #555555;
  --sfx-line: rgba(140, 106, 79, 0.22);
  --sfx-display: var(--font-display, "Nunito Sans", system-ui, sans-serif);
}

html { scroll-behavior: smooth; }

body.page-stilfinder-campaign {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--sfx-paper);
  color: var(--sfx-ink);
}

#stilfinder { scroll-margin-top: 68px; }

/* ============================================================= HEADER */
.sfx-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(16px, 4vw, 32px);
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid var(--sfx-line);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  backdrop-filter: saturate(160%) blur(6px);
}
.sfx-header img { display: block; width: auto; height: 40px; object-fit: contain; }
.sfx-header-claim {
  flex: 1;
  margin: 0;
  color: var(--sfx-graphit);
  font-size: 0.82rem;
  text-align: center;
}
.sfx-header .sfx-btn--sm { flex: 0 0 auto; }

/* ================================================================ CTA */
.sfx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 26px;
  border: 2px solid var(--sfx-oak-dark);
  border-radius: 11px;
  background: var(--sfx-oak-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.sfx-btn:hover { background: #5c4230; transform: translateY(-1px); }
.sfx-btn:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.sfx-btn--sm { min-height: 42px; padding: 9px 16px; font-size: 0.88rem; }
.sfx-btn--ghost {
  border-color: var(--sfx-line);
  background: #fff;
  color: var(--sfx-ink);
}
.sfx-btn--ghost:hover { border-color: var(--sfx-oak); background: var(--sfx-paper2); }

/* =============================================================== HERO */
.sfx-hero { padding: clamp(36px, 6vw, 76px) clamp(16px, 4vw, 32px) clamp(28px, 5vw, 52px); }
.sfx-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
  max-width: 1140px;
  margin-inline: auto;
}
.sfx-eyebrow {
  margin: 0 0 14px;
  color: var(--sfx-oak-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.sfx-hero-text h1 {
  margin: 0 0 18px;
  max-width: 21ch;
  font-family: var(--sfx-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}
.sfx-lead {
  margin: 0 0 22px;
  max-width: 56ch;
  color: var(--sfx-graphit);
  font-size: clamp(1.02rem, 2.1vw, 1.14rem);
  line-height: 1.55;
}
.sfx-hero-list { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 9px; }
.sfx-hero-list li { position: relative; padding-left: 30px; font-weight: 600; line-height: 1.4; }
.sfx-hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sfx-oak);
  -webkit-mask: 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'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
          mask: 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'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.sfx-hero-note { margin: 12px 0 0; max-width: 58ch; color: var(--sfx-graphit); font-size: 0.82rem; line-height: 1.45; }
.sfx-hero-note strong,
.sfx-hero-note span { display: block; }
.sfx-hero-note strong { color: var(--sfx-ink); }
.sfx-hero-note span { margin-top: 3px; }
.sfx-hero-media { position: relative; margin: 0; }
.sfx-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgba(31, 41, 55, 0.45);
}
/* ============================================================== TRUST */
.sfx-trust { padding: 16px clamp(16px, 4vw, 32px); background: var(--sfx-paper2); border-block: 1px solid var(--sfx-line); }
.sfx-trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  max-width: 1080px;
  margin-inline: auto;
  color: var(--sfx-graphit);
  font-size: 0.86rem;
  text-align: center;
}
.sfx-trust-inner span { position: relative; }
.sfx-trust-inner span + span::before { content: "·"; position: absolute; left: -13px; color: var(--sfx-nut); }
.sfx-trust-rating { display: flex; justify-content: center; margin-top: 10px; }
.sfx-trust-rating :is(img, iframe) { max-width: 100%; }

/* =========================================================== SECTIONS */
.sfx-section { padding: clamp(40px, 7vw, 76px) clamp(16px, 4vw, 32px); }
.sfx-section > * { max-width: 1080px; margin-inline: auto; }
.sfx-section--alt { background: var(--sfx-paper2); }
.sfx-section--narrow > * { max-width: 800px; }
/* Das Tool soll sich klar von den Content-Sektionen abheben, nicht wie ein
   weiterer Textblock wirken. */
.sfx-section--tool {
  background: linear-gradient(180deg, var(--sfx-paper2) 0%, var(--sfx-paper) 100%);
  border-top: 1px solid var(--sfx-line);
  border-bottom: 1px solid var(--sfx-line);
}

.sfx-section-head { text-align: center; margin-bottom: clamp(22px, 4vw, 38px); }
.sfx-section-head .sfx-eyebrow { margin-bottom: 10px; }
.sfx-section-head h2 {
  margin: 0 auto 12px;
  max-width: 28ch;
  font-family: var(--sfx-display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}
.sfx-section-sub { margin: 8px auto 0; max-width: 64ch; color: var(--sfx-graphit); font-size: clamp(0.98rem, 2vw, 1.06rem); line-height: 1.55; }
.sfx-section p + p { margin-top: 14px; }
.sfx-section > .sfx-btn { display: flex; width: fit-content; margin: clamp(24px, 4vw, 36px) auto 0; }

/* ==================================================== TOOL / STILFINDER */
.sfx-tool-shell {
  max-width: 860px;
  margin-inline: auto;
}
.sfx-tool-frame {
  overflow: hidden;
  /* clip statt hidden: kein Scroll-Container, sonst klebt die Weiter-Leiste des Stilfinders nicht. */
  overflow: clip;
  border: 1px solid var(--sfx-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 44px -24px rgba(31, 41, 55, 0.32);
}
.sfx-tool-frame > p,
.sfx-tool-noscript {
  margin: 0;
  padding: 32px 20px;
  color: var(--sfx-graphit);
  text-align: center;
}
.sfx-tool-frame > .kk-stilfinder { display: block; width: 100%; }
.sfx-tool-note { margin: 14px auto 0; max-width: 60ch; color: var(--sfx-graphit); font-size: 0.86rem; text-align: center; }

/* ============================================================== CARDS */
.sfx-cards { display: grid; gap: 18px; }
.sfx-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sfx-card { padding: clamp(18px, 3vw, 26px); border: 1px solid var(--sfx-line); border-radius: 14px; background: #fff; }
.sfx-card h3 { margin: 0 0 10px; font-size: 1.02rem; line-height: 1.35; }
.sfx-card p { margin: 0; color: var(--sfx-graphit); font-size: 0.94rem; line-height: 1.55; }

/* ============================================================= EXPERTE */
.sfx-section--expert { background: #fff; }
.sfx-expert {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}
.sfx-expert-media { margin: 0; }
.sfx-expert-media img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 18px;
  box-shadow: 0 20px 48px -28px rgba(31, 41, 55, 0.45);
}
.sfx-expert-copy h2 {
  margin: 0 0 18px;
  max-width: 25ch;
  font-family: var(--sfx-display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.14;
  text-wrap: balance;
}
.sfx-expert-copy p { margin: 0; color: var(--sfx-graphit); line-height: 1.65; }
.sfx-expert-copy p + p { margin-top: 16px; }
.sfx-expert-copy strong { color: var(--sfx-ink); }

/* ============================================================== LISTE */

/* ================================================================ FAQ */
.sfx-faq { display: grid; gap: 12px; }
.sfx-faq details { border: 1px solid var(--sfx-line); border-radius: 12px; background: #fff; padding: 4px 18px; }
.sfx-faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sfx-faq summary::-webkit-details-marker { display: none; }
.sfx-faq summary::after { content: ""; flex: none; width: 0.5em; height: 0.5em; border-right: 2px solid var(--sfx-oak-dark); border-bottom: 2px solid var(--sfx-oak-dark); transform: translateY(-25%) rotate(45deg); transition: transform 0.2s; }
.sfx-faq details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
.sfx-faq details p { margin: 0 0 14px; color: var(--sfx-graphit); line-height: 1.6; }

/* ============================================================= FOOTER */
.sfx-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sfx-line);
  background: var(--sfx-paper2);
  color: var(--sfx-graphit);
  font-size: 12px;
}
.sfx-footer a,
.sfx-footer button {
  border: 0;
  padding: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* =========================================================== RESPONSIVE */
@media (max-width: 900px) {
  .sfx-hero-inner { grid-template-columns: 1fr; }
  .sfx-hero-media { order: -1; }
  .sfx-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sfx-expert { grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr); gap: 28px; }
}

@media (max-width: 640px) {
  .sfx-header { gap: 10px; padding: 6px 12px; }
  .sfx-header img { height: 32px; }
  .sfx-header-claim { display: none; }
  .sfx-header .sfx-btn--sm { min-height: 38px; padding: 7px 12px; font-size: 0.8rem; }
  /* Läuft der Stilfinder, ist der Start-CTA überflüssig: Header ausblenden,
     damit Frage, Antworten und Weiter-Leiste auf einen Bildschirm passen. */
  body:has(#stilfinder [data-view="intro"].hidden) .sfx-header { display: none; }
  body:has(#stilfinder [data-view="intro"].hidden) #stilfinder { scroll-margin-top: 0; }
  .sfx-cards--3 { grid-template-columns: 1fr; }

  /* Mobile Darstellung des Inline-Stilfinders: randlos und nahezu
     bildschirmfüllend, ohne einen zweiten Scroll-Kontext. */
  .sfx-tool-shell { max-width: none; margin-inline: calc(clamp(16px, 4vw, 32px) * -1); }
  .sfx-tool-frame {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
    min-height: calc(100dvh - 130px);
  }

  .sfx-tool-frame > .kk-stilfinder { min-height: calc(100dvh - 130px); }

  /* Erster Bildschirm (Instagram-/Facebook-Browser, ggf. mit WhatsApp-Leiste):
     Überschrift und CTA zuerst, keine Illustration, keine Wiederholungen. */
  .sfx-hero { padding: 14px 16px 18px; }
  .sfx-hero-media { display: none; }
  .sfx-eyebrow { margin-bottom: 8px; font-size: 0.7rem; }
  .sfx-hero-text h1 { margin-bottom: 10px; max-width: none; font-size: clamp(1.55rem, 7vw, 1.95rem); line-height: 1.06; }
  .sfx-lead { margin-bottom: 14px; font-size: 0.96rem; line-height: 1.42; }
  .sfx-hero-list { display: none; }
  .sfx-hero-text > .sfx-btn { display: flex; width: 100%; min-height: 50px; }
  .sfx-hero-note { margin-top: 9px; font-size: 0.75rem; line-height: 1.35; }
  .sfx-hero-note span { margin-top: 2px; }
  .sfx-hero-text > .lp-stilpunkte { margin-top: 12px; }
  .sfx-section--tool .sfx-section-head { margin-bottom: 16px; }
  .sfx-section--tool .sfx-section-head .sfx-eyebrow,
  .sfx-section--tool .sfx-section-sub { display: none; }
  .page-stilfinder-campaign .kk-stilfinder--inline .intro-visual { display: none; }
  .sfx-expert { grid-template-columns: 1fr; gap: 22px; }
  .sfx-expert-media img { max-height: 300px; object-position: center 24%; }
}

/* Meta-In-App-Browser haben durch Browser- und App-Leisten besonders wenig
   nutzbare Höhe. Nutzen, Ablauf und Start-CTA bleiben deshalb im ersten Blick. */
@media (max-width: 640px) and (max-height: 720px) {
  html.is-meta-inapp .sfx-header { position: relative; }
  html.is-meta-inapp .sfx-hero { padding-top: 10px; padding-bottom: 14px; }
  html.is-meta-inapp .sfx-hero-text h1 { font-size: clamp(1.45rem, 6.6vw, 1.8rem); }
  html.is-meta-inapp .sfx-lead { font-size: 0.91rem; line-height: 1.36; }
  html.is-meta-inapp .sfx-hero-text > .lp-stilpunkte { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sfx-btn { transition: none; }
}
