:root {
  --ink: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.7);
  --gold: #d8b57d;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --pad-x: clamp(1.25rem, 5vw, 4.5rem);
  --pad-y: clamp(1.5rem, 4vw, 3rem);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: #0c0c0e;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-track {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  will-change: transform;
}

.bg-img {
  width: 100%;
  height: 100%;
  /* contain = весь человек в кадре, без зума cover */
  object-fit: contain;
  object-position: center center;
  image-rendering: auto;
  -webkit-user-drag: none;
  transform: translateZ(0) scale(1.02);
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  opacity: 0;
  filter: blur(18px) brightness(0.85);
  transition:
    opacity 1.6s var(--ease),
    filter 1.8s var(--ease),
    transform 2s var(--ease);
}

.bg.is-ready .bg-img {
  opacity: 1;
  filter: blur(0) brightness(1);
  transform: translateZ(0) scale(1);
  animation: floatFrame 28s var(--ease-soft) 1.8s infinite;
}

.veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 8, 10, 0.55) 0%, rgba(8, 8, 10, 0.12) 48%, rgba(8, 8, 10, 0.2) 100%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.2) 0%, transparent 45%, rgba(8, 8, 10, 0.55) 100%);
  opacity: 0;
  transition: opacity 1.4s var(--ease) 0.25s;
}

.bg.is-ready .veil {
  opacity: 1;
}

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

.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    calc(var(--pad-y) + var(--safe-t))
    var(--pad-x)
    calc(var(--pad-y) + var(--safe-b));
  max-width: 36rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--ease) 0.55s forwards;
}

.pulse {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(216, 181, 125, 0.45);
  animation: pulse 2.4s var(--ease-soft) infinite;
}

.brand {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  font-family: "Cormorant", serif;
  font-size: clamp(4.6rem, 13vw, 8.2rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0.04em;
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1rem);
  animation: charIn 0.85s var(--ease) forwards;
  animation-delay: calc(0.7s + var(--i) * 0.07s);
}

.rule {
  width: 0;
  height: 1px;
  margin: 1.35rem 0 0;
  background: linear-gradient(90deg, var(--gold), transparent 90%);
  animation: draw 1.1s var(--ease) 1.35s forwards;
}

.lead {
  margin: 1.2rem 0 0;
  font-family: "Cormorant", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(246, 241, 232, 0.88);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--ease) 1.45s forwards;
}

.lead .line {
  display: block;
}

.contacts {
  margin-top: 2.6rem;
  display: grid;
  gap: 0.5rem;
}

.contacts > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.85s var(--ease) forwards;
}

.hint {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(216, 181, 125, 0.85);
  animation-delay: 1.6s;
}

.addr {
  margin: 0 0 0.2rem;
  font-family: "Cormorant", serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  animation-delay: 1.75s;
}

.contacts a:nth-of-type(1) {
  animation-delay: 1.9s;
}

.contacts a:nth-of-type(2) {
  animation-delay: 2.05s;
}

.contacts a:nth-of-type(3) {
  animation-delay: 2.2s;
}

.contacts a {
  width: fit-content;
  font-size: 1rem;
  letter-spacing: 0.03em;
  position: relative;
}

.contacts a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: rgba(216, 181, 125, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.contacts a:hover {
  color: var(--gold);
}

.contacts a:hover::after {
  transform: scaleX(1);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes charIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw {
  to {
    width: min(7.5rem, 28vw);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(216, 181, 125, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(216, 181, 125, 0);
  }
}

/* Only translate — no scale/zoom */
@keyframes floatFrame {
  0% {
    transform: translate3d(0, 0, 0);
  }
  35% {
    transform: translate3d(-8px, -6px, 0);
  }
  70% {
    transform: translate3d(7px, -4px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Tablet / mobile */
@media (max-width: 720px) {
  body {
    overflow-y: auto;
  }

  .bg-track {
    inset: 0;
  }

  .bg-img {
    /* Full-bleed on phones */
    object-fit: cover;
    object-position: 58% 18%;
    animation-duration: 32s;
  }

  .bg.is-ready .bg-img {
    transform: translateZ(0) scale(1.01);
  }

  .veil {
    background:
      linear-gradient(
        180deg,
        rgba(8, 8, 10, 0.2) 0%,
        rgba(8, 8, 10, 0.08) 36%,
        rgba(8, 8, 10, 0.5) 68%,
        rgba(8, 8, 10, 0.9) 100%
      );
  }

  .stage {
    justify-content: flex-end;
    max-width: none;
    width: 100%;
    padding:
      calc(1rem + var(--safe-t))
      1.4rem
      calc(1.85rem + var(--safe-b));
  }

  .status {
    margin-bottom: 0.75rem;
    font-size: 0.67rem;
    letter-spacing: 0.14em;
    gap: 0.55rem;
  }

  .brand {
    font-size: clamp(3.9rem, 17.5vw, 5.5rem);
    letter-spacing: 0.03em;
  }

  .rule {
    margin-top: 0.95rem;
  }

  .lead {
    margin-top: 0.95rem;
    font-size: clamp(1.15rem, 4.4vw, 1.35rem);
    line-height: 1.35;
  }

  .lead .line {
    white-space: nowrap;
  }

  .contacts {
    margin-top: 1.55rem;
    gap: 0.3rem;
    padding-top: 1.05rem;
    border-top: 1px solid rgba(246, 241, 232, 0.14);
  }

  .hint {
    margin-bottom: 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.11em;
    line-height: 1.4;
  }

  .addr {
    font-size: 1.18rem;
    margin-bottom: 0.3rem;
  }

  .contacts a {
    font-size: 0.98rem;
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
  }

  .contacts a:active {
    color: var(--gold);
  }

  .contacts a::after {
    display: none;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .status {
    font-size: 0.6rem;
    letter-spacing: 0.11em;
  }

  .brand {
    font-size: 3.55rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .hint {
    letter-spacing: 0.09em;
  }

  .stage {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

/* Short screens (landscape phones / small height) */
@media (max-height: 700px) and (max-width: 720px) {
  .stage {
    justify-content: flex-end;
    padding-top: calc(0.75rem + var(--safe-t));
    padding-bottom: calc(1.1rem + var(--safe-b));
  }

  .bg-img {
    object-fit: cover;
    object-position: 58% 22%;
  }

  .status {
    margin-bottom: 0.55rem;
  }

  .brand {
    font-size: clamp(3.2rem, 14vw, 4.4rem);
  }

  .lead {
    margin-top: 0.75rem;
    font-size: 1.15rem;
  }

  .contacts {
    margin-top: 1.2rem;
    padding-top: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg,
  .veil,
  .status,
  .char,
  .rule,
  .lead,
  .contacts > *,
  .pulse,
  .bg-img {
    animation: none !important;
    transition: none !important;
  }

  .status,
  .char,
  .lead,
  .contacts > *,
  .veil,
  .bg.is-ready .veil,
  .bg-img,
  .bg.is-ready .bg-img {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .rule {
    width: min(7.5rem, 28vw);
  }
}
