/* madherz Cloud — Landing Page
   Tokens aus dem madherz Design System (Claude-Design-Export):
   Primary Terracotta #C0532F, Secondary Mulberry #8A3A55,
   Barlow 800 für Display-Headings (h1–h3), Public Sans für alles andere.
   8px-Grid, Radius 8px (Buttons/Inputs) / 16px (Cards), graue Schatten,
   dashed Dividers, keine Emojis, kein AI-Gradient-Klischee. */

:root {
  /* Palette (verbatim aus tokens/colors.css) */
  --palette-primary-lighter: #FBE7DE;
  --palette-primary-light: #E9A085;
  --palette-primary-main: #C0532F;
  --palette-primary-dark: #8F3A1F;
  --palette-primary-darker: #5E2413;
  --palette-primary-main-channel: 192 83 47;

  --palette-secondary-lighter: #F3E0E7;
  --palette-secondary-light: #C4899E;
  --palette-secondary-main: #8A3A55;
  --palette-secondary-dark: #6A2B41;
  --palette-secondary-darker: #46182A;
  --palette-secondary-main-channel: 138 58 85;

  --palette-grey-100: #F9FAFB;
  --palette-grey-200: #F4F6F8;
  --palette-grey-300: #DFE3E8;
  --palette-grey-500: #919EAB;
  --palette-grey-600: #637381;
  --palette-grey-800: #1C252E;
  --palette-grey-900: #141A21;
  --palette-grey-500-channel: 145 158 171;

  --text-primary: var(--palette-grey-800);
  --text-secondary: var(--palette-grey-600);
  --text-disabled: var(--palette-grey-500);
  --divider: rgb(var(--palette-grey-500-channel) / 0.2);
  --input-outlined: rgb(var(--palette-grey-500-channel) / 0.2);
  --button-outlined: rgb(var(--palette-grey-500-channel) / 0.32);

  --radius-base: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;

  --shadow-z8: 0 8px 16px 0 rgb(var(--palette-grey-500-channel) / 0.16);
  --shadow-z24: 0 24px 48px 0 rgb(var(--palette-grey-500-channel) / 0.16);
  --shadow-card: 0 0 2px 0 rgb(var(--palette-grey-500-channel) / 0.2), 0 12px 24px -4px rgb(var(--palette-grey-500-channel) / 0.12);
  --shadow-primary: 0 8px 16px 0 rgb(var(--palette-primary-main-channel) / 0.24);

  --font-primary: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Barlow', var(--font-primary);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Display-Headings: Barlow extrabold; h3 in Cards: Public Sans */
h1, h2 {
  font-family: var(--font-secondary);
  color: var(--text-primary);
}
h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.33;
  margin-bottom: 40px;
}
h3 {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.56;
  margin-bottom: 8px;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--palette-primary-main);
  margin-bottom: 12px;
}

/* Wordmark (type-only, Punkt in Mulberry) */
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.wordmark {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: var(--palette-grey-800);
}
.wordmark .dot { color: var(--palette-secondary-main); }
.wordmark-sub {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-disabled);
}
.wordmark-footer { color: #fff; }
.wordmark-footer .dot { color: var(--palette-secondary-light); }

/* Buttons — 14/700, Radius 8, Sentence case, Color-Shadow nur auf Hover */
.btn {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.71;
  border: none;
  border-radius: var(--radius-base);
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-lg { padding: 12px 28px; font-size: 0.9375rem; }

.btn-primary {
  background: var(--palette-primary-main);
  color: #fff;
}
.btn-primary:hover {
  background: var(--palette-primary-dark);
  box-shadow: var(--shadow-primary);
}

.btn-outlined {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--button-outlined);
}
.btn-outlined:hover {
  border-color: currentColor;
  background: rgb(var(--palette-grey-500-channel) / 0.08);
}

.btn-light {
  background: #fff;
  color: var(--palette-primary-dark);
}
.btn-light:hover { background: var(--palette-primary-lighter); }

/* Header — sticky, frosted (bgBlur), dashed Divider unten */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px dashed var(--divider);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header-nav a:not(.btn) {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}
.header-nav a:not(.btn):hover { color: var(--palette-primary-main); }

/* Hero — ruhige Fläche auf grey-100, keine Content-Gradients */
.hero {
  background: var(--palette-grey-100);
  border-bottom: 1px dashed var(--divider);
  padding: 96px 0 80px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }

.badge {
  display: inline-block;
  background: var(--palette-primary-lighter);
  color: var(--palette-primary-dark);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* Code-Fenster im Hero */
.hero-code {
  margin-top: 32px;
  width: 100%;
  max-width: 560px;
  text-align: left;
  background: var(--palette-grey-900);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-z24);
  overflow: hidden;
}
.code-titlebar {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
}
.code-titlebar span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--palette-grey-600);
}
.hero-code pre {
  padding: 16px 20px 20px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
}
.hero-code code { color: var(--palette-grey-300); font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; }
.hero-code .c { color: var(--palette-primary-light); font-weight: 700; }
.hero-code .ph { color: var(--palette-secondary-light); }

