:root {
  --home-black: #050505;
  --home-panel: rgba(8, 8, 8, .92);
  --home-line: rgba(255, 255, 255, .08);
  --home-text: rgba(255, 255, 255, .86);
  --home-muted: rgba(255, 255, 255, .48);
  --home-dim: rgba(255, 255, 255, .34);
  --home-orange: #f97316;
  --home-gold: #c88728;
  --home-ui: var(--font-primary, 'Inter', sans-serif);
  --home-serif: var(--font-heading, 'Playfair Display', serif);
  --home-mono: 'DM Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--home-black);
  color: var(--home-text);
  font-family: var(--home-ui);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .70), transparent 62%);
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--home-line);
  background: rgba(8, 8, 8, .92);
  backdrop-filter: blur(14px);
}

.brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand span {
  color: var(--home-orange);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: #fff;
}

.nav-action,
.btn-main,
.btn-secondary,
.resource-row button,
.plan button,
.plan a {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-action,
.btn-main,
.plan.pro button,
.plan.pro a {
  background: var(--gradient-1, linear-gradient(135deg, #f97316 0%, #ea580c 100%));
  color: #fff;
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.btn-main,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
}

.btn-secondary,
.resource-row button,
.plan button,
.plan a {
  border: 1px solid var(--home-line);
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .72);
}

.btn-secondary:hover,
.resource-row button:hover,
.plan button:hover,
.plan a:hover {
  border-color: rgba(249, 115, 22, .35);
  color: #fff;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 5rem;
  overflow: hidden;
}

#waveCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .8;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, transparent 0%, rgba(5, 5, 5, .28) 38%, rgba(5, 5, 5, .88) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  text-align: center;
}

.eyebrow,
.section-kicker,
.panel-kicker,
.app-id,
.app-status,
.resource-row span,
.plan span {
  color: var(--home-orange);
  font-family: var(--home-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 1rem auto 0;
  max-width: 980px;
  color: #fff;
  font-family: var(--home-serif);
  font-size: clamp(3.5rem, 8.5vw, 7.4rem);
  font-weight: 700;
  line-height: .98;
}

.hero h1 span {
  color: var(--home-orange);
}

.hero-copy {
  max-width: 680px;
  margin: 1.5rem auto 0;
  color: var(--home-muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

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

.metric-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-top: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
  background: var(--home-line);
}

.metric {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--home-panel);
}

.metric strong {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.metric span {
  margin-top: .35rem;
  color: var(--home-dim);
  font-family: var(--home-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-head {
  max-width: 760px;
  margin-bottom: 2.2rem;
}

.section h2,
.split-section h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
}

.split-section h2 span {
  color: var(--home-orange);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  position: relative;
  min-height: 255px;
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  border: 1px solid var(--home-line);
  border-radius: 18px;
  background: var(--home-panel);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.app-card:hover {
  border-color: rgba(249, 115, 22, .34);
  transform: translateY(-2px);
}

.app-card.live {
  background: rgba(8, 8, 8, .96);
}

.app-card.muted {
  opacity: .72;
}

.app-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--home-gold);
}

.app-id {
  color: var(--home-dim);
}

.app-card h3 {
  margin-top: 2.2rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.app-card p {
  margin-top: .7rem;
  color: var(--home-muted);
  font-size: .88rem;
  line-height: 1.65;
}

.app-link {
  margin-top: auto;
  color: var(--home-orange);
  font-family: var(--home-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr);
  gap: 1.2rem;
  align-items: stretch;
}

.split-section p {
  max-width: 720px;
  color: var(--home-muted);
  line-height: 1.75;
}

.book-panel,
.plan,
.resource-row {
  border: 1px solid var(--home-line);
  border-radius: 18px;
  background: var(--home-panel);
}

.book-panel {
  padding: 1.5rem;
}

.book-panel h3 {
  margin-top: .8rem;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.chapter-list {
  display: grid;
  gap: .55rem;
  margin-top: 1.2rem;
}

.chapter-list span {
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: .72rem;
}

.resource-list {
  display: grid;
  gap: 1rem;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem;
}

.resource-row h3 {
  margin: .5rem 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.resource-row p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.65;
}

.resource-row button {
  flex: 0 0 auto;
  padding: 0 1rem;
}

.pricing-section {
  max-width: 980px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.plan {
  padding: 1.4rem;
}

.plan strong {
  display: block;
  margin-top: .7rem;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
}

.plan small {
  color: var(--home-muted);
  font-size: .92rem;
}

.plan p {
  margin: 1rem 0 1.3rem;
  color: var(--home-muted);
}

.plan button,
.plan a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 2.2rem 1.5rem;
  border-top: 1px solid var(--home-line);
  color: var(--home-muted);
}

.site-footer p {
  margin: .4rem 0 0;
}

.site-footer div:nth-child(2) {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: var(--home-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-footer small {
  grid-column: 1 / -1;
  color: var(--home-dim);
  font-family: var(--home-mono);
  font-size: .65rem;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .pricing-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .metric-band {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .site-nav {
    padding: 0 .9rem;
  }

  .hero {
    min-height: 86vh;
    padding-inline: 1rem;
  }

  .apps-grid,
  .metric-band {
    grid-template-columns: 1fr;
  }

  .resource-row {
    align-items: stretch;
    flex-direction: column;
  }
}
