:root {
  --bg: #363e32;
  --ink: #dfe4dd;
  --muted: #b5c0b0;
  --dim: #6c7d64;
  --stroke: rgba(108, 125, 100, 0.37);
  --font: 'Alpino', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: 57px;
}

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

html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: inherit; }

/* ---------- Hero shell ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ---------- Nav ---------- */

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 41.5px var(--pad) 0;
}
.nav__logo img { display: block; width: 145.676px; height: 34.003px; }

.nav__links {
  position: absolute;
  left: 50%;
  top: 59px;
  transform: translateX(-50%);
  display: flex;
  gap: 36px;
  white-space: nowrap;
}
.nav__links a {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 15px;
  line-height: normal;
  color: var(--ink);
  transition: opacity .2s ease;
}
.nav__links a:hover { opacity: .7; }
.nav__links sup {
  font: 400 9px/normal var(--mono);
  letter-spacing: .18px;
  color: var(--dim);
  vertical-align: baseline;
}

.nav__dock {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  border: .5px solid var(--dim);
  border-radius: 15px;
  background: var(--bg);
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  line-height: normal;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.btn--ghost { color: rgba(255, 255, 255, .7); border-radius: 999px; }
.btn--ghost:hover { color: #fff; }
.btn--solid {
  min-width: 96px;
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
}
.btn--solid:hover { background: #fff; }

/* ---------- Copy + input ---------- */

.hero__copy {
  position: absolute;
  left: var(--pad);
  bottom: 90px;
  z-index: 1;
  pointer-events: none;
}
.hero__copy h1 {
  width: 499px;
  font-weight: 300;
  font-size: 52px;
  line-height: .96;
  letter-spacing: -2.08px;
  color: var(--ink);
}
.hero__copy p {
  margin-top: 26px;
  font-size: 17px;
  line-height: normal;
  color: var(--muted);
}

.ask {
  position: absolute;
  right: var(--pad);
  bottom: 40px;
  z-index: 6;
  width: 237px;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 7.791px 7.791px 7.791px 15.583px;
  border-radius: 10px;
  background: var(--ink);
  transition: box-shadow .25s ease;
}
.ask:focus-within { box-shadow: 0 0 0 4px rgba(223, 228, 221, .14); }
.ask input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font: 400 13.635px/normal 'Jost', var(--font);
  color: var(--bg);
}
.ask input::placeholder { color: var(--dim); }

/* ---------- OS console readout ---------- */

.console {
  position: absolute;
  left: 50%;
  bottom: 62px;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 9.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.console__key { color: var(--dim); }
.console__sep { color: rgba(108, 125, 100, .5); }
.console__val { color: var(--muted); }
.console__caret {
  width: 5px;
  height: 9px;
  margin-left: -3px;
  background: var(--muted);
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Constellation ---------- */

.constellation {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Core node — Humm.OS */
.os {
  --a: 0;      /* activation */
  --hv: 0;     /* hover */
  --kick: 0;   /* flash when a pulse leaves/arrives */
  position: absolute;
  left: 0;
  top: 0;
  width: 130px;
  height: 130px;
  margin: -65px 0 0 -65px;
  z-index: 3;
  opacity: 0;
  transition: opacity 1s ease;
  will-change: transform;
  outline: none;
}
.os.is-in { opacity: 1; }

.os__box {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: var(--bg);
  border: 1px solid rgba(108, 125, 100, calc(.37 + .3 * var(--hv)));
  box-shadow:
    -11px -11px 71px 0 rgba(223, 228, 221, .09),
    127px 122px 49px 0 rgba(0, 0, 0, 0),
    81px 78px 45px 0 rgba(0, 0, 0, .01),
    46px 44px 38px 0 rgba(0, 0, 0, .04),
    20px 20px 28px 0 rgba(0, 0, 0, .08),
    5px 5px 16px 0 rgba(0, 0, 0, .09),
    0 0 90px 0 rgba(223, 228, 221, calc(.075 * var(--a)));
}

.os__label {
  position: absolute;
  left: 103px;
  top: 17px;
  transform: translateX(-50%);
  font-weight: 300;
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
}

.os__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  gap: 4.4px;
  transform: translate(-50%, -50%);
  filter:
    saturate(calc(1 - .55 * var(--a)))
    brightness(calc(1 + .75 * var(--a)))
    drop-shadow(0 0 calc(9px * var(--a)) rgba(223, 228, 221, calc(.2 * var(--a))));
}
.os__half {
  display: block;
  width: 22.9085px;
  height: 66.5828px;
  transform-origin: 50% 50%;
}
.os__half--l { translate: calc(-2.5px * var(--a)) 0; }
.os__half--r { translate: calc(2.5px * var(--a)) 0; transform: scaleX(-1); }
.os.is-live .os__half { animation: hum 2.4s ease-in-out infinite; }
.os.is-live .os__half--r { animation-delay: -.6s; }
@keyframes hum {
  0%, 100% { scale: 1 1; }
  50% { scale: 1 1.04; }
}

.os__line {
  position: absolute;
  left: 21px;
  top: 127.4px;
  width: 68.8688px;
  height: 1.60469px;
  transform: scaleY(-1);
  opacity: calc(.75 + .25 * var(--kick));
}
.os.is-live .os__line { animation: scan 2.6s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes scan {
  0% { translate: -12px 0; opacity: 0; }
  25%, 75% { opacity: 1; }
  100% { translate: 40px 0; opacity: 0; }
}
.os:focus-visible .os__box { outline: 1px solid var(--muted); outline-offset: 5px; }

/* Service nodes */
.node {
  --p: 0;    /* presence: ghost → fully raised */
  --c: 0;    /* content visibility */
  --h: 0;    /* hover */
  --led: 0;  /* status light */
  position: absolute;
  left: 0;
  top: 0;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  z-index: 2;
  will-change: transform;
  outline: none;
}
.node.is-active { z-index: 4; }

.node__box {
  position: absolute;
  inset: 0;
  border-radius: 23px;
  background: rgba(54, 62, 50, calc(.3 + .7 * var(--p)));
  border: 1px solid rgba(108, 125, 100, calc(.13 + .24 * var(--p) + .3 * var(--h)));
  box-shadow:
    -11px -11px 71px 0 rgba(223, 228, 221, calc(.09 * var(--p))),
    81px 78px 45px 0 rgba(0, 0, 0, calc(.01 * var(--p))),
    46px 44px 38px 0 rgba(0, 0, 0, calc(.04 * var(--p))),
    20px 20px 28px 0 rgba(0, 0, 0, calc(.08 * var(--p))),
    5px 5px 16px 0 rgba(0, 0, 0, calc(.09 * var(--p))),
    0 0 46px 0 rgba(223, 228, 221, calc(.07 * var(--h)));
  transform: scale(calc(.9 + .1 * var(--p)));
}

.node__idx {
  position: absolute;
  left: 10px;
  top: 10px;
  font: 400 8px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--dim);
  opacity: var(--c);
}

.node__led {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(108, 125, 100, calc(.25 + .6 * var(--c)));
}
.node__led::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--ink);
  opacity: var(--led);
  box-shadow: 0 0 8px rgba(223, 228, 221, .9);
}

.node__icon {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: calc(var(--c) * .92);
  transform: translateY(calc((1 - var(--c)) * 4px));
}

.node__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--ink);
  opacity: var(--c);
}

