:root {
  --night: #070a12;
  --deep: #0d1220;
  --frost: #e8eef6;
  --haze: #8a94a7;
  --dim: #5b6478;
  --mint: #8be0d8;
  --signal: #4a86ff;
  --line: rgba(232, 238, 246, 0.08);
  --line-2: rgba(232, 238, 246, 0.16);
  --brand: linear-gradient(100deg, #f2f4f8 0%, #8be0d8 48%, #4a86ff 100%);
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Golos Text", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 44px);
}

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

html { scroll-behavior: smooth; background: var(--night); }

body {
  margin: 0;
  color: var(--frost);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  background: var(--night);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: rgba(139, 224, 216, 0.3); }

/* ---------- sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 78% 38%, rgba(74, 134, 255, 0.13), transparent 62%),
    radial-gradient(48vmax 48vmax at 70% 46%, rgba(139, 224, 216, 0.08), transparent 60%),
    radial-gradient(70vmax 50vmax at 0% 100%, rgba(74, 134, 255, 0.06), transparent 60%),
    var(--night);
}

/* ---------- header ---------- */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.top.is-scrolled {
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}

.top-bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.mark img { width: 34px; height: 34px; transition: transform 0.6s var(--ease-out); }
.mark:hover img { transform: rotate(-90deg); }

.nav { display: flex; gap: 6px; }

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--haze);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover { color: var(--frost); background: rgba(232, 238, 246, 0.06); }

/* ---------- hero ---------- */

main { position: relative; }

.hero {
  min-height: 100svh;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 110px var(--gutter) 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.05vw, 3.4rem);
  line-height: 1.06;
  white-space: nowrap;
  letter-spacing: -0.045em;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line > span { display: block; }

.hero-sub {
  margin: 22px 0 0;
  max-width: 30rem;
  color: var(--haze);
  font-size: 1.06rem;
}

/* preview of the chosen service */

.preview {
  position: relative;
  margin-top: clamp(24px, 4.5vh, 48px);
  padding-top: 22px;
  max-width: 32rem;
  min-height: 236px;
}

.preview::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 100%;
  background: var(--line-2);
}

.preview::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: var(--bar, 0%);
  background: var(--brand);
  transition: width 0.9s var(--ease-out);
}

.preview-body.swap { animation: swap-in 0.6s var(--ease-out) both; }

@keyframes swap-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--haze);
  font-size: 13px;
}

.preview-name {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.preview-desc {
  margin: 12px 0 0;
  color: var(--haze);
}

.preview .btn { margin-top: 22px; }

/* status + tag */

.tag {
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--frost);
  font-size: 12px;
  font-weight: 500;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--haze);
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}

.status.is-live::before {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(139, 224, 216, 0.14), 0 0 12px rgba(139, 224, 216, 0.6);
}

/* buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease-out), color 0.3s ease;
}

.btn.primary { background: var(--frost); color: var(--night); }

.btn.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brand);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out);
}

.btn.primary:hover::before { transform: none; }
.btn.primary:hover { transform: translateY(-2px); }
.btn.primary:active { transform: translateY(0) scale(0.98); }

.btn.soon {
  border: 1px dashed var(--line-2);
  color: var(--haze);
  cursor: default;
}

/* ---------- orbit ---------- */

.orbit-wrap {
  display: grid;
  place-items: center;
  will-change: transform;
}

.orbit {
  position: relative;
  width: min(calc(100% - 100px), 600px, calc(100svh - 170px));
  aspect-ratio: 1;
}

.orbit-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring-line {
  fill: none;
  stroke: url(#ring-g);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.ring-line.r2 { stroke-dasharray: 0.004 0.012; }

.pulse {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1;
  opacity: 0;
  transform-origin: 300px 300px;
}

.core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 18, 32, 0.95) 55%, rgba(13, 18, 32, 0) 72%);
}

.core img { width: 100%; height: 100%; }

.rings { position: absolute; inset: 0; }

.ring {
  position: absolute;
  inset: calc(50% - var(--r));
}

.ring-spin {
  position: absolute;
  inset: 0;
  animation: spin var(--dur) linear infinite;
  animation-direction: var(--dir, normal);
}

.arm {
  position: absolute;
  inset: 0;
  transform: rotate(var(--a));
  pointer-events: none;
}

.node {
  position: absolute;
  left: 50%;
  top: 0;
  transform-origin: 50% 12px;
  transform: translate(-50%, -12px) rotate(calc(-1 * var(--a)));
  pointer-events: auto;
}

.node-spin {
  transform-origin: 50% 12px;
  animation: spin var(--dur) linear infinite;
  animation-direction: var(--counter, reverse);
}

.node-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--frost);
  font: inherit;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 999px;
}

.node-dot {
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(7, 10, 18, 0.9), 0 0 0 5px var(--line-2);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.node-label {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--haze);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(13, 18, 32, 0.8);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.node-btn:hover .node-label,
.node-btn.is-on .node-label {
  color: var(--frost);
  border-color: rgba(139, 224, 216, 0.4);
}

.node-btn:hover .node-dot { transform: scale(1.3); }

.node-btn.is-on .node-dot {
  transform: scale(1.45);
  box-shadow: 0 0 0 4px rgba(7, 10, 18, 0.9), 0 0 0 5px rgba(139, 224, 216, 0.6), 0 0 22px rgba(139, 224, 216, 0.7);
}

.orbit.is-paused .ring-spin,
.orbit.is-paused .node-spin { animation-play-state: paused; }

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

/* ---------- services list ---------- */

.services,
.contact {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 140px) var(--gutter) 0;
}

