/* ==========================================================================
   Superstrat site, deeptech dark system
   Black ground, cream type, magma accent (#FF7A59), mono microlabels,
   hairline dividers, bracket motifs, radial magma glows.
   ========================================================================== */

:root {
  --bg: #0B0A09;            /* near-black, warm */
  --bg-2: #121009;          /* raised black */
  --surface: #151210;       /* panel bodies */
  --cream: #F2E9DA;
  --cream-60: rgba(242, 233, 218, 0.6);
  --cream-35: rgba(242, 233, 218, 0.35);
  --cream-12: rgba(242, 233, 218, 0.12);
  --cream-08: rgba(242, 233, 218, 0.08);
  --magma: #EC5759;         /* solid magma, the single accent color */
  --magma-rgb: 236, 87, 89;
  --accent-mid: var(--magma);
  --accent-deep: #D9345E;
  --spark-grad: linear-gradient(135deg, #FF7A59, #D9345E); /* logo spark only */
  --paper: #FEFCF8;
  --font: 'Montserrat', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --nav-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--cream);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-deep); color: var(--paper); }

/* solid magma text, the brand accent */
.hero__kicker, .hero__title .accent,
.section__kicker, .section__title em,
.step__num, .cta h2 em {
  color: var(--magma);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; font-weight: 800; }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ======= Buttons: flat rectangular, mono labels ======= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn--magma {
  background: var(--magma);
  color: var(--paper);
}
.btn--magma:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(var(--magma-rgb), 0.35);
}
.btn--ghost {
  border: 1px solid var(--cream-35);
  color: var(--cream);
}
.btn--ghost:hover { border-color: var(--cream); transform: translateY(-2px); }
.btn--lg { padding: 1rem 2rem; font-size: 0.85rem; }
.btn__arrow { font-family: var(--font); font-weight: 400; transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ======= Nav: full-width utility bar ======= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: var(--nav-h);
  padding: 0 1.75rem;
  background: rgba(11, 10, 9, 0.75);
  border-bottom: 1px solid var(--cream-08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.4s;
}
.nav.scrolled { background: rgba(11, 10, 9, 0.92); }
.nav__logo { margin-right: auto; }
.nav__logo img { height: 24px; width: auto; }
.nav__links { display: flex; gap: 2rem; white-space: nowrap; }
.nav__links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-60);
  transition: color 0.3s;
}
.nav__links a::before { content: '[ '; color: var(--cream-35); }
.nav__links a::after { content: ' ]'; color: var(--cream-35); }
.nav__links a:hover { color: var(--accent-mid); }
.nav__cta { padding: 0.55rem 1.1rem; font-size: 0.72rem; white-space: nowrap; }
.nav__burger { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: rgba(11, 10, 9, 0.97);
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }

/* ======= Hero ======= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--bg);
}
/* faint dotted grid, HUD ground */
/* starfield behind everything in the hero */
#heroSky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 3D space station: right of the headline, floating just above the screens.
   Same z-index as the hero text but earlier in the DOM, so text stays on top. */
#station {
  position: absolute;
  z-index: 1; /* behind the screen strip (z-index 1, later in the DOM) and the hero text */
  top: calc(var(--nav-h) + 1.25rem);
  right: max(0.5rem, calc((100vw - 1240px) / 2 - 2.5rem));
  width: min(34.5vw, 483px); /* 15% larger than the first cut */
  aspect-ratio: 1 / 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
#station.is-ready { opacity: 1; }
.hero__inner {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: calc(var(--nav-h) + 4.5rem) 1.5rem 0;
  width: 100%;
  max-width: 1240px; /* same left edge as the sections below */
}
.hero__kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.hero__title .accent { font-weight: 800; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: block;
  transform: translateY(110%);
  animation: lineUp 1.1s var(--ease-out) forwards;
}
.hero__title .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.27s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.39s; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero__foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.3rem;
  padding: 0 1.5rem 3.5rem;
  width: 100%;
  max-width: 1240px;
}
.hero__sub {
  max-width: 460px;
  text-align: left;
  font-size: 0.92rem;
  color: var(--cream-60);
}

