/* Just for Joy — мир «GoPro-монтаж».
   Экранная грамматика экшн-камеры: чёрный кадр, белый HUD, красная точка записи.
   Палитра: #000000 / #ffffff / #ff0000 / #8a8a8a */

:root {
  --black: #000000;
  --white: #ffffff;
  --rec: #ff0000;
  --gray: #8a8a8a;
  --line: rgba(255, 255, 255, 0.18);
  --display: 'Unbounded', 'Arial Black', sans-serif;
  --body: 'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --timeline-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  padding-bottom: var(--timeline-h);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gray);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.08; }

h1 { font-size: clamp(26px, 4.4vw, 62px); font-weight: 900; text-transform: uppercase; overflow-wrap: anywhere; }
h2 { font-size: clamp(26px, 3.6vw, 48px); font-weight: 700; text-transform: uppercase; }
h3 { font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; }

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

a { color: inherit; }

::selection { background: var(--rec); color: var(--white); }

/* ---------- верхний HUD ---------- */

.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--pad);
  background: linear-gradient(rgba(0,0,0,0.82), rgba(0,0,0,0));
}

.logo { height: 32px; width: auto; color: var(--white); display: block; }
.logo-word { font-family: var(--display); font-weight: 900; font-size: 34px; fill: currentColor; letter-spacing: 1px; }
.logo-footer { height: 26px; }

.hud-nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }

.hud-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.hud-nav a:hover, .hud-nav a:focus-visible { border-bottom-color: var(--rec); }

.hud-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--white);
}

.rec-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--rec);
  animation: rec-blink 1.2s steps(1) infinite;
}

.rec-label { letter-spacing: 0.14em; }

@keyframes rec-blink { 50% { opacity: 0.15; } }

/* ---------- хиро ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.78));
  z-index: 0;
}

.finder { position: absolute; inset: clamp(64px, 9vh, 96px) var(--pad) clamp(72px, 10vh, 110px); z-index: 1; pointer-events: none; }

.corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--white); }
.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.hero-hud {
  position: absolute;
  top: clamp(72px, 10vh, 104px);
  left: calc(var(--pad) + 14px);
  right: calc(var(--pad) + 14px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
  color: rgba(255,255,255,0.85);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 calc(var(--pad) + 14px) clamp(90px, 13vh, 150px);
  max-width: 980px;
}

.hero-sub {
  margin-top: 22px;
  max-width: 560px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255,255,255,0.92);
}

.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- кнопки ---------- */

.btn-rec, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: 2px solid var(--white);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-rec { background: var(--rec); border-color: var(--rec); color: var(--white); font-weight: 500; }
.btn-rec:hover, .btn-rec:focus-visible { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-rec:hover .btn-dot { background: var(--rec); }

.btn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--white); animation: rec-blink 1.2s steps(1) infinite; }

.btn-ghost { color: var(--white); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--white); color: var(--black); }

/* ---------- секции ---------- */

section { padding: clamp(70px, 10vh, 130px) var(--pad); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vh, 64px);
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

/* ---------- клипы направлений ---------- */

.clips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

@media (min-width: 760px) { .clips { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .clips { grid-template-columns: repeat(5, 1fr); } }

.clip { display: flex; flex-direction: column; }

.clip-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
}

.clip-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.clip:hover .clip-media img { transform: scale(1.045); }

.clip-tc {
  position: absolute;
  left: 12px; bottom: 10px;
  color: var(--white);
  background: rgba(0,0,0,0.65);
  padding: 4px 8px;
}

.clip-body { padding: 18px 2px 0; }

.clip-body h3 { text-transform: uppercase; }

.clip-body p { margin-top: 8px; color: var(--gray); font-size: 15.5px; }

/* появление кадров при скролле: прячем только когда JS точно работает */
html.js .clip { opacity: 0; transform: translateY(26px); transition: opacity 0.6s, transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
html.js .clip.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .clip { opacity: 1; transform: none; transition: none; }
  .rec-dot, .btn-dot { animation: none; }
  .clip-media img { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- цифры ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat { text-align: left; }

.stat-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 84px);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin-top: 12px;
  max-width: 260px;
}

/* ---------- шаги ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(22px, 3vw, 44px);
}

.steps li { border-top: 2px solid var(--white); padding-top: 20px; }

.step-num { color: var(--rec); font-size: 14px; display: block; margin-bottom: 12px; }

.steps h3 { text-transform: uppercase; }

.steps p { margin-top: 10px; color: var(--gray); font-size: 15.5px; }

/* ---------- поездки ---------- */

.trips-empty {
  border: 1px dashed var(--line);
  padding: clamp(34px, 5vw, 60px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.trips-msg { max-width: 520px; font-size: clamp(17px, 1.6vw, 20px); }

/* ---------- отзывы ---------- */

.review-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.review-slot {
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--gray);
}

/* ---------- контакт ---------- */

.contact {
  position: relative;
  text-align: center;
  padding-top: clamp(90px, 14vh, 170px);
  padding-bottom: clamp(90px, 14vh, 170px);
}

.finder-static { inset: 34px var(--pad); }

.contact-tc { margin-bottom: 18px; }

.contact-sub { max-width: 520px; margin: 18px auto 0; color: var(--gray); }

.contact-links {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- футер ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 34px var(--pad) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer img { height: 26px; width: auto; }

/* ---------- нижний таймлайн ---------- */

.timeline {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--timeline-h);
  z-index: 20;
  background: rgba(0,0,0,0.92);
  border-top: 1px solid var(--line);
  padding: 10px var(--pad) 8px;
}

.timeline-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.14);
}

.playhead {
  position: absolute;
  top: -5px;
  left: 0;
  width: 3px;
  height: 16px;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255,0,0,0.8);
}

.timeline-chapters {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  text-transform: uppercase;
}

.timeline-chapters span { color: var(--gray); transition: color 0.2s; }
.timeline-chapters span.active { color: var(--white); }

/* ---------- мобильная адаптация ---------- */

@media (max-width: 760px) {
  .hud-nav { display: none; }
  .hero-hud { flex-direction: column; gap: 6px; }
  .review-slots { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 110px; }
  .timeline-chapters span:nth-child(even) { display: none; }
  .trips-empty { flex-direction: column; align-items: flex-start; }
  .contact { text-align: left; }
  .contact-sub { margin-left: 0; }
  .contact-links { justify-content: flex-start; }
  .finder-static { inset: 20px 16px; }
}
