/* ==========================================================================
   CAFEX Hero + Intro 2027 (по макету)
   Все селекторы под префиксом .cfx27- : не пересекаются с основными стилями.
   Подключать после main.css / cafex-light.css / cafex-dark.css.
   ========================================================================== */

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

.cfx27-hero {
  position: relative;
  padding: 150px 0 0;
  overflow: hidden;
  /* тёмный hero в обеих темах — как на макетах */
  background: #0c0c0e !important;
  color: #f5f5f5;
}

html[data-theme=light] .cfx27-hero,
html[data-theme=dark] .cfx27-hero {
  background: #0c0c0e !important;
  color: #f5f5f5 !important;
}

.cfx27-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 40px;
  align-items: center;
  padding-bottom: 64px;
}

/* Левая колонка */
.cfx27-eyebrow {
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #cfcfd4;
  margin: 0 0 22px;
  font-weight: 600;
}

.cfx27-eyebrow-accent {
  color: var(--cafex-orange, #ff7002);
  font-weight: 800;
  letter-spacing: .22em;
}

.cfx27-title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  line-height: .92;
  margin: 0 0 26px;
  letter-spacing: .01em;
}

.cfx27-title-name,
.cfx27-title-year {
  display: block;
  font-size: clamp(64px, 9vw, 128px);
}