.node:focus-visible .node__box { outline: 1px solid var(--muted); outline-offset: 4px; }

/* Capability card shown on hover */
.node__card {
  position: absolute;
  top: 50%;
  left: calc(100% + 16px);
  width: 204px;
  display: block;
  padding: 14px 16px 13px;
  border-radius: 16px;
  text-align: left;
  background: rgba(58, 67, 54, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--stroke);
  box-shadow:
    -11px -11px 71px 0 rgba(223, 228, 221, .05),
    46px 44px 38px 0 rgba(0, 0, 0, .04),
    20px 20px 28px 0 rgba(0, 0, 0, .08),
    5px 5px 16px 0 rgba(0, 0, 0, .09);
  opacity: 0;
  transform: translate(-8px, -50%);
  transition: opacity .22s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.node--left .node__card {
  left: auto;
  right: calc(100% + 16px);
  transform: translate(8px, -50%);
}
.node.is-active .node__card { opacity: 1; transform: translate(0, -50%); }

.no-cards .node__card { display: none; }

/* Inner nodes sit between two outer ones — open their card downwards */
.node--below .node__card,
.node--below.node--left .node__card {
  top: calc(100% + 14px);
  left: 50%;
  right: auto;
  transform: translate(-50%, -8px);
}
.node--below.is-active .node__card { transform: translate(-50%, 0); }

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card__title { font-size: 16px; line-height: 1.1; color: var(--ink); }
.card__idx { font: 400 9px/1 var(--mono); letter-spacing: .18px; color: var(--dim); }

.card__caps { display: block; }
.card__cap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: .5px solid rgba(108, 125, 100, .4);
  font-size: 13px;
  line-height: 1.1;
  color: var(--muted);
  opacity: 0;
  translate: 0 4px;
  transition: opacity .25s ease, translate .4s cubic-bezier(.2, .8, .2, 1);
}
.card__cap::before {
  content: '';
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--dim);
}
.node.is-active .card__cap {
  opacity: 1;
  translate: 0 0;
  transition-delay: calc(.06s + var(--i) * .05s);
}

.card__foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: .5px solid rgba(108, 125, 100, .4);
  font: 400 8.5px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.card__live {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 6px rgba(223, 228, 221, .8);
  animation: live 1.4s ease-in-out infinite;
}
@keyframes live { 50% { opacity: .35; } }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav__links { display: none; }
}

@media (max-width: 759px) {
  :root { --pad: 20px; }
  .nav { padding-top: 20px; }
  .nav__logo img { width: 110px; height: auto; }
  .btn--ghost { display: none; }
  .nav__dock { padding: 5px; border-radius: 13px; }
  .hero__copy { right: var(--pad); bottom: 120px; }
  .hero__copy h1 { width: auto; font-size: clamp(32px, 9.4vw, 44px); letter-spacing: -1.4px; }
  .hero__copy p { margin-top: 14px; font-size: 15px; }
  .ask { left: var(--pad); right: var(--pad); bottom: 28px; width: auto; height: 50px; }
  .console { display: none; }

  .node__card,
  .node--left .node__card {
    top: calc(100% + 10px);
    left: 50%;
    right: auto;
    width: 172px;
    transform: translate(-50%, -6px);
  }
  .node--left .node__card { left: 0; transform: translate(0, -6px); }
  .node--right .node__card { left: auto; right: 0; transform: translate(0, -6px); }
  .node.is-active .node__card { transform: translate(-50%, 0); }
  .node--left.is-active .node__card,
  .node--right.is-active .node__card { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .os.is-live .os__half,
  .os.is-live .os__line,
  .console__caret,
  .card__live { animation: none; }
}
