/* ============================================================
   ForgeDev — Night Veld Sky
   ============================================================ */

:root {
  /* Sky ground */
  --sky-top: #0b0d24;
  --sky-mid: #0e1130;
  --sky-deep: #070818;

  /* Foreground */
  --bone: #f1ede2;
  --bone-dim: #cfcab8;
  --ink-tint: #a9aed4; /* indigo-tinted secondary text, never gray */

  /* Accent — sodium/bone guiding star */
  --star: #f4c778;
  --star-soft: rgba(244, 199, 120, 0.16);
  --star-line: rgba(244, 199, 120, 0.42);

  /* Type */
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--star-line) var(--sky-deep);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bone);
  background: var(--sky-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Browser surfaces belong to the design ---- */
::selection {
  background: var(--star);
  color: var(--sky-deep);
}

:focus-visible {
  outline: 2px solid var(--star);
  outline-offset: 3px;
  border-radius: 3px;
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--sky-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--star-line);
  border-radius: 6px;
  border: 3px solid var(--sky-deep);
}

a {
  color: var(--star);
  text-underline-offset: 3px;
}

input,
textarea,
select {
  caret-color: var(--star);
}

/* ---- Staged emergence (one authored reveal system) ---- */
.is-in-hidden {
  opacity: 0;
  transform: translateY(1.4rem);
}

.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.feature.is-in {
  animation: rise 0.8s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .is-in-hidden,
  .is-in,
  .feature.is-in {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* ---- The living sky ---- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4vw;
  background: linear-gradient(to bottom, rgba(7, 8, 24, 0.72), rgba(7, 8, 24, 0));
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  color: var(--bone);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--bone);
}

.nav__links .nav__cta {
  color: var(--star);
  border: 1px solid var(--star-line);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.nav__links .nav__cta:hover {
  color: var(--sky-deep);
  background: var(--star);
}

/* ---- Hero ---- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 4vw 5rem;
  position: relative;
}

.hero__inner {
  max-width: 46rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--bone-dim);
  max-width: 36rem;
  text-wrap: balance;
}

.hero__note {
  font-size: 0.9rem;
  color: var(--ink-tint);
  max-width: 30rem;
}

/* ---- CTA ---- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s ease;
}

.cta--primary {
  background: var(--star);
  color: var(--sky-deep);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}

.cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.6);
}

.cta--primary:active {
  transform: translateY(0);
}

.cta__star {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 10px 2px var(--star-soft);
  flex: none;
}

/* ---- Scroll cue ---- */
.hero__cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__cue span {
  display: block;
  width: 1.5px;
  height: 2.6rem;
  background: var(--star-line);
  border-radius: 1px;
  animation: cue 2.4s var(--ease-out) infinite;
}

@keyframes cue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ---- Shared section rhythm ---- */
main > section {
  position: relative;
  padding: 7rem 4vw;
  scroll-margin-top: 3rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lead {
  color: var(--bone-dim);
  max-width: 40rem;
  font-size: 1.05rem;
  text-wrap: balance;
}

/* ---- Features: one idea per card, hard asymmetry ---- */
.features__head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem 3rem;
  align-items: start;
  max-width: 76rem;
  margin: 0 auto 4rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.4rem;
  max-width: 76rem;
  margin: 0 auto;
  position: relative;
}

.feature {
  grid-column: span 6;
  background: linear-gradient(160deg, rgba(14, 17, 48, 0.82), rgba(11, 13, 36, 0.6));
  border: 1px solid rgba(169, 174, 212, 0.16);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.feature:nth-child(odd) {
  margin-right: 1.5rem;
}

.feature:nth-child(even) {
  margin-left: 4.5rem;
}

.feature:hover {
  border-color: var(--star-line);
}

.feature__mark {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.4rem;
}

.feature__mark * {
  fill: none;
  stroke: var(--star);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature__mark circle:first-child {
  fill: var(--star);
  stroke: none;
}

.feature__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.feature__text {
  color: var(--bone-dim);
  font-size: 0.97rem;
  max-width: 30rem;
}

/* ---- Neighborhood ---- */
.neighborhood__inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.neighborhood__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--star);
}

.neighborhood__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 2rem;
  margin-top: 1.2rem;
  max-width: 46rem;
}

.neighborhood__list li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--bone-dim);
}

.neighborhood__list span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--star);
  flex: none;
  align-self: center;
}

/* ---- Close ---- */
.close {
  text-align: center;
}

.close__inner {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.close__star {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 22px 6px var(--star-soft);
}

.close__note {
  color: var(--ink-tint);
  font-size: 0.9rem;
}

/* ---- Footer ---- */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 4vw;
  border-top: 1px solid rgba(169, 174, 212, 0.12);
  color: var(--ink-tint);
  font-size: 0.88rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bone);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero__cue span {
    animation: none;
    transform: scaleY(1);
  }
  .cta {
    transition: none;
  }
  .cta--primary:hover {
    transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav__links {
    gap: 1.1rem;
  }
  .nav__links a:not(.nav__cta) {
    display: none;
  }
  .features__head,
  .features__grid {
    grid-template-columns: 1fr;
  }
  .feature,
  .feature:nth-child(odd),
  .feature:nth-child(even) {
    grid-column: 1 / -1;
    margin-left: 0;
    margin-right: 0;
  }
  .features__head {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .feature {
    margin-bottom: 1.4rem;
  }
  .neighborhood__list {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
