/* Hub and Redial page: hero with the gate, status consoles, project cards, steps. */

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::after { /* horizon glow on the floor */
  content: ""; position: absolute; left: 50%; bottom: -260px; width: 1100px; height: 420px; transform: translateX(-10%);
  background: radial-gradient(closest-side, rgba(29, 99, 255, 0.22), transparent 70%); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: center; padding-block: 56px 64px; }
.hero-copy { display: grid; gap: 22px; max-width: 560px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 0.98; font-weight: 700; text-transform: uppercase; letter-spacing: 0.005em; }
.hero h1 .glow { color: var(--horizon); text-shadow: 0 0 28px rgba(86, 200, 255, 0.55); }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 52ch; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.gate-stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: end; }
.gate-stage canvas { position: absolute; inset: -6%; width: 112%; height: 112%; display: block; }
/* the glow of the open wormhole behind the gate (set from the render loop) */
.gate-stage::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(61,140,255,.55) 0, rgba(61,140,255,.18) 45%, transparent 70%);
  opacity: var(--glow, 0); filter: blur(18px); }
.gate-fallback { position: absolute; inset: 8%; border-radius: 50%; display: none;
  background: radial-gradient(circle, rgba(86,200,255,.55) 0 52%, transparent 53%), radial-gradient(circle, #2b3346 0 62%, #151b28 63% 70%, transparent 71%);
  box-shadow: 0 0 80px rgba(86, 200, 255, 0.35); }
.no-webgl .gate-fallback { display: block; }
.no-webgl canvas, .no-webgl #redial-btn { visibility: hidden; }
.gate-noscript { position: absolute; left: 0; right: 0; bottom: 4%; z-index: 3; margin: 0 auto; width: min(320px, 80%); text-align: center;
  font: 500 12px/1.5 var(--f-mono); color: var(--muted); background: rgba(6, 10, 20, 0.72); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.dial-log {
  position: absolute; left: 0; bottom: 4%; z-index: 3; width: min(280px, 60%);
  font-family: var(--f-mono); font-size: 11.5px; line-height: 1.55; color: var(--muted);
  background: rgba(6, 10, 20, 0.82); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.dial-log .head { display: flex; justify-content: space-between; gap: 8px; color: var(--text); margin-bottom: 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.dial-log ol { list-style: none; margin: 0; padding: 0; min-height: 7.75em; }
.dial-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dial-log li.lock { color: var(--chevron); }
.dial-log li.open { color: var(--horizon); }
.dial-log button { font: 600 11px/1 var(--f-mono); color: var(--horizon); background: none; border: 0; padding: 2px 0; cursor: pointer; letter-spacing: .06em; text-transform: uppercase; }
.chev-dots { display: flex; gap: 5px; margin-top: 8px; }
.chev-dots i { width: 14px; height: 6px; border-radius: 2px; background: rgba(255,255,255,.08); transition: background .3s, box-shadow .3s; }
.chev-dots i.on { background: var(--chevron); box-shadow: 0 0 10px rgba(255,138,43,.8); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 13px; font-family: var(--f-mono); }
.hero-meta b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------ sections */
section.block { padding-block: 72px; }
section.block.flush { padding-top: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); text-transform: uppercase; }
.sec-head p { color: var(--muted); max-width: 56ch; }

/* server cards: one per mode; "prep" until the servers run */
.servers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.srv {
  position: relative; display: grid; gap: 14px; padding: 18px; border-radius: var(--r);
  background: linear-gradient(180deg, var(--hull-2), var(--hull)); border: 1px solid var(--line); overflow: hidden; min-width: 0;
}
.srv::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--state, var(--dim)); opacity: .9; box-shadow: 0 0 18px var(--state, transparent); }
.srv[data-state="online"] { --state: var(--ok); }
.srv[data-state="prep"] { --state: var(--idle); }
.srv[data-state="offline"] { --state: var(--off); }
.srv-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; color: var(--text); background: rgba(255,255,255,.06); padding: 6px 8px; border-radius: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font: 600 12px/1 var(--f-body); color: var(--state); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--state); box-shadow: 0 0 10px var(--state); }
.srv[data-state="online"] .pill::before { animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.srv h3 { font-size: 20px; }
.srv .map { color: var(--muted); font-size: 14px; margin-top: 2px; }
.addr { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 12.5px/1.4 var(--f-mono); color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }

/* projects */
.projects { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.proj {
  position: relative; border-radius: 20px; border: 1px solid var(--line); background: var(--hull); overflow: hidden; min-width: 0;
  display: grid; align-content: end; gap: 14px; padding: 28px; min-height: 360px; isolation: isolate;
}
.proj.feature { background:
  radial-gradient(120% 90% at 85% 10%, rgba(29, 99, 255, .35), transparent 55%),
  radial-gradient(60% 50% at 10% 100%, rgba(255, 138, 43, .14), transparent 70%),
  linear-gradient(180deg, var(--hull-2), var(--hull)); transition: border-color .3s, transform .3s; }
.proj.feature:hover, .proj.feature:focus-within { border-color: rgba(86, 200, 255, .5); transform: translateY(-2px); }
.proj .ring-art { position: absolute; right: -90px; top: -90px; width: 360px; height: 360px; z-index: -1; opacity: .9; }
.proj h3 { font-size: clamp(26px, 3vw, 36px); text-transform: uppercase; line-height: 1.05; }
.proj p { color: var(--muted); max-width: 52ch; }
/* the whole card is the link's hit area; the link itself sits in the heading */
.proj .stretch { color: inherit; }
.proj .stretch:hover { text-decoration: none; }
.proj .stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.proj .stretch:focus-visible { outline: none; }
.proj .stretch:focus-visible::after { outline: 2px solid var(--horizon); outline-offset: -2px; }
.proj .btn.self-start { justify-self: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 12px/1 var(--f-mono); color: var(--text); border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 999px; background: rgba(6, 10, 20, 0.55); }
.chip.live { color: var(--ok); border-color: rgba(61, 220, 151, .45); }
.chip.prep { color: var(--idle); border-color: rgba(245, 196, 81, .45); }
.proj.next { border-style: dashed; background: transparent; align-content: center; justify-items: start; }
.proj.next h3 { font-size: 24px; }
.proj.next .plus { width: 56px; height: 56px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); font: 300 30px/1 var(--f-display); }

/* community band */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(29,99,255,.08), rgba(255,138,43,.06)); }
.band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 40px; }
.band-copy { display: grid; gap: 6px; min-width: 0; }
.band h2 { font-size: clamp(24px, 3vw, 32px); text-transform: uppercase; }
.band p { color: var(--muted); max-width: 62ch; }

