/* ===== Цвета бренда Winston ===== */
:root {
  --sky:   #9DD7FD;  /* голубой — логотип */
  --night: #021019;  /* тёмный — фон */
  --lime:  #BEFF5D;  /* салатовый — кнопки */
  --pink:  #FF28AF;  /* розовый — акценты */
  --kiwi:  #39E03A;  /* зелёный — цвет Kiwi */

  --bg:        var(--night);
  --bg-alt:    #04192A;
  --surface:   #072338;
  --line:      rgba(157, 215, 253, 0.14);
  --text:      #EAF6FF;
  --muted:     #8FA9BD;

  --radius: 28px;
  --pixel: "Oswald", "Arial Narrow", sans-serif;  /* узкий шрифт для меню и подписей */
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ===== Общие элементы ===== */
h1, h2, h3 { line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.5vw, 48px); margin-bottom: 40px; }

.accent { color: var(--sky); }

.tag {
  font-family: var(--pixel);
  font-weight: 500;
  color: var(--pink);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.lead { font-size: 20px; color: var(--muted); max-width: 600px; }
.lead--section { font-size: 18px; margin: -20px 0 40px; }

.buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  background: var(--lime);
  color: var(--night);
  font-weight: 700;
  padding: 15px 28px;
  border-radius: 999px;
  border: 2px solid var(--lime);
  transition: transform .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(190, 255, 93, .28); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(157, 215, 253, .3); }
.btn--ghost:hover { border-color: var(--sky); color: var(--sky); box-shadow: none; }
.btn--big { padding: 18px 34px; font-size: 18px; }
.btn--small { padding: 9px 20px; font-size: 15px; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

.section { padding: 110px 0; }
.section--alt { background: var(--bg-alt); }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(2, 16, 25, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sky);
}
/* Три колонки: логотип слева, меню по центру, Instagram справа */
.header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: 72px; }
.header__insta { justify-self: end; }
.logo { justify-self: start; }
.logo img { width: 110px; }
.logo:hover img { animation: glitch .4s steps(2) 1; }
.nav { display: flex; gap: 48px; }
.nav a {
  font-family: var(--pixel); font-weight: 500;
  font-size: 18px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--sky);
  transition: color .2s;
}
.nav a:hover { color: var(--lime); }

@keyframes glitch {
  0%   { transform: translate(0); filter: drop-shadow(-3px 0 var(--pink)) drop-shadow(3px 0 var(--lime)); }
  50%  { transform: translate(2px, -1px); }
  100% { transform: translate(0); filter: none; }
}

