:root {
  --font-sans: "Mona Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --bg-base: #050506;
  --bg-elevated: #0b0b0e;
  --bg-card: #0f1014;
  --bg-pill: rgba(255, 255, 255, 0.05);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-primary: #ffffff;
  --text-secondary: #8e929c;
  --text-muted: #52555e;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: clip;
  position: relative;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#webgl-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 2.35rem;
  padding: 0 1.05rem;
  border-radius: 999px;
  background: #ffffff;
  color: #050506;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-expo), opacity 0.2s;
}

.btn-white:hover {
  transform: scale(1.02);
  opacity: 0.92;
}

.btn-white:active {
  transform: scale(0.98);
}

.btn-white-lg {
  height: 3.35rem;
  padding: 0 1.65rem;
  font-size: 0.98rem;
  gap: 0.7rem;
}

.btn-ghost-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 3.35rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-ghost-lg:hover {
  background: rgba(255, 255, 255, 0.09);
}

.hero {
  padding-top: clamp(3.5rem, 8vh, 5.5rem);
  padding-bottom: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-3d {
  position: relative;
  perspective: 1000px;
  margin-bottom: 1.75rem;
  cursor: grab;
}

.hero-logo-rig {
  position: relative;
  width: clamp(180px, 21vw, 260px);
  aspect-ratio: 1320 / 618;
  transform-style: preserve-3d;
  transform: rotateX(var(--lrx, 6deg)) rotateY(var(--lry, -8deg));
  transition: transform 0.15s ease-out;
}

.logo-depth-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.logo-front-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateZ(6px);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero-h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.03;
  max-width: 15ch;
  color: #ffffff;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 36rem;
  line-height: 1.55;
  margin-top: 1.15rem;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.stage-container {
  margin-top: 3.25rem;
  width: 100%;
  max-width: 66rem;
  perspective: 2000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.view-switcher {
  display: inline-flex;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.view-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.view-tab.active {
  background: #ffffff;
  color: #050506;
  font-weight: 600;
}

.launcher-3d-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1014 / 595;
  border-radius: 1.25rem;
  background: #0a0a0d;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 60px 140px -30px rgba(0, 0, 0, 0.98),
    0 20px 40px -20px rgba(0, 0, 0, 0.85);
  transform-style: preserve-3d;
  transform: rotateX(var(--srx, 9deg)) rotateY(var(--sry, 0deg)) scale(var(--ssc, 0.98));
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.launcher-screen-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #050506;
}

.launcher-screen-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s var(--ease-expo), transform 0.6s var(--ease-expo);
  user-select: none;
  -webkit-user-drag: none;
}

.launcher-screen-inner img.hidden-screen {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.bento-section {
  padding-block: clamp(5rem, 9vw, 7.5rem);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.section-h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.08;
  max-width: 18ch;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .col-7 { grid-column: span 7; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-12 { grid-column: span 12; }
}

.card {
  position: relative;
  border-radius: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #fff;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.5rem;
  max-width: 32rem;
}

.webgl-card-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  margin-block: 1rem;
  border-radius: 1.2rem;
  background: #08090c;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: grab;
}

.webgl-card-canvas-wrap:active {
  cursor: grabbing;
}

#voxelInspectorCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.block-selector-bar {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 16, 20, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.block-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
}

.block-chip.active {
  background: #fff;
  color: #050506;
  font-weight: 600;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .profile-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

.profile-preview-dock {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.15rem;
  background: #08090c;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.minimal-input {
  background: #121318;
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  padding: 0.55rem 0.85rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  outline: none;
  width: 150px;
  transition: border-color 0.2s;
}

.minimal-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.metric-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.metric-label-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.metric-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.download-footer {
  padding-block: clamp(4.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--border-subtle);
  background: #070709;
}

.dl-banner {
  border-radius: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: clamp(2rem, 4.5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  padding: 0.85rem 1.25rem;
  border-radius: 0.9rem;
  background: #ffffff;
  color: #050506;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s var(--ease-expo), opacity 0.3s;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}
