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

:root {
  --bg: #080c10;
  --surface: #0e1318;
  --surface2: #131920;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);
  --accent: #aa2e25;
  --accent2: #47c8ff;
  --text: #f0f4f8;
  --muted: #6b7a8d;
  --muted2: #3d4e5e;
  --red: #ff4757;
  --green: #2ecc71;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.3s ease;
}

/* ── BACKGROUND GRID ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── GLOW ORBS ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 500px; height: 500px;
  background: rgba(170,46,37,0.03);
  top: -150px; left: -100px;
}
.orb-2 {
  width: 600px; height: 600px;
  background: rgba(71,200,255,0.025);
  bottom: -200px; right: -150px;
}

/* ── WRAPPER ── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── HERO ── */
.hero {
  padding: 100px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(170,46,37,0.8);
  border: 1px solid rgba(170,46,37,0.4);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 32px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(24px, 4vw, 64px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffffff;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  max-width: 420px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 620px;
  margin: 0 auto;
}

.hero-stat {
  padding: 20px 16px;
  text-align: center;
  position: relative;
}

.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: var(--border);
}

.hero-stat-value {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.1rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  white-space: nowrap;
}

.hero-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  margin: 48px 0;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.part-count {
  font-size: 13px;
  color: var(--muted2);
  font-family: 'Space Mono', monospace;
}

/* ── COMPONENT GRID ── */
.component-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Category text-only color — no background pill */
.comp-category {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cat-rahmen    { color: #c8dd30; }
.cat-antrieb   { color: #ff7a5c; }
.cat-vorderrad { color: #47c8ff; }
.cat-hinterrad { color: #6aabff; }
.cat-cockpit   { color: #c47aff; }
.cat-gabel     { color: #2ecc71; }
.cat-pedale    { color: #ffc847; }
.cat-sattel    { color: #ff6eb0; }

/* ── CATEGORY FILTER BUTTONS ── */
.comp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.comp-filter-btn {
  padding: 5px 13px;
  border-radius: 5px;
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.comp-filter-btn:hover { border-color: var(--muted); color: var(--text); }
.comp-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── CATEGORY GROUP HEADER ── */
.cat-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cat-group-header .comp-category {
  color: rgba(255,255,255,0.55);
}

.cat-group-count {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted2);
  margin-left: auto;
}

/* ── COMPONENT TILE GRID ── */
.comp-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.comp-tile {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 14px 16px 0;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s, border-color 0.15s;
}

.comp-tile:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.comp-tile-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.comp-tile-name {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.comp-tile-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-family: 'Space Mono', monospace;
}

.comp-tile-footer {
  margin-top: auto;
  padding: 10px 0 12px;
}

.comp-tile-shop {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
  font-size: 10px;
  font-family: 'Space Grotesk', sans-serif;
  text-decoration: none;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 3px 8px;
  transition: opacity 0.15s, border-color 0.15s;
}

.comp-tile-shop:hover { opacity: 0.65; border-color: rgba(255,255,255,0.28); }

.comp-tile-shop--empty {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
  color: var(--muted);
}

/* ── WEIGHT DISTRIBUTION CHART ── */
.wdist { margin: 40px 0; }

.wdist-subtitle {
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--muted2);
}

.wdist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.wdist-btn {
  padding: 5px 13px;
  border-radius: 5px;
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wdist-btn:hover { border-color: var(--muted); color: var(--text); }

.wdist-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wdist-chart {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wdist-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
  cursor: default;
}

.wdist-row:hover { background: rgba(255,255,255,0.04); }

.wdist-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
  transition: color 0.15s;
}

.wdist-row:hover .wdist-label { color: var(--text); }

.wdist-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wdist-track {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.wdist-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #aa2e25 0%, #d44940 100%) !important;
  width: 0%;
  max-width: 100%;
  transition: width 0.45s ease;
}

.wdist-val {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
  min-width: 52px;
}

/* Floating tooltip */
.wdist-tip {
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 9999;
  max-width: 280px;
}

@media (max-width: 600px) {
  .wdist-row { grid-template-columns: 130px 1fr; gap: 10px; }
  .wdist-label { font-size: 11px; }
}

/* ── TOTALS ── */
.totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px auto 0;
  max-width: 520px;
}

.total-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.total-value {
  font-family: 'Space Mono', monospace;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.total-unit {
  font-size: 16px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 400;
}

.total-sublabel {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted2);
}

/* ── CARD COLOR PICKER ── */
.card-color-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

/* ── WEIGHT SUP / CTA ── */
.hero-stat-value sup,
.total-value sup {
  font-size: 0.45em;
  opacity: 0.6;
  vertical-align: super;
  font-weight: 400;
}

.cta-section {
  text-align: center;
  padding: 60px 20px;
  margin-top: 40px;
}

.cta-tagline {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.85;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cta-sub {
  font-size: 14px;
  color: var(--muted);
  opacity: 0.4;
  margin-bottom: 28px;
}

.cta-btn {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 12px 32px;
  font-size: 13px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  border-radius: 2px;
  transition: border-color 0.2s, background 0.2s;
}

.cta-btn:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}

/* ── FOOTER ── */
.footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-note {
  font-size: 12px;
  color: var(--muted2);
}

.footer-tag {
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--muted2);
}

/* ── ENTRY ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── GALLERY ── */
.gallery-section {
  margin: 0 0 0;
}

/* ── WEIGHT NOTE ── */
.weight-note {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
  margin-top: 5px;
  letter-spacing: 0.03em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 260px);
  gap: 8px;
}

.gallery-tile {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s ease;
  filter: contrast(1.05) saturate(0.85) brightness(0.92);
  will-change: transform;
}

.gallery-tile:hover img {
  transform: scale(1.07);
  filter: contrast(1.1) saturate(1.0) brightness(1.0);
}

/* Permanent gradient at bottom */
.gallery-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.15) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

.gallery-label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
}

.gallery-label-text {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  text-transform: uppercase;
}

.gallery-label-num { display: none; }

/* Hover overlay — centered label appears */
.gallery-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.gallery-tile:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-inner {
  text-align: center;
}

.gallery-overlay-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,255,71,0.12);
  border: 1px solid rgba(232,255,71,0.35);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Border shimmer on hover */
.gallery-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  z-index: 4;
  transition: border-color 0.3s;
  pointer-events: none;
}

.gallery-tile:hover::before {
  border-color: rgba(232,255,71,0.2);
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .totals-grid { grid-template-columns: 1fr; }

  .weight-bar-row {
    grid-template-columns: 120px 1fr 50px;
    gap: 8px;
  }

  .hero-stat { padding: 12px 8px; }

  .footer { flex-direction: column; text-align: center; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 180px);
  }
}

@media (max-width: 480px) {
  .wrapper { padding: 0 16px 60px; }
  .hero { padding: 60px 0 40px; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 150px);
  }
  .comp-group-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── FINALE SECTION ── */
.finale {
  position: relative;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 64px;
}

.finale::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 110%, rgba(170,46,37,0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 100% -10%, rgba(80,20,15,0.3) 0%, transparent 50%);
  pointer-events: none;
}

.finale-inner {
  position: relative;
  z-index: 1;
  padding: 56px 52px 48px;
}

.finale-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}

.finale-title {
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 52px;
}

.finale-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}

.finale-stat {
  background: #111;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finale-stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.finale-stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  word-break: break-word;
}

.finale-stat-value--accent { color: #e05040; }

.finale-stat-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-family: 'Space Mono', monospace;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .finale-inner { padding: 40px 28px 36px; }
  .finale-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .finale-stats { grid-template-columns: 1fr; }
}
