:root {
  color-scheme: dark;
  --page-bg: #090705;
  --gold: #f5cf74;
  --gold-deep: #a87322;
  --warm: #ffb05a;
  --ink: #080706;
  --vh: 1vh;
  --stage-height: calc(var(--vh) * 100);
  --creative-ratio: 784 / 1168;
  --creative-ratio-value: 0.6712328767;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: var(--stage-height);
  overflow: hidden;
  overscroll-behavior: none;
}

a {
  color: inherit;
}

.landing {
  min-height: var(--stage-height);
  background: #050403;
}

.stage {
  position: fixed;
  inset: 0;
  height: var(--stage-height);
  min-height: var(--stage-height);
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: max(0px, env(safe-area-inset-top)) 0 max(0px, env(safe-area-inset-bottom));
}

.ambient-bg {
  position: absolute;
  inset: -44px;
  z-index: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.18) brightness(0.68);
  transform: scale(1.08);
  opacity: 0.78;
}

.ambient-bg::before,
.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-bg::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 207, 116, 0.28), transparent 25%),
    radial-gradient(circle at 82% 28%, rgba(255, 92, 58, 0.2), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(20, 13, 6, 0.74), transparent 45%);
  animation: ambientPulse 6.8s ease-in-out infinite alternate;
}

.ambient-bg::after {
  background: linear-gradient(115deg, transparent 0%, rgba(255, 232, 174, 0.12) 45%, transparent 58%);
  transform: translateX(-90%);
  animation: backgroundSweep 5.6s ease-in-out infinite;
}

.phone-shell {
  position: relative;
  z-index: 1;
  width: min(100vw, calc(var(--stage-height) * var(--creative-ratio-value)), 784px);
  height: auto;
  aspect-ratio: var(--creative-ratio);
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.creative {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.effects::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.13) 45%, transparent 53%),
    radial-gradient(circle at 50% 15%, rgba(255, 240, 196, 0.15), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0.48;
  transform: translateX(-120%);
  animation: creativeSweep 4.8s ease-in-out infinite;
}

.effects::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 95%, rgba(245, 207, 116, 0.16), transparent 28%);
  opacity: 0.9;
  animation: lowerGlow 2.8s ease-in-out infinite alternate;
}

.spark {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: var(--ss, 4px);
  height: var(--ss, 4px);
  border-radius: 999px;
  background: rgba(255, 224, 143, 0.82);
  box-shadow: 0 0 14px rgba(255, 209, 97, 0.78);
  opacity: 0;
  animation: sparkle var(--sd, 4.5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  z-index: 5;
  border-radius: var(--r, 18px);
  outline: 0;
  -webkit-tap-highlight-color: transparent;
}

.hotspot::before,
.hotspot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.hotspot::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent),
    radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255, 244, 202, 0.35), transparent 34%);
  mix-blend-mode: screen;
  transform: scale(0.98);
}

.hotspot::after {
  border: 1px solid rgba(255, 232, 165, 0.92);
  box-shadow:
    0 0 0 3px rgba(255, 202, 91, 0.16),
    0 0 28px rgba(255, 211, 112, 0.58),
    inset 0 0 20px rgba(255, 232, 165, 0.22);
  transform: scale(1);
}

.hotspot:hover::before,
.hotspot:focus-visible::before,
.hotspot.is-pressed::before {
  opacity: 1;
  transform: scale(1.03);
}

.hotspot:hover::after,
.hotspot:focus-visible::after,
.hotspot.is-pressed::after {
  opacity: 1;
  transform: scale(1.035);
}

.hotspot.is-pressed {
  animation: tapPop 220ms ease-out;
}

.hotspot.menu,
.hotspot.search {
  --r: 999px;
}

.hotspot.store {
  --r: 14px;
}

.hotspot.pill {
  --r: 28px;
}

.overview {
  min-height: var(--stage-height);
  color: #fff;
  background:
    radial-gradient(circle at 10% 4%, rgba(247, 196, 93, 0.24), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(197, 50, 39, 0.16), transparent 28rem),
    #080604;
}

.overview-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 44px;
}

.overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.overview h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.overview p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.6;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(245, 207, 116, 0.72);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  outline: none;
}

.card img {
  width: 100%;
  aspect-ratio: 784 / 1168;
  object-fit: cover;
  display: block;
}

.card span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  min-width: 44px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #130d04;
  background: linear-gradient(180deg, #ffe39b, #c48a32);
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.34);
}

@keyframes ambientPulse {
  from {
    opacity: 0.62;
    transform: scale(1);
  }
  to {
    opacity: 0.92;
    transform: scale(1.035);
  }
}

@keyframes backgroundSweep {
  0%,
  34% {
    transform: translateX(-95%);
    opacity: 0;
  }
  52% {
    opacity: 1;
  }
  74%,
  100% {
    transform: translateX(95%);
    opacity: 0;
  }
}

@keyframes creativeSweep {
  0%,
  36% {
    transform: translateX(-120%);
    opacity: 0;
  }
  50% {
    opacity: 0.55;
  }
  75%,
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes lowerGlow {
  from {
    transform: translateY(10px) scale(0.96);
    opacity: 0.55;
  }
  to {
    transform: translateY(-2px) scale(1.04);
    opacity: 1;
  }
}

@keyframes sparkle {
  0%,
  100% {
    transform: translate3d(0, 10px, 0) scale(0.7);
    opacity: 0;
  }
  35% {
    opacity: 0.85;
  }
  72% {
    transform: translate3d(8px, -28px, 0) scale(1);
    opacity: 0;
  }
}

@keyframes tapPop {
  0% {
    transform: scale(1);
  }
  48% {
    transform: scale(0.965);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .overview-head {
    display: block;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .stage {
    place-items: center;
  }

  .phone-shell {
    width: min(100vw, calc(var(--stage-height) * var(--creative-ratio-value)));
    box-shadow: none;
  }

  .overview-wrap {
    width: min(100% - 22px, 520px);
    padding-top: 24px;
  }

  .gallery {
    gap: 10px;
  }
}

@media (max-height: 640px) and (orientation: portrait) {
  .ambient-bg {
    filter: blur(22px) saturate(1.12) brightness(0.64);
  }

  .effects::before {
    opacity: 0.36;
  }
}

@media (max-width: 360px) {
  .hotspot::after {
    box-shadow:
      0 0 0 2px rgba(255, 202, 91, 0.13),
      0 0 20px rgba(255, 211, 112, 0.46),
      inset 0 0 16px rgba(255, 232, 165, 0.18);
  }
}

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