/* Among the Waves — VS/Studio
   Светлая тема по макету «Among the Waves White». */

:root {
  --bg: #EEF1F2;
  --bg-2: #E2E8EA;
  --ink: #10151A;
  --head: #0C1116;
  --text: #2A343C;
  --text-2: #333E47;
  --muted: #5A6873;
  --muted-2: #66747F;
  --faint: #8C99A3;

  --accent: #5B8500;
  --accent-ink: #476800;
  --lime: #9EE217;
  --lime-hi: #C4F25A;

  --dark: #0A0A08;
  --dark-2: #10151A;
  --on-dark: #F2F5F6;
  --on-dark-2: rgba(242, 245, 246, .62);

  --line: rgba(91, 133, 0, .25);
  --line-2: rgba(91, 133, 0, .18);

  --f-display: 'Forum', 'Noto Serif SC', serif;
  --f-mono: 'Share Tech Mono', 'Noto Sans SC', monospace;
  --f-body: 'Manrope', 'Noto Sans SC', sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: 48px;
  --topbar-h: 70px;

  color-scheme: light;
}

/* ---------- База ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--topbar-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Пока подставляется перевод, страница скрыта (доли секунды) */
.i18n-wait body { opacity: 0; }
body { transition: opacity .25s ease; }

a { color: var(--accent); text-decoration: none; transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease; }
a:hover { color: var(--accent-ink); }

button { font: inherit; }

::selection { background: var(--accent); color: #F2F5F6; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.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: fixed; top: 10px; left: 10px; z-index: 1000;
  padding: 10px 16px; background: var(--lime); color: var(--dark);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: var(--dark); }

/* Зерно поверх страницы */
.grain {
  position: fixed; inset: -60%; z-index: 900; pointer-events: none;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainshift 6s steps(8) infinite;
}

/* ---------- Анимации ---------- */

@keyframes hum { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes grainshift {
  0% { transform: translate(0, 0); } 10% { transform: translate(-4%, -3%); } 20% { transform: translate(-8%, 2%); }
  30% { transform: translate(3%, -6%); } 40% { transform: translate(-2%, 7%); } 50% { transform: translate(-9%, -2%); }
  60% { transform: translate(5%, 4%); } 70% { transform: translate(-3%, 6%); } 80% { transform: translate(6%, -4%); }
  90% { transform: translate(-5%, 1%); } 100% { transform: translate(0, 0); }
}

.rise { opacity: 0; animation: riseIn .95s var(--ease) both; }
.rise-2 { animation-delay: .18s; }
.rise-3 { animation-delay: .38s; }

/* Появление блоков при прокрутке (только когда работает JS) */
.js .rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Общие элементы ---------- */

.kicker {
  margin: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent);
}

.h2 {
  margin: 0;
  font-family: var(--f-display); font-weight: 500; line-height: 1.05;
  color: var(--head);
}
.h2--caps { text-transform: uppercase; letter-spacing: .04em; }

.lead {
  margin: 0;
  font-size: 16px; line-height: 1.85; font-weight: 300;
  color: var(--text); text-wrap: pretty;
}

.btn {
  display: inline-block;
  background: var(--lime); color: var(--dark);
  padding: 15px 32px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  text-align: center;
}
.btn:hover { background: var(--lime-hi); color: var(--dark); transform: translateY(-3px); }
.btn--lg { padding: 16px 38px; }

.link-arrow {
  align-self: flex-start;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--lime); padding-bottom: 5px;
}

.section-pad { padding: 130px var(--gutter) 90px; }

