:root {
  color-scheme: dark;
  --bg: #090c12;
  --bg-deep: #06080d;
  --text: #f2f5fa;
  --muted: #aeb9c9;
  --line: rgba(202, 218, 239, 0.18);
  --accent: #c8d9f0;
  --accent-bright: #e5effb;
  --halo: rgba(110, 145, 190, 0.24);
  --card: rgba(17, 23, 33, 0.92);
  --focus: #edf5ff;
}

@font-face {
  font-family: Inter;
  src: url("./assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 62% 59% at 50% 42%, rgba(46, 64, 90, 0.28), transparent 74%),
    radial-gradient(ellipse 40% 30% at 50% 84%, rgba(29, 45, 67, 0.2), transparent 74%),
    linear-gradient(155deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.19;
  background-image:
    linear-gradient(rgba(201, 219, 243, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 219, 243, 0.025) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.26) 100%);
}

button,
a {
  color: inherit;
}

.site-shell {
  width: min(1440px, calc(100% - 80px));
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 12px;
  position: relative;
  z-index: 6;
}

.header-contact {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  letter-spacing: -0.01em;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.header-contact span {
  color: var(--accent-bright);
  font-size: 17px;
  line-height: 1;
}

.header-contact:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(220, 234, 252, 0.38);
  transform: translateY(-1px);
}

.header-contact:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.main-content {
  flex: 1;
  display: flex;
  min-height: 0;
}

.hero {
  width: 100%;
  min-height: calc(100svh - 84px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 clamp(20px, 3svh, 34px);
  text-align: center;
  position: relative;
  isolation: isolate;
}

.ambient-light {
  width: min(88vw, 1120px);
  height: min(76svh, 760px);
  position: absolute;
  z-index: -1;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(87, 119, 159, 0.14) 0%, rgba(58, 78, 107, 0.06) 38%, transparent 72%);
  filter: blur(28px);
}

.hero h1 {
  max-width: 100%;
  margin: 0 0 -88px;
  position: relative;
  z-index: 1;
  color: #f4f6fa;
  font-size: clamp(72px, 7.4vw, 108px);
  font-weight: 610;
  line-height: 0.96;
  letter-spacing: -0.083em;
  text-shadow: 0 9px 42px rgba(5, 8, 14, 0.72);
}

.hero h1 span {
  color: #c0ccdc;
  font-weight: 480;
}

.scene-wrap {
  width: min(780px, calc(100vw - 64px));
  height: clamp(380px, 53svh, 560px);
  margin-inline: auto;
  position: relative;
  top: 18px;
  z-index: 2;
  pointer-events: none;
}

.scene-wrap::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 14%;
  bottom: 2%;
  left: 14%;
  height: 14%;
  border-radius: 50%;
  background: rgba(64, 90, 126, 0.26);
  filter: blur(40px);
  pointer-events: none;
}

.scene-halo {
  position: absolute;
  z-index: 0;
  inset: 5% 7% 9%;
  background: radial-gradient(ellipse at 50% 44%, var(--halo) 0%, rgba(54, 77, 108, 0.06) 48%, transparent 74%);
  filter: blur(35px);
  pointer-events: none;
}