.section-title {
  margin: 0 0 clamp(28px, 5vh, 48px);
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--haze);
}

.rows { border-top: 1px solid var(--line); }

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vh, 44px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.row::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: radial-gradient(600px 160px at var(--mx, 30%) 50%, rgba(139, 224, 216, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.row:hover::before,
.row.is-flash::before { opacity: 1; }

.row-head { container-type: inline-size; min-width: 0; }

.row-name {
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 10.4cqi, 5.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.row-name > span {
  display: inline-block;
  padding: 0.04em 0.02em 0.1em 0;
  background-image: var(--brand), linear-gradient(var(--frost), var(--frost));
  background-repeat: no-repeat;
  background-size: 0% 100%, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-size 0.8s var(--ease-out);
}

.row:hover .row-name > span,
.row.is-flash .row-name > span { background-size: 100% 100%, 100% 100%; }

.row-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.row-side { display: grid; gap: 20px; justify-items: start; }

.row-desc { margin: 0; color: var(--haze); max-width: 34rem; font-size: 1.04rem; }

/* ---------- contact ---------- */

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.big-link {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s ease, transform 0.5s var(--ease-out);
}

.big-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 100%), rgba(74, 134, 255, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.big-link:hover { border-color: var(--line-2); transform: translateY(-4px); }
.big-link:hover::before { opacity: 1; }

.big-link-label { color: var(--haze); font-size: 14px; }

.big-link-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.75rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
  white-space: nowrap;
}

/* ---------- footer ---------- */

.foot {
  max-width: var(--wrap);
  margin: clamp(80px, 14vh, 140px) auto 0;
  padding: 28px var(--gutter) 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ---------- intro (only with JS) ---------- */

.js .top { opacity: 0; transform: translateY(-12px); }
.js .line > span { transform: translateY(105%); }
.js .hero-sub,
.js .preview { opacity: 0; transform: translateY(16px); }
.js .core { transform: translate(-50%, -50%) scale(0); }
.js .orbit-lines .glow { opacity: 0; }
.js .ring-line { stroke-dashoffset: 1; }
.js .ring-line.r2 { opacity: 0; }
.is-ready .ring-line.r2 { opacity: 1; transition: opacity 1.4s ease 0.45s; }
.js .ring { opacity: 0; transform: scale(0.35); }

.is-ready .top {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease 1.3s, transform 0.8s var(--ease-out) 1.3s, background 0.4s ease, border-color 0.4s ease;
}

.is-ready .core {
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.9s var(--ease-spring) 0.1s;
}

.is-ready .orbit-lines .glow { opacity: 1; transition: opacity 1.6s ease 0.3s; }

.is-ready .ring-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease-out); }
.is-ready .ring-line.r1 { transition-delay: 0.3s; }
.is-ready .ring-line.r2 { transition-delay: 0.45s; }
.is-ready .ring-line.r3 { transition-delay: 0.6s; }

.is-ready .ring {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 1.3s var(--ease-out);
  transition-delay: calc(0.75s + var(--i) * 0.12s);
}

.is-ready .line > span { transform: none; transition: transform 1.1s var(--ease-out); }
.is-ready .line:nth-child(1) > span { transition-delay: 0.55s; }
.is-ready .line:nth-child(2) > span { transition-delay: 0.65s; }
.is-ready .line:nth-child(3) > span { transition-delay: 0.75s; }

.is-ready .hero-sub { opacity: 1; transform: none; transition: opacity 0.9s ease 1s, transform 0.9s var(--ease-out) 1s; }
.is-ready .preview { opacity: 1; transform: none; transition: opacity 0.9s ease 1.15s, transform 0.9s var(--ease-out) 1.15s; }

.is-ready .pulse { animation: pulse 5s var(--ease-out) 2.4s infinite; }

@keyframes pulse {
  0% { opacity: 0.55; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(7.2); }
}

/* ---------- scroll reveals ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 1s var(--ease-out); }

.js .row .row-name > span { transform: translateY(105%); }
.js .row .row-meta,
.js .row .row-desc,
.js .row .row-action { opacity: 0; }
.js .row .row-desc { filter: blur(8px); transform: translateY(10px); }
.js .row .row-action { transform: translateX(-16px); }

.js .row.is-in .row-name > span {
  transform: none;
  transition: transform 1.1s var(--ease-out), background-size 0.8s var(--ease-out);
}

.js .row.is-in .row-meta { opacity: 1; transition: opacity 0.8s ease 0.25s; }
.js .row.is-in .row-desc { opacity: 1; filter: none; transform: none; transition: opacity 0.9s ease 0.2s, filter 0.9s ease 0.2s, transform 0.9s var(--ease-out) 0.2s; }
.js .row.is-in .row-action { opacity: 1; transform: none; transition: opacity 0.8s ease 0.4s, transform 0.8s var(--ease-out) 0.4s; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 96px;
    gap: 8px;
  }

  .orbit-wrap { order: -1; }
  .orbit { width: min(calc(100% - 70px), 460px); }
  .headline { font-size: clamp(1.7rem, 6.4vw, 3rem); }
  .preview { min-height: 0; }

  .row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .headline { white-space: normal; }
  .mark span { display: none; }
  .node-label { font-size: 11px; padding: 4px 9px; }
  .node-btn { gap: 6px; }
  .contact-links { grid-template-columns: 1fr; }
  .row-action, .preview .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .ring-spin, .node-spin, .pulse { animation: none !important; }
}