/* ---------- Верхняя панель ---------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 40px;
  isolation: isolate;
}
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 6, 5, .92), rgba(6, 6, 5, .78));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(158, 226, 23, .2);
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.topbar.is-scrolled::before { opacity: 1; }

.brand { display: flex; align-items: center; gap: 14px; color: var(--on-dark); min-width: 0; }
.brand:hover { color: var(--on-dark); }
.brand img { height: 42px; width: auto; flex-shrink: 0; transition: height .4s var(--ease); }
.topbar.is-scrolled .brand img { height: 36px; }
.brand-text { display: flex; flex-direction: column; gap: 3px; border-left: 1px solid rgba(242, 245, 246, .35); padding-left: 14px; min-width: 0; }
.brand-name { font-family: var(--f-display); font-size: 17px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.brand-sub { font-family: var(--f-mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-2); white-space: nowrap; }

.topnav {
  display: none; margin-left: auto; gap: 28px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  opacity: 0; transform: translateY(-6px); transition: opacity .4s ease, transform .4s var(--ease);
}
.topnav a { color: var(--on-dark-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.topnav a:hover, .topnav a.is-active { color: var(--lime-hi); }
.topnav a.is-active { border-bottom-color: var(--lime); }
@media (min-width: 1000px) {
  .topnav { display: flex; pointer-events: none; }
  .topbar.is-scrolled .topnav { opacity: 1; transform: none; pointer-events: auto; }
}

.lang {
  display: flex; align-items: center; flex-shrink: 0;
  border: 1px solid rgba(242, 245, 246, .4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lang button {
  background: transparent; color: rgba(242, 245, 246, .72);
  border: 0; cursor: pointer;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  padding: 6px 11px;
  transition: background .22s ease, color .22s ease;
}
.lang button:hover { color: var(--lime-hi); }
.lang button[aria-pressed="true"] { background: var(--lime); color: var(--dark); }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 640px;
  overflow: hidden; background: var(--dark);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.hero-art {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: left center;
  transition: opacity 1.4s ease; pointer-events: none;
}
.hero.is-video .hero-art { opacity: 0; }
.hero-shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 6, 5, .82) 0%, rgba(6, 6, 5, .45) 14%, transparent 34%),
    linear-gradient(0deg, rgba(6, 6, 5, .7) 0%, transparent 36%);
}
.hero-inner {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 40px 40px;
}
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-pitch { display: flex; flex-direction: column; gap: 18px; max-width: 460px; }
.hero-kicker {
  margin: 0; display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--lime-hi);
  animation: hum 5s ease-in-out infinite;
}
.hero-kicker::before { content: ''; width: 26px; height: 1px; background: currentColor; flex-shrink: 0; }
.hero-pitch .btn { align-self: flex-start; padding: 14px 30px; }

.hero-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.hnav {
  position: relative; isolation: isolate;
  display: flex; align-items: baseline; gap: 14px;
  padding: 2px 14px;
  color: var(--on-dark);
  font-family: var(--f-display); font-size: clamp(38px, 4.6vw, 64px); line-height: 1.18;
  text-shadow: 0 2px 24px rgba(6, 6, 5, .55);
}
.hnav:hover { color: var(--lime-hi); }
.hnav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(158, 226, 23, .22), rgba(158, 226, 23, .34));
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .45s var(--ease);
}
.hnav::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2px;
  background: var(--lime);
  transform: scaleY(0); transition: transform .3s var(--ease);
}
.hnav:hover::before, .hnav:focus-visible::before { transform: scaleX(1); transform-origin: left center; }
.hnav:hover::after, .hnav:focus-visible::after { transform: scaleY(1); }
.hnav-num {
  font-family: var(--f-mono); font-size: 11px; color: rgba(242, 245, 246, .5); text-shadow: none;
  transition: color .3s ease, transform .45s var(--ease);
}
.hnav:hover .hnav-num { color: var(--lime-hi); transform: translateX(-6px); }

/* ---------- Галерея ---------- */

