/* ============================================================
   VIBEDECK // web
   Brutalist + cyberpunk. Mirrors the app's DesignSystem.
   ============================================================ */

/* --- Brand fonts (self-hosted, match the iOS app exactly) --- */
@font-face {
  font-family: "ClashDisplay";
  src: url("fonts/ClashDisplay-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "ClashDisplay";
  src: url("fonts/ClashDisplay-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("fonts/JetBrainsMono-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("fonts/JetBrainsMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

/* --- Palette (from DesignSystem.swift) --- */
:root {
  --void-black: #050505;
  --electric-lime: #ccff00;
  --hyper-violet: #7f00ff;
  --bittersweet: #ff453a;
  --off-white: #f2f2f7;
  --smoke: rgba(242, 242, 247, 0.55);
  --hairline: rgba(242, 242, 247, 0.12);
  --surface: #101012;

  --display: "ClashDisplay", "Arial Black", sans-serif;
  --mono: "JetBrainsMono", "SFMono-Regular", ui-monospace, "Menlo", monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --maxw: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void-black);
  color: var(--off-white);
  font-family: var(--mono);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient mesh glow behind everything (echoes AmbientMeshBackground) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 18% 12%, rgba(127, 0, 255, 0.16), transparent 60%),
    radial-gradient(55% 45% at 85% 8%, rgba(204, 255, 0, 0.1), transparent 55%),
    radial-gradient(70% 60% at 50% 110%, rgba(127, 0, 255, 0.12), transparent 60%);
  pointer-events: none;
}

a {
  color: var(--electric-lime);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Type helpers --- */
.mono-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke);
}

.terminal {
  color: var(--electric-lime);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  margin: 0;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--off-white);
}
.topbar .mark span {
  color: var(--electric-lime);
}
.topbar nav a {
  color: var(--smoke);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 22px;
}
.topbar nav a:hover {
  color: var(--electric-lime);
  text-decoration: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(56px, 12vh, 120px) var(--gutter) clamp(40px, 8vh, 80px);
}

/* Living equalizer (echoes VibeEqualizerGraphic) */
.eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 120px;
  margin: 0 auto 28px;
  max-width: 420px;
}
.eq span {
  flex: 1;
  max-width: 14px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--electric-lime), rgba(204, 255, 0, 0.15));
  animation: bounce 1.1s ease-in-out infinite;
  transform-origin: bottom;
}
.eq span:nth-child(even) {
  background: linear-gradient(180deg, var(--hyper-violet), rgba(127, 0, 255, 0.12));
}
.eq span:nth-child(1)  { animation-delay: -0.9s;  height: 40%; }
.eq span:nth-child(2)  { animation-delay: -0.2s;  height: 70%; }
.eq span:nth-child(3)  { animation-delay: -0.6s;  height: 55%; }
.eq span:nth-child(4)  { animation-delay: -1.0s;  height: 90%; }
.eq span:nth-child(5)  { animation-delay: -0.35s; height: 45%; }
.eq span:nth-child(6)  { animation-delay: -0.75s; height: 80%; }
.eq span:nth-child(7)  { animation-delay: -0.15s; height: 60%; }
.eq span:nth-child(8)  { animation-delay: -0.55s; height: 100%; }
.eq span:nth-child(9)  { animation-delay: -0.95s; height: 50%; }
.eq span:nth-child(10) { animation-delay: -0.3s;  height: 75%; }
.eq span:nth-child(11) { animation-delay: -0.7s;  height: 42%; }
.eq span:nth-child(12) { animation-delay: -0.5s;  height: 85%; }

@keyframes bounce {
  0%, 100% { transform: scaleY(0.35); opacity: 0.85; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

.hero h1 {
  font-size: clamp(3rem, 13vw, 7rem);
  letter-spacing: -0.01em;
}
.hero h1 .bolt {
  color: var(--electric-lime);
}
.hero .tagline {
  margin-top: 20px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  letter-spacing: 0.28em;
  color: var(--smoke);
  text-transform: uppercase;
}
.hero .sub {
  max-width: 560px;
  margin: 26px auto 0;
  color: var(--smoke);
  font-size: 0.98rem;
}

/* CTA / status pill */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 38px;
  padding: 16px 26px;
  border: 2px solid var(--electric-lime);
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--electric-lime);
  background: rgba(204, 255, 0, 0.05);
}
.cta .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--electric-lime);
  box-shadow: 0 0 12px var(--electric-lime);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.cta small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--smoke);
  margin-top: 2px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
  padding: clamp(48px, 10vh, 96px) 0;
  border-top: 1px solid var(--hairline);
}
.section-head {
  margin-bottom: 40px;
}
.section-head .mono-label {
  display: block;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 6vw, 3rem);
}
.section-head p {
  margin-top: 14px;
  max-width: 560px;
  color: var(--smoke);
}

/* How it works — terminal steps */
.steps {
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--electric-lime);
  border-radius: 10px;
}
.step .num {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--electric-lime);
  font-size: 0.85rem;
  white-space: nowrap;
}
.step .body h3 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--electric-lime);
  text-transform: uppercase;
}
.step .body p {
  margin: 8px 0 0;
  color: var(--smoke);
  font-size: 0.92rem;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
.card.violet {
  border-color: rgba(127, 0, 255, 0.4);
}
.card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.card.violet h3 {
  color: var(--hyper-violet);
}
.card.lime h3 {
  color: var(--electric-lime);
}
.card p {
  margin: 0;
  color: var(--smoke);
  font-size: 0.92rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--hairline);
  padding: 40px var(--gutter);
  text-align: center;
}
footer .links a {
  color: var(--smoke);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 12px;
}
footer .links a:hover {
  color: var(--electric-lime);
  text-decoration: none;
}
footer .copy {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(242, 242, 247, 0.35);
}

/* ============================================================
   LEGAL (privacy) — brutalist chrome, readable body
   ============================================================ */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 80px) var(--gutter) 80px;
}
.legal .mono-label {
  display: block;
  margin-bottom: 14px;
}
.legal h1 {
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  margin-bottom: 10px;
}
.legal .updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--smoke);
  text-transform: uppercase;
}
.legal h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--electric-lime);
  text-transform: uppercase;
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.legal h2 .idx {
  color: var(--smoke);
  margin-right: 10px;
}
.legal p,
.legal li {
  color: rgba(242, 242, 247, 0.82);
  font-size: 0.98rem;
  line-height: 1.7;
}
.legal ul {
  padding-left: 20px;
}
.legal li {
  margin-bottom: 8px;
}
.legal strong {
  color: var(--off-white);
}
.legal .note {
  margin-top: 40px;
  padding: 18px 20px;
  background: rgba(127, 0, 255, 0.08);
  border: 1px solid rgba(127, 0, 255, 0.35);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--smoke);
}
.legal .back {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .eq span,
  .cta .dot {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
