/* ============================================================
   ForgeDev — Deep Field
   An observatory instrument panel, not a sci-fi HUD: elegant
   star-chart serif + mission-control mono, deep violet space
   (not black), amber + teal telemetry accents, real continuous
   motion (radar sweep, orbiting satellites, live clock) instead
   of scroll-triggered fade-ins.
   ============================================================ */

:root {
  --void: #070818;
  --void-deep: #050614;
  --nebula: #151a4a;
  --nebula-2: #0e1236;
  --paper: #e2e8f0;
  --dim: #8f97b8;
  --dim-2: #565d80;
  --signal: #f4c778;
  --signal-soft: rgba(244, 199, 120, 0.16);
  --telemetry: #34d399;
  --telemetry-soft: rgba(52, 211, 153, 0.16);
  --line: rgba(226, 232, 240, 0.14);
  --line-strong: rgba(226, 232, 240, 0.3);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--paper);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--signal);
  color: var(--void-deep);
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--void-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 5px;
}

a {
  color: var(--signal);
}

/* ---- Ambient background: fixed nebula wash + starfield canvas ---- */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(60rem 40rem at 15% 8%, var(--nebula) 0%, transparent 60%),
    radial-gradient(50rem 36rem at 88% 82%, var(--nebula-2) 0%, transparent 62%), var(--void);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- Rocket: travels bottom-left -> top-right as the page scrolls ---- */
.rocket {
  position: fixed;
  top: 0;
  left: 0;
  width: 190px;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  opacity: 0.18;
  transform: translate3d(-10vw, 95vh, 0) rotate(-25deg);
  filter: drop-shadow(0 0 16px rgba(34, 240, 216, 0.12));
}

.rocket img {
  width: 100%;
  height: auto;
  display: block;
}

/* Everything real sits in its own stacking context above the background layers */
.page {
  position: relative;
  z-index: 1;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 4vw;
  background: linear-gradient(to bottom, rgba(10, 14, 31, 0.82), transparent);
  backdrop-filter: blur(2px);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--paper);
  text-decoration: none;
}

.nav__brand-logo {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  flex: none;
}

.nav__brand-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
  flex: none;
  animation: blink 2.6s ease-in-out infinite;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.nav__links a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav__links a:hover {
  color: var(--paper);
}

.nav__cta {
  color: var(--signal) !important;
  border: 1px solid var(--signal-soft);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.nav__cta:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--void-deep) !important;
}

/* ---- Hero: off-center, telemetry panel ---- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 7rem 4vw 4rem;
  max-width: 82rem;
  margin: 0 auto;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--telemetry);
  margin-bottom: 1.2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lead {
  margin-top: 1.3rem;
  color: var(--dim);
  font-size: 1.12rem;
  max-width: 34rem;
  text-wrap: balance;
}

.hero__actions {
  margin-top: 2.1rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: var(--signal);
  color: var(--void-deep);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px rgba(242, 161, 84, 0.45);
}
.cta:active {
  transform: translateY(0);
}

.hero__note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dim-2);
}

/* Telemetry readout panel */
.readout {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem 1.5rem;
  background: rgba(234, 230, 242, 0.03);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--dim);
  justify-self: end;
  width: 100%;
  max-width: 19rem;
}

.readout__row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.readout__row:first-child {
  border-top: none;
}

.readout__row span:last-child {
  color: var(--paper);
}

.readout__status {
  color: var(--telemetry);
}

/* ---- Shared section rhythm ---- */
main > section {
  max-width: 82rem;
  margin: 0 auto;
  padding: 6.5rem 4vw;
  position: relative;
}

.section-head {
  max-width: 34rem;
  margin-bottom: 3.6rem;
}

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

.section-lead {
  margin-top: 0.8rem;
  color: var(--dim);
  font-size: 1.05rem;
  text-wrap: balance;
}

/* ---- Services: radar orbit, not a card grid ---- */
.orbit-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.radar {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 26rem;
  justify-self: center;
}

.radar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.radar__ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar__sweep {
  fill: none;
  stroke: var(--telemetry);
  stroke-width: 1.4;
  stroke-dasharray: 3 10;
  animation: sweep 14s linear infinite;
  transform-box: view-box;
  transform-origin: 150px 150px;
}

.radar__arm {
  stroke: var(--signal);
  stroke-width: 1.5;
  transform-box: view-box;
  transform-origin: 150px 150px;
  animation: rotate 9s linear infinite;
  opacity: 0.85;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes sweep {
  to {
    stroke-dashoffset: -260;
  }
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.nodes {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.6rem);
  min-width: 0;
}

.nodes .node {
  position: static;
  transform: none;
  width: 100%;
  max-width: 32rem;
  margin: 0;
  text-align: left;
  align-items: flex-start;
}

.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 10.5rem;
  transform: translate(-50%, -50%);
}