/* ------------------------------------------------------------------ redial page */
.r-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(80% 120% at 100% 0%, rgba(29, 99, 255, .28), transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(255, 138, 43, .10), transparent 70%); }
.r-hero .wrap { padding-block: 48px 52px; display: grid; gap: 22px; }
.r-hero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1; text-transform: uppercase; }
.r-hero h1 small { display: block; font-size: .42em; color: var(--horizon); letter-spacing: .12em; margin-bottom: 10px; }
.r-hero p { color: var(--muted); max-width: 64ch; font-size: 17px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fact { background: var(--hull); padding: 16px 18px; display: grid; gap: 4px; }
.fact b { font: 600 26px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 13px; }

.panel { background: var(--hull); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel h3 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.panel.empty { border-style: dashed; display: grid; gap: 10px; justify-items: start; padding: 28px; }
.panel.empty h3 { margin: 0; color: var(--idle); }
.panel.empty p { color: var(--muted); max-width: 64ch; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step::before { counter-increment: s; content: "CHEVRON " counter(s); font: 600 11px/1 var(--f-mono); letter-spacing: .16em; color: var(--chevron); }
.step h3 { font-size: 20px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step code { font-family: var(--f-mono); font-size: 13px; color: var(--text); background: rgba(255,255,255,.05); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .servers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 32px 48px; }
  .gate-stage { justify-self: center; max-width: 460px; order: -1; }
  .projects, .steps { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .servers { grid-template-columns: minmax(0, 1fr); }
  .dial-log { width: 76%; font-size: 10.5px; }
  .proj { padding: 22px; min-height: 300px; }
  .proj .ring-art { width: 240px; height: 240px; right: -80px; top: -80px; opacity: .55; }
}
