/* ZeroBlockBridge — Site Styles */

:root {
  --zbb-font:    'Rubik', system-ui, sans-serif;
  --zbb-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --zbb-green:   #34d399;
  --zbb-green2:  #10b981;
  --section-gap: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--zbb-font);
  margin: 0;
  padding-top: 100dvh;
  background: var(--vitra-color-bg);
  color: var(--vitra-color-text-primary);
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */

#hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.35s ease;
  will-change: opacity;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(16,185,129,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(5,150,105,0.12)  0%, transparent 60%),
    linear-gradient(160deg, hsl(160,22%,5%) 0%, hsl(160,18%,3%) 60%, hsl(160,14%,2%) 100%);
}

/* Shimmer sweep */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(52,211,153,0.06) 45%,
    rgba(52,211,153,0.12) 50%,
    rgba(52,211,153,0.06) 55%,
    transparent 80%
  );
  background-size: 220% 100%;
  animation: hero-sweep 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes hero-sweep {
  from { background-position: 0% center; }
  to   { background-position: -220% center; }
}

/* Bottom fade */
#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Tile Grid ─────────────────────────────────────────────── */

#hero-tiles {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(var(--columns), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
}

.tile {
  cursor: pointer;
  position: relative;
  background: rgba(5, 15, 10, 0.88);
  transition: background 0.25s ease;
}

.tile:hover {
  background: rgba(16, 60, 35, 0.92);
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0.5px;
  background: transparent;
  transition: background 0.15s ease;
}

#hero.toggled #hero-tiles .tile:hover::before {
  background: rgba(52,211,153,0.04);
}

/* ── Hero Content ────────────────────────────────────────── */

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem 1.5rem 6rem;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}

#hero.toggled .hero-content {
  opacity: 1;
  transition-delay: 0.25s;
}

.hero-content > * { pointer-events: none; }
#hero.toggled .hero-content > * { pointer-events: auto; }

/* Logo */
.hero-logo-wrap {
  margin-bottom: 1.75rem;
  line-height: 0;
}

.hero-logo {
  width: 220px;
  height: auto;
  border-radius: 16px;
  filter:
    drop-shadow(0 0 48px rgba(52,211,153,0.3))
    drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}

/* ── Title ──────────────────────────────────────────────── */

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  margin: 0 0 1.1rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.title-zero,
.title-bridge {
  color: #fff;
}

/* "Block" — blue/orange slow color drift, diagonal */
.title-block {
  background: linear-gradient(
    120deg,
    #f97316 0%,
    #fb923c 18%,
    #60a5fa 42%,
    #e0f2fe 52%,
    #60a5fa 62%,
    #fb923c 82%,
    #f97316 100%
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: block-drift 7s ease-in-out infinite;
}

@keyframes block-drift {
  0%   { background-position: 0%   30%; }
  25%  { background-position: 60%  80%; }
  50%  { background-position: 100% 20%; }
  75%  { background-position: 40%  90%; }
  100% { background-position: 0%   30%; }
}

/* Subtitle */
.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(255,255,255,0.45);
  margin: 0 0 2rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* ── CTA Buttons ─────────────────────────────────────────── */

.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #052e16;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 28px rgba(52,211,153,0.3), 0 2px 8px rgba(0,0,0,0.3);
}

.hero-btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(52,211,153,0.45), 0 4px 16px rgba(0,0,0,0.35);
}

.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(6px);
}

.hero-btn-ghost:hover {
  background: rgba(52,211,153,0.08);
  border-color: rgba(52,211,153,0.35);
  color: #fff;
}

.btn-arrow { transition: transform 0.2s ease; }
.hero-btn-ghost:hover .btn-arrow { transform: translateX(4px); }

.btn-icon { display: block; flex-shrink: 0; }
.btn-icon-invert { filter: invert(1); }

/* Hint */
.tiles-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--zbb-mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 5;
  animation: hint-pulse 3s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 1; }
}

#hero.toggled .tiles-hint { display: none; }

#hero.toggled::before { animation: none; opacity: 0; }

/* ═══════════════════════════════════════════
   SECTIONS WRAP + PARTICLE CANVAS
═══════════════════════════════════════════ */

#sections-wrap { position: relative; }

#section-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

