/* ==========================================================================
   smiley.kz — HTML5-прототип (Вариант А: полностью статический сайт)
   Тёмная «ночная» тема с эффектом плавающих искр (firefly).
   ========================================================================== */

:root {
  --bg-0: #06192b;
  --bg-1: #0a2740;
  --bg-2: #103552;
  --surface: rgba(14, 43, 66, 0.72);
  --surface-solid: #0e2b42;
  --border: rgba(120, 196, 220, 0.18);
  --border-strong: rgba(120, 196, 220, 0.34);
  --cyan: #a6dfeb;
  --accent: #4fd1c5;
  --accent-dark: #2f9e93;
  --warm: #ffd27a;
  --text: #eaf6fb;
  --muted: #9db8c8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.25s ease;
  --container: 1180px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-bar-height: 60px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(79, 209, 197, 0.12), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(79, 140, 209, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; }
p { margin: 0 0 1em; }

/* Слой искр — позади всего контента */
#firefly {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding: 88px 0; }
section[id] { scroll-margin-top: 84px; }

.section__head { max-width: 680px; margin-bottom: 42px; }
.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
.section__title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 0; }
.section__lead { color: var(--muted); margin: 14px 0 0; }

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #04202a; box-shadow: 0 10px 30px rgba(79, 209, 197, 0.28); }
.btn--primary:hover { background: #6fe3d8; }
.btn--ghost { background: transparent; color: var(--cyan); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 25, 43, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: 0.01em; }
.logo__img { height: 40px; width: auto; }
.logo__mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #3a8fd0);
  display: grid; place-items: center;
  color: #04202a;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(79, 209, 197, 0.35);
}
.logo__sub { display: block; font-size: 0.66rem; font-weight: 600; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 24px; }
.nav__link { position: relative; font-weight: 600; color: var(--muted); padding: 6px 0; transition: color var(--transition); }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.header__cta { margin-left: 8px; }

.burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 11px;
}
.burger span { display: block; height: 2px; background: var(--cyan); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.burger span + span { margin-top: 5px; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Герой ===== */
.hero { position: relative; padding: 70px 0 90px; }
.hero__intro { max-width: 820px; margin: 0 auto 54px; text-align: center; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  background: rgba(79, 209, 197, 0.10);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 999px;
  margin: 0 0 22px;
}
.hero__title { font-size: clamp(2.2rem, 6vw, 4.2rem); margin: 0 0 18px; letter-spacing: -0.01em; }
.hero__title span {
  background: linear-gradient(120deg, var(--accent), #7fb8ff 60%, var(--warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__text { font-size: 1.12rem; color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero__facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; margin: 56px 0 0; }
.hero__facts li { display: grid; text-align: center; }
.hero__facts strong { font-size: 1.9rem; font-weight: 800; color: var(--cyan); line-height: 1.1; }
.hero__facts span { font-size: 0.82rem; color: var(--muted); }

/* --- «Колесо»: 6 направлений вокруг центральной картинки --- */
.wheel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 470px) 1fr;
  gap: 30px;
  align-items: center;
}
.wheel__side { display: grid; gap: 18px; }

.bubble {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.bubble:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.bubble__icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(79, 209, 197, 0.12);
  color: var(--accent);
  font-size: 1.15rem;
}
.bubble__body { display: grid; gap: 2px; min-width: 0; }
.bubble__body strong { font-size: 1.02rem; font-weight: 700; }
.bubble__body small { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }

.wheel__center { position: relative; display: grid; place-items: center; padding: 10px; }
.wheel__glow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(79, 209, 197, 0.30), rgba(58, 143, 208, 0.12) 45%, transparent 68%);
  filter: blur(6px);
}
.wheel__showcase {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 26px 55px rgba(0, 0, 0, 0.55));
  animation: wheel-float 7s ease-in-out infinite;
}
@keyframes wheel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer__logo { height: 34px; width: auto; opacity: 0.92; }

/* ===== Карточки категорий ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(240px 160px at 100% 0, rgba(79, 209, 197, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: rgba(79, 209, 197, 0.12);
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.card__title { font-size: 1.18rem; margin: 0 0 8px; }
.card__text { color: var(--muted); margin: 0; font-size: 0.94rem; }
.card__more { display: inline-block; margin-top: 14px; font-size: 0.86rem; font-weight: 700; color: var(--accent); }

/* ===== Портфолио: фильтры + сетка ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  padding: 9px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: #04202a; border-color: var(--accent); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-solid);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.video:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.video__thumb { position: relative; aspect-ratio: 16 / 9; background: #08243a; }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 20, 34, 0.72));
}
.video__play i {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(79, 209, 197, 0.92);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition);
}
.video__play i::before {
  content: "";
  display: block;
  width: 0; height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #04202a;
  margin-left: 3px;
}
.video:hover .video__play i { transform: scale(1.12); }
.video__body { padding: 14px 16px 16px; }
.video__title { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.35; }
.video__cat { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 6px 0 0; }

.gallery__empty { color: var(--muted); padding: 30px 0; }

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 12, 22, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox__inner { width: min(1000px, 100%); }
.lightbox__frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__title { color: var(--text); margin: 16px 0 0; font-weight: 700; }
.lightbox__close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(6, 25, 43, 0.8);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__close:hover { border-color: var(--accent); }

/* ===== CTA ===== */
.cta {
  background: linear-gradient(120deg, rgba(79, 209, 197, 0.16), rgba(58, 143, 208, 0.16));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 70px 0;
  text-align: center;
}
.cta__title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta__text { color: var(--muted); max-width: 620px; margin: 0 auto 26px; }

