:root {
  --night: #0a0706;
  --panel: #160f0b;
  --orange: #ff813b;
  --bright: #ffbf8e;
  --muted: #c8a38b;
  --border: #63351f;
  --script: "Marck Script", "Segoe Print", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; isolation: isolate; background: var(--night); color: var(--bright); font: 16px/1.6 "Golos Text", Arial, sans-serif; }
.particle-backdrop { position: fixed; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
a, button { color: inherit; font: inherit; }
a { text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--bright); outline-offset: 5px; }
[hidden] { display: none !important; }

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, #2b140c, #0a0706 66%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .42s ease, visibility 0s .42s;
}
.loading .intro-loader { opacity: 1; visibility: visible; pointer-events: auto; transition: none; }
.loading .nav, .loading .sphere-page { visibility: hidden; }
.loading body > :not(.intro-loader),
.loading body > :not(.intro-loader) * { animation-play-state: paused; }
.intro-loader__body { width: min(100%, 300px); text-align: center; }
.intro-loader__orb {
  width: 75px;
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px dotted var(--orange);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #f48d4522, transparent 65%);
  box-shadow: 0 0 38px #ff72283d, inset 0 0 22px #ff72283d;
}
.intro-loader__status { margin: 19px 0 15px; font: 400 clamp(31px, 8vw, 39px)/1.1 var(--script); }
.intro-loader__track { width: min(100%, 162px); height: 2px; margin-inline: auto; overflow: hidden; background: var(--border); }
.intro-loader__track::after {
  content: "";
  display: block;
  width: 44%;
  height: 100%;
  background: var(--orange);
  animation: loader-travel 1.15s ease-in-out infinite;
}
.intro-loader__hint { margin: 17px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }

@keyframes loader-travel {
  from { translate: -100% 0; }
  to { translate: 228% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-loader { transition: none; }
  .intro-loader__track::after { animation: none; margin-inline: auto; }
}

.wrap { width: min(1440px, calc(100% - 96px)); margin-inline: auto; }
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #4d2b1c; }
.brand { font-size: 15px; font-weight: 700; white-space: nowrap; }
.brand span { color: var(--orange); font-size: 21px; vertical-align: middle; margin-right: 7px; }
.nav-caption { font-size: 13px; color: var(--muted); text-align: right; }

.sphere-page {
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(440px, 1.45fr);
  align-items: center;
  min-height: min(820px, calc(100svh - 74px));
}
.sphere-heading { position: relative; z-index: 4; pointer-events: none; padding-block: 34px; }
.sphere-heading h1 { color: #ffad73; font: 400 clamp(64px, 7.4vw, 118px)/.98 var(--script); letter-spacing: -.045em; margin: 0; }
.sphere-heading p { max-width: 32ch; margin: 25px 0 0; color: var(--muted); font-size: clamp(15px, 1.25vw, 19px); line-height: 1.6; }

.stage {
  position: relative;
  width: 100%;
  height: clamp(510px, 53vw, 790px);
  isolation: isolate;
  overflow: clip;
}
.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 49%, #65241036 2%, #30150b39 37%, transparent 70%);
}
.model, .branch-map, .scene-grid { position: absolute; inset: 0; }
.model, .branch-map { transform-origin: var(--entry-x, 50%) var(--entry-y, 50%); }
.model canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage[data-dragging] .model canvas { cursor: grabbing; }
.stage[data-open] .model canvas { cursor: default; }
.scene-grid { pointer-events: none; z-index: -1; inset: 5% 0; background-image: linear-gradient(#9c51241b 1px, transparent 1px), linear-gradient(90deg, #9c51241b 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(ellipse at center, black 10%, transparent 72%); }
.fallback { position: absolute; width: 67%; aspect-ratio: 1; inset: 50% auto auto 50%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle at 35% 34%, #4b291344 30%, transparent 65%); border: 1px dotted #b86324aa; box-shadow: inset -22px 19px 70px #86421748, 0 0 70px #b9622535; pointer-events: none; }
.stage[data-ready] .fallback { opacity: 0; }

.branch-map { z-index: 2; pointer-events: none; }
.branch-map svg { position: absolute; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px #ff6a2b8c); }
.branch-map path, .branch-map circle { fill: none; stroke: #ff9e56; opacity: .8; stroke-width: .18; }
.branch-map path { stroke-dasharray: .012 .009; }
.branch-map circle { fill: var(--orange); stroke-width: .24; }
.branch {
  position: absolute;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 13px 7px 10px;
  border: 1px solid #c36b3f;
  border-radius: 5px;
  background: linear-gradient(130deg, #3c2117, #19100c 70%);
  box-shadow: 0 0 22px #e86b3028, inset 0 1px #f5986524;
  white-space: nowrap;
  font-size: clamp(12px, 1.04vw, 16px);
  font-weight: 650;
  pointer-events: auto;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.branch::before { content: ""; width: 7px; height: 7px; rotate: 45deg; border: 1px solid #ffc49a; background: #e66a30; box-shadow: 0 0 10px #ff833d; }
.branch:hover, .branch:focus-visible { border-color: #ffc497; background: #492415; box-shadow: 0 0 28px #e86b3060; }
.branch-about { left: 33%; top: 37%; }
.branch-services { left: 70%; top: 47%; }
.branch-process { left: 48%; top: 70%; }
.stage[data-open] .branch-map { opacity: 0; }
.stage[data-open] .branch { pointer-events: none; }

.entry-ripple {
  position: absolute;
  z-index: 2;
  left: var(--entry-x, 50%);
  top: var(--entry-y, 50%);
  translate: -50% -50%;
  width: 76px;
  aspect-ratio: 1;
  border: 1px solid #ffb16e;
  border-radius: 50%;
  box-shadow: 0 0 40px #ff782fcc, inset 0 0 26px #ff782faa;
  opacity: 0;
  pointer-events: none;
}
.entry-ripple::after { content: ""; position: absolute; inset: -11px; border: 1px dashed #ffa16689; border-radius: 50%; }
.branch-card {
  position: absolute;
  z-index: 3;
  inset: 12% 8% 14%;
  display: flex;
  flex-direction: column;
  border: 1px solid #995533;
  border-radius: 11px;
  background: linear-gradient(148deg, #291810fa, #140d09fa 62%);
  box-shadow: 0 30px 90px #080402c9, inset 0 1px #ffa76a20;
  overflow: hidden;
}
.card-tools { border-bottom: 1px solid #754126; padding: 9px clamp(18px, 3vw, 42px); }
.back { display: inline-flex; align-items: center; min-height: 38px; font-size: 14px; font-weight: 650; }
.back:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-section { overflow: auto; min-height: 0; padding: 22px clamp(18px, 3vw, 42px) 30px; scrollbar-color: #ca662f #21130e; overscroll-behavior: contain; }
.card-section h2 { margin: 0 0 20px; font: 400 clamp(52px, 6.15vw, 92px)/1.01 var(--script); letter-spacing: -.035em; }
.card-section h2:focus { outline: none; }
.story, .offer-grid, .steps { margin: 0; padding: 0; display: grid; gap: 15px; }
.story p, .card-section dd, .steps p { max-width: 62ch; margin: 0; color: var(--muted); font-size: clamp(14px, 1.15vw, 17px); }
.offer-grid > div, .steps li { border-bottom: 1px solid #623820; padding-bottom: 12px; }
.offer-grid dt, .steps h3 { margin: 0 0 4px; font: 400 clamp(24px, 2.2vw, 34px)/1.15 var(--script); }
.steps { list-style: none; }

.scene-tools { position: absolute; z-index: 3; inset: auto 1% 3%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; pointer-events: none; }
.scene-hint { display: none; color: var(--muted); font-size: 12px; }
.stage[data-ready]:not([data-open]) .scene-hint { display: inline; }
.scene-toggle { margin-left: auto; background: #100b08; color: var(--muted); font-size: 12px; border: 1px solid var(--border); padding: 7px 10px; cursor: pointer; border-radius: 4px; pointer-events: auto; }
.scene-toggle:hover { color: var(--bright); border-color: var(--muted); }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 34px); }
  .nav { min-height: 58px; }
  .nav-caption { font-size: 11px; }
  .sphere-page { grid-template-columns: 1fr; min-height: 0; justify-items: center; }
  .sphere-heading { padding: 35px 0 0; text-align: center; }
  .sphere-heading h1 { max-width: 12ch; font-size: clamp(55px, 11vw, 90px); }
  .hero-break { display: none; }
  .sphere-heading p { margin: 13px auto 0; }
  .stage { height: clamp(375px, 104vw, 660px); }
  .branch { padding-inline: 8px; gap: 7px; }
  .branch-card { inset: 8% 1% 15%; }
  .card-section { padding-top: 18px; }
  .scene-tools { bottom: 1%; }
}

@media (prefers-reduced-motion: reduce) {
  .branch { transition: none; }
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
}

@keyframes reveal-sphere {
  from { opacity: 0; scale: .92; }
}

@keyframes reveal-fade {
  from { opacity: 0; }
}

@keyframes reveal-divider {
  from { border-color: transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  .nav .brand, .nav-caption, .sphere-heading h1, .sphere-heading p,
  .branch, .scene-hint, .scene-toggle, .back, .card-section h2,
  .story > *, .offer-grid > *, .steps > * {
    animation: reveal-up var(--reveal-duration, .6s) cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0s) backwards;
  }

  .nav { animation: reveal-divider .7s .05s backwards; }
  .particle-backdrop { animation: reveal-fade 1.4s .2s backwards; }
  .nav-caption { --reveal-delay: .09s; }
  .sphere-heading h1 { --reveal-delay: .17s; --reveal-duration: .85s; }
  .sphere-heading p { --reveal-delay: .34s; }
  .scene-grid, .stage::before { animation: reveal-fade .85s .17s backwards; }
  .model canvas, .stage:not([data-ready]) .fallback {
    animation: reveal-sphere 1.1s cubic-bezier(.22, 1, .36, 1) .27s backwards;
  }

  .branch-map svg { animation: reveal-fade .75s .53s backwards; }
  .branch-about { --reveal-delay: .72s; }
  .branch-services { --reveal-delay: .84s; }
  .branch-process { --reveal-delay: .96s; }
  .scene-hint { --reveal-delay: 1.08s; }
  .scene-toggle { --reveal-delay: 1.18s; }
  .back { --reveal-delay: .34s; }
  .card-section h2 { --reveal-delay: .4s; }
  .story > *, .offer-grid > *, .steps > * { --reveal-delay: .51s; }
  .story > :nth-child(2), .offer-grid > :nth-child(2), .steps > :nth-child(2) { --reveal-delay: .59s; }
  .story > :nth-child(3), .offer-grid > :nth-child(3), .steps > :nth-child(3) { --reveal-delay: .67s; }
  .steps > :nth-child(4) { --reveal-delay: .75s; }

  .branch:focus-visible, .back:focus-visible { animation: none; }
}
