@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700;900&family=Golos+Text:wght@400;500;600&display=swap');

@font-face {
  font-family: 'Comic CAT';
  src: url('../fonts/ComicCAT.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --maroon-950: #4c0f1c;
  --maroon-900: #7B1527;
  --maroon-700: #8f2038;
  --maroon-600: #AF2438;
  --maroon-800: #AD2239;
  --pink-500: #D24160;
  --khaki: #BAAD90;
  --khaki-dark: #9C8D73;
  --cream: #D5C6A9;
  --offwhite: #FFFDFF;
  --ink: #2A292A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Rubik', system-ui, sans-serif;
  color: var(--ink);
  background: var(--offwhite);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ol, ul { margin: 0; padding: 0; list-style: none; }

.btn {
  display: inline-block;
  padding: 0.75em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-pink {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  background: var(--pink-500);
  color: var(--offwhite);
}

.btn-khaki {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  background: var(--khaki);
  color: var(--maroon-950);
  font-size: 1.35rem;
  padding: 0.7em 2em;
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--maroon-800);
  padding-bottom: 0;
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: center;
  padding: 32px 24px 0;
  position: relative;
  z-index: 5;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--maroon-950);
  border-radius: 999px;
  padding: 14px 16px 14px 40px;
}

.nav-pill a:not(.btn) {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  color: var(--offwhite);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-pill a.btn { margin-left: 16px; }

.hero-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 40px 20px 80px;
}

.hero-logo {
  width: min(560px, 90vw);
}

.hero-subtitle {
  margin: 0;
  color: var(--offwhite);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.deco {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.deco-sign {
  left: clamp(10px, 4vw, 60px);
  bottom: 200px;
  width: clamp(150px, 17vw, 280px);
}

.deco-elki {
  right: clamp(10px, 5vw, 70px);
  bottom: 200px;
  width: clamp(180px, 20vw, 320px);
}

/* logos ticker */
.logos-strip {
  position: relative;
  z-index: 3;
  width: 100%;
  overflow: hidden;
  background-color: var(--pink-500);
  padding: 36px 0;
}

.logos-track {
  display: flex;
  width: max-content;
  animation: logos-scroll 18s linear infinite;
}

.logos-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
  padding-right: 16px;
}

.logos-group img {
  display: block;
  height: 56px;
  width: auto;
  flex-shrink: 0;
}

@keyframes logos-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; }
}

/* ---------- TIMELINE ---------- */

.timeline-section {
  background: var(--offwhite);
  border-top: 6px solid var(--maroon-600);
  padding: 60px 24px 140px;
}

.timeline-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  margin: 0 auto 56px;
  max-width: 700px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 300px));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  column-gap: 70px;
  row-gap: 40px;
  max-width: 680px;
}

.timeline li {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.timeline li img {
  width: 54px;
  flex-shrink: 0;
}

.timeline li h3 {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 400;
  text-transform: uppercase;
}

.timeline li span {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  color: #6b6b6b;
  font-size: 0.95rem;
}

.timeline-bus {
  position: absolute;
  right: 0;
  bottom: -30px;
  width: min(280px, 26vw);
}

.timeline-tree {
  position: absolute;
  left: -10px;
  bottom: -110px;
  width: 60px;
  z-index: 0;
}

/* ---------- VIDEO / EPISODES ---------- */

.video-section {
  background: var(--cream);
  border-top: 6px solid var(--maroon-600);
  padding: 60px 24px 80px;
}

.video-wrap {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.video-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 12px;
}

.video-subtitle {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin: 0 0 40px;
}

.player-frame {
  position: relative;
  width: 100%;
  max-width: 853px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 28px;
  background: var(--maroon-950);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(76, 15, 28, 0.25);
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.episode-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.episode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--maroon-800);
  background: transparent;
  color: var(--maroon-800);
  font-family: 'Rubik', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.episode-tab:hover {
  transform: translateY(-2px);
}

.episode-tab.active {
  background: var(--maroon-800);
  color: var(--offwhite);
}

/* ---------- REGISTER ---------- */

.register-section {
  background: var(--offwhite);
  border-top: 6px solid var(--maroon-600);
  padding: 60px 24px 100px;
}

.register-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.register-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  margin: 0 0 12px;
}

.register-subtitle {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  text-align: center;
  color: #6b6b6b;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  margin: 0 0 40px;
}

.member-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
}

.member-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.member-card-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: var(--maroon-950);
  margin: 0;
}