/* ===== Первый экран ===== */
.hero {
  padding: 130px 0 140px;
  background:
    radial-gradient(700px 420px at 80% 20%, rgba(157, 215, 253, .13), transparent 70%),
    radial-gradient(520px 380px at 5% 100%, rgba(255, 40, 175, .09), transparent 70%);
}
.hero h1 {
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.hero .lead { margin-bottom: 40px; }

/* ===== Карточки продуктов ===== */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.product {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(157, 215, 253, .22);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.product:hover { transform: translateY(-4px); }
.product--rebecca:hover { border-color: rgba(255, 40, 175, .55); }
.product--kiwi:hover { border-color: rgba(57, 224, 58, .55); }

/* Верхняя «сцена» с персонажем или примером */
.product__stage {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.product--rebecca .product__stage {
  background:
    radial-gradient(260px 220px at 50% 35%, rgba(255, 40, 175, .32), transparent 70%),
    radial-gradient(320px 260px at 50% 100%, rgba(157, 215, 253, .22), transparent 70%),
    #061A2B;
}
/* Фото Ребекки заполняет всю верхнюю часть карточки */
.product__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 35% center;
  transition: transform .5s;
}
.product--rebecca:hover .product__photo { transform: scale(1.04); }

.product--kiwi .product__stage {
  display: grid; place-items: center;
  padding: 28px;
  background:
    radial-gradient(300px 220px at 50% 50%, rgba(57, 224, 58, .2), transparent 70%),
    #04170A;
}

/* Окошко-терминал Kiwi */
.terminal {
  width: 100%; max-width: 420px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(57, 224, 58, .35);
  border-radius: 14px;
  padding: 14px 18px 18px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px; line-height: 1.7;
  color: #BFEFC0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.terminal__bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: rgba(191, 239, 192, .5); font-size: 12px; }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(57, 224, 58, .35); }
.terminal__bar span { margin-left: 8px; }
.terminal__me { color: #fff; }
.terminal__ok { color: var(--kiwi); }
.terminal__cursor span {
  display: inline-block; width: 8px; height: 15px;
  background: var(--kiwi); vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Нижняя часть карточки */
.product__body {
  flex: 1;
  display: flex; flex-direction: column; gap: 20px;
  padding: 32px 36px 36px;
}
.product__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.product__logo { width: 220px; margin-left: -6px; }
.product__logo--kiwi { width: 120px; margin-left: 0; }
.product__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.product__text { color: var(--muted); }
.product__note {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; line-height: 1.55; opacity: .8;
}
.product--kiwi .buttons { margin-top: auto; }

.badge {
  display: inline-block;
  background: var(--pink); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 5px 14px; border-radius: 999px;
}
.badge--lime { background: var(--lime); color: var(--night); }
.badge--outline { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge--kiwi { background: rgba(57, 224, 58, .14); color: var(--kiwi); border: 1px solid rgba(57, 224, 58, .4); }

.checks { list-style: none; display: grid; gap: 8px; }
.checks li::before { content: "✓"; color: var(--lime); font-weight: 700; margin-right: 12px; }
.checks--kiwi li::before { color: var(--kiwi); }

/* ===== Услуги: галерея кадров ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.gallery__item {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gallery__item--wide { grid-column: span 3; }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__caption { color: var(--muted); font-size: 14px; margin: 14px 0 36px; }

/* ===== Контакты ===== */
.contacts {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 32px;
  border: 1px solid rgba(157, 215, 253, .22);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(157, 215, 253, .12), transparent 70%),
    var(--surface);
}
.contacts .lead { margin-inline: auto; }
.contacts__row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.contacts__row:last-child { margin-bottom: 0; }
.mail {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 22px;
  border: 1px solid rgba(157, 215, 253, .3);
  border-radius: 999px;
}
.mail__address { font-weight: 600; color: var(--sky); word-break: break-all; }
.mail__address:hover { text-decoration: underline; }
.mail__copy {
  border: none; border-radius: 999px;
  padding: 10px 16px;
  background: rgba(157, 215, 253, .1);
  color: var(--text); font-size: 14px; font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}
.mail__copy:hover { background: rgba(157, 215, 253, .2); }

.link { color: var(--pink); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ===== Подвал ===== */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy { color: var(--muted); font-size: 14px; }

/* ===== Планшет ===== */
@media (max-width: 900px) {
  .hero { padding: 80px 0 90px; }
  .products { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item, .gallery__item--wide { grid-column: span 1; }
  .gallery__item--wide:first-child { grid-column: span 2; }
}

/* ===== Телефон ===== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  /* На телефоне: логотип и Instagram сверху, меню второй строкой по центру */
  .header__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "logo insta" "nav nav";
    height: auto; gap: 8px 16px; padding: 12px 0 10px;
  }
  .logo { grid-area: logo; }
  .header__insta { grid-area: insta; }
  .nav { grid-area: nav; justify-content: center; gap: 28px; }
  .logo img { width: 92px; }
  .nav a { font-size: 15px; }
  .contacts .btn--big { width: 100%; text-align: center; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 56px); }
  .lead { font-size: 17px; }
  .product__stage { height: 300px; }
  .product__character { width: 200px; }
  .product__body { padding: 26px 22px 28px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__item, .gallery__item--wide, .gallery__item--wide:first-child { grid-column: span 1; }
  .contacts { padding: 52px 20px; }
  .mail { flex-direction: column; padding: 14px; border-radius: 20px; gap: 10px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* Для тех, у кого в системе отключена анимация */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