.cfx27-title-name { color: #ffffff; }
.cfx27-title-year { color: var(--cafex-orange, #ff7002); }

.cfx27-lead {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.65;
  color: #d9d9de;
  margin: 0 0 32px;
}

/* Кнопки */
.cfx27-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.cfx27-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: .3s ease;
  white-space: nowrap;
}

.cfx27-btn-solid {
  background: var(--cafex-orange, #ff7002);
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(255, 112, 2, .35);
}

.cfx27-btn-solid .cfx27-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--cafex-orange, #ff7002);
  font-size: 15px;
  transition: .3s ease;
}

.cfx27-btn-solid:hover {
  background: #ff8a26;
  transform: translateY(-2px);
}

.cfx27-btn-ghost {
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff !important;
  background: transparent;
}

.cfx27-btn-ghost i { font-size: 15px; transition: transform .3s ease; }

.cfx27-btn-ghost:hover {
  border-color: var(--cafex-orange, #ff7002);
  color: var(--cafex-orange, #ff7002) !important;
}

.cfx27-btn-ghost:hover i { transform: translateX(4px); }

/* Правая колонка: круг с фото */
.cfx27-hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 26px;
}

.cfx27-photo-ring {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
}

/* декоративная орбита */
.cfx27-photo-ring::before {
  content: "";
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid rgba(255, 112, 2, .35);
  pointer-events: none;
}

.cfx27-photo-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.04);
}

.cfx27-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* оранжевый бейдж даты */
.cfx27-date-badge {
  position: absolute;
  top: -4%;
  left: -10%;
  z-index: 2;
  width: clamp(110px, 12vw, 150px);
  height: clamp(110px, 12vw, 150px);
  border-radius: 50%;
  background: var(--cafex-orange, #ff7002);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 18px 44px rgba(255, 112, 2, .45);
  font-family: "Montserrat", system-ui, sans-serif;
}

.cfx27-date-days  { font-size: clamp(18px, 2vw, 24px); font-weight: 800; }
.cfx27-date-month { font-size: clamp(12px, 1.2vw, 14px); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cfx27-date-year  { font-size: clamp(20px, 2.2vw, 27px); font-weight: 800; }

/* место проведения */
.cfx27-place {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f5f5f5;
  padding-right: 8px;
}

.cfx27-place i {
  color: var(--cafex-orange, #ff7002);
  font-size: 24px;
}

.cfx27-place strong { display: block; font-size: 16px; font-weight: 700; }
.cfx27-place span   { display: block; font-size: 13.5px; color: #b9b9c0; }

/* ---------- Бегущая строка ---------- */

.cfx27-marquee {
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: #111114;
  overflow: hidden;
  padding: 16px 0;
  white-space: nowrap;
}

.cfx27-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  animation: cfx27-marquee-scroll 30s linear infinite;
  will-change: transform;
}

.cfx27-mq-item {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8b8b93;
}

.cfx27-mq-item.is-accent { color: var(--cafex-orange, #ff7002); }
.cfx27-mq-sep { color: #55555c; font-size: 15px; }

@keyframes cfx27-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

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

/* ---------- INTRO ---------- */

.cfx27-intro {
  padding: 64px 0 72px;
}

/* Статистика */
.cfx27-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-bottom: 56px;
}

.cfx27-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 18px;
  border-left: 1px solid color-mix(in srgb, var(--default-color, #999), transparent 82%);
}

.cfx27-stat:first-child { border-left: none; }

.cfx27-stat-ic {
  font-size: 26px;
  color: var(--cafex-orange, #ff7002);
  margin-bottom: 4px;
}

.cfx27-stat-n {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  color: var(--heading-color, #fafafa);
}

.cfx27-stat-t {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.45;
  color: color-mix(in srgb, var(--default-color, #999), transparent 20%);
}

/* Видео-панель */
.cfx27-video {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: clamp(240px, 34vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 84px;
  background: #0c0c0e;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.cfx27-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.5) saturate(.9);
}

.cfx27-video-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 45%, rgba(0,0,0,.45));
}

.cfx27-video-label {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 2;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #e9e9ee;
}

.cfx27-video-play {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--cafex-orange, #ff7002);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  text-decoration: none;
  box-shadow: 0 0 0 10px rgba(255, 112, 2, .18), 0 18px 44px rgba(255, 112, 2, .4);
  transition: .3s ease;
}

.cfx27-video-play:hover {
  transform: scale(1.08);
  color: #fff;
}

/* Зачем участвовать */
.cfx27-why-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.cfx27-why-title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.05;
  margin: 0;
  color: var(--heading-color, #fafafa);
  max-width: 560px;
}

.cfx27-why-dot { color: var(--cafex-orange, #ff7002); }

.cfx27-why-sub {
  margin: 0 0 8px;
  max-width: 300px;
  font-size: 15px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--default-color, #999), transparent 15%);
}

.cfx27-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cfx27-why-card {
  border: 1px solid color-mix(in srgb, var(--default-color, #999), transparent 82%);
  border-radius: 18px;
  padding: 28px 26px 30px;
  background: var(--surface-color, #1f283d);
  transition: .3s ease;
}

.cfx27-why-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cafex-orange, #ff7002), transparent 45%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .16);
}

.cfx27-why-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cfx27-why-num {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--cafex-orange, #ff7002);
}

.cfx27-why-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--cafex-orange, #ff7002), transparent 55%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--cafex-orange, #ff7002);
}

.cfx27-why-card h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--heading-color, #fafafa);
}

.cfx27-why-card p {
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
  color: color-mix(in srgb, var(--default-color, #999), transparent 18%);
}

/* light-тема: карточки на белом */
html[data-theme=light] .cfx27-why-card {
  background: #fff !important;
  border-color: rgba(17, 19, 24, .1);
}

html[data-theme=light] .cfx27-stat-n,
html[data-theme=light] .cfx27-why-title,
html[data-theme=light] .cfx27-why-card h4 { color: #111318; }

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

@media (max-width: 1199px) {
  .cfx27-hero { padding-top: 130px; }
  .cfx27-hero-grid { gap: 32px; }
  .cfx27-photo-ring { width: min(100%, 380px); }
}

@media (max-width: 991px) {
  .cfx27-hero-grid {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }

  .cfx27-hero-visual {
    align-items: center;
    order: -1; /* фото над текстом на планшете/мобиле */
  }

  .cfx27-photo-ring { width: min(78vw, 360px); }
  .cfx27-hero-copy { text-align: center; }
  .cfx27-lead { margin-left: auto; margin-right: auto; }
  .cfx27-actions { justify-content: center; }
  .cfx27-place { justify-content: center; padding-right: 0; }

  .cfx27-stats {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 28px;
  }
  .cfx27-stat:nth-child(4) { border-left: none; }

  .cfx27-why-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cfx27-why-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .cfx27-hero { padding-top: 110px; }
  .cfx27-title-name,
  .cfx27-title-year { font-size: clamp(56px, 17vw, 84px); }
  .cfx27-eyebrow { font-size: 13px; }
  .cfx27-lead { font-size: 15.5px; }

  .cfx27-btn { padding: 12px 22px; font-size: 14px; }

  .cfx27-photo-ring { width: min(86vw, 320px); }
  .cfx27-date-badge {
    left: -2%;
    width: 100px;
    height: 100px;
  }

  .cfx27-stats { grid-template-columns: repeat(2, 1fr); }
  .cfx27-stat { border-left: none; }

  .cfx27-video { min-height: 220px; margin-bottom: 60px; }
  .cfx27-video-label { top: 16px; left: 18px; font-size: 11px; }
  .cfx27-video-play { width: 64px; height: 64px; font-size: 30px; }

  .cfx27-marquee-track { animation-duration: 22s; }
}
