:root {
  --bg: #081021;
  --accent: #2a46a3;
  --accent-bright: #4d6bff;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.4);
  --countdown-color: #dbe4ff;
  --font: "Onest", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  background: var(--bg);
}

body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Hero section ---------- */

.hero {
  position: relative;
  flex-shrink: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  padding: 48px 24px;
}

/* soft ambient glow behind everything, mimics the Figma "Firefly" light layers */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 8%, rgba(77, 107, 255, 0.35), transparent 70%),
    radial-gradient(ellipse 45% 35% at 78% 15%, rgba(42, 70, 163, 0.35), transparent 70%);
  pointer-events: none;
}

/* glowing arc / "planet horizon" under the headline */
.hero__arc {
  position: absolute;
  left: 50%;
  bottom: -38%;
  width: 130vw;
  max-width: 1400px;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(90, 130, 255, 0.16), transparent 55%);
  box-shadow:
    0 0 0 1px rgba(120, 150, 255, 0.25),
    0 -40px 120px rgba(60, 100, 255, 0.25);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
  text-align: center;
}

/* ---------- Top block: logo + date ---------- */

.hero__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__date {
  font-weight: 500;
  font-size: clamp(15px, 1.6vw, 20px);
  color: var(--text);
}

.hero__note {
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Middle block: headline + CTA ---------- */

.hero__middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
  max-width: 760px;
}

.hero__title {
  font-weight: 500;
  font-size: clamp(32px, 6.5vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.hero__subtitle {
  font-weight: 500;
  font-size: clamp(18px, 3.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(14px, 1.6vw, 17px);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 8px 24px rgba(42, 70, 163, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(77, 107, 255, 0.55);
}

.btn svg {
  flex-shrink: 0;
}

/* ---------- Countdown ---------- */

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 22px);
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 48px;
}

.countdown__value {
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1;
  color: var(--countdown-color);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: clamp(10px, 1.1vw, 13px);
  color: var(--text-faint);
  text-transform: lowercase;
}

.countdown__sep {
  font-weight: 500;
  font-size: clamp(22px, 3.5vw, 36px);
  color: var(--text-faint);
  transform: translateY(-8px);
}

/* ---------- Mobile / tablet portrait ----------
   Секция по высоте контента: на узких экранах фиксированные 100vh оставляли
   мёртвую зону между таймером и подвалом. */

@media (max-width: 1023px) {
  .hero {
    min-height: 0;
    align-items: center;
    padding: clamp(40px, 9vw, 64px) 20px clamp(32px, 7vw, 56px);
  }

  .hero__inner {
    gap: clamp(26px, 6vw, 36px);
  }

  /* Дуга-горизонт была привязана к высоте секции в процентах; после укорачивания
     считаем её от собственного размера, чтобы линия осталась у низа героя. */
  .hero__arc {
    bottom: calc(60px - 130vw);
  }
}

@media (max-width: 480px) {
  .countdown {
    gap: 10px;
  }

  .countdown__item {
    min-width: 40px;
  }
}

/* ---------- Footer (1:1 with tvaity.ru/sps) ---------- */

.footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 0;
  background: var(--bg);
  color: #5C6F99;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  max-width: 72rem; /* max-w-6xl */
  margin-inline: auto;
  padding: 2.5rem 1rem 1.5rem; /* pt-10 px-4 pb-6 */
}

.footer__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem; /* gap-6 */
  margin-bottom: 2rem; /* mb-8 */
}

.footer__logo {
  color: #fff;
  flex-shrink: 0;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* gap-6 */
  font-size: 0.875rem; /* text-sm */
  line-height: 1.25rem;
}

.footer__links button,
.footer__links a {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer__links button:hover,
.footer__links a:hover {
  color: #fff;
}

.footer__divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem; /* mb-6 */
}

.footer__divider--tight {
  margin-bottom: 1.25rem; /* mb-5 */
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* gap-4 */
  font-size: 0.75rem; /* text-xs */
  line-height: 1rem;
  color: #5C6F99;
  margin-bottom: 1.5rem; /* mb-6 */
}

.footer__col {
  display: flex;
  flex-direction: column;
  row-gap: 0.25rem; /* space-y-1 */
}

.footer__col--contacts {
  row-gap: 0.375rem; /* space-y-1.5 */
}

.footer__col-title {
  color: #8FA1C2;
  font-weight: 500; /* font-medium */
}

.footer__col a {
  color: inherit;
  transition: color 0.15s ease;
}

.footer__col a:hover {
  color: #fff;
}

.footer__contact {
  display: flex;
  align-items: center;
  gap: 0.375rem; /* gap-1.5 */
  transition: color 0.15s ease;
}

.footer__contact--address {
  align-items: flex-start;
}

.footer__contact svg {
  width: 0.75rem; /* w-3 */
  height: 0.75rem; /* h-3 */
  flex-shrink: 0;
}

.footer__contact--address svg {
  margin-top: 0.125rem; /* mt-0.5 */
}

.footer__disclaimer {
  font-size: 11px;
  line-height: 1.625; /* leading-relaxed */
  color: #4A5A7A;
  margin-bottom: 0;
}

.footer__copyright {
  margin-top: 1.25rem; /* mt-5 */
  font-size: 0.75rem; /* text-xs */
  line-height: 1rem;
  color: #5C6F99;
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer__top {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- GetCourse signup layer ----------
   Мобилка — полноэкранный слой со скроллом страницы виджета.
   ПК (>=1024px) — карточка по высоте контента. Высоту в обоих случаях
   проставляет getcourse-widget.js из postMessage самого GetCourse. */

body.gc-layer-open {
  overflow: hidden;
}

.gc-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.gc-layer.is-open {
  opacity: 1;
  visibility: visible;
}

/* Затемнение нужно только карточке на ПК. */
.gc-layer__backdrop {
  display: none;
}

.gc-layer__inner {
  width: 100%;
  min-height: 100%;
  background: #fff;
}

.gc-layer__frame {
  width: 100%;
  overflow: hidden; /* обрезает собственные отступы блока GetCourse */
}

.gc-layer__frame iframe {
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  border: 0;
  transform-origin: top left;
}

/* Реальная высота пришла — заглушка убирается, иначе снизу белый хвост. */
.gc-layer[data-gc-sized] .gc-layer__frame iframe {
  min-height: 0;
}

.gc-layer__close {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(8, 16, 33, 0.82);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease;
}

.gc-layer__close:hover {
  background: rgba(8, 16, 33, 0.95);
}

@media (min-width: 1024px) {
  .gc-layer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: transparent;
    overflow: hidden;
  }

  .gc-layer__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 16, 0.72);
    backdrop-filter: blur(4px);
  }

  .gc-layer__inner {
    position: relative;
    z-index: 1;
    width: min(560px, 92vw);
    min-height: 0;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
    scrollbar-width: thin;
  }

  .gc-layer.is-open .gc-layer__inner {
    transform: none;
  }

  .gc-layer__frame iframe {
    min-height: 560px;
  }

  .gc-layer__close {
    top: 18px;
    right: 18px;
  }
}
