/* ==========================================================================
   ATQM Early Access Program — лендинг
   Палитра и размеры — из ТЗ (docs/ATQM_Early_Access_Landing_Content_TZ.pdf, п. 2)
   ========================================================================== */

@font-face { font-family: 'Geologica'; src: url('fonts/geologica-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geologica'; src: url('fonts/geologica-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geologica'; src: url('fonts/geologica-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geologica'; src: url('fonts/geologica-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #050505;
  --bg-alt: #0A0A0A;
  --text: #FFFFFF;
  --muted: #8D8D8D;
  --line: #262626;
  --accent: #FFD900;

  --gutter: clamp(16px, 4vw, 48px);
  --container: 1320px;
  --header-h: 72px;
  --section-y: clamp(88px, 12vw, 168px);

  --font: 'Geologica', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  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: 16px; top: -100px; z-index: 100;
  padding: 10px 16px;
  background: var(--accent); color: #050505;
  font-weight: 500; font-size: 14px;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.4;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  flex: none;
  background: var(--accent);
}

/* ---------- шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-open { background: var(--bg); border-bottom-color: var(--line); }
.site-header.is-scrolled:not(.is-open) {
  background: rgba(5, 5, 5, .86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: inline-flex; padding: 6px 0; }
.logo img { width: 88px; height: auto; }

.site-nav ul { display: flex; gap: clamp(20px, 3vw, 44px); }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a[aria-current="true"] { color: var(--text); }
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) {
  .site-nav a:hover { color: var(--text); }
  .site-nav a:hover::after { transform: scaleX(1); }
  .scroll-hint:hover { color: var(--text); }
  .faq-btn:hover { color: var(--accent); }
}

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.menu-toggle-bar {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform .3s var(--ease);
}
.site-header.is-open .menu-toggle-bar:first-child { transform: translateY(4.25px) rotate(45deg); }
.site-header.is-open .menu-toggle-bar:last-child { transform: translateY(-4.25px) rotate(-45deg); }

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .site-header.is-open .site-nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 16px 0; font-size: 14px; }
  .site-nav a::after { display: none; }
}
/* без JS меню на мобильном просто открыто под шапкой */
.no-js .menu-toggle { display: none; }
@media (max-width: 760px) {
  .no-js .site-header { position: absolute; }
  .no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 48px) 0 120px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 75%);
}
.hero-glow {
  position: absolute;
  width: min(900px, 120vw); aspect-ratio: 1;
  right: -18%; top: -22%;
  background: radial-gradient(circle, rgba(255, 217, 0, .10) 0%, rgba(255, 217, 0, .03) 38%, transparent 68%);
  animation: glow-drift 22s ease-in-out infinite alternate;
}
.hero-line {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-line path {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: .35;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: line-draw 3.2s var(--ease) .4s forwards;
}
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-8%, 10%, 0) scale(1.08); }
}
@keyframes line-draw { to { stroke-dashoffset: 0; } }

.hero-inner { position: relative; }
.hero-eyebrow { margin-bottom: clamp(24px, 3vw, 40px); color: var(--text); }
.hero-title {
  font-weight: 600;
  /* ТЗ: 96–160px desktop, 52–72px mobile */
  font-size: clamp(52px, 10.4vw, 160px);
  line-height: .92;
  letter-spacing: -.035em;
  max-width: 11ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.hero-sub {
  margin-top: clamp(28px, 3.5vw, 48px);
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}
.scroll-hint {
  position: absolute; left: 50%; bottom: 32px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 500; letter-spacing: .22em;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.scroll-hint-line {
  position: relative;
  width: 1px; height: 44px;
  background: var(--line);
  overflow: hidden;
}
.scroll-hint-line::after {
  content: '';
  position: absolute; left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--accent);
  animation: scroll-cue 2.4s var(--ease) infinite;
}
@keyframes scroll-cue {
  0%   { top: -40%; }
  70%, 100% { top: 100%; }
}

@media (min-width: 761px) {
  /* ТЗ: не меньше 96px на desktop */
  .hero-title { font-size: clamp(96px, 10.4vw, 160px); }
}
@media (max-width: 760px) {
  .hero { min-height: 92vh; min-height: 92svh; padding-bottom: 136px; }
  .scroll-hint { bottom: 24px; }
  .scroll-hint-line { height: 36px; }
  .hero-title { font-size: clamp(52px, 14.5vw, 72px); line-height: .96; }
  .hero-grid { background-size: 56px 56px; }
}

/* ---------- секции ---------- */
.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }

.split {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: start;
}
.split > .eyebrow { padding-top: .9em; }

.section-title {
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -.03em;
  max-width: 14ch;
}
.prose {
  margin-top: clamp(28px, 3.5vw, 48px);
  display: grid; gap: 1.1em;
  max-width: 38em;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--muted);
}
.prose p:first-child { color: var(--text); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split > .eyebrow { padding-top: 0; }
}

/* ---------- program: карточки ---------- */
.cards {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  position: relative;
  padding: clamp(28px, 3.5vw, 52px);
  min-height: clamp(220px, 22vw, 300px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.card::before {
  content: '';
  position: absolute; left: -1px; top: -1px;
  width: 32px; height: 2px;
  background: var(--accent);
}
.card-title {
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -.01em;
  max-width: 12ch;
}
.card p { max-width: 28em; color: var(--muted); }

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; gap: 20px; }
}

/* ---------- шаги доступа ---------- */
.steps {
  margin-top: clamp(64px, 8vw, 120px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(24px, 3vw, 48px);
  counter-reset: none;
}
.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.step::before {
  content: '';
  position: absolute; left: 0; top: -1px;
  width: 32px; height: 1px;
  background: var(--accent);
}
.step-num {
  font-size: 13px; font-weight: 500; letter-spacing: .16em;
  color: var(--accent);
}
.step-title {
  margin-top: 16px;
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.2;
}
.step p:last-child { margin-top: 14px; color: var(--muted); max-width: 26em; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- статус ---------- */
.status { --status-color: var(--accent); }
.status[data-status="access-open"]   { --status-color: #3DDC84; }
.status[data-status="invite-only"]   { --status-color: var(--accent); }
.status[data-status="access-closed"] { --status-color: var(--muted); }

.status-inner { text-align: left; }
.status-label { color: var(--text); }
.status-label::before { display: none; }
.status-dot {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--status-color);
  flex: none;
}
.status-dot::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--status-color);
  animation: pulse 2.4s ease-out infinite;
}
.status[data-status="access-closed"] .status-dot::after { animation: none; }
@keyframes pulse {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(3.2); opacity: 0; }
}
.status-value {
  margin-top: clamp(24px, 3vw, 40px);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 136px);
  line-height: .95;
  letter-spacing: -.035em;
  color: var(--text);
}
.status-value::after {
  content: '';
  display: block;
  width: 64px; height: 2px;
  margin-top: clamp(24px, 3vw, 40px);
  background: var(--status-color);
}
.status-caption {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--muted);
}

/* ---------- примечание ---------- */
.note {
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}
.note-inner {
  display: grid; gap: .9em;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.note-inner p { max-width: 62em; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { font-size: inherit; font-weight: inherit; }
.faq-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(22px, 2.4vw, 32px) 0;
  background: none; border: 0; cursor: pointer;
  text-align: left;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  transition: color .2s var(--ease);
}
.faq-btn:focus-visible { outline-offset: 2px; }
.faq-icon {
  position: relative; flex: none;
  width: 16px; height: 16px;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 16px; height: 1.5px; margin-top: -.75px;
  background: currentColor;
  transition: transform .3s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-btn[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }

.faq-a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .35s var(--ease);
}
.faq-a > p {
  overflow: hidden;
  min-height: 0;
  max-width: 40em;
  padding-bottom: clamp(22px, 2.4vw, 32px);
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--muted);
}
/* скрываем ответы только когда работает JS — без него всё раскрыто */
.js .faq-a[data-collapsed] { grid-template-rows: 0fr; }
.js .faq-a[data-collapsed] > p { padding-bottom: 0; visibility: hidden; transition: padding-bottom .35s var(--ease), visibility 0s linear .35s; }
.js .faq-a > p { transition: padding-bottom .35s var(--ease); }

/* ---------- футер ---------- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px 32px;
}
.footer-inner img { width: 72px; height: auto; }
.footer-inner p { font-size: 13px; color: var(--muted); }

/* ---------- появление при скролле ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- reduced motion: анимации выключены ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-line path { stroke-dashoffset: 0; }
  .scroll-hint-line::after { top: 30%; }
  .js .reveal { opacity: 1; transform: none; }
}
