:root {
  --ink: #f4f7f5;
  --muted: rgba(235, 243, 242, 0.74);
  --line: rgba(225, 239, 240, 0.22);
  --panel: rgba(7, 18, 25, 0.62);
  --panel-strong: rgba(5, 15, 22, 0.82);
  --accent: #d8b77f;
  --accent-soft: rgba(226, 193, 136, 0.22);
  --safe-top: max(22px, env(safe-area-inset-top));
  --safe-right: max(22px, env(safe-area-inset-right));
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
  --safe-left: max(22px, env(safe-area-inset-left));
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #07131b;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: #07131b;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 10px;
  background: #fff;
  color: #07131b;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #07131b;
}

.hero__media,
.hero__picture,
.hero__image,
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media {
  z-index: -3;
  overflow: hidden;
  background: #07131b;
}

.hero__picture {
  display: block;
  overflow: hidden;
}

.hero__image {
  object-fit: cover;
  object-position: center center;
  transform: scale(1.018);
  filter: saturate(0.96) contrast(1.02);
}

.hero__canvas {
  z-index: 1;
  display: block;
  opacity: 0;
  transition: opacity 750ms cubic-bezier(.2,.75,.2,1);
  will-change: opacity;
}

.webgl-ready .hero__canvas {
  opacity: 1;
}

.webgl-ready .hero__image {
  opacity: 0;
  transition: opacity 750ms ease;
}

.hero__mist,
.hero__sun-glow,
.hero__shade,
.hero__grain,
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__mist {
  z-index: 2;
  width: 125%;
  height: 26%;
  top: 48%;
  left: -12%;
  opacity: 0.26;
  filter: blur(26px);
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(232, 237, 230, 0.35), transparent 48%),
    radial-gradient(ellipse at 68% 48%, rgba(183, 203, 204, 0.24), transparent 52%);
  animation: mist-drift-one 24s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.hero__mist--two {
  top: 51%;
  opacity: 0.17;
  transform: translateX(7%);
  animation: mist-drift-two 31s ease-in-out infinite alternate;
}

.hero__sun-glow {
  z-index: 2;
  opacity: 0.55;
  background: radial-gradient(circle at 17% 51%, rgba(255, 193, 108, 0.22), transparent 22%);
  animation: glow-breathe 8s ease-in-out infinite;
}

.hero__shade {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(3, 12, 18, 0.90) 0%, rgba(4, 14, 21, 0.76) 22%, rgba(5, 15, 22, 0.36) 45%, rgba(5, 15, 22, 0.06) 65%, rgba(4, 12, 18, 0.16) 100%),
    linear-gradient(180deg, rgba(2, 9, 14, 0.28) 0%, transparent 34%, transparent 70%, rgba(2, 8, 13, 0.42) 100%);
}

.hero__grain {
  z-index: 4;
  opacity: 0.26;
  background-image: url("../img/grain.webp");
  background-size: 128px 128px;
  mix-blend-mode: soft-light;
}

.hero__vignette {
  z-index: 5;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.36);
}

.hero__shell {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1680px);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    var(--safe-top)
    clamp(var(--safe-right), 4.2vw, 76px)
    var(--safe-bottom)
    clamp(var(--safe-left), 4.2vw, 76px);
}