.scene {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.scene canvas,
.poster {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  object-position: center;
}

.scene canvas {
  z-index: 2;
  display: block;
  pointer-events: auto;
  touch-action: none;
  cursor: default !important;
}

.scene canvas:focus,
.scene canvas:focus-visible {
  outline: none;
  outline-offset: 0;
  border: 0;
  box-shadow: none;
  cursor: default !important;
}

.poster {
  z-index: 1;
  opacity: 0.98;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.scene[data-mode="sequence"] .poster {
  opacity: 0;
}

.launch-block {
  width: min(680px, calc(100vw - 48px));
  margin-top: clamp(4px, 0.8svh, 10px);
  display: grid;
  gap: 11px;
  position: relative;
  z-index: 5;
}

.progress-meta {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-label {
  color: #c4d1e2;
  font-size: 12px;
  font-weight: 570;
  letter-spacing: 0.09em;
  line-height: 1.4;
}

.gesture-hint {
  min-height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(204, 218, 237, 0.72);
  font-size: 15px;
  font-weight: 430;
  letter-spacing: 0.005em;
  line-height: 1.4;
  opacity: 1;
  transition: opacity 220ms ease, visibility 0s linear;
}

.gesture-hint-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.gesture-hint-mobile {
  display: none;
}

.gesture-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gesture-hint.is-dismissed {
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

@media (pointer: coarse) {
  .gesture-hint {
    min-height: 44px;
    font-size: 16px;
    line-height: 22px;
  }

  .gesture-hint-desktop {
    display: none;
  }

  .gesture-hint-mobile {
    display: flex;
    width: min(100%, 340px);
  }

  .gesture-hint-mobile > span {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
  }
}

.site-footer {
  display: none;
}

.progress-track {
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(196, 214, 239, 0.07);
  border-radius: 999px;
  background: rgba(176, 195, 221, 0.18);
  box-shadow: 0 0 18px rgba(121, 157, 201, 0.11);
}

.progress-fill {
  width: 45%;
  height: 100%;
  display: block;
  position: relative;
  overflow: hidden;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, #7894b7 0%, #afc8e8 62%, #e0ebf9 100%);
  box-shadow: 0 0 12px rgba(157, 190, 229, 0.7), 0 0 28px rgba(115, 153, 201, 0.35);
  animation: progress-reveal 1.15s cubic-bezier(0.22, 0.76, 0.24, 1) 160ms forwards;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: -2px 0;
  width: 46px;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  filter: blur(2px);
  animation: progress-sheen 1.45s ease-out 480ms 1 both;
}

@keyframes progress-reveal {
  to { transform: scaleX(1); }
}

@keyframes progress-sheen {
  to { transform: translateX(145%); }
}

.message-card {
  min-height: 108px;
  display: grid;
  place-items: center;
  padding: 25px 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(177, 199, 228, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(25, 32, 44, 0.96), var(--card) 60%, rgba(13, 18, 27, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(239, 246, 255, 0.07),
    0 20px 54px rgba(0, 0, 0, 0.25),
    0 0 42px rgba(93, 127, 169, 0.07);
  backdrop-filter: blur(20px);
}

.message-card::before {
  content: "";
  height: 1px;
  position: absolute;
  top: -1px;
  right: 18%;
  left: 18%;
  background: linear-gradient(90deg, transparent, rgba(196, 217, 244, 0.62), transparent);
}

.message-card p {
  max-width: 560px;
  margin: 0;
  color: #d6deea;
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 430;
  line-height: 1.58;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

@media (max-width: 700px) {
  .site-shell {
    width: calc(100% - 36px);
  }

  .site-header {
    min-height: 66px;
    padding-top: 10px;
  }

  .header-contact {
    min-height: 42px;
    gap: 9px;
    padding-inline: 14px;
    font-size: 12px;
  }

  .hero {
    min-height: calc(100svh - 100px);
    padding: 4px 0 max(26px, env(safe-area-inset-bottom));
  }

  .site-footer {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    color: rgba(187, 201, 221, 0.7);
    font-size: 10px;
    font-weight: 430;
    letter-spacing: 0.025em;
    line-height: 1.4;
    text-align: center;
  }

  .ambient-light {
    width: 100vw;
    height: 59svh;
    top: 42%;
  }

  .hero h1 {
    margin-bottom: -70px;
    font-size: clamp(49px, 12.9vw, 60px);
    letter-spacing: -0.079em;
  }

  .scene-wrap {
    width: min(520px, calc(100vw - 8px));
    height: clamp(350px, 50svh, 440px);
    margin-inline: 0;
    top: 23px;
  }

  .scene-halo {
    inset: 5% 2% 8%;
    filter: blur(27px);
  }

  .launch-block {
    width: min(600px, calc(100vw - 36px));
    margin-top: 7px;
    gap: 10px;
  }

  .progress-label {
    font-size: 11px;
    letter-spacing: 0.085em;
  }

  .progress-track {
    height: 5px;
  }

  .message-card {
    min-height: 104px;
    padding: 22px 22px;
    border-radius: 19px;
  }

  .message-card p {
    max-width: 430px;
    font-size: 15px;
    line-height: 1.57;
  }
}

@media (max-width: 360px) {
  .site-shell {
    width: calc(100% - 28px);
  }

  .hero h1 {
    margin-bottom: -66px;
    font-size: clamp(44px, 12.6vw, 48px);
  }

  .scene-wrap {
    width: min(420px, calc(100vw - 8px));
    height: clamp(320px, 47svh, 390px);
    margin-inline: 0;
  }

  .launch-block {
    width: min(560px, calc(100vw - 28px));
  }

  .message-card {
    padding-inline: 18px;
  }

  .message-card p {
    font-size: 14px;
  }
}

@media (max-height: 700px) and (min-width: 701px) {
  .site-header {
    min-height: 66px;
  }

  .hero {
    min-height: calc(100svh - 66px);
    padding: 8px 0 18px;
  }

  .hero h1 {
    margin-bottom: -70px;
    font-size: clamp(68px, 6.8vw, 78px);
  }

  .scene-wrap {
    height: clamp(320px, 50svh, 390px);
    top: 14px;
  }

  .launch-block {
    margin-top: 4px;
    gap: 9px;
  }

  .message-card {
    min-height: 92px;
    padding-block: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .scene-halo,
  .scene-wrap::after {
    display: none;
  }

  .scene canvas {
    display: none;
  }

  .scene[data-poster-ready="true"] .poster {
    opacity: 1;
  }

  .progress-fill {
    transform: scaleX(1);
  }

  .progress-fill::after {
    display: none;
  }
}