/* Sections */
.section { padding: 88px 0; }
.section-alt {
  background: var(--palette-grey-100);
  border-top: 1px dashed var(--divider);
  border-bottom: 1px dashed var(--divider);
}

/* Feature-Grid — Cards ohne Border, Schatten trennt */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-z8), var(--shadow-card); }
.card-icon {
  font-size: 1.75rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  color: var(--palette-primary-main);
  background: var(--palette-primary-lighter);
  border-radius: 12px;
  margin-bottom: 20px;
}
.card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.57; }
.card code {
  background: var(--palette-grey-200);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.85em;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
}
.step-num {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--palette-primary-main);
  color: #fff;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
  margin-bottom: 16px;
}
.step p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.57; }

/* Warteliste — das eine „rich panel": Terracotta→Mulberry-Scrim wie im Wordmark-Tile */
.waitlist {
  background: linear-gradient(135deg, var(--palette-primary-main), var(--palette-secondary-darker));
}
.waitlist-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.waitlist h2 { color: #fff; margin-bottom: 0; }
.waitlist .lead { color: rgb(255 255 255 / 0.8); }

.waitlist-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 560px;
}
.waitlist-form input,
.waitlist-form select {
  width: 100%;
  min-width: 0;
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 13px 16px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-base);
  outline: none;
  transition: box-shadow 0.2s ease;
}
/* Fokus-Ring neutral-dunkel (2px grey-800), nicht in Markenfarbe */
.waitlist-form input:focus,
.waitlist-form select:focus { box-shadow: inset 0 0 0 2px var(--palette-grey-800); }

/* Native Select auf die Optik des DS-Select bringen: eigener Chevron statt
   der Systemvariante, damit das Feld exakt wie das Input-Feld sitzt. */
.waitlist-form select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23637381' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
/* Der Platzhalter ist disabled und soll wie ein Placeholder wirken, die
   echten Länder danach wie normaler Text. */
.waitlist-form select:invalid { color: var(--text-disabled); }
.waitlist-form select option { color: var(--text-primary); }

.waitlist-form .btn { grid-column: 1 / -1; }
.form-note { color: rgb(255 255 255 / 0.55); font-size: 0.75rem; }

/* Footer */
.site-footer {
  background: var(--palette-grey-900);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-inner > div { display: flex; flex-direction: column; line-height: 1.1; }
.site-footer .wordmark-sub { color: rgb(var(--palette-grey-500-channel) / 0.7); }
.site-footer p { color: var(--palette-grey-500); font-size: 0.8125rem; }

/* Mobile */
@media (max-width: 640px) {
  .header-nav a:not(.btn) { display: none; }
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 8px; text-align: center; }
  .brand { align-items: center; }
  .header-nav .btn { padding: 8px 16px; font-size: 0.8125rem; white-space: nowrap; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  /* Zwei Felder nebeneinander werden auf dem Handy zu schmal. */
  .waitlist-form { grid-template-columns: 1fr; }
}

/* Motion: reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .waitlist-form input { transition: none; }
}