/* on wide screens the hero text sits a step left of the page edge, clear of the station */
@media (min-width: 961px) {
  .hero__inner, .hero__foot { left: -2.75rem; } /* both are position: relative; transform is owned by the parallax script */
}

/* ----- Diorama: one flat strip of screens, astronaut floating in front ----- */
.diorama {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  min-height: 380px;
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* fade the screens out at both edges, letting the stars show through */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.strip__track {
  display: flex;
  gap: 26px;
  width: max-content;
  align-items: center;
  animation: stripDrift 80s linear infinite;
}
@keyframes stripDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* edge fades into the black */
#astro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 206px;
  height: 240px;
}

/* ----- Panels (mock UI screens) ----- */
.panel {
  opacity: 0.9; /* 10% see-through so the station and stars read through the strip */
  flex: 0 0 auto;
  width: 230px;
  height: 250px;
  border-radius: 8px;
  background: linear-gradient(175deg, var(--surface), #0E0C0A);
  border: 1px solid var(--cream-12);
  padding: 12px;
  overflow: hidden;
  color: var(--cream);
  font-size: 9px;
  line-height: 1.5;
}
.panel--tall { height: 285px; }
.panel--wide { width: 310px; }
.panel__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-08);
}
.panel__bar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cream-35);
  font-style: normal;
}
.panel__bar i:first-child { background: var(--magma); }
.panel__title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-60);
  margin-left: 4px;
}
.panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 4px;
  background: var(--cream-08);
  margin-bottom: 6px;
  white-space: nowrap;
}
.panel__row b { font-weight: 600; }
.pill {
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cream-12);
  color: var(--cream-60);
}
.pill--ok { background: var(--magma); color: var(--paper); }
.pill--run {
  background: transparent;
  border: 1px solid var(--accent-mid);
  color: var(--accent-mid);
  animation: pillPulse 1.6s ease-in-out infinite;
}
@keyframes pillPulse { 50% { opacity: 0.45; } }
.panel__line {
  height: 5px;
  border-radius: 2px;
  background: var(--cream-12);
  margin-bottom: 7px;
}
.panel__line--dim { background: var(--cream-08); }
.panel__type::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 9px;
  margin-left: 2px;
  background: var(--magma);
  vertical-align: -2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.panel__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 90px;
  padding-top: 8px;
}
.panel__chart i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--cream-12);
  animation: barGrow 3.2s var(--ease-out) infinite alternate;
  transform-origin: bottom;
}
.panel__chart i:nth-child(2n) {
  background: var(--magma);
}
@keyframes barGrow {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1); }
}
.panel__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.panel__grid i {
  height: 22px;
  border-radius: 3px;
  background: var(--cream-08);
}
.panel__grid i.on {
  background: var(--magma);
}
.panel__check {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--magma);
  color: var(--paper);
  font-size: 7px;
  line-height: 10px;
  text-align: center;
  font-weight: 800;
}

/* ======= Statement ======= */
.statement {
  border-top: 1px solid var(--cream-08);
  position: relative;
  padding: 22vh 1.5rem;
  display: flex;
  justify-content: center;
  background: var(--bg);
}
.statement__text {
  max-width: 900px;
  font-size: clamp(1.6rem, 4vw, 2.9rem);
  line-height: 1.38;
  font-weight: 300;
}
.statement__text .w { color: var(--cream-12); transition: color 0.35s linear; }
.statement__text .w.lit { color: var(--cream); }
.statement__text .w.lit.hot { color: var(--magma); font-weight: 600; }

