/* ============================================================
   СОПС — стили лендинга (index.html)
   Aesthetic: Industrial monochrome + amber (locomotive headlight)
   ============================================================ */

:root {
  --amber:       #e89010;
  --amber-glow:  rgba(232, 144, 16, 0.20);
  --hero-dark:   #070a12;
  --hero-dark2:  #0b0f1c;
  --f-display:   'Russo One', sans-serif;
  --f-mono:      'IBM Plex Mono', monospace;
  --f-body:      'Geologica', system-ui, sans-serif;
}

body { font-family: var(--f-body); }

/* ---- Шапка ---- */
#main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  height: 58px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.logo-link {
  font-family: var(--f-display);
  font-size: 1.35rem;
  letter-spacing: 3px;
  color: var(--amber);
  text-decoration: none;
  margin-right: auto;
}
.logo-link:hover { text-decoration: none; color: var(--amber); opacity: .85; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

#nav-user { display: none; }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--hero-dark);
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 90px 24px 120px;
}

/* Dot grid texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-tracks {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 65%;
}

.hero-glow {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 380px;
  background: radial-gradient(ellipse, var(--amber-glow) 0%, transparent 65%);
}

/* Angled transition to next section */
.hero-skew {
  position: absolute;
  bottom: -1px;
  left: -4%;
  right: -4%;
  height: 72px;
  background: var(--color-bg);
  transform: skewY(-1.8deg);
  transform-origin: bottom left;
  z-index: 3;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
  width: 100%;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 26px;
  animation: hero-in 0.6s ease both 0.1s;
}

.hero-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber), 0 0 18px rgba(232,144,16,0.5);
  animation: dot-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.75); }
}

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: .02em;
  color: #fff;
  margin-bottom: 26px;
  animation: hero-in 0.7s ease both 0.28s;
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  font-size: 1.07rem;
  line-height: 1.68;
  color: rgba(255,255,255,0.65);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: hero-in 0.7s ease both 0.46s;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 38px;
  animation: hero-in 0.7s ease both 0.62s;
}

.hero-btn-primary {
  background: var(--amber);
  color: #000;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 34px;
  border-radius: 7px;
  letter-spacing: .02em;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.hero-btn-primary:hover {
  background: #f5a520;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,144,16,0.45);
}

.hero-btn-secondary {
  background: transparent;
  color: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(255,255,255,0.28);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: .95rem;
  padding: 13px 34px;
  border-radius: 7px;
  transition: background .18s, border-color .18s;
}
.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.hero-disclaimer {
  font-size: .78rem;
  color: rgba(255,255,255,0.34);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
  animation: hero-in 0.7s ease both 0.78s;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Общие секции ---- */
.section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-eyebrow {
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--amber);
  text-align: center;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 400;
  text-align: center;
  color: var(--color-text);
  line-height: 1.12;
  margin-bottom: 16px;
  letter-spacing: .01em;
}

.section-sub {
  text-align: center;
  color: var(--color-text-sec);
  margin-bottom: 48px;
  font-size: .975rem;
  line-height: 1.65;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Как работает ---- */
.how-section {
  padding: 96px 0 84px;
  background: var(--color-bg);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 52px;
}

.step-card {
  background: var(--color-surface);
  padding: 32px 22px 28px;
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease, background 0.2s;
}
.step-card:hover { background: var(--color-surface2); }
.step-card.in-view { opacity: 1; transform: none; }
.step-card:nth-child(1) { transition-delay: 0s; }
.step-card:nth-child(2) { transition-delay: 0.1s; }
.step-card:nth-child(3) { transition-delay: 0.2s; }
.step-card:nth-child(4) { transition-delay: 0.3s; }

/* Amber left accent on hover */
.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--amber);
  transition: height 0.3s ease;
}
.step-card:hover::before { height: 100%; }

.step-num {
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: .1em;
  margin-bottom: 14px;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  line-height: 1;
}

.step-card h3 {
  font-size: .975rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: .01em;
}

.step-card p {
  font-size: .855rem;
  color: var(--color-text-sec);
  line-height: 1.62;
}

/* ---- Карма ---- */
.karma-section {
  padding: 96px 0 84px;
  background: var(--hero-dark2);
  position: relative;
  overflow: hidden;
}

/* Subtle grid lines for depth */
.karma-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.karma-section .section-inner { position: relative; }

.karma-title { color: #fff; }
.karma-sub   { color: rgba(255,255,255,0.48); }

.karma-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
}

