/* ===================================================================
   Стакан — тёмный презентационный лендинг
   Базовые стили, переменные, секции, адаптив и дизайн-полировка.
   Этапы: skeleton → markup → styles (адаптивная вёрстка и дизайн).
   =================================================================== */

/* --- Переменные --- */
:root {
  --bg: #0d0d0f;
  --bg-elev: #16161a;
  --fg: #f4f4f5;
  --fg-muted: #a1a1aa;
  --accent: #c8a06a;
  --accent-soft: rgba(200, 160, 106, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --maxw: 1100px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-pad: clamp(72px, 12vh, 160px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Сброс --- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

img { max-width: 100%; display: block; }

/* Выделение текста в фирменном цвете */
::selection { background: var(--accent); color: #14110b; }

/* Видимый фокус для клавиатурной навигации */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Ссылка «к содержанию» для клавиатуры --- */
.skip-link {
  position: fixed;
  top: 8px; left: 50%;
  transform: translate(-50%, -200%);
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: #14110b;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --- Навигация --- */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 90;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13, 13, 15, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.nav__brand-mark {
  width: 12px; height: 16px;
  background: var(--accent);
  clip-path: polygon(18% 0, 82% 0, 70% 100%, 30% 100%);
  border-radius: 2px;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link.is-active { color: var(--accent); }
.nav__link--cta {
  border: 1px solid var(--border);
  color: var(--fg);
}
.nav__link--cta:hover { border-color: var(--accent); color: var(--accent); }

/* Бургер */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav.is-open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Контейнер --- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Прогресс-бар скролла --- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width 0.1s linear;
}

/* --- Кнопки --- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #14110b; }
.btn--primary:hover { background: #d8b27e; }
.btn--ghost { border-color: var(--border); color: var(--fg); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* --- Reveal-анимации --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Лёгкий каскад появления внутри hero и блока «об изделии» */
.hero__inner [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.hero__inner [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.hero__inner [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.features .feature:nth-child(1) { transition-delay: 0.05s; }
.features .feature:nth-child(2) { transition-delay: 0.13s; }
.features .feature:nth-child(3) { transition-delay: 0.21s; }

/* ===================================================================
   Hero
   =================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.hero__inner { padding-block: var(--section-pad); }
.hero__eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
}
.hero__title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__lead {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: var(--fg-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}
.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
}
.hero__scroll-dot {
  width: 4px;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scroll-hint 1.6s var(--ease) infinite;
}
@keyframes scroll-hint {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ===================================================================
   About — единый смысловой блок
   =================================================================== */
.about { padding-block: var(--section-pad); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about__figure {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 70% at 50% 30%, var(--accent-soft), transparent 70%),
    var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about__render {
  width: auto;
  height: 84%;
  max-width: 80%;
  object-fit: contain;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
  transition: transform 0.6s var(--ease, ease);
}
.about__figure:hover .about__render {
  transform: translateY(-6px) scale(1.02);
}
@media (prefers-reduced-motion: reduce) {
  .about__render { transition: none; }
  .about__figure:hover .about__render { transform: none; }
}
/* --- CSS-арт стакана (hero + about), без внешнего изображения --- */
.hero__cup {
  position: absolute;
  right: 7%;
  bottom: -30px;
  opacity: 0.92;
  pointer-events: none;
  display: none;
}
.cup {
  position: relative;
  width: 150px;
  height: 200px;
  background:
    linear-gradient(100deg,
      rgba(255, 255, 255, 0.07) 0 6%,
      transparent 6% 92%,
      rgba(0, 0, 0, 0.35) 92% 100%),
    linear-gradient(160deg, #2c2c32, var(--bg-elev));
  clip-path: polygon(16% 0, 84% 0, 72% 100%, 28% 100%);
  border-radius: 6px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 30px 60px rgba(0, 0, 0, 0.5);
}
/* Ободок-крышка стакана */
.cup::before {
  content: "";
  position: absolute;
  top: -10px; left: 8%;
  width: 84%; height: 20px;
  background:
    radial-gradient(120% 120% at 50% 0%, #3a3a42, #26262b);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.12);
}
/* Тонкий тёплый блик от напитка */
.cup::after {
  content: "";
  position: absolute;
  top: -2px; left: 16%;
  width: 68%; height: 10px;
  background: var(--accent-soft);
  border-radius: 50%;
  opacity: 0.9;
}
.cup--big {
  width: clamp(170px, 24vw, 230px);
  height: clamp(230px, 32vw, 310px);
}

.cup__steam {
  position: absolute;
  top: -66px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
}
.cup__steam span {
  display: block;
  width: 6px;
  height: 46px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.28), transparent);
  border-radius: 50%;
  filter: blur(2px);
  animation: steam 3s ease-in-out infinite;
}
.cup__steam span:nth-child(2) { animation-delay: 0.6s; }
.cup__steam span:nth-child(3) { animation-delay: 1.2s; }

@keyframes steam {
  0%   { opacity: 0; transform: translateY(0) scaleX(1); }
  40%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-40px) scaleX(1.6); }
}

@media (min-width: 980px) {
  .hero__cup { display: block; }
}
.about__eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}
.about__title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.about__text {
  margin-top: 1.2rem;
  color: var(--fg-muted);
  max-width: 52ch;
}

/* --- Преимущества --- */
.features {
  margin-top: 2.6rem;
  display: grid;
  gap: 18px;
}
.feature {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature__num {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
.feature__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.feature__text {
  color: var(--fg-muted);
  font-size: 0.92rem;
}

/* ===================================================================
   CTA
   =================================================================== */
.cta {
  padding-block: var(--section-pad);
  text-align: center;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(90% 120% at 50% 120%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.cta__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cta__eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}
.cta__text {
  margin: 1rem auto 2.4rem;
  max-width: 46ch;
  color: var(--fg-muted);
}

/* --- Форма заявки --- */
.form {
  max-width: 560px;
  margin-inline: auto;
  text-align: left;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form__label {
  font-size: 0.82rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.form__input {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.form__input::placeholder { color: rgba(161, 161, 170, 0.6); }
.form__input:hover { border-color: rgba(255, 255, 255, 0.18); }
.form__input:focus {
  outline: none;
  border-color: var(--accent);
  background: #1b1b20;
}
.form__textarea { resize: vertical; min-height: 110px; }

/* Состояние ошибки */
.form__field.has-error .form__input { border-color: #e0726b; }
.form__error {
  min-height: 1em;
  font-size: 0.78rem;
  color: #e0726b;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.form__field.has-error .form__error { opacity: 1; transform: none; }

.form__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.form__submit { border: none; }
.form__submit:disabled { opacity: 0.6; cursor: progress; transform: none; }
.form__status {
  font-size: 0.9rem;
  color: var(--fg-muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.form__status.is-shown { opacity: 1; transform: none; }
.form__status.is-success { color: var(--accent); }
.form__status.is-error { color: #e0726b; }

/* ===================================================================
   Footer
   =================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2.4rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand { font-weight: 700; letter-spacing: 0.02em; }
.footer__note { color: var(--fg-muted); font-size: 0.85rem; }

/* ===================================================================
   Адаптив
   =================================================================== */
/* Якоря не должны прятаться под фиксированной навигацией */
:where(#about, #cta, #features) { scroll-margin-top: 84px; }

/* Планшеты: сужаем разрыв колонок, чуть уменьшаем стакан в hero */
@media (max-width: 1024px) {
  .about__inner { gap: clamp(28px, 4vw, 56px); }
  .hero__cup { right: 4%; opacity: 0.8; }
}

/* Мобильное меню: бургер + выпадающая панель */
@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: rgba(13, 13, 15, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
                visibility 0.25s var(--ease);
  }
  .nav.is-open .nav__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .nav__link { padding: 12px 14px; font-size: 1rem; }
  .nav__link--cta { text-align: center; margin-top: 6px; }
}

/* Узкие планшеты и крупные телефоны: одна колонка */
@media (max-width: 760px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__media { order: -1; }
  .about__figure {
    aspect-ratio: 16 / 12;
    max-width: 420px;
    margin-inline: auto;
  }
  .cup--big { width: clamp(150px, 40vw, 200px); height: clamp(200px, 52vw, 270px); }
  .footer__inner { justify-content: center; text-align: center; }
}

/* Телефоны: компактные отступы, полноширинные кнопки, кнопка-скролл скрыта */
@media (max-width: 540px) {
  .hero { min-height: 92vh; min-height: 92svh; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .feature { padding: 18px 18px; }
  .hero__scroll { display: none; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .form__submit { width: 100%; }
  .form__footer { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Низкие альбомные экраны: hero не должен занимать весь экран */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: 64px; }
  .hero__scroll { display: none; }
}

/* ===================================================================
   Доступность: уважение к prefers-reduced-motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__scroll-dot,
  .cup__steam span { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
