/* -------------------------------------------------------------------------- */
/* Landing page (/) — owner CSS                                               */
/* -------------------------------------------------------------------------- */
/* Hero, features, home CTA. Перенесено из ui-events-slots.css                */
/* (там был owner-violation — лендинговые правила в каталог-файле).           */
/* -------------------------------------------------------------------------- */

.ui-home {
  display: flex;
  flex-direction: column;
  gap: var(--twds-space-14);
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow: visible;
}

.ui-home > .ui-hero,
.ui-home > .ui-features-section,
.ui-home > .ui-home-cta {
  width: 100%;
  max-width: 100%;
}

.ui-home .ui-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--twds-space-5);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Mobile: 4 колонки на 375px дают ~80px каждой — подписи режутся
   («Колле…» вместо «Коллективы»). Складываем в 2×2. */
@media (max-width: 640px) {
  .ui-home .ui-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--twds-space-3);
  }
}

/* ────────────────── Hero ────────────────── */
.ui-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--twds-radius-xl);
  min-height: 520px;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 55%, #6d28d9 100%);
}

.ui-hero-bg {
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1511379938547-c1f69419868d?w=1920") center/cover no-repeat;
  opacity: 0.14;
}

.ui-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(12 8 39 / 0.1) 0%, rgb(30 14 88 / 0.65) 100%);
}

.ui-hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 120px;
  text-align: center;
}

.ui-hero-inner h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.9rem + 1.7vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: var(--twds-weight-bold);
}

.ui-hero-inner p {
  margin: var(--twds-space-5) auto 0;
  max-width: 720px;
  color: rgb(255 255 255 / 0.88);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.25rem);
  line-height: 1.5;
}

.ui-hero-actions {
  margin-top: var(--twds-space-7);
  display: flex;
  justify-content: center;
  gap: var(--twds-space-3);
  flex-wrap: wrap;
}

.ui-hero-btn {
  min-width: 240px;
  min-height: 48px;
  border-radius: var(--twds-btn-radius);
  font-size: var(--twds-text-md);
  font-weight: var(--twds-weight-semibold);
}

.ui-hero-btn-primary {
  background: #fff;
  border-color: #fff;
  color: #7c3aed;
}

.ui-hero-btn-primary:hover {
  background: rgb(255 255 255 / 0.92);
  border-color: rgb(255 255 255 / 0.92);
  color: #7c3aed;
}

.ui-hero-btn-outline {
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.45);
  color: #fff;
}

.ui-hero-btn-outline:hover {
  background: rgb(255 255 255 / 0.2);
  border-color: rgb(255 255 255 / 0.7);
  color: #fff;
}

/* ────────────────── Hero stats (живые цифры с прода) ────────────────── */
.ui-hero-stats {
  margin: var(--twds-space-8) auto 0;
  max-width: 720px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--twds-space-3);
}

.ui-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--twds-space-1);
  padding: var(--twds-space-3) var(--twds-space-2);
  border-radius: var(--twds-radius-md);
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.18);
  text-align: center;
  color: #fff;
}

.ui-hero-stat-value {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.1;
  font-weight: var(--twds-weight-bold);
  letter-spacing: -0.01em;
  color: #fff;
}

.ui-hero-stat-label {
  font-size: var(--twds-text-xs);
  line-height: 1.25;
  color: rgb(255 255 255 / 0.78);
  font-weight: var(--twds-weight-medium);
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .ui-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
    margin-top: var(--twds-space-6);
    gap: var(--twds-space-2);
  }
}

/* ────────────────── Features ────────────────── */
.ui-features-section {
  background: transparent;
  padding: var(--twds-space-1) 0 10px;
}

.ui-section-head {
  text-align: center;
  margin-bottom: var(--twds-space-7);
}

.ui-section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.95rem, 1.7rem + 0.75vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.ui-section-head p {
  margin: 10px 0 0;
  color: rgb(var(--twds-text-muted));
  font-size: var(--twds-text-lg);
}

