@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/press-start-2p.woff2") format("woff2");
}

:root {
  --bg: #07061a;
  --text: #f7f3ff;
  --muted: #d2c7e8;
  --violet: #b44dff;
  --violet-deep: #8a2ee0;
  --pink: #e89cff;
  --glass: rgba(10, 8, 30, 0.62);
  --line: rgba(226, 204, 255, 0.22);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius: 14px;
  --radius-bar: 20px;
  --pad-x: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --font-display: Inter, "Segoe UI", sans-serif;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --font-body: Inter, "Segoe UI", system-ui, sans-serif;
  --ease: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  --moon-x: 78%;
  --moon-y: 14%;
}

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

html {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

picture {
  display: block;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  background: #1a1238;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
}

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.atmosphere-shift {
  position: absolute;
  inset: -3%;
  will-change: transform;
}

.atmosphere-shift picture {
  position: absolute;
  inset: 0;
}

.scene-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 70% 38%;
  animation: scene-breathe 16s ease-in-out infinite alternate;
  transform-origin: 62% 42%;
}

.scene-dim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 24, 0.18) 0%, rgba(7, 6, 24, 0.1) 28%, rgba(7, 6, 24, 0.12) 52%, rgba(7, 6, 24, 0.7) 100%);
}

.moon-glow {
  position: absolute;
  left: var(--moon-x);
  top: var(--moon-y);
  translate: -50% -50%;
  width: min(28vw, 200px);
  height: min(28vw, 200px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 220, 0.28) 0%, rgba(255, 214, 160, 0.1) 38%, transparent 70%);
  animation: moon-pulse 5.5s ease-in-out infinite;
}

.lamp-glow {
  position: absolute;
  left: 14%;
  top: 18%;
  width: min(22vw, 220px);
  height: min(34vw, 280px);
  background: radial-gradient(ellipse at 50% 18%, rgba(255, 196, 110, 0.32), rgba(255, 140, 80, 0.08) 42%, transparent 70%);
  animation: lamp-flicker 2.8s ease-in-out infinite;
}

.monitor-glow {
  position: absolute;
  left: 16%;
  top: 42%;
  width: min(24vw, 260px);
  height: min(18vw, 160px);
  background: radial-gradient(ellipse, rgba(164, 92, 255, 0.28), transparent 68%);
  animation: monitor-pulse 3.4s ease-in-out infinite;
}

.steam {
  position: absolute;
  left: 22.5%;
  top: 52%;
  width: 36px;
  height: 72px;
}

.steam span {
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 8px rgba(255, 230, 255, 0.45);
  animation: steam-up 2.4s ease-in infinite;
}

.steam span:nth-child(2) {
  left: 18px;
  animation-delay: 0.7s;
  animation-duration: 2.8s;
}

.steam span:nth-child(3) {
  left: 8px;
  animation-delay: 1.3s;
  animation-duration: 2.2s;
}

.water-sheen {
  position: absolute;
  left: 28%;
  right: 0;
  top: 52%;
  height: 30%;
  background:
    linear-gradient(
      185deg,
      transparent 0%,
      rgba(255, 220, 255, 0.08) 35%,
      rgba(255, 236, 255, 0.28) 48%,
      rgba(176, 130, 255, 0.2) 56%,
      transparent 78%
    );
  background-size: 100% 180%;
  mask-image: linear-gradient(90deg, transparent, #000 26%);
  animation: water-shift 3.6s ease-in-out infinite, water-scroll 4.8s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Page layout */
.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(180, 77, 255, 0.7));
  flex: 0 0 auto;
}

.logo-word {
  display: inline-block;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1;
  color: #fff;
  transform: scaleY(1.28);
  transform-origin: center;
  -webkit-font-smoothing: none;
}

.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 20px;
}