/* Mobile browser chrome composites from the large viewport; 2px keeps it scrollable. */
@supports (height: 100lvh) {
  @media (hover: none) and (pointer: coarse) {
    .hero {
      min-height: calc(100lvh + 2px);
      height: calc(100lvh + 2px);
    }
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 12px;
  opacity: 0;
  transform: translateY(-12px);
  animation: content-enter 850ms 820ms cubic-bezier(.2,.75,.2,1) forwards;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(231, 240, 240, 0.25);
  border-radius: 14px;
  background: rgba(5, 16, 23, 0.44);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.brand__mark svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: rgba(246, 249, 247, 0.94);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__mark circle {
  fill: rgba(246, 249, 247, 0.94);
  stroke: none;
}

.brand__wave {
  stroke: var(--accent);
}

.brand__copy {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand__copy strong {
  font-size: 12px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand__copy span {
  color: var(--muted);
  font-size: 12px;
}

.hero__content {
  align-self: center;
  width: min(610px, 46vw);
  padding-top: clamp(12px, 3vh, 38px);
  padding-bottom: clamp(18px, 4vh, 54px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: rgba(226, 236, 235, 0.76);
  font-size: clamp(11px, 0.8vw, 13px);
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(18px);
  animation: content-enter 850ms 980ms cubic-bezier(.2,.75,.2,1) forwards;
}

.eyebrow span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(58px, 6.1vw, 105px);
  font-weight: 720;
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

h1 span,
h1 em {
  display: block;
  opacity: 0;
  transform: translateY(34px);
  animation: title-enter 1000ms cubic-bezier(.17,.78,.22,1) forwards;
}

h1 span {
  animation-delay: 1040ms;
}

h1 em {
  margin-top: 0.07em;
  color: rgba(248, 250, 248, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.87em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.045em;
  animation-delay: 1130ms;
}

.lead {
  max-width: 535px;
  margin: clamp(25px, 3.5vh, 38px) 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(22px);
  animation: content-enter 900ms 1260ms cubic-bezier(.2,.75,.2,1) forwards;
}

.contacts {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: clamp(26px, 4.4vh, 48px);
  opacity: 0;
  transform: translateY(24px);
  animation: content-enter 900ms 1390ms cubic-bezier(.2,.75,.2,1) forwards;
}

.phone-card {
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.60);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px) saturate(1.08);
}

.phone-card {
  position: relative;
  display: grid;
  min-width: min(340px, 30vw);
  min-height: 78px;
  padding: 15px 68px 14px 18px;
  border-radius: 18px;
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.phone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 193, 136, 0.46);
  background: rgba(11, 25, 34, 0.74);
}

.phone-card__label {
  color: rgba(225, 235, 235, 0.58);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.phone-card strong {
  align-self: end;
  font-size: clamp(18px, 1.55vw, 25px);
  font-weight: 650;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.phone-card__arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent-soft);
  color: #f0d5a7;
}

.phone-card__arrow svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-card:focus-visible {
  outline: 2px solid rgba(245, 214, 159, 0.9);
  outline-offset: 4px;
}

.hero__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(223, 233, 233, 0.48);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: content-enter 800ms 1620ms ease forwards;
}

.drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-email {
  color: rgba(223, 233, 233, 0.72);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.footer-email:hover,
.footer-email:focus-visible {
  color: rgba(248, 250, 248, 0.96);
}

.footer-email:focus-visible {
  outline: 2px solid rgba(245, 214, 159, 0.9);
  outline-offset: 4px;
  border-radius: 4px;
}

.drag-hint svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-curtain,
.intro-flare {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
}

.intro-curtain {
  background: #061119;
  transform-origin: right center;
  animation: curtain-open 1350ms 150ms cubic-bezier(.76,0,.24,1) forwards;
}

.intro-flare {
  opacity: 0;
  transform: translateX(-55%) skewX(-12deg);
  background: linear-gradient(90deg, transparent 40%, rgba(255, 225, 174, 0.23) 49%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 224, 170, 0.12) 52%, transparent 61%);
  mix-blend-mode: screen;
  animation: flare-cross 1800ms 620ms cubic-bezier(.2,.7,.25,1) forwards;
}

@keyframes curtain-open {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

@keyframes flare-cross {
  0% { opacity: 0; transform: translateX(-65%) skewX(-12deg); }
  18% { opacity: 0.7; }
  75% { opacity: 0.25; }
  100% { opacity: 0; transform: translateX(65%) skewX(-12deg); }
}

@keyframes title-enter {
  0% { opacity: 0; transform: translateY(34px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes content-enter {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mist-drift-one {
  0% { transform: translate3d(-2%, 0, 0) scale(1); opacity: 0.20; }
  100% { transform: translate3d(8%, -5%, 0) scale(1.08); opacity: 0.34; }
}

@keyframes mist-drift-two {
  0% { transform: translate3d(7%, 2%, 0) scale(1.04); }
  100% { transform: translate3d(-8%, -4%, 0) scale(1.12); }
}

@keyframes glow-breathe {
  0%,100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.64; transform: scale(1.045); }
}

@media (max-width: 1180px) and (orientation: landscape) {
  .hero__content {
    width: min(570px, 48vw);
  }

  .contacts {
    gap: 9px;
  }

  .phone-card {
    min-width: min(300px, 29vw);
  }

}

@media (orientation: portrait) and (max-width: 1100px) {
  :root {
    --safe-top: max(18px, env(safe-area-inset-top));
    --safe-right: max(16px, env(safe-area-inset-right));
    --safe-bottom: max(14px, env(safe-area-inset-bottom));
    --safe-left: max(16px, env(safe-area-inset-left));
  }

  .hero__image {
    object-position: center center;
    transform: scale(1.025);
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(3, 12, 18, 0.88) 0%, rgba(4, 14, 21, 0.66) 25%, rgba(5, 15, 22, 0.16) 49%, rgba(4, 12, 18, 0.05) 68%, rgba(2, 8, 13, 0.46) 100%),
      linear-gradient(90deg, rgba(3, 12, 18, 0.28), transparent 62%);
  }

  .hero__mist {
    top: 59%;
    height: 22%;
    opacity: 0.22;
    filter: blur(20px);
  }

  .hero__sun-glow {
    background: radial-gradient(circle at 14% 62%, rgba(255, 193, 108, 0.24), transparent 25%);
  }

  .hero__vignette {
    box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.32);
  }

  .hero__shell {
    grid-template-rows: auto 1fr auto;
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 37px;
    height: 37px;
    border-radius: 12px;
  }

  .brand__mark svg {
    width: 25px;
    height: 25px;
  }

  .brand__copy strong,
  .brand__copy span {
    font-size: 10px;
  }

  .hero__content {
    align-self: start;
    width: 100%;
    max-width: 530px;
    padding-top: clamp(34px, 7.2vh, 82px);
    padding-bottom: 10px;
  }

  .eyebrow {
    margin-bottom: 15px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .eyebrow span {
    width: 28px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(44px, 13.2vw, 76px);
    line-height: 0.91;
    letter-spacing: -0.058em;
  }

  h1 em {
    font-size: 0.88em;
  }

  .lead {
    max-width: min(95%, 430px);
    margin-top: clamp(18px, 2.8vh, 28px);
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.45;
  }

  .contacts {
    position: absolute;
    right: var(--safe-right);
    bottom: calc(var(--safe-bottom) + 34px);
    left: var(--safe-left);
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin: 0;
  }

  .phone-card {
    min-width: 0;
    min-height: 68px;
    padding: 12px 14px 11px;
    border-radius: 16px;
  }

  .phone-card strong {
    font-size: clamp(17px, 4.7vw, 21px);
  }

  .phone-card__arrow {
    display: none;
  }

  .hero__footer {
    align-self: end;
    padding-bottom: 0;
    font-size: 9px;
  }

  .drag-hint span {
    display: none;
  }
}

@media (orientation: portrait) and (max-width: 430px) and (max-height: 760px) {
  .hero__content {
    padding-top: 22px;
  }

  h1 {
    font-size: clamp(40px, 12.2vw, 56px);
  }

  .lead {
    max-width: 92%;
    margin-top: 14px;
    font-size: 13px;
  }

  .contacts {
    bottom: calc(var(--safe-bottom) + 34px);
  }

  .phone-card {
    min-height: 60px;
  }

  .hero__footer {
    font-size: 8px;
  }
}

@media (max-height: 660px) and (orientation: landscape) {
  .hero__shell {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(22px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(22px, env(safe-area-inset-left));
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand__mark svg {
    width: 23px;
    height: 23px;
  }

  .brand__copy strong,
  .brand__copy span {
    font-size: 9px;
  }

  .hero__content {
    width: min(430px, 50vw);
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .eyebrow {
    margin-bottom: 9px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(34px, 9.2vh, 48px);
    line-height: 0.9;
  }

  .lead {
    max-width: 380px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.3;
  }

  .contacts {
    gap: 7px;
    margin-top: 12px;
  }

  .phone-card {
    min-width: min(230px, 27vw);
    min-height: 52px;
    padding: 9px 12px;
    border-radius: 14px;
  }

  .phone-card strong {
    font-size: 17px;
  }

  .phone-card__arrow {
    display: none;
  }

  .hero__footer {
    font-size: 8px;
  }
}

@media (hover: none), (pointer: coarse) {
  .drag-hint span::before {
    content: "Коснитесь сцены";
    font-size: 0;
  }
}

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

  .hero__canvas {
    display: none;
  }

  .hero__image {
    opacity: 1 !important;
  }

  .hero__mist,
  .hero__sun-glow,
  .intro-curtain,
  .intro-flare {
    display: none;
  }
}
