/**
 * Компоненты только для /websites/: hero-видео, тематические группы
 * шаблонов, ссылки на живые сайты и расширенная карточка подписки.
 */

/* ── Видео в первом экране ──────────────────────────────────────────── */

.websites-hero__grid {
  grid-template-columns: minmax(0, .92fr) minmax(540px, 1.08fr);
  align-items: center;
  gap: clamp(32px, 4.2vw, 60px);
}

.websites-hero__media {
  width: 100%;
  max-width: 720px;
  margin: 0;
  justify-self: end;
}

.websites-hero__video-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-forest) 18%, var(--color-border));
  border-radius: var(--radius-card-lg);
  background: var(--color-forest-deep);
  box-shadow:
    0 34px 86px color-mix(in srgb, var(--color-forest-deep) 25%, transparent),
    0 10px 26px color-mix(in srgb, var(--color-forest-deep) 14%, transparent);
}

.websites-hero__video-frame::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid color-mix(in srgb, white 24%, transparent);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.websites-hero__video-launch,
.websites-hero__video-frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.websites-hero__video-launch {
  z-index: 1;
  overflow: hidden;
  background: var(--color-forest-deep);
  color: var(--color-text-inverse);
  cursor: pointer;
}

.websites-hero__video-launch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .24s ease, transform .4s ease;
}

.websites-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(62px, 6vw, 72px);
  height: clamp(62px, 6vw, 72px);
  border: 1px solid color-mix(in srgb, white 48%, transparent);
  border-radius: 50%;
  color: var(--color-text-inverse);
  background: color-mix(in srgb, var(--color-forest) 88%, transparent);
  box-shadow: 0 16px 42px color-mix(in srgb, black 48%, transparent);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
  transition: background-color .2s ease, transform .2s ease;
}

.websites-hero__play svg {
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-left: 3px;
}
.websites-hero__video-launch:hover img { filter: brightness(.88); transform: scale(1.012); }
.websites-hero__video-launch:hover .websites-hero__play { background: var(--color-brand-700); transform: translate(-50%, -50%) scale(1.06); }
.websites-hero__video-launch:focus-visible { outline: 4px solid var(--color-brand); outline-offset: -4px; }

.websites-hero__media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 6px 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.websites-hero__media figcaption a {
  flex: 0 0 auto;
  color: var(--color-brand-text);
  font-weight: 750;
  text-underline-offset: 3px;
}

/* ── Группы шаблонов и доказательства ──────────────────────────────── */

.websites-template-groups { display: grid; gap: 54px; }

.websites-template-group__head {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(320px, 1.28fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.websites-template-group__head h3 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -.025em;
}

.websites-template-group__head p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 15px;
}

.websites-template-group__label {
  color: var(--color-brand-text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cg-template {
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cg-template:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--color-brand) 45%, var(--color-border));
  box-shadow: var(--shadow-card-hover);
}

.cg-template__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.cg-template__actions {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 17px;
}

.cg-template__actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--color-brand-text);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
  text-decoration: none;
}

.cg-template__actions a::after { content: "→"; transition: transform .16s ease; }
.cg-template__actions a:hover::after { transform: translateX(3px); }
.cg-template__actions .cg-template__example { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 38%, transparent); text-underline-offset: 4px; }
.cg-template__empty { color: var(--color-text-secondary); font-size: 13px; font-weight: 700; line-height: 1.35; }

/* ── Подписка ───────────────────────────────────────────────────────── */

.websites-pricing {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(420px, 1.22fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.websites-pricing__intro h2 { max-width: 640px; }

.websites-pricing__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.websites-pricing__proof span {
  padding: 7px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.websites-plan {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--color-brand) 44%, var(--color-border));
  border-radius: var(--radius-card-lg);
  background: var(--color-bg-card);
  box-shadow: 0 26px 70px color-mix(in srgb, var(--color-forest-deep) 13%, transparent);
}

.websites-plan::before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand) 16%, transparent);
  content: "";
  pointer-events: none;
}

.websites-plan__badge {
  position: relative;
  display: inline-flex;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-forest);
  color: var(--color-text-inverse);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.websites-plan__price {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 24px 0 10px;
}

.websites-plan__price strong {
  color: var(--color-forest);
  font-family: var(--font-display);
  font-size: clamp(50px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .9;
}

.websites-plan__price > span {
  padding-bottom: 5px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.websites-plan__price strong span { color: inherit; font-size: inherit; }

.websites-plan__lead {
  position: relative;
  max-width: 520px;
  margin-bottom: 24px;
  color: var(--color-text-secondary);
}

.websites-plan__features {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.websites-plan__features li {
  position: relative;
  padding-left: 24px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.websites-plan__features li::before {
  position: absolute;
  top: .1em;
  left: 0;
  color: var(--color-brand-text);
  font-weight: 900;
  content: "✓";
}

.websites-plan .btn { position: relative; width: 100%; margin: 0; text-decoration: none; }
.websites-plan__fineprint { position: relative; margin: 12px 0 0; color: var(--color-text-muted); font-size: 12.5px; text-align: center; }
.websites-plan__fineprint a { color: var(--color-brand-text); font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .websites-hero__grid,
  .websites-pricing { grid-template-columns: 1fr; }
  .websites-hero__media { max-width: 820px; justify-self: center; }
  .websites-template-group__head { grid-template-columns: 1fr; align-items: start; gap: 12px; }
}

@media (max-width: 680px) {
  .websites-hero__media figcaption { align-items: flex-start; flex-direction: column; gap: 4px; margin-top: 11px; }
  .websites-template-groups { gap: 44px; }
  .websites-template-group__head { margin-bottom: 18px; }
  .websites-plan__features { grid-template-columns: 1fr; }
  .websites-pricing__proof { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .cg-template,
  .cg-template__actions a::after,
  .websites-hero__video-launch img,
  .websites-hero__play { transition: none; }
}