.btn-remove-member {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--maroon-800);
  color: var(--offwhite);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-remove-member:hover { transform: translateY(-2px); filter: brightness(1.08); }

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--maroon-950);
}

.field input,
.field textarea {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  font-size: 1rem;
  padding: 0.7em 1em;
  border: 2px solid var(--khaki-dark);
  border-radius: 12px;
  background: var(--offwhite);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--maroon-800);
}

.field-wide {
  grid-column: 1 / -1;
}

.btn-add-member {
  display: block;
  margin: 0 auto 40px;
  padding: 0.7em 1.8em;
  border-radius: 999px;
  border: 2px solid var(--maroon-800);
  background: transparent;
  color: var(--maroon-800);
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-add-member:hover {
  background: var(--maroon-800);
  color: var(--offwhite);
  transform: translateY(-2px);
}

.form-block {
  margin-bottom: 32px;
}

.form-block-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.4rem;
  color: var(--maroon-950);
  margin: 0 0 16px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  font-size: 0.95rem;
  margin-bottom: 32px;
  cursor: pointer;
}

.checkbox-field input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--maroon-800);
  flex-shrink: 0;
}

.checkbox-field a {
  color: var(--maroon-800);
  text-decoration: underline;
}

.btn-submit {
  display: block;
  margin: 0 auto;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}

.register-success {
  text-align: center;
  padding: 40px 24px;
  background: var(--cream);
  border-radius: 20px;
}

.register-success h3 {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--maroon-950);
  margin: 0 0 8px;
}

.register-success p {
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
  color: #6b6b6b;
  margin: 0;
}

.register-error {
  text-align: center;
  padding: 16px 24px;
  margin-top: 16px;
  border-radius: 12px;
  background: #fdecea;
  color: #b3261e;
  font-family: 'Golos Text', 'Rubik', system-ui, sans-serif;
}

/* ---------- FOOTER ---------- */

.site-footer {
  position: relative;
  background: var(--maroon-800);
  border-top: 6px solid var(--maroon-600);
  overflow: hidden;
  padding-top: 22px;
}

.footer-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 0 24px 20px;
}

.footer-label {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  color: var(--offwhite);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.footer-title {
  font-family: 'Comic CAT', 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  color: var(--offwhite);
  text-transform: uppercase;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.15;
  margin: 0;
}

.footer-vk-link {
  font-size: 0.85rem;
  padding: 0.5em 1.3em;
}

.footer-hills-wrap {
  width: 100%;
  height: 130px;
  overflow: hidden;
}

.footer-hills {
  display: block;
  width: 100%;
  height: 136px;
  object-fit: fill;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1024px) {
  .timeline { column-gap: 40px; }
  .logos-group img { height: 48px; }
  .logos-strip { padding: 28px 0; }
}

@media (max-width: 900px) {
  .nav-pill { gap: 20px; padding: 12px 12px 12px 24px; }
  .nav-pill a.btn { padding: 0.6em 1.1em; font-size: 0.85rem; }
  .deco-elki, .deco-sign { display: none; }
  .timeline-bus { position: static; width: 260px; margin: 40px auto 0; }
  .timeline-tree { display: none; }
  .timeline { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; max-width: 100%; row-gap: 22px; }
}

@media (max-width: 700px) {
  .logos-group img { height: 38px; }
  .logos-strip { padding: 22px 0; }
  .logos-group { gap: 12px; padding-right: 12px; }
}

@media (max-width: 560px) {
  .nav-pill { flex-wrap: wrap; justify-content: center; gap: 10px; border-radius: 24px; }
  .hero { min-height: 560px; }
  .hero-content { padding-bottom: 60px; }
  .timeline-title { margin-bottom: 36px; }
  .timeline li img { width: 44px; }
  .timeline li h3 { font-size: 1.1rem; }
  .episode-tab { width: 40px; height: 40px; font-size: 0.9rem; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer { padding-top: 16px; }
  .footer-content { padding-bottom: 14px; }
  .footer-hills-wrap { height: 90px; }
  .footer-hills { height: 95px; }
}

@media (max-width: 380px) {
  .topbar { padding: 20px 12px 0; }
  .nav-pill a:not(.btn) { font-size: 0.95rem; }
  .hero-content { padding: 32px 16px 48px; }
  .btn-khaki { font-size: 1.1rem; padding: 0.65em 1.6em; }
  .timeline-section { padding: 44px 16px 100px; }
}