/* ==========================================================================
   Cliplab – Landingpage
   Vanilla CSS, keine Abhängigkeiten. Schriften werden lokal gehostet.
   ========================================================================== */

/* ---------- Fonts (OFL, lokal gehostet – kein Google-Request) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff") format("woff");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ground: #f4f2ec;
  --card: #ffffff;
  --ink: #15140f;
  --text: #3f3c36;
  --muted: #5c5852;
  --faint: #8a857b;
  --hair: #dcd8ce;
  --hair-soft: #e7e3da;
  --accent: #ffd449;
  --blue: #d3e4fa;

  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-l: 28px;
  --radius-m: 22px;
  --radius-s: 14px;
  --shadow: 0 30px 60px -36px rgba(21, 20, 15, 0.4);
  --shadow-deep: 0 40px 80px -40px rgba(21, 20, 15, 0.5);

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(56px, 7vw, 112px);
  --container: 1240px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 6.4vw, 96px); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(34px, 4.2vw, 60px); }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.1; letter-spacing: -0.02em; }

p { margin: 0; }
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--text); max-width: 580px; }
.copy { font-size: clamp(17px, 1.3vw, 20px); color: var(--text); max-width: 520px; }
.small { font-size: 14px; color: var(--muted); }
.faint { font-size: 13px; color: var(--faint); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 28px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: var(--ground);
  font: inherit; font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); opacity: 0.92; }
.btn:active { transform: translateY(0); }
.btn--accent { background: var(--accent); color: var(--ink); border: 2px solid var(--ink); }
.btn--small { min-height: 46px; padding: 0 20px; font-size: 15px; }
.btn svg { flex: 0 0 auto; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.link-plain {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Header + animiertes Logo ---------- */
.site-header { position: relative; z-index: 3; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 22px; padding-bottom: 22px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.logo__mark { width: 40px; height: 40px; overflow: visible; }
.logo__word {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; line-height: 1; letter-spacing: -0.045em;
}
.logo__word > span { display: inline-block; }
.logo__dot {
  width: 0.2em; height: 0.2em; border-radius: 50%;
  background: var(--accent); border: 0.055em solid var(--ink);
  margin-left: 0.07em; transform-origin: center;
}
.logo--light { color: var(--ground); }
.logo--light .logo__dot { border-color: var(--ground); }

/* Ring und Bogen: gestrichelt, damit sie sich "zeichnen" können */
.logo__ring { stroke-dasharray: 214; stroke-dashoffset: 0; }
.logo__arc  { stroke-dasharray: 54;  stroke-dashoffset: 0; }
.logo__pivot { transform-origin: 50px 56px; }

/* Nur beim ersten Laden pro Browsersitzung animieren (JS setzt .logo-played) */
html:not(.logo-played) .logo--animate .logo__crown { animation: lg-crown 2.4s ease-out 1 both; }
html:not(.logo-played) .logo--animate .logo__ring  { animation: lg-ring 2.4s cubic-bezier(0.4, 0, 0.2, 1) 1 both; }
html:not(.logo-played) .logo--animate .logo__arc   { animation: lg-arc 2.4s cubic-bezier(0.4, 0, 0.2, 1) 1 both; }
html:not(.logo-played) .logo--animate .logo__pivot { animation: lg-dot 2.4s ease-out 1 both; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(1) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 0.85s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(2) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 0.92s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(3) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 0.99s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(4) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 1.06s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(5) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 1.13s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(6) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 1.20s; }
html:not(.logo-played) .logo--animate .logo__word > span:nth-child(7) { animation: lg-letter 2.4s ease-out 1 both; animation-delay: 1.27s; }
html:not(.logo-played) .logo--animate .logo__dot { animation: lg-pointe 2.4s ease-out 1 both; animation-delay: 1.45s; }

@keyframes lg-crown {
  0%   { opacity: 0; transform: translateY(-10px); }
  12%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes lg-ring {
  0%   { stroke-dashoffset: 214; }
  8%   { stroke-dashoffset: 214; }
  40%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes lg-arc {
  0%   { stroke-dashoffset: 54; }
  36%  { stroke-dashoffset: 54; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes lg-dot {
  0%   { transform: scale(0); }
  58%  { transform: scale(0); }
  64%  { transform: scale(1.3); }
  70%  { transform: scale(1); }
  100% { transform: scale(1); }
}
@keyframes lg-letter {
  0%   { opacity: 0; transform: translateY(0.35em); }
  12%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes lg-pointe {
  0%   { opacity: 0; transform: scale(0); }
  10%  { opacity: 1; transform: scale(1.45); }
  18%  { transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Rec-Punkt (Hero-Video) */
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: rec-blink 1.6s ease-in-out infinite; }

/* ---------- Hero ---------- */
.hero .container {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding-top: clamp(36px, 5vw, 80px);
  padding-bottom: clamp(48px, 6vw, 96px);
}
.hero__copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__media { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; align-items: center; }

.underline { position: relative; display: inline-block; padding-bottom: 0.08em; }
.underline svg { position: absolute; left: -2%; bottom: -0.04em; width: 104%; height: 0.18em; overflow: visible; }

.offer {
  margin-top: 8px; max-width: 520px;
  background: var(--accent); border: 2px solid var(--ink); border-radius: var(--radius-m);
  padding: clamp(18px, 2.2vw, 26px);
  display: flex; flex-direction: column; gap: 16px;
  transform: rotate(-1.5deg);
  box-shadow: 0 24px 50px -30px rgba(21, 20, 15, 0.45);
}
.offer p { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); line-height: 1.1; letter-spacing: -0.02em; }
.offer .btn { align-self: flex-start; }

.spot {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); border-radius: var(--radius-l);
  box-shadow: var(--shadow-deep);
}
.spot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spot--portrait { width: min(400px, 100%); aspect-ratio: 9 / 16; }
.spot--landscape { width: 100%; aspect-ratio: 16 / 9; }
.spot__chip {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--ground); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.spot__chip span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Video-Sections ---------- */
.feature { padding-top: var(--section); }
.feature .container {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.feature--flip .container { flex-wrap: wrap-reverse; }
.feature__media { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.feature__media--wide { flex: 1 1 440px; }
.feature__media .spot--landscape { width: 100%; }
.feature__copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Wizard ---------- */
.idea { padding-top: var(--section); }
.idea__box {
  background: var(--accent); border-radius: 36px;
  padding: clamp(32px, 5vw, 80px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: clamp(28px, 4vw, 56px);
  box-shadow: 0 50px 100px -60px rgba(21, 20, 15, 0.45);
}
.idea__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.idea__copy h2 { font-size: clamp(36px, 4.6vw, 68px); line-height: 0.98; letter-spacing: -0.035em; }
.idea__copy p { font-size: clamp(18px, 1.5vw, 23px); font-weight: 500; }

.wizard {
  flex: 1 1 380px; min-width: 0;
  background: var(--card); border-radius: 24px;
  padding: clamp(20px, 2.4vw, 28px);
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow);
}
.wizard__status { display: flex; flex-direction: column; gap: 10px; }
.wizard__label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.wizard__track { height: 4px; background: var(--hair-soft); border-radius: 2px; overflow: hidden; }
.wizard__bar { height: 100%; width: 33%; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }
.wizard[data-step="2"] .wizard__bar { width: 66%; }
.wizard[data-step="3"] .wizard__bar { width: 100%; }

.wizard__step { display: none; flex-wrap: wrap; gap: 10px; }
.wizard__step.is-active { display: flex; }
.wizard__step label { flex: 1 1 100%; font-size: 15px; font-weight: 600; color: var(--text); }
.wizard__step .btn { flex: 0 0 auto; }
.wizard__back { flex: 1 1 100%; text-align: left; padding-top: 4px; }

.wizard__done { display: none; flex-direction: column; gap: 10px; }
.wizard__done.is-active { display: flex; }
.wizard__done p { font-size: 18px; font-weight: 600; }

.input {
  flex: 1 1 220px; min-width: 0; width: 100%;
  min-height: 56px; padding: 0 18px;
  border: 1.5px solid var(--hair); border-radius: 999px;
  background: var(--ground); color: var(--ink);
  font: inherit; font-size: 17px;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.input[aria-invalid="true"] { border-color: #c0392b; }

/* ---------- Kontakt ---------- */
.contact { padding-top: var(--section); padding-bottom: clamp(64px, 8vw, 112px); }
.contact .container { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: flex-start; }
.contact__copy { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contact__copy h2 { font-size: clamp(34px, 4.4vw, 64px); }
.contact__details { display: flex; flex-direction: column; gap: 4px; font-size: 17px; font-weight: 500; }
.contact__details a { text-decoration: none; }
.contact__details a:hover { text-decoration: underline; }

.form {
  flex: 1 1 440px; min-width: 0;
  background: var(--card); border: 1px solid var(--hair-soft); border-radius: 24px;
  padding: clamp(22px, 3vw, 36px);
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 30px 60px -36px rgba(21, 20, 15, 0.3);
}
.form__row { display: flex; flex-wrap: wrap; gap: 16px; }
.form__field { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form__field label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form__field .input { flex: 0 0 auto; border-radius: var(--radius-s); min-height: 52px; padding: 0 16px; }
.form__field textarea.input { min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.form .btn { align-self: flex-start; }
.form__note { font-size: 13px; color: var(--faint); }
.form__note a { color: var(--muted); }

.form-status { font-size: 15px; font-weight: 600; margin: 0; }
.form-status[data-state="error"] { color: #a93226; }
.form-status[data-state="success"] { color: #1e7a46; }
.form-status:empty { display: none; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hair); }
.site-footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px 32px; padding-top: 32px; padding-bottom: 32px;
  font-size: 14px; color: var(--muted);
}
.site-footer .logo__word { font-size: 22px; }
.site-footer .logo__mark { width: 28px; height: 28px; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(64px, 8vw, 112px); }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(40px, 5vw, 72px); margin-bottom: 28px; }
.legal h2 { font-size: clamp(24px, 2.4vw, 32px); margin-top: 48px; margin-bottom: 14px; }
.legal h3 { font-size: 20px; margin-top: 28px; margin-bottom: 8px; }
.legal p, .legal li { color: var(--text); font-size: 17px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ink); }
.legal .meta { color: var(--muted); font-size: 15px; }
.legal address { font-style: normal; }
.legal .todo {
  background: #fff4c2; border: 1px dashed #d4b22c; border-radius: 10px;
  padding: 2px 8px; font-size: 0.95em;
}

/* ---------- Responsive Feinschliff ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .site-header .container { padding-top: 16px; padding-bottom: 16px; }
  .logo__word { font-size: 26px; }
  .logo__mark { width: 34px; height: 34px; }
  .hero .container { padding-top: 20px; }
  .offer { transform: rotate(-1deg); }
  .offer .btn { align-self: stretch; }
  .spot--portrait { width: min(320px, 100%); }
  .idea__box { border-radius: 28px; }
  .wizard__step .btn { flex: 1 1 100%; }
  .form .btn { align-self: stretch; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .wizard__bar { transition: none; }
  .rec { animation: none; }
  html:not(.logo-played) .logo--animate .logo__crown,
  html:not(.logo-played) .logo--animate .logo__ring,
  html:not(.logo-played) .logo--animate .logo__arc,
  html:not(.logo-played) .logo--animate .logo__pivot,
  html:not(.logo-played) .logo--animate .logo__word > span,
  html:not(.logo-played) .logo--animate .logo__dot { animation: none; }
}
