@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Inter:wght@400;450;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #ffffff;
  --muted: #8a91a3;
  --line: rgba(255, 255, 255, 0.14);
  --blue: #40a9ff;
  --violet: #7c3cff;
  --surface: #11131a;
  
  /* Жорсткий стандарт відступів */
  --section-py: clamp(3rem, 6vw, 4.5rem); /* Відстань від ліній до тексту зверху/знизу */
  --gap-block: clamp(1.25rem, 4vw, 2.25rem); /* Відстань між заголовком і текстом всередині блоку */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 173, 255, 0.18), transparent 34rem),
    linear-gradient(180deg, #0b0b0c 0%, var(--bg) 42rem);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 3rem);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

.hero__inner {
  position: relative;
  width: min(100%, 48rem);
  display: grid;
  justify-items: center;
  text-align: center;
  padding-bottom: 5svh;
}

.logo {
  width: clamp(6.6rem, 12vw, 9.5rem);
  aspect-ratio: 1;
  border-radius: 2rem;
  box-shadow:
    0 1.5rem 5rem rgba(88, 173, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: clamp(1.35rem, 3vw, 2rem);
  font-size: clamp(3.4rem, 12vw, 8.6rem);
  line-height: 0.86;
  font-family:
    Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.2;
  text-transform: uppercase;
  font-family:
    "JetBrainsMono-Regular", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hero-copy {
  width: min(100%, 42rem);
  margin-top: clamp(1.35rem, 3vw, 2rem);
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 2.2vw, 1.35rem);
  line-height: 1.48;
}

.hero-copy span {
  display: block;
}

.hero-copy span + span {
  margin-top: 0.15rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.hero-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: rgba(17, 19, 26, 0.72);
  color: rgba(255, 255, 255, 0.72);
  font-family:
    "JetBrainsMono-Regular", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.52rem;
  line-height: 1;
  text-transform: uppercase;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: clamp(1.7rem, 4vw, 2.6rem);
}

.store-link {
  display: grid;
  place-items: center;
  min-height: 3.45rem;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    filter 180ms ease;
}

.store-link:hover {
  opacity: 1;
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 20px rgba(88, 173, 255, 0.3));
}

.store-link img {
  height: clamp(3rem, 7vw, 3.75rem);
  width: auto;
}

/* Спільна ширина контейнера */
.section-head,
.statement__inner,
.editors__inner,
.story__frame,
.footer {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

/* =========================================================
   СТРОГИЙ КОНТРОЛЬ ВІДСТУПІВ МІЖ БЛОКАМИ ТА ЛІНІЯМИ
   ========================================================= */

/* Обнуляємо зайві падінги з обгорток */
.statement,
.editors,
.story {
  padding: 0;
}

.statement__inner {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: var(--gap-block);
  align-items: end;
}

.screens {
  padding-top: 1rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem; /* Відступ від самого низу екрана */
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px; /* Довжина лінії */
  background: linear-gradient(to top, rgba(255,255,255,0.5), transparent);
  animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
  0% { transform: translate(-50%, -10px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-50%, 10px); opacity: 0; }
}

.editors__inner {
  padding: var(--section-py) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: var(--section-py); /* Відстань між текстом і сіткою іконок */
}

.story__frame {
  padding: var(--section-py) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
}

.footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Ідеальний відступ від останньої лінії */
  padding: var(--section-py) 0 3rem;
  color: var(--muted);
  font-family:
    "JetBrainsMono-Regular", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* ========================================================= */

.statement__lead {
  color: var(--ink);
  font-family:
    Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2rem, 5.5vw, 5rem);
  font-weight: 760;
  line-height: 0.98;
}

.statement__inner > p:not(.statement__lead),
.section-head p,
.editors__copy p {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.62;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.7fr);
  gap: var(--gap-block);
  align-items: end;
  padding-bottom: var(--section-py);
}

h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  line-height: 0.96;
  font-family:
    Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 720;
  letter-spacing: 0;
}

h2 span {
  display: block;
}

.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(15rem, 22rem);
  gap: clamp(1rem, 2.8vw, 2rem);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  padding: 0 max(1rem, calc((100vw - 72rem) / 2)) 1rem;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel img {
  width: 100%;
  aspect-ratio: 1242 / 2688;
  object-fit: cover;
  border-radius: 1.6rem;
  scroll-snap-align: center;
  box-shadow:
    0 2rem 5rem rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.editors__copy {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.7fr);
  gap: var(--gap-block);
  align-items: end;
}

.editor-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(4.4rem, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1rem);
}

.editor-row figure {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin: 0;
}

.editor-row img {
  width: clamp(3.4rem, 5vw, 4.8rem);
  aspect-ratio: 1;
  border-radius: 1.15rem;
  box-shadow:
    0 1rem 2.5rem rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

.editor-row figcaption {
  width: 100%;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.62);
  font-family:
    "JetBrainsMono-Regular", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.copy {
  display: grid;
  width: min(100%, 46rem);
  gap: clamp(1.25rem, 2.6vw, 1.85rem);
  color: rgba(255, 255, 255, 0.74);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 450;
  line-height: 1.5;
  text-align: center;
  text-align-last: center;
}

.copy strong {
  color: var(--ink);
  font-weight: 650;
}

.story-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.footer img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
}

.footer p {
  margin-right: auto;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

.footer a {
  position: relative;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
}

.footer a + a::before {
  position: absolute;
  left: -0.78rem;
  content: "/";
  color: rgba(255, 255, 255, 0.24);
}

.footer a:hover {
  color: var(--ink);
}

/* =========================================
   АНІМАЦІЇ ПОЯВИ ПРИ СКРОЛІ (Reveal)
   ========================================= */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* =========================================
   АДАПТИВНІСТЬ
   ========================================= */

@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
    padding: 0 1rem;
  }

  .hero__inner {
    padding-bottom: 12svh;
  }

  .logo {
    border-radius: 1.55rem;
  }

  .store-links {
    margin-top: 2.5rem;
    width: min(100%, 22rem);
    gap: 0.65rem;
  }

  .store-link {
    min-height: 3.1rem;
  }

  .store-link img {
    height: 3.1rem;
  }

  .hero-copy {
    margin-top: 2.5rem;
  }

  .statement__lead,
  h2 {
    max-width: none;
    font-size: clamp(2.1rem, 6.8vw, 3.5rem);
    line-height: 0.98;
  }

  .screens .section-head h2 {
    max-width: none;
    font-size: clamp(2.1rem, 6.8vw, 3.5rem);
  }

  .screens .section-head h2 span {
    white-space: nowrap;
  }

  .carousel {
    grid-auto-columns: minmax(13.5rem, 76vw);
  }

  .carousel img {
    border-radius: 1.2rem;
  }

  .statement__inner,
  .section-head,
  .editors__copy,
  .story__frame {
    grid-template-columns: 1fr;
  }

  .editor-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem 0.7rem;
  }

  .editor-row img {
    border-radius: 0.95rem;
  }

  .footer {
    align-items: center;
    flex-direction: column;
    gap: 0.95rem;
    text-align: center;
  }

  .footer p {
    margin-right: 0;
  }

  .footer nav {
    justify-content: center;
  }
}