/* ──────────────── Reset & Variables ──────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* === FARBEN === */
  --primary:          #6B3F5E;   /* Aubergine/Pflaume – Hauptfarbe */
  --primary-dark:     #2A1A28;   /* Deep Plum – dunkelste Variante */
  --primary-hover:    #5A3450;   /* Hover-Zustand */
  --accent:           #7D5272;   /* Mauve – Italic-Akzent, Headlines */
  --accent-mid:       #A07090;   /* Helles Mauve – sekundär */
  --teal:             #20B2AA;   /* Teal – frischer Kontrast-Akzent */
  --teal-hover:       #1A9A93;   /* Teal dunkler */

  /* === HINTERGRÜNDE === */
  --bg:               #F7F2F5;   /* Warm Petal – Haupthintergrund */
  --surface-1:        rgba(255,255,255,0.70); /* Karten */
  --surface-2:        #EDE0EA;   /* Premium-Karten, verschachtelt */
  --surface-solid:    #FFFFFF;   /* Volle weiße Fläche wo nötig */

  /* === RAHMEN === */
  --border:           rgba(107,63,94,0.12);
  --border-mid:       rgba(107,63,94,0.20);
  --border-strong:    rgba(107,63,94,0.35);

  /* Alpha-Varianten (werden von tenant-branding.js überschrieben) */
  --primary-bg:       rgba(107,63,94,0.06);
  --primary-bg-soft:  rgba(107,63,94,0.10);
  --primary-ring:     rgba(107,63,94,0.15);
  --primary-shadow:   rgba(107,63,94,0.30);

  /* === TEXT === */
  --text:             #2A1A28;   /* Haupttext – warmes Fast-Schwarz */
  --text-muted:       #8A7080;   /* Sekundärtext – warmes Grau */
  --text-subtle:      #B09AA8;   /* Hints, Placeholder */
  --text-on-primary:  #FFFFFF;   /* Text auf Primary-Buttons */

  /* === DRINGLICHKEITSAMPEL === */
  --success:          #10B981;   /* Grün – BEOBACHTEN */
  --success-bg:       rgba(16,185,129,0.10);
  --warning:          #C88C32;   /* Warmes Amber – BALD */
  --warning-bg:       rgba(200,140,50,0.10);
  --danger:           #C83C3C;   /* Warmes Rot – SOFORT */
  --danger-bg:        rgba(200,60,60,0.10);

  /* === SCHATTEN === */
  --shadow-sm:        0 1px 4px rgba(42,26,40,0.06);
  --shadow-md:        0 4px 16px rgba(42,26,40,0.08);
  --shadow-lg:        0 8px 32px rgba(42,26,40,0.10);

  /* === TYPOGRAFIE === */
  --font-heading:     'Cormorant Garamond', Georgia, serif;
  --font-body:        'Jost', system-ui, sans-serif;

  /* === RADIEN === */
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        24px;
  --radius-pill:      999px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.15;
}

h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }

em, i {
  color: var(--accent);
  font-style: italic;
}

/* ──────────────── Header ──────────────── */
.header {
  background: rgba(247,242,245,0.85);
  border-bottom: 0.5px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon { font-size: 2rem; }

.logo-title {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.1;
}

.logo-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.badge {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid var(--border-mid);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: .06em;
}

/* ──────────────── Premium Badge ──────────────── */
.badge-premium {
  background: var(--primary);
  color: white;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ──────────────── Layout ──────────────── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  flex: 1;
}

.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ──────────────── Cards ──────────────── */
.card {
  background: var(--surface-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card.premium {
  background: var(--surface-2);
  border-color: var(--border-mid);
}

.form-card { margin-bottom: 0; }

/* ──────────────── Form ──────────────── */
.field-group { margin-bottom: 20px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.required { color: var(--primary); }

.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 1rem; /* ≥16px verhindert Auto-Zoom auf iOS */
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input::placeholder { color: var(--text-subtle); }

.select { cursor: pointer; appearance: none; }

.textarea { resize: vertical; min-height: 100px; }

.char-count {
  display: block;
  text-align: right;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ──────────────── Pet Grid ──────────────── */
.pet-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.pet-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  color: var(--text);
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--font-body);
  min-height: 44px; /* Touch-Target ≥ 44px */
}

.pet-btn:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-2px);
}

.pet-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg-soft);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.pet-btn span { font-size: 1.5rem; }

/* ──────────────── Buttons ──────────────── */
.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform .15s;
  width: 100%;
}

.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-icon { font-size: 1.1rem; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 10px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.btn-secondary {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 12px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: var(--font-body);
  margin-top: 8px;
}

.btn-secondary:hover { border-color: var(--primary); background: var(--primary-bg); }

/* ──────────────── Navbar (alias) ──────────────── */
.navbar {
  background: rgba(247,242,245,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

/* ──────────────── Dringlichkeits-Pills ──────────────── */
.badge-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
}

/* ──────────────── Loading ──────────────── */
.loading-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
}

.pulse-ring {
  width: 56px;
  height: 56px;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text p { color: var(--text-muted); font-size: 1rem; }

#loadingAnimal { font-size: 2.2rem; }

.dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* ──────────────── Urgency Banner ──────────────── */
.urgency-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid;
}

.urgency-banner span:first-child { font-size: 1.8rem; flex-shrink: 0; }

.urgency-banner strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }

.urgency-banner p { font-size: .9rem; opacity: .85; }

.urgency-notfall {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: #8B2020;
}

.urgency-hoch {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: #7A4A10;
}

.urgency-mittel {
  background: rgba(200,140,50,0.06);
  border-color: rgba(200,140,50,0.40);
  color: #7A4A10;
}

.urgency-niedrig {
  background: var(--success-bg);
  border-color: var(--success);
  color: #065f46;
}

/* ──────────────── Section Titles ──────────────── */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* ──────────────── Causes ──────────────── */
.cause-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.cause-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cause-name { font-weight: 600; font-size: .95rem; }

.probability-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.prob-wahrscheinlich { background: var(--success-bg); color: #065f46; }
.prob-möglich        { background: var(--warning-bg); color: #7A4A10; }
.prob-selten         { background: rgba(138,112,128,0.12); color: var(--text-muted); }

.cause-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }

/* ──────────────── Lists ──────────────── */
.bullet-list { list-style: none; padding: 0; }

.bullet-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
}

.bullet-list li:last-child { border-bottom: none; }

.bullet-list li::before {
  content: '→';
  color: var(--primary);
  flex-shrink: 0;
  font-weight: 700;
}

/* ──────────────── Two Column ──────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.two-col .card { margin-bottom: 0; }

/* ──────────────── Costs ──────────────── */
.cost-card { border-color: var(--border-mid); }

.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cost-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.cost-total {
  grid-column: 1 / -1;
  background: var(--primary-bg);
  border-color: var(--border-mid);
}

.cost-label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.cost-value {
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
}

.cost-total .cost-value { font-size: 1.05rem; }

/* ──────────────── Disclaimer ──────────────── */
.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--warning-bg);
  border: 1px solid rgba(200,140,50,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--text-muted);
}

.disclaimer span { font-size: 1.2rem; flex-shrink: 0; }

/* ──────────────── Footer ──────────────── */
.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 0.5px solid var(--border);
  background: var(--surface-solid);
}

.footer-copy {
  margin-top: 10px;
  font-size: .75rem;
  opacity: .7;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.footer-links a:hover { color: var(--primary); }

/* ──────────────── Static Page Content ──────────────── */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  flex: 1;
}

.page-container h1 {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 8px;
}

.page-container .page-intro {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: .95rem;
}

.page-container h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

.page-container p {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 10px;
  line-height: 1.7;
}

.page-container a {
  color: var(--primary);
  text-decoration: none;
}

.page-container a:hover { text-decoration: underline; }

.page-container ul {
  margin: 8px 0 16px 20px;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
}

.page-container .info-box {
  background: var(--primary-bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: .9rem;
  color: var(--text-muted);
}

.page-container .info-box strong {
  display: block;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 1rem;
}

.placeholder {
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-style: italic;
  color: var(--text-muted);
  font-size: .9rem;
  margin: 6px 0 12px;
}

/* ──────────────── Utilities ──────────────── */
.hidden { display: none !important; }

/* ═══════════════ ICON SYSTEM ═══════════════ */
[data-lucide] {
  stroke-width: 1.5;
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-lg [data-lucide],
[data-lucide].icon-lg {
  width: 24px;
  height: 24px;
}

.icon-sm [data-lucide],
[data-lucide].icon-sm {
  width: 16px;
  height: 16px;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(107, 63, 94, 0.08);
  border: 1px solid rgba(107, 63, 94, 0.15);
  color: #6B3F5E;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-wrap:hover {
  background: rgba(107, 63, 94, 0.14);
  border-color: rgba(107, 63, 94, 0.28);
}

.icon-wrap.teal {
  background: rgba(32, 178, 170, 0.08);
  border-color: rgba(32, 178, 170, 0.20);
  color: #20B2AA;
}

.icon-wrap.teal:hover {
  background: rgba(32, 178, 170, 0.14);
  border-color: rgba(32, 178, 170, 0.35);
}

.icon-wrap.sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.icon-wrap.lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.photo-credit {
  font-size: 11px;
  color: var(--text-subtle);
  text-align: center;
  padding: 8px 0;
  opacity: 0.7;
}

/* ──────────────── Responsive ──────────────── */
@media (max-width: 600px) {
  .pet-grid { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .cost-grid { grid-template-columns: 1fr; }
  .cost-total { grid-column: 1; }
  .hero h1 { font-size: 1.5rem; }
}

/* ──────────────── Landing Hero ──────────────── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/petdoc/images/hero-bg.jpg');
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(42, 26, 40, 0.70) 0%,
    rgba(107, 63, 94, 0.55) 50%,
    rgba(42, 26, 40, 0.75) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #FFFFFF;
  max-width: 720px;
  padding: 0 32px;
}

.hero-content h1 {
  -webkit-text-fill-color: #FFFFFF !important;
  background: none !important;
  color: #FFFFFF !important;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
}

.hero .btn-hero-primary {
  background: #FFFFFF;
  color: #6B3F5E;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

.hero .btn-hero-primary:hover {
  background: #F7F2F5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.hero .btn-hero-secondary {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
}

.hero .btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
}