.karma-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.2s, background 0.2s;
}
.karma-item:hover {
  border-color: rgba(232,144,16,0.4);
  background: rgba(232,144,16,0.07);
}
.karma-item.in-view { opacity: 1; transform: none; }
.karma-item:nth-child(1) { transition-delay: 0s; }
.karma-item:nth-child(2) { transition-delay: 0.1s; }
.karma-item:nth-child(3) { transition-delay: 0.2s; }
.karma-item:nth-child(4) { transition-delay: 0.3s; }

/* Top tier — highlighted */
.karma-top {
  border-color: rgba(232,144,16,0.3);
  background: rgba(232,144,16,0.06);
}

.karma-stars {
  font-size: 1.1rem;
  color: var(--amber);
  letter-spacing: 3px;
}

.karma-label {
  font-weight: 600;
  font-size: .9rem;
  color: #fff;
}

.karma-desc {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: rgba(255,255,255,0.42);
}

/* ---- Вход / Регистрация ---- */
.auth-cta-section {
  padding: 72px 0;
  background: var(--color-bg);
}

.auth-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.auth-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 32px 28px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.auth-cta-card:hover {
  border-color: var(--amber);
  box-shadow: 0 6px 24px rgba(232,144,16,0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.auth-cta-card--primary {
  background: var(--hero-dark2);
  border-color: rgba(232,144,16,0.3);
  color: #fff;
}
.auth-cta-card--primary:hover {
  border-color: var(--amber);
  color: #fff;
}

.auth-cta-icon { font-size: 2rem; line-height: 1; }

.auth-cta-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.1;
}

.auth-cta-desc {
  font-size: .9rem;
  color: var(--color-text-sec);
  line-height: 1.55;
  flex: 1;
}
.auth-cta-card--primary .auth-cta-desc { color: rgba(255,255,255,0.6); }

.auth-cta-btn {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--amber);
  margin-top: 4px;
}
.auth-cta-card--primary .auth-cta-btn { color: var(--amber); }

@media (max-width: 600px) {
  .auth-cta-grid { grid-template-columns: 1fr; }
  .auth-cta-section { padding: 48px 0; }
}

/* ---- Сообщество ---- */
.community-section {
  padding: 88px 0;
  background: var(--color-surface2);
  text-align: center;
}

.community-title {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.12;
  margin-bottom: 14px;
  letter-spacing: .01em;
}

.community-sub {
  color: var(--color-text-sec);
  font-size: .975rem;
  margin-bottom: 40px;
}

.community-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.community-tg-btn {
  background: #229ed9;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .18s, transform .18s;
}
.community-tg-btn:hover {
  background: #1d8fc2;
  text-decoration: none;
  transform: translateY(-1px);
}
.community-vk-btn {
  background: #0077ff;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 24px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .18s, transform .18s;
}
.community-vk-btn:hover {
  background: #0060cc;
  text-decoration: none;
  transform: translateY(-1px);
}

.community-cta { margin-top: 8px; }

.community-register-btn {
  background: var(--amber);
  color: #000;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 32px;
  border-radius: 8px;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.community-register-btn:hover {
  background: #f5a520;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(232,144,16,0.4);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--hero-dark);
  padding: 36px 24px;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--f-display);
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--amber);
  margin-right: auto;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: .855rem;
  color: rgba(255,255,255,0.38);
  text-decoration: none;
}
.footer-nav a:hover { color: rgba(255,255,255,0.72); }

.footer-copy {
  width: 100%;
  font-family: var(--f-mono);
  font-size: .74rem;
  color: rgba(255,255,255,0.22);
  margin-top: 8px;
}

/* ---- Адаптив ---- */
@media (max-width: 860px) {
  .steps-grid  { grid-template-columns: 1fr 1fr; }
  .karma-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  #main-header { padding: 0 16px; }

  .hero { padding: 64px 16px 100px; min-height: 520px; }
  .hero-title { font-size: 2.4rem; }

  .how-section, .karma-section, .community-section { padding: 64px 0; }
  .section-inner { padding: 0 16px; }

  .steps-grid { grid-template-columns: 1fr; gap: 0; }

  .hero-cta { flex-direction: column; align-items: center; }
  .hero-btn-primary,
  .hero-btn-secondary { width: 100%; max-width: 300px; justify-content: center; }
}

@media (max-width: 420px) {
  .karma-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }
}
