/* ==========================================================================
   RapidHost Design System — jahresflat.de (Malik Consults)
   Alle Werte 1:1 aus rapidhost/Rapidhost.fig extrahiert (Kiwi-Decode).
   Keine geschätzten Farben, Schriftgrößen oder Radien.
   ========================================================================== */

/* Schriften kommen aus fonts.css und liegen lokal auf unserem Server.
   Kein @import von fonts.googleapis.com — das würde die IP jedes Besuchers
   ohne Einwilligung an Google übertragen. Siehe Kommentar in fonts.css. */

:root {
  /* --- Farben (Styleguide-Swatches) --- */
  --bg:              #090D14;   /* Primary Background */
  --bg-black:        #151E2B;   /* Sekundärer Hintergrund */
  --bg-deep:         #090D14;   /* Black (alt) */
  --card:            #101722;   /* Card Background */
  --border:          #263243;   /* Card Borders */
  --divider:         #263243;   /* Subtle Dividers */
  --text:            #F5F7FA;   /* Text Primary */
  --text-muted:      #AAB4C3;   /* Text Secondary */
  --accent:          #15E6A1;   /* Accent Green */
  --accent-mid:      #0FC88A;   /* Darker Green for Hover */
  --accent-deep:     #0b7a54;
  --white:           #ffffff;
  --gray-01:         #333537;
  
  /* Status Colors */
  --color-error:     #FF5F6D;
  --color-warning:   #FFB84D;
  --color-success:   #25D695;

  /* --- Gradients --- */
  --grad-button: linear-gradient(135deg, var(--accent-mid) 0%, var(--accent) 100%);
  --grad-hero:   linear-gradient(180deg, var(--accent) 0%, var(--accent-mid) 42%, var(--bg) 100%);

  /* --- Typografie --- */
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --font-alt:  'Inter', system-ui, sans-serif;

  /* --- Radien --- */
  --r-sm:   5px;
  --r-md:  20px;
  --r-lg:  30px;
  --r-pill: 100px;

  /* --- Layout --- */
  --container: 1200px;
  --header-h:   90px;
}

/* --- Reset / Basis --- */
*, *::before, *::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

#root,
.page-wrapper {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

.page-content {
  width: 100%;
  padding-inline: 24px;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* --- Typo-Skala (exakt aus dem Styleguide) --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text);
  margin: 0 0 16px;
}
h1 { font-weight: 700; font-size: 72px; line-height: 108px; }
h2 { font-weight: 700; font-size: 56px; line-height: 1.1; }
h3 { font-weight: 700; font-size: 48px; line-height: 1.15; }
h4 { font-weight: 600; font-size: 29px; line-height: 1.25; }
h5 { font-weight: 600; font-size: 22px; line-height: 1.3; }
h6 { font-weight: 600; font-size: 18px; line-height: 1.4; }

p { margin: 0 0 16px; color: var(--text-muted); }