.ui-feature-card {
  border: 1px solid rgb(var(--twds-border));
  border-radius: var(--twds-card-radius);
  background: #fff;
  box-shadow: var(--twds-card-shadow);
  min-height: auto;
  padding: 26px 18px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ui-feature-card:hover,
.ui-feature-card:focus-visible {
  border-color: var(--twds-card-hover-border);
  box-shadow: var(--twds-card-shadow-hover);
  transform: none;
}

.ui-feature-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #0f172a;
}

.ui-feature-card p {
  margin: var(--twds-space-2) 0 0;
  color: rgb(var(--twds-text-muted));
  font-size: var(--twds-text-base);
  line-height: 1.45;
}

.ui-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--twds-card-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgb(124 58 237 / 0.12);
  background: #f5f3ff;
  color: #7c3aed;
}

.ui-feature-icon .icon {
  font-size: var(--twds-text-2xl);
}

.ui-feature-icon.is-violet  { background: #f5f3ff; color: #7c3aed; }
.ui-feature-icon.is-amber   { background: #fef3c7; color: #d97706; }
.ui-feature-icon.is-emerald { background: #d1fae5; color: #059669; }
.ui-feature-icon.is-blue    { background: #dbeafe; color: #2563eb; }

/* ────────────────── Auth-state hero/CTA visibility (FOUC guard) ────────────────── */
/* Управляется .is-auth / .is-guest на <html>, ставится inline-скриптом в base.html
 * до первого paint. Без JS innerHTML reflow. */
.hero-auth-guest,
.hero-auth-user {
  display: none;
}
html.is-guest .hero-auth-guest {
  display: contents;
}
html.is-auth .hero-auth-user {
  display: contents;
}
html.is-auth #home-guest-cta {
  display: none;
}

/* ────────────────── Home CTA ────────────────── */
.ui-home .ui-home-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--twds-radius-xl);
  min-height: 292px;
  border: 1px solid rgb(124 58 237 / 0.22);
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 55%, #6d28d9 100%);
}

.ui-home .ui-home-cta-bg {
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1514320291840-2e0a9bf2a9ae?w=1920") center/cover no-repeat;
  opacity: 0.16;
}

.ui-home .ui-home-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(16 8 54 / 0.2) 0%, rgb(18 10 58 / 0.72) 100%);
}

.ui-home .ui-home-cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 48px;
}

.ui-home .ui-home-cta-icon {
  font-size: 44px;
  line-height: 1;
  color: #ede9fe;
}

.ui-home .ui-home-cta-inner h2 {
  margin: 14px 0 0;
  font-size: clamp(40px, 3.7vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: var(--twds-weight-bold);
}

.ui-home .ui-home-cta-inner p {
  margin: var(--twds-space-4) auto 0;
  max-width: 720px;
  color: rgb(255 255 255 / 0.86);
  font-size: var(--twds-text-lg);
  line-height: 1.45;
}

.ui-home .ui-home-cta-btn {
  margin-top: var(--twds-space-6);
  min-height: 46px;
  border-radius: var(--twds-btn-radius);
  padding: 0 24px;
  background: #fff;
  color: #7c3aed;
  border-color: #fff;
  font-size: var(--twds-text-md);
  font-weight: var(--twds-weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: var(--twds-space-2);
}

.ui-home .ui-home-cta-btn:hover {
  background: rgb(255 255 255 / 0.92);
  color: #7c3aed;
  border-color: rgb(255 255 255 / 0.92);
}

/* Микрокопия под CTA-кнопкой: «займёт 2 минуты, без верификации». */
.ui-home .ui-home-cta-microcopy {
  margin: var(--twds-space-3) auto 0;
  font-size: var(--twds-text-sm);
  color: rgb(255 255 255 / 0.72);
  line-height: 1.4;
}