.gallery { padding: 120px 0 100px; }
.gallery-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  max-width: 1360px; margin: 0 auto 44px; padding: 0 var(--gutter);
}
.gallery-head > div { display: flex; flex-direction: column; gap: 16px; }
.gallery-head .h2 { font-size: clamp(40px, 5vw, 66px); line-height: 1; }
.gallery-head p { max-width: 340px; margin: 0; font-size: 14px; line-height: 1.8; font-weight: 300; color: var(--muted); text-wrap: pretty; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  background: var(--dark-2);
}
.gallery-grid figure { margin: 0; overflow: hidden; position: relative; }
.g-vid { grid-column: span 4; aspect-ratio: 32 / 9; }
.g-img { grid-column: span 2; aspect-ratio: 16 / 9; } /* по высоте совпадает с соседним роликом 32:9 */

.gallery-grid img, .gallery-grid video {
  width: calc(100% + 2px); height: calc(100% + 2px); margin: -1px; max-width: none;
  object-fit: cover;
}
.gallery-grid img { transition: transform 1.1s var(--ease), filter .5s ease; }
.g-link { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.g-link:hover img, .g-link:focus-visible img { transform: scale(1.07); filter: saturate(1.12) brightness(1.05); }
.g-link:focus-visible { outline-offset: -3px; }

/* ---------- Об игре ---------- */

.about { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
.about-head { display: flex; flex-direction: column; gap: 26px; }
.about-head .h2 { font-size: clamp(40px, 4.6vw, 64px); }
.about-head .h2 em {
  font-style: normal; color: var(--accent);
  font-family: var(--f-mono); font-size: .78em; text-transform: uppercase; letter-spacing: .06em;
}
.about-banner { margin: 0; }
.about-banner img { width: 100%; height: auto; }
.about-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 72px; align-items: start; }
.about-cols .lead { line-height: 1.9; }
.about-cols > div { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Манифест ---------- */

.manifesto { position: relative; overflow: hidden; }
.manifesto-inner { max-width: 880px; margin: 0 auto; padding: 130px var(--gutter); }
.manifesto-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; margin-bottom: 70px; }
.manifesto-head .h2 { font-size: clamp(52px, 8vw, 96px); line-height: 1.1; }
.manifesto-head .lead { max-width: 600px; }

.mlist { list-style: none; margin: 0; padding: 0; }
.mrow { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 34px; padding: 38px 0; border-top: 1px solid var(--line); }
.mrow-num { font-family: var(--f-display); font-size: 46px; font-style: italic; color: var(--accent); line-height: 1; }
.mrow-body { display: flex; flex-direction: column; gap: 11px; }
.mrow h3 { margin: 0; font-family: var(--f-display); font-size: 28px; font-weight: 600; color: var(--head); }
.mrow p { margin: 0; font-size: 15px; line-height: 1.85; font-weight: 300; color: var(--text-2); text-wrap: pretty; }

.manifesto-end {
  border-top: 1px solid var(--line); padding: 56px 0 0;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 30px;
}
.manifesto-end blockquote {
  max-width: 700px; margin: 0;
  font-family: var(--f-display); font-size: clamp(26px, 3.4vw, 36px); font-style: italic; line-height: 1.45;
  color: var(--accent-ink); text-wrap: pretty;
}

/* ---------- Вопросы ---------- */

.faq { background: var(--bg-2); border-top: 1px solid var(--line-2); padding: 120px var(--gutter); }
.faq-inner { max-width: 860px; margin: 0 auto; }
.faq-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 60px; }
.faq-head .h2 { font-size: clamp(44px, 6vw, 72px); line-height: 1.1; }
.faq-head p { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted-2); }