.hero-copy {
  position: relative;
  width: min(100%, 38rem);
  margin: 0 auto;
  text-align: center;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -28px -16px;
  background: radial-gradient(ellipse at center, rgba(8, 6, 28, 0.55) 0%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #efe7ff;
  text-shadow: 0 2px 16px rgba(8, 6, 24, 0.7);
}

.eyebrow span {
  color: var(--pink);
  padding: 0 0.35em;
}

.brand-title {
  margin: 0 0 16px;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.55;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 2px 28px rgba(8, 6, 24, 0.45);
  -webkit-font-smoothing: none;
}

.brand-mark {
  display: inline-block;
  transform: scaleY(1.34);
  transform-origin: center;
}

.cursor {
  display: inline-block;
  width: 0.78em;
  height: 0.2em;
  margin-left: 0.14em;
  background: var(--violet);
  box-shadow: 0 0 16px rgba(180, 77, 255, 0.85);
  vertical-align: baseline;
  transform: translateY(0.06em);
  animation: blink 1.05s steps(1, end) infinite;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: clamp(1.28rem, 0.7rem + 2.6vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.22;
  text-shadow: 0 2px 18px rgba(8, 6, 24, 0.65);
}

.lead {
  margin: 0 auto 22px;
  max-width: 28em;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(8, 6, 24, 0.75);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.actions .btn {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn-compact {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.btn-primary {
  color: #fff;
  background: var(--violet-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 24px rgba(138, 46, 224, 0.38);
}

.btn-ghost {
  color: #fff;
  background: rgba(12, 9, 32, 0.42);
  border: 1px solid rgba(244, 228, 255, 0.55);
  backdrop-filter: blur(10px);
}

.btn span[aria-hidden] {
  font-size: 1.15em;
  line-height: 1;
}

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 8px;
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.services li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 8px 4px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 600;
  color: #f8f2ff;
  text-shadow: 0 2px 12px rgba(8, 6, 24, 0.85);
}

.service-icon {
  color: var(--pink);
  filter: drop-shadow(0 0 10px rgba(232, 156, 255, 0.45));
}

.service-icon svg {
  width: 34px;
  height: 34px;
}

.contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  padding: 12px 12px 12px;
  border: 1px solid rgba(173, 119, 255, 0.42);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.contact svg,
.social svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--pink);
}

.contact-city {
  grid-column: auto;
}

.socials {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.social {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 169, 255, 0.42);
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Reveal */
.js .hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.js .eyebrow { animation-delay: 0.05s; }
.js .brand-title { animation-delay: 0.14s; }
.js h1 { animation-delay: 0.22s; }
.js .lead { animation-delay: 0.3s; }
.js .actions { animation-delay: 0.38s; }
.js .visually-hidden { animation: none; opacity: 1; transform: none; }
.js .services { animation-delay: 0.46s; }

/* Hover / active — only where input allows */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: #9b3dff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(155, 61, 255, 0.48);
  }

  .btn-ghost:hover,
  .social:hover {
    background: rgba(151, 53, 255, 0.22);
    border-color: var(--pink);
    transform: translateY(-1px);
  }

  .contact:hover {
    color: var(--pink);
  }
}

.btn:active,
.social:active,
.contact:active {
  transform: translateY(1px);
}

/* Tablet */
@media (min-width: 600px) {
  .page {
    padding:
      max(16px, env(safe-area-inset-top))
      max(28px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
  }

  .actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .actions .btn {
    width: auto;
    min-width: 200px;
  }

  .services {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .contacts {
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
  }
}

@media (min-width: 768px) {
  :root {
    --moon-x: 84%;
    --moon-y: 16%;
  }

  .scene-photo {
    object-position: 52% 46%;
    transform-origin: 48% 50%;
  }

  .scene-dim {
    background:
      linear-gradient(90deg, rgba(7, 6, 24, 0.28) 0%, rgba(7, 6, 24, 0.06) 42%, rgba(7, 6, 24, 0.04) 58%, rgba(7, 6, 24, 0.16) 100%),
      linear-gradient(180deg, rgba(7, 6, 24, 0.12) 0%, transparent 22%, transparent 64%, rgba(7, 6, 24, 0.56) 100%);
  }

  .hero {
    padding-top: 0;
    padding-bottom: 28px;
    justify-content: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .services {
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    gap: 28px;
  }

  .contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    padding: 14px 24px;
    border-radius: var(--radius-bar);
  }

  .contact-city {
    grid-column: auto;
  }

  .socials {
    grid-column: auto;
    border: 0;
    padding: 0;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .contacts {
    justify-content: space-between;
  }

  .page {
    padding:
      20px
      clamp(28px, 6vw, 96px)
      20px
      clamp(28px, 6vw, 96px);
  }

  .topbar {
    min-height: 58px;
    padding-bottom: 16px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .logo-word {
    font-size: 32px;
  }

  .brand-title {
    font-size: 64px;
  }

  .hero {
    padding: 8px 0 24px;
  }

  .hero-copy {
    width: min(640px, 52vw);
  }

  .services li {
    font-size: 1.02rem;
  }

  .service-icon svg {
    width: 38px;
    height: 38px;
  }

  .contact {
    font-size: 1.08rem;
    white-space: nowrap;
  }

  .contact svg,
  .social svg {
    width: 24px;
    height: 24px;
  }

  .social {
    width: 52px;
    height: 52px;
    font-size: 0.88rem;
  }
}

@media (min-width: 1440px) {
  .page {
    padding: 22px 108px 24px;
  }

  .hero-copy {
    width: min(680px, 48vw);
  }

  .brand-title {
    font-size: 72px;
  }
}

@media (min-width: 1920px) {
  .page {
    padding: 24px 140px 28px;
  }
}

/* Short screens: allow scroll instead of overlap */
@media (max-height: 700px) {
  .hero {
    justify-content: flex-start;
    padding-top: 20px;
  }

  .page {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .scene-photo {
    animation-duration: 22s;
  }

  .lamp-glow,
  .monitor-glow,
  .steam {
    display: none;
  }

  .water-sheen {
    left: 0;
    opacity: 0.7;
  }

  .hero {
    padding: 16px 0 12px;
    justify-content: flex-start;
  }

  .eyebrow {
    letter-spacing: 0.14em;
    font-size: 0.62rem;
    margin-bottom: 10px;
  }

  .brand-title {
    margin-bottom: 8px;
    font-size: 24px;
  }

  h1 {
    margin-bottom: 8px;
  }

  .lead {
    margin-bottom: 16px;
  }

  .actions {
    margin-bottom: 16px;
  }

  .services {
    padding-top: 12px;
    gap: 8px 6px;
  }

  .services li {
    min-height: 64px;
  }

  .contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    padding: 10px 10px 12px;
  }

  .contact,
  .contact-city {
    grid-column: auto;
    min-width: 0;
    min-height: 44px;
    padding: 4px 2px;
    gap: 6px;
    font-size: clamp(0.72rem, 3.35vw, 0.9rem);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
  }

  .contact span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .contact svg {
    width: 18px;
    height: 18px;
  }

  .socials {
    grid-column: 1 / -1;
    justify-content: space-evenly;
    padding-top: 8px;
    padding-bottom: 2px;
  }
}

@media (min-width: 380px) and (max-width: 1023px) {
  .brand-title {
    font-size: 32px;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .brand-title {
    font-size: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .brand-title {
    font-size: 48px;
  }

  .logo-word {
    font-size: 24px;
  }
}

@media (max-width: 359px) {

  .logo-word {
    font-size: 16px;
  }

  .eyebrow {
    letter-spacing: 0.08em;
    font-size: 0.58rem;
  }
}

@keyframes blink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}

@keyframes scene-breathe {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.6%, 1.1%, 0); }
}

@keyframes moon-pulse {
  0%, 100% { opacity: 0.55; scale: 1; }
  50% { opacity: 1; scale: 1.12; }
}

@keyframes lamp-flicker {
  0%, 100% { opacity: 0.7; }
  18% { opacity: 1; }
  22% { opacity: 0.55; }
  48% { opacity: 0.95; }
  62% { opacity: 0.6; }
}

@keyframes monitor-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.95; }
}

@keyframes water-shift {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}

@keyframes water-scroll {
  from { background-position: 0 0; }
  to { background-position: 0 70%; }
}

@keyframes steam-up {
  0% { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.7); }
  25% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(6px, -64px, 0) scale(1.4); }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .hero-copy > * {
    opacity: 1;
    transform: none;
  }

  .atmosphere-shift,
  .moon-glow,
  .water-sheen,
  .scene-photo,
  .lamp-glow,
  .monitor-glow,
  .steam span {
    animation: none;
    transform: none;
    filter: none;
  }

  .fx-canvas {
    display: none;
  }
}
