/* Zudo Homepage — Softened Brutalist */

* {
  border-radius: 0px !important;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1A1A2E;
  background: #FAFAF9;
}

.brutalist-border {
  border: 2px solid #1A1A2E;
}

.brutalist-border-white {
  border: 2px solid #FFFFFF;
}

.brutalist-border-red {
  border: 2px solid #C0392B;
}

.brutalist-border-blue {
  border: 2px solid #2471A3;
}

.code-block {
  background: #1E1E2E;
  color: #CDD6F4;
  border: 2px solid #313244;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  padding: 1.25rem;
}

.code-block .keyword { color: #CBA6F7; }
.code-block .string { color: #A6E3A1; }
.code-block .comment { color: #9399B2; }
.code-block .function { color: #89B4FA; }

.feature-card {
  border: 2px solid #E5E7EB;
  background: #FFFFFF;
}

.feature-card:hover {
  border-color: #1A1A2E;
  box-shadow: 4px 4px 0px #1A1A2E;
}

.pkg-card {
  border: 2px solid #E5E7EB;
  background: #FFFFFF;
}

.pkg-card:hover {
  background: #2471A3;
  color: #FFFFFF;
  border-color: #2471A3;
}

.pkg-card:hover .pkg-arrow {
  color: #FFFFFF;
}

.layer-box {
  border: 2px solid #1A1A2E;
  position: relative;
}

.layer-box::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid #C0392B;
  z-index: -1;
}

.step-number {
  width: 48px;
  height: 48px;
  background: #C0392B;
  color: #FFFFFF;
  border: 2px solid #1A1A2E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
}

/* ==================== HERO TERMINAL ==================== */

.hero-term {
  position: relative;
  background: #1E1E2E;
  border: 3px solid #1A1A2E;
  box-shadow: 10px 10px 0 #C0392B;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.hero-term-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 40px;
  padding: 0 0.6rem 0 0.85rem;
  background: #181825;
  border-bottom: 2px solid #313244;
}

.hero-term-dots { display: flex; gap: 5px; }
.hero-term-dots i { width: 10px; height: 10px; display: block; }
.hero-term-dots i:nth-child(1) { background: #C0392B; }
.hero-term-dots i:nth-child(2) { background: #D4AC0D; }
.hero-term-dots i:nth-child(3) { background: #1E8449; }

.hero-term-file {
  font-size: 0.72rem;
  color: #CDD6F4;
  background: #313244;
  padding: 3px 8px;
  border-left: 2px solid #89B4FA;
}

.hero-term-run {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #A6E3A1;
  border: 2px solid #A6E3A1;
  padding: 3px 9px;
  text-decoration: none;
}

.hero-term-run:hover { background: #A6E3A1; color: #1E1E2E; }

.hero-term-code {
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-size: 0.78rem;
  line-height: 1.75;
  color: #CDD6F4;
  overflow-x: auto;
  white-space: pre;
}

.hero-term-out {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 2px solid #313244;
  background: #11111B;
  font-size: 0.74rem;
  line-height: 1.7;
  color: #CDD6F4;
  overflow-x: auto;
}

.hero-term-out > div { white-space: pre; }

.hero-cursor {
  display: inline-block;
  width: 7px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -2px;
  background: #CDD6F4;
  animation: hero-blink 1s step-end infinite;
}

@keyframes hero-blink { 50% { opacity: 0; } }


@media (max-width: 480px) {
  .hero-term { box-shadow: 6px 6px 0 #C0392B; }
  .hero-term-code, .hero-term-out { font-size: 0.68rem; }
}

.grid-lines {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.grid-lines-dark {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Focus visible */
*:focus-visible {
  outline: 3px solid #2471A3;
  outline-offset: 2px;
}

/* ==================== PACKAGE TICKER ==================== */

.ticker {
  overflow: hidden;
  background: #F5F5F0;
  padding: 0.85rem 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: #4B5563;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  animation: ticker 90s linear infinite;
}

.ticker-track i { width: 5px; height: 5px; background: #C0392B; display: inline-block; }

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* premium hover on cards */
.feature-card, .pkg-card { transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease; }
.feature-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1A1A2E; }
.pkg-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1A1A2E; }

/* ==================== HERO BACKDROP (three.js) ==================== */

.hero-scene { position: relative; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1200ms ease;
}

.hero-scene.has-scene .hero-canvas { opacity: 1; }

/* Fade the lattice out behind the headline column, strongest on the left. */
.hero-canvas {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.35) 34%, #000 68%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.35) 34%, #000 68%);
}

/* Everything in the hero sits above the canvas. */
.hero-scene > *:not(.hero-canvas) { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-canvas { transition: none; opacity: 0.7; }
}

/* Ticker: pause on hover, driven by jQuery so it also works on focus. */
.ticker.is-paused .ticker-track { animation-play-state: paused; }

/* ==================== HERO ==================== */

.hero {
  background-color: #FAFAF9;
  border-bottom: 4px solid #1A1A2E;
}

.hero-head {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding: 3px 12px 3px 3px;
  background: #FFFFFF;
  border: 2px solid #1A1A2E;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1A1A2E;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.hero-badge:hover { background: #D4AC0D; }

.hero-badge-ver {
  padding: 2px 7px;
  background: #C0392B;
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0;
  text-transform: none;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 6.2vw, 5.1rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: #1A1A2E;
}

.hero-title span { color: #C0392B; }

.hero-rule {
  width: min(460px, 70%);
  height: 4px;
  margin: 2rem auto;
  background: #1A1A2E;
}

.hero-sub {
  max-width: 44rem;
  margin: 0 auto;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: #4B5563;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border: 2px solid #1A1A2E;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.hero-btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #1A1A2E; }
.hero-btn--primary { background: #C0392B; color: #FFFFFF; }
.hero-btn--mono { background: #FFFFFF; color: #1A1A2E; font-family: 'JetBrains Mono', monospace; font-size: 0.875rem; }
.hero-btn--mono:hover { background: #D4AC0D; }

.hero-stage {
  display: grid;
  gap: 2.5rem;
  margin-top: 4.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
}

.hero-visual { position: relative; min-width: 0; }

/* ==================== PACKAGE PICKER ==================== */

.picker {
  background: #FFFFFF;
  border: 3px solid #1A1A2E;
  box-shadow: 10px 10px 0 #2471A3;
  padding: 1.5rem;
  min-width: 0;
}

.picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #1A1A2E;
}

.picker-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.picker-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6B7280;
}

.picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  background: #FFFFFF;
  color: #1A1A2E;
  border: 2px solid #1A1A2E;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}

.picker-chip::before {
  content: '';
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
}

.picker-chip:hover { background: #F5F5F0; }

.picker-chip[aria-pressed="true"] { background: #1A1A2E; color: #FAFAF9; }
.picker-chip[aria-pressed="true"]::before { background: #D4AC0D; border-color: #D4AC0D; }

.picker-cmd {
  display: flex;
  align-items: stretch;
  margin-top: 1.5rem;
  background: #11111B;
  border: 2px solid #1A1A2E;
}

.picker-cmd code {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #CDD6F4;
  white-space: normal;
  word-break: break-word;
}

.picker-prompt { color: #A6E3A1; margin-right: 0.35rem; }

.picker-copy {
  flex-shrink: 0;
  padding: 0 1rem;
  background: #FAFAF9;
  color: #1A1A2E;
  border: none;
  border-left: 2px solid #1A1A2E;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.picker-copy:hover { background: #D4AC0D; }
.picker-copy.is-done { background: #1E8449; color: #FFFFFF; }

.picker-more {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1A1A2E;
  text-decoration: underline;
  text-decoration-color: #C0392B;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.picker-more:hover { color: #C0392B; }

@media (max-width: 480px) {
  .picker { padding: 1.1rem; box-shadow: 6px 6px 0 #2471A3; }
  .hero-btn { width: 100%; }
}

/* ==================== HERO: LIGHT RAYS ==================== */

/* Runs up behind the floating nav; rays converge on the headline. */
.hero--beams {
  margin-top: calc(-1 * var(--z-nav-h));
  padding-top: var(--z-nav-h);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 50% 30%, rgba(192, 57, 43, 0.22), transparent 70%),
    #11111B;
}
.hero--beams::before,
.hero--beams::after {
  content: '';
  position: absolute;
  top: 110px;
  width: 52%;
  height: 440px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 55%, transparent 98%);
  mask-image: linear-gradient(to right, transparent, #000 55%, transparent 98%);
}
.hero--beams::before {
  left: -6%;
  background: repeating-conic-gradient(from 0deg at 100% 50%, transparent 0 1.1deg, rgba(230, 103, 90, 0.55) 1.1deg 1.35deg);
  clip-path: polygon(0 0, 100% 46%, 100% 54%, 0 100%);
}
.hero--beams::after {
  right: -6%;
  background: repeating-conic-gradient(from 0deg at 0% 50%, transparent 0 1.1deg, rgba(93, 169, 233, 0.55) 1.1deg 1.35deg);
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 54%);
  -webkit-mask-image: linear-gradient(to left, transparent, #000 55%, transparent 98%);
  mask-image: linear-gradient(to left, transparent, #000 55%, transparent 98%);
}
.hero--beams > div { position: relative; z-index: 1; }
@media (max-width: 767px) {
  .hero--beams::before,
  .hero--beams::after { top: 70px; height: 320px; opacity: 0.45; }
}
.hero--beams .hero-title { color: #FAFAF9; }
.hero--beams .hero-title span { color: #E6675A; }
.hero--beams .hero-rule { background: #C0392B; }
.hero--beams .hero-sub { color: rgba(250, 250, 249, 0.72); }
.hero--beams .hero-btn--mono { background: transparent; color: #FAFAF9; border-color: rgba(250, 250, 249, 0.6); }
.hero--beams .hero-btn--mono:hover { background: #FAFAF9; color: #1A1A2E; box-shadow: 3px 3px 0 #C0392B; }
.hero--beams .hero-term { border-color: #FAFAF9; }
.hero--beams .picker { box-shadow: 10px 10px 0 #2471A3; }

body:has(.hero--beams) .zh:not(.is-scrolled) .zh-bar { box-shadow: 4px 4px 0 var(--z-red); }