/* ======= Sections ======= */
.section { padding: 8.5rem 1.5rem; max-width: 1240px; margin: 0 auto; }
.section__head { margin-bottom: 4rem; }
.section__kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.section__title {
  font-size: clamp(1.9rem, 4.5vw, 3.3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 820px;
}
.section__title em { font-weight: 800; }

/* ======= Services ======= */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--cream-12);
  border: 1px solid var(--cream-12);
}
.card {
  position: relative;
  padding: 2.2rem 1.9rem 2.4rem;
  background: var(--bg);
  overflow: hidden;
  transition: background-color 0.4s;
}
.card:hover { background: var(--bg-2); }
.card__num {
  position: absolute;
  top: 1.3rem;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--cream-35);
}
.card__num::before { content: '[ '; }
.card__num::after { content: ' ]'; }
.card__spark {
  width: 22px;
  height: 22px;
  margin-bottom: 1.5rem;
  background: var(--spark-grad);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  transition: transform 0.6s var(--ease-out);
}
.card:hover .card__spark { transform: rotate(90deg) scale(1.15); }
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.7rem; }
.card p { font-size: 0.92rem; color: var(--cream-60); }

/* ======= Process ======= */
.process__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.step {
  border-top: 1px solid var(--cream-12);
  padding-top: 1.8rem;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--magma);
  transition: width 1.2s var(--ease-out) 0.3s;
}
.step.visible::before { width: 100%; }
.step__num {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 1.2rem;
}
.step h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.7rem; }
.step p { color: var(--cream-60); font-size: 0.95rem; }

/* ======= Why ======= */
.why__list { list-style: none; display: grid; gap: 0; }
.why__list li {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--cream-12);
  transition: padding-left 0.5s var(--ease-out);
}
.why__list li:first-child { border-top: 1px solid var(--cream-12); }
.why__list li:hover { padding-left: 1.2rem; }
.why__list h3 { font-size: 1.4rem; font-weight: 800; }
.why__list p { color: var(--cream-60); align-self: center; }

/* ======= CTA ======= */
.cta {
  position: relative;
  overflow: hidden;
  padding: 11rem 1.5rem;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--cream-08);
}
#ctaSky { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta__inner { position: relative; z-index: 2; }
.cta h2 {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cta p {
  margin: 1.6rem auto 2.6rem;
  max-width: 480px;
  color: var(--cream-60);
  font-size: 1.05rem;
}

/* ======= Footer ======= */
.footer {
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
  border-top: 1px solid var(--cream-08);
  background: var(--bg);
}
.footer__logo { height: 28px; width: auto; margin: 0 auto 1.2rem; }
.footer__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-35);
  margin-bottom: 2.2rem;
}
.footer__meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--cream-35);
}
.footer__meta a { color: var(--cream-60); transition: color 0.3s; }
.footer__meta a:hover { color: var(--accent-mid); }

/* ======= Reveal on scroll ======= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.services__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.services__grid .reveal:nth-child(4) { transition-delay: 0.08s; }
.services__grid .reveal:nth-child(5) { transition-delay: 0.16s; }
.services__grid .reveal:nth-child(6) { transition-delay: 0.24s; }
.process__steps .reveal:nth-child(2) { transition-delay: 0.15s; }
.process__steps .reveal:nth-child(3) { transition-delay: 0.3s; }

/* ======= Responsive ======= */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: 1fr; gap: 2.2rem; }
  .why__list li { grid-template-columns: 1fr; gap: 0.6rem; }
}
/* compact menu: three bracketed labels plus the button do not fit on tablets */
@media (max-width: 960px) {
  .nav { gap: 1rem; padding: 0 1.1rem; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 0.6rem;
    cursor: pointer;
  }
  .nav__burger span {
    width: 22px;
    height: 2px;
    background: var(--cream);
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
}
@media (max-width: 680px) {
  .services__grid { grid-template-columns: 1fr; }
  .section { padding: 6rem 1.25rem; }
  .diorama { min-height: 300px; }
  .strip { height: 230px; }
  .panel { width: 165px; height: 185px; font-size: 8px; }
  .panel--tall { height: 210px; }
  .panel--wide { width: 220px; }
  #astro { width: 147px; height: 172px; }
  /* station gets its own space above the hero text on phones */
  #station { width: 172px; top: calc(var(--nav-h) + 0.5rem); right: 0.75rem; }
  .hero__inner { padding-top: calc(var(--nav-h) + 11.75rem); }
}

/* ======= Reduced motion ======= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .line > span { transform: none; animation: none; }
}