.text-small { font-size: 14px; line-height: 1.5; }
.text-lead  { font-size: 20px; line-height: 32px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* --- Layout-Helfer --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding: 100px 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { margin-bottom: 16px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Eyebrow / "Sub heading" ---
   Im Template: Höhe 39px, Füllung #eaeff3 bei 5 % Deckkraft, Rand als
   Winkel-Gradient (#000000 48% → #26c98e 78% → #00ffa3 100%). */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 39px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  background: rgba(234, 239, 243, .05);
  border-radius: var(--r-pill);
  padding: 0 20px;
  margin-bottom: 20px;
  position: relative;
  /* Rückfallebene, falls mask-composite nicht unterstützt wird */
  border: 1px solid rgba(0, 255, 163, .22);
}
.eyebrow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  /* Weicher Rundlauf ohne harte Kante: der Verlauf beginnt und endet
     bei derselben Farbe, sonst entsteht bei 0°/360° ein sichtbarer Bruch. */
  background: conic-gradient(from 200deg,
    rgba(0, 255, 163, .12) 0deg,
    rgba(38, 201, 142, .45) 90deg,
    #00ffa3 180deg,
    rgba(38, 201, 142, .45) 270deg,
    rgba(0, 255, 163, .12) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  padding: 18px 34px;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad-button);
  color: #04150e;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 255, 163, .18);
}
.btn-primary:hover { box-shadow: 0 14px 38px rgba(0, 255, 163, .3); color: #04150e; }

.btn-accent { background: var(--accent); color: #04150e; font-weight: 600; }
.btn-accent:hover { color: #04150e; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* --- Karten --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.card-glass {
  background: rgba(22, 29, 37, .6);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* --- Formulare --- */
label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}
input[type=text], input[type=email], input[type=password],
input[type=tel], select, textarea {
  width: 100%;
  background: var(--bg-black);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: #6c7484; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 255, 163, .12);
}
.field { margin-bottom: 20px; }
.field-error { color: #ff6b6b; font-size: 14px; margin-top: 6px; }
.field-hint  { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

/* --- Status-Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
}
.badge-ok      { background: rgba(0,255,163,.12); color: var(--accent);  border-color: rgba(0,255,163,.3); }
.badge-wait    { background: rgba(255,193,7,.12); color: #ffc107;        border-color: rgba(255,193,7,.3); }
.badge-error   { background: rgba(255,107,107,.12); color: #ff6b6b;      border-color: rgba(255,107,107,.3); }
.badge-neutral { background: rgba(161,168,182,.1); color: var(--text-muted); border-color: var(--border); }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(13, 17, 23, .85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 32px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--text);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad-button);
  display: grid; place-items: center;
  color: #04150e; font-weight: 700; font-size: 18px;
}
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
/* :not(.btn) ist nötig: ohne das überschreibt `.nav a` (Spezifität 11) die
   Textfarbe von `.btn-primary` (Spezifität 10) — die Schaltfläche in der
   Navigation bekam dadurch grauen statt dunklen Text. */
.nav a:not(.btn) { font-family: var(--font-head); font-weight: 500; font-size: 16px; color: var(--text-muted); }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current=page] { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 26px; cursor: pointer; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-black);
  border-top: 1px solid var(--border);
  padding: 72px 0 0;
  margin-top: 40px;
}
.site-footer h6 { margin-bottom: 20px; }
/* :not(.btn) wie in der Navigation — sonst wird der Button-Text grau. */
.site-footer a:not(.btn) { color: var(--text-muted); font-size: 16px; line-height: 32px; }
.site-footer a:not(.btn):hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 24px 0;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 14px;
}

/* --- Hero --- */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
/* Akzentschein hinter dem Hero.
   Vorher lag hier der flächige Mint-Gradient des Templates. Der legte einen
   grünen Schleier über den ganzen Bereich und erzeugte an der Unterkante eine
   sichtbare Naht. Jetzt ein weicher Schein, der nach außen auf Null läuft —
   dadurch gibt es keine Kante mehr. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 1000px;
  background: radial-gradient(55% 55% at 50% 8%,
    rgba(0, 255, 163, .13) 0%,
    rgba(0, 255, 163, .04) 45%,
    transparent 72%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero h1 { max-width: 900px; }
.hero p { max-width: 620px; font-size: 20px; line-height: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* --- Prose (Rechtstexte) --- */
.prose { max-width: 860px; }
.prose h2 { font-size: 29px; margin-top: 48px; }
.prose h3 { font-size: 22px; margin-top: 32px; }
.prose ul { padding-left: 22px; color: var(--text-muted); }
.prose li { margin-bottom: 10px; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.prose th, .prose td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--border); color: var(--text-muted);
}
.prose th { color: var(--text); font-family: var(--font-head); font-weight: 600; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 52px; line-height: 1.12; }
  h2 { font-size: 40px; }
  h3 { font-size: 32px; }
  .section { padding: 72px 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  h1 { font-size: 38px; }
  h2 { font-size: 30px; }
  h3 { font-size: 26px; }
  h4 { font-size: 24px; }
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg-black); border-bottom: 1px solid var(--border); padding: 16px 24px 24px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .hero { padding: 56px 0; }
  .hero p { font-size: 18px; line-height: 30px; }
}

/* Tabellen/Codeblöcke dürfen nie die Seite horizontal scrollen lassen */
.scroll-x { overflow-x: auto; }

/* --- Domainprüfer Laser Scanner & Button Loader --- */
.domain-input-wrapper {
  position: relative;
  overflow: hidden;
}
.domain-input-wrapper .scanner-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -150px;
  width: 120px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 163, 0.35), transparent);
  pointer-events: none;
  display: none;
  z-index: 10;
}
.domain-input-wrapper.is-loading .scanner-bar {
  display: block;
  animation: scanSweep 1.6s infinite linear;
}
@keyframes scanSweep {
  0% { left: -150px; }
  100% { left: 100%; }
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.6s infinite linear;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.result-fade-in {
  animation: fadeInUpScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInUpScale {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