.node__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-soft);
  margin-bottom: 0.4rem;
}

.node--1 {
  top: 8%;
  left: 50%;
  text-align: center;
  align-items: center;
}
.node--2 {
  top: 62%;
  left: 92%;
  text-align: left;
  align-items: flex-start;
}
.node--3 {
  top: 62%;
  left: 8%;
  text-align: right;
  align-items: flex-end;
}

.node__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--telemetry);
}

.node__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.1rem);
  font-weight: 500;
}

.node__text {
  color: var(--dim);
  font-size: clamp(0.82rem, 0.78rem + 0.3vw, 0.88rem);
}

/* ---- Flagship: core + orbiting satellites ---- */
.flagship {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.core-wrap {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 24rem;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.core {
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--nebula),
    var(--nebula-2),
    var(--signal-soft),
    var(--nebula)
  );
  box-shadow: 0 0 5rem 1rem rgba(79, 179, 172, 0.18), inset 0 0 3rem rgba(0, 0, 0, 0.35);
  animation: spin 40s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orbit-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.satellite-dot {
  fill: var(--telemetry);
}
.satellite-dot--b {
  fill: var(--signal);
}

.flagship__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
  margin-top: 2rem;
}

.flagship__list li:nth-child(2) {
  margin-top: 1.6rem;
}
.flagship__list li:nth-child(3) {
  margin-top: -0.8rem;
}

.flagship__list li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}

.flagship__list li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--telemetry);
  flex: none;
  transform: translateY(-2px);
}

.flagship__list span {
  color: var(--dim);
  font-size: 0.95rem;
}

/* ---- Client work ---- */
#clients {
  border-top: 1px solid var(--line);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(234, 230, 242, 0.03);
  display: flex;
  flex-direction: column;
}

.work-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--void-deep);
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}

.work-card:hover .work-card__media img {
  transform: scale(1.02);
}

.work-card__media--portrait img {
  object-position: center 42%;
}

.work-card__body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.work-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--telemetry);
}

.work-card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.work-card__url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.work-card__url a {
  color: var(--signal);
  text-decoration: none;
}

.work-card__url a:hover {
  text-decoration: underline;
}

.work-card__text {
  color: var(--dim);
  font-size: 0.95rem;
}

.work-card__list {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.work-card__list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  color: var(--dim);
  font-size: 0.88rem;
}

.work-card__list li::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--telemetry);
  flex: none;
  transform: translateY(-2px);
}

.work-card__link {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--paper);
  text-decoration: none;
}

.work-card__link:hover {
  color: var(--signal);
}

.work-card__note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--dim-2);
  margin-top: 0.4rem;
}

/* ---- Contact: transmission channels ---- */
.channels {
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
}

.channel {
  position: relative;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  overflow: hidden;
}
.channels .channel:last-child {
  border-bottom: 1px solid var(--line);
}

.channel__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.35rem;
  top: auto;
  width: 100%;
  height: 2.2rem;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.channel__wave path {
  fill: none;
  stroke: var(--telemetry);
  stroke-width: 1;
  stroke-dasharray: 6 5;
  animation: sweep 6s linear infinite;
}

.channel__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

.channel__icons {
  display: flex;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}
.channel__icons a {
  color: var(--paper);
  display: inline-flex;
  transition: color 0.2s ease;
}
.channel__icons a:hover {
  color: var(--signal);
}

/* ---- Footer ---- */
.footer {
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 2.6rem 4vw 3.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--dim-2);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .nav__brand-dot,
  .radar__sweep,
  .radar__arm,
  .core,
  .satellite,
  .channel__wave path {
    animation: none !important;
  }
  .rocket {
    transform: translate3d(45vw, 45vh, 0) rotate(-25deg) !important;
  }
  .cta:hover {
    transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 6.5rem;
  }
  .readout {
    justify-self: start;
    max-width: 100%;
  }
  .orbit-wrap,
  .flagship__grid,
  .work-grid {
    grid-template-columns: 1fr;
  }
  .radar,
  .core-wrap {
    max-width: 20rem;
    margin-bottom: 1rem;
  }
  .node {
    position: static;
    width: 100%;
    transform: none;
    text-align: left !important;
    align-items: flex-start !important;
    margin-bottom: 1.6rem;
  }
  .flagship__list {
    grid-template-columns: 1fr;
  }
  .flagship__list li:nth-child(2),
  .flagship__list li:nth-child(3) {
    margin-top: 0;
  }
  .nav__links {
    gap: 1rem;
  }
  .nav__links a:not(.nav__cta) {
    display: none;
  }
}