.faq-list { border-bottom: 1px solid rgba(91, 133, 0, .22); }
.faq details { border-top: 1px solid rgba(91, 133, 0, .22); }
.faq summary {
  display: flex; align-items: baseline; gap: 22px; padding: 26px 0;
  list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-n { font-family: var(--f-mono); font-size: 12px; color: var(--accent); padding-top: 6px; min-width: 24px; }
.faq-q { font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--head); flex: 1; line-height: 1.25; transition: color .22s ease; }
.faq summary:hover .faq-q { color: var(--accent-ink); }
.faq-plus { color: var(--accent); font-size: 22px; line-height: 1; transition: transform .3s var(--ease); padding-top: 4px; }
.faq details[open] .faq-plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 30px 46px; }
.faq-a p { margin: 0 0 1em; font-size: 15px; line-height: 1.85; font-weight: 300; color: var(--text-2); text-wrap: pretty; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Подвал ---------- */

.footer {
  border-top: 1px solid var(--line); background: var(--bg);
  padding: 100px var(--gutter) 56px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 34px;
}
.footer-mark { display: flex; align-items: center; gap: 16px; color: var(--accent); }
.footer-mark::before, .footer-mark::after { content: ''; width: 70px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.footer-mark::after { transform: scaleX(-1); }
.footer-mark span { position: relative; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 50%; }
.footer-mark span::after { content: ''; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.footer-tagline {
  max-width: 720px; margin: 0;
  font-family: var(--f-display); font-size: clamp(28px, 4vw, 44px); font-weight: 500; line-height: 1.3;
  color: var(--head); text-wrap: pretty;
}
.footer-sub { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted-2); }
.socials { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: block;
  border: 1px solid rgba(91, 133, 0, .35); padding: 10px 18px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text);
}
.socials a:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.copyright { margin: 0; font-family: var(--f-mono); font-size: 11px; color: var(--faint); letter-spacing: .1em; }

/* ---------- Просмотр картинок ---------- */

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(6, 6, 5, .94); color: var(--on-dark);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(6, 6, 5, .6); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lbIn .35s var(--ease); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: min(92vw, 1600px); max-height: 84vh; max-height: 84dvh;
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .6);
  user-select: none; -webkit-user-drag: none;
}
.lb-btn {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: rgba(6, 6, 5, .5); color: var(--on-dark);
  border: 1px solid rgba(158, 226, 23, .35); cursor: pointer;
  font-family: var(--f-mono); font-size: 20px; line-height: 1;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.lb-btn:hover { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .24em; color: var(--on-dark-2);
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .hero-nav .hnav { font-size: clamp(34px, 5vw, 52px); }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --topbar-h: 56px; }

  .topbar { padding: 10px 16px; gap: 12px; }
  .brand { gap: 10px; }
  .brand img, .topbar.is-scrolled .brand img { height: 32px; }
  .brand-text { padding-left: 10px; }
  .brand-name { font-size: 14px; }
  .brand-sub { font-size: 8px; letter-spacing: .22em; }

  /* На узком экране показываем героиню, а не обрезанный логотип */
  .hero-art { object-position: 74% center; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(6, 6, 5, .82) 0%, rgba(6, 6, 5, .35) 14%, transparent 30%),
      linear-gradient(0deg, rgba(6, 6, 5, .88) 0%, rgba(6, 6, 5, .6) 38%, transparent 62%);
  }
  .hero-inner { padding: 20px 20px 32px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 30px; }
  .hero-nav { align-items: flex-start; text-align: left; order: -1; }
  .hero-nav .hnav { font-size: 32px; padding: 2px 10px 2px 0; }

  .gallery { padding: 80px 0 60px; }
  .g-vid { grid-column: span 6; aspect-ratio: 16 / 9; }
  .g-img { grid-column: span 3; }
  .g-img--wide-sm { grid-column: span 6; } /* картинок нечётное число — последняя на всю ширину */

  .section-pad { padding: 80px 20px 60px; }
  .manifesto-inner { padding: 80px 20px 60px; }
  .faq { padding: 80px 20px 60px; }
  .about-cols { grid-template-columns: 1fr; gap: 22px; }
  .mrow { grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 28px 0; }
  .mrow-num { font-size: 32px; }
  .mrow h3 { font-size: 24px; }
  .faq summary { gap: 14px; }
  .faq-q { font-size: 19px; }
  .faq-a { padding-left: 38px; }
  .footer { padding: 70px 20px 44px; }

  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-close { top: 12px; right: 12px; }
}

@media (max-width: 359px) {
  .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .hero-kicker { animation: none; }
  .rise { opacity: 1; animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .gallery-grid img { transition: none; }
}