#sections-wrap > .section,
#sections-wrap > .download-section,
#sections-wrap > .site-footer {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════ */

.section { padding: var(--section-gap) 1.5rem; }

.section > .vitra-container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--vitra-color-text-secondary);
  font-size: 1.05rem;
  margin: 0 auto 3rem;
  max-width: 520px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════
   FEATURES
═══════════════════════════════════════════ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

/* Icon: full-width bar so it centers regardless of Vitra card internals */
.feature-icon {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  text-align: center;
  width: 100%;
  padding: 0.6rem 0;
  margin-bottom: 0.9rem;
  background: rgba(52,211,153,0.07);
  border: 1px solid rgba(52,211,153,0.12);
  border-radius: 10px;
}

.mc-tag-pill {
  margin-top: 1rem;
  font-family: var(--zbb-mono);
  font-size: 0.65rem;
  color: var(--zbb-green);
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.14);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  display: inline-block;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════
   HOW IT WORKS
═══════════════════════════════════════════ */

.how-section {
  background: linear-gradient(180deg, transparent 0%, rgba(16,185,129,0.04) 50%, transparent 100%);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.step { text-align: center; padding: 1rem 0; }

.step-num {
  font-family: var(--zbb-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--zbb-green);
  margin-bottom: 0.5rem;
}

.step-block { font-size: 2.5rem; line-height: 1; margin-bottom: 1rem; }
.step h3    { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.6rem; }

.step p {
  font-size: 0.9rem;
  color: var(--vitra-color-text-secondary);
  line-height: 1.65;
  margin: 0;
}

.step code {
  font-family: var(--zbb-mono);
  font-size: 0.82em;
  background: rgba(52,211,153,0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--zbb-green);
}

/* ═══════════════════════════════════════════
   DOWNLOAD
═══════════════════════════════════════════ */

.download-section { padding: var(--section-gap) 1.5rem; }

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 2.5rem 3rem;
  border-radius: var(--vitra-radius-lg, 16px);
  flex-wrap: wrap;
  max-width: 860px;
  margin: 0 auto;
}

.download-left h2 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.4rem; }
.dl-meta { color: var(--vitra-color-text-secondary); font-size: 0.92rem; margin: 0 0 1rem; }
.download-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.download-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  flex-shrink: 0;
}

.install-block { display: flex; flex-direction: column; gap: 0.35rem; }

.install-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vitra-color-text-secondary);
}

.install-block code {
  display: block;
  font-family: var(--zbb-mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.14);
  border-radius: 5px;
  color: var(--zbb-green);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   DOCS
═══════════════════════════════════════════ */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 1.4rem;
  transition: transform 0.2s ease;
}

.doc-card:hover { transform: translateY(-3px); }
.doc-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-card h4 { margin: 0 0 0.2rem; font-size: 0.95rem; font-weight: 600; }
.doc-card p  { margin: 0; font-size: 0.83rem; color: var(--vitra-color-text-secondary); }

.doc-arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--zbb-green);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.doc-card:hover .doc-arrow { transform: translateX(4px); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--vitra-color-border);
  padding: 1.75rem 1.5rem;
  color: var(--vitra-color-text-secondary);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.footer-logo  { border-radius: 4px; opacity: 0.55; height: 22px; width: auto; }
.footer-brand { font-weight: 700; color: var(--vitra-color-text-primary); }
.footer-sep   { opacity: 0.3; }

.site-footer a {
  color: var(--vitra-color-text-secondary);
  text-decoration: none;
  transition: color 0.18s;
}
.site-footer a:hover { color: var(--zbb-green); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 768px) {
  :root { --section-gap: 4rem; }

  .hero-content { padding: 1.5rem 1rem; }
  .hero-title   { white-space: normal; }
  .hero-logo    { width: 120px; }

  .features-grid,
  .steps-grid,
  .docs-grid { grid-template-columns: 1fr; }

  .download-card {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .download-left,
  .download-right { align-items: center; width: 100%; text-align: center; }
  .download-badges { justify-content: center; }
  .install-block code { white-space: normal; word-break: break-all; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-btn-primary,
  .hero-btn-ghost { width: 100%; max-width: 280px; justify-content: center; }
  .footer-inner { gap: 0.5rem; }
  .footer-sep   { display: none; }
}