/* ===== Форма заявки ===== */
.section--contact {
  background: linear-gradient(180deg, transparent, rgba(79, 209, 197, 0.06));
}
.section--contact .section__head { margin-inline: auto; text-align: center; }

.form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  margin-inline: auto;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { display: grid; gap: 6px; font-weight: 600; font-size: 0.88rem; color: var(--cyan); }
.form__field input,
.form__field textarea,
.form__field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(6, 25, 43, 0.62);
  color: var(--text);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: rgba(157, 184, 200, 0.55); }
.form__field input:focus,
.form__field textarea:focus,
.form__field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.18);
}
.form__field select option { background: var(--surface-solid); color: var(--text); }
.form .btn { justify-self: start; }
.form__note { font-size: 0.9rem; margin: 0; min-height: 1.2em; }
.form__note.is-ok { color: var(--accent); }
.form__note.is-error { color: #ff8f7a; }

/* Honeypot: скрытое поле-ловушка для ботов */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ===== Подвал ===== */
.footer { padding: 54px 0 40px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__nav a { color: var(--muted); }
.footer__nav a:hover { color: var(--text); }
.footer__copy { width: 100%; text-align: center; color: var(--muted); font-size: 0.85rem; margin: 18px 0 0; }
.footer__mail { color: var(--accent); font-weight: 700; }

/* ===== Мобильная нижняя навигация ===== */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  align-items: stretch;
  background: rgba(6, 25, 43, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.mobile-bar__link {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  min-height: var(--mobile-bar-height);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.mobile-bar__link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-bar__link.is-active { color: var(--accent); }
.mobile-bar__link:active { transform: scale(0.94); }

html.device-mobile .mobile-bar { display: flex; }
html.device-desktop .mobile-bar, html.device-tablet .mobile-bar { display: none; }
@media (max-width: 760px) {
  html:not(.device-desktop):not(.device-tablet) .mobile-bar { display: flex; }
}
html.device-mobile body { padding-bottom: calc(var(--mobile-bar-height) + var(--safe-bottom)); }
@media (max-width: 760px) {
  html:not(.device-desktop):not(.device-tablet) body { padding-bottom: calc(var(--mobile-bar-height) + var(--safe-bottom)); }
}

/* ===== Анимация появления ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .video:hover { transform: none; }
}

/* ===== Адаптив ===== */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* Планшеты (портрет): «колесо» сохраняем — текст остаётся вокруг картинки */
@media (min-width: 721px) and (max-width: 980px) {
  .wheel {
    grid-template-columns: 1fr minmax(180px, 300px) 1fr;
    gap: 14px;
  }
  .wheel__side { gap: 12px; }
  .bubble { padding: 12px; gap: 10px; }
  .bubble__icon { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
  .bubble__body strong { font-size: 0.92rem; }
  .bubble__body small { font-size: 0.72rem; }
  .wheel__showcase { max-width: 100%; }
}

@media (max-width: 760px) {
  .section { padding: 58px 0; }
  .hero { padding: 64px 0 54px; }
  .hero__facts { gap: 24px; margin-top: 38px; }
  .hero__facts strong { font-size: 1.5rem; }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: rgba(6, 25, 43, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav.is-open { max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav__list { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .nav__link { display: block; padding: 13px 0; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
  .header__cta { display: none; }
  .burger { display: block; }
  body.nav-open { overflow: hidden; }

  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* Телефоны: картинка сверху, карточки компактной сеткой */
@media (max-width: 720px) {
  .wheel { grid-template-columns: 1fr; gap: 16px; }
  .wheel__center { order: -1; }
  .wheel__side { display: contents; }
  .wheel__showcase { max-width: 340px; }
}
@media (min-width: 560px) and (max-width: 720px) {
  .wheel { grid-template-columns: repeat(2, 1fr); }
  .wheel__center { grid-column: 1 / -1; }
}

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

html.device-mobile .btn { min-height: 48px; }
html.device-mobile .nav__link { min-height: 48px; display: flex; align-items: center; }
html.device-mobile .burger { display: block; }
html.device-mobile .header__cta { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}