/* ============================================================
   Nails By Alisa — стили
   Mobile-first. Базовые стили = мобильные (375px),
   @media min-width — расширения для планшета/десктопа.
   ============================================================ */

/* -------------------- Дизайн-токены -------------------- */
:root {
  /* Цвета */
  --bg-top: #fce8ee;        /* верх градиента — светло-розовый */
  --bg-bottom: #f6d5df;     /* низ градиента — чуть глубже роза */
  --card: #fffafb;          /* почти белые карточки */
  --accent: #f0708a;        /* тёпло-коралловый акцент */
  --accent-dark: #e0576f;   /* акцент при наведении */
  --accent-soft: #fdeef1;   /* мягкая заливка на акценте */
  --text: #2b2226;          /* тёмно-графитовый, не чёрный */
  --text-soft: #8a757d;     /* приглушённый текст */
  --line: rgba(43, 34, 38, 0.10);

  /* Тени / скругления */
  --shadow: 0 20px 45px -22px rgba(200, 110, 135, 0.55);
  --shadow-sm: 0 8px 22px -14px rgba(200, 110, 135, 0.5);
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Типографика */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Раскладка */
  --maxw: 1120px;
  --gutter: 20px;
  --tap: 48px; /* минимальный тап-таргет */
}

/* -------------------- Сброс -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  /* Плавный розовый градиент сверху вниз, закреплён на всю высоту */
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: 1.08; }
p { margin: 0; }

/* -------------------- Утилиты -------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 600;
}
.section-title {
  font-size: clamp(28px, 8vw, 44px);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.section-title.center { margin-left: auto; margin-right: auto; }

/* -------------------- Кнопки -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: #fff; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* -------------------- Карточка (базовая) -------------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -------------------- Шапка -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 232, 238, 0.72);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.brand-mini {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-mini span { color: var(--accent-dark); font-style: italic; font-weight: 500; }

/* -------------------- HERO -------------------- */
.hero { padding: 26px 0 40px; }
.hero-inner { display: flex; flex-direction: column; gap: 26px; }

.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-title {
  /* Крупный serif, капс, 3-4 строки как на референсе */
  font-size: clamp(40px, 15vw, 88px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
}
.hero-sub {
  margin-top: 18px;
  max-width: 42ch;
  color: var(--text-soft);
  font-size: 16px;
}
.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------- Преимущества -------------------- */
.advantages { padding: 30px 0; }
.adv-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.adv { padding: 22px; }
.adv-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 20px;
  margin-bottom: 12px;
}
.adv h3 { font-size: 20px; margin-bottom: 6px; }
.adv p { color: var(--text-soft); font-size: 14.5px; }

/* -------------------- Галерея -------------------- */
.gallery-sec { padding: 30px 0; }
.gallery {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* мобайл: 2 колонки */
  gap: 12px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--accent-soft);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease; /* лёгкий hover-зум */
}
.gallery-item:hover img { transform: scale(1.06); }

/* -------------------- Услуги -------------------- */
.services-sec { padding: 30px 0; }
.services {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.service {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}
.service-main { min-width: 0; }
.service-name { font-size: 20px; margin-bottom: 4px; }
.service-desc { color: var(--text-soft); font-size: 14px; }
.service-dur {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.service-price {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
/* Красная цена (скидка): старая зачёркнута, новая красная */
.price-old { font-size: 15px; font-weight: 400; color: var(--text-soft); text-decoration: line-through; }
.price-red { color: #e0143c; }
.choice-price .price-old { font-size: 12px; display: block; text-align: right; }
.choice-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.price-note { margin-top: 16px; text-align: center; color: var(--text-soft); font-size: 14px; }
.services-cta { margin-top: 22px; text-align: center; }

/* Доп. услуги — переключатели-чипы на шаге «Контакты» */
.addons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.addon-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.addon-chip input { width: 18px; height: 18px; accent-color: var(--accent); }
.addon-name { font-size: 15px; font-weight: 500; }
.addon-price { font-size: 14px; color: var(--accent-dark); font-weight: 600; }
.addon-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* -------------------- Форма записи -------------------- */
.booking-sec { padding: 30px 0 50px; }
.booking {
  margin-top: 24px;
  padding: 22px 18px 26px;
  overflow: hidden;
}

/* Прогресс шагов */
.steps {
  display: flex;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
}
.step span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-soft);
  transition: all .25s ease;
}
.step.is-active span { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.is-done span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.step.is-active { color: var(--text); }

/* Панели шагов */
.pane { display: none; animation: fadeIn .3s ease; }
.pane.is-active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pane-title { font-size: 22px; margin-bottom: 4px; }
.pane-hint { color: var(--text-soft); font-size: 13.5px; margin-bottom: 16px; }
.pane-nav {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.pane-nav .btn-primary { margin-left: auto; }

/* Карточки-кнопки выбора (услуга) */
.choice-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 16px 18px;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.choice:hover { border-color: var(--accent); }
.choice:active { transform: scale(0.99); }
.choice.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-name { font-weight: 600; font-size: 16px; }
.choice-meta { color: var(--text-soft); font-size: 13px; margin-top: 2px; }
.choice-price { font-family: var(--font-serif); font-size: 20px; font-weight: 600; white-space: nowrap; }

/* Лента дат (горизонтальный свайп) */
.dates {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.date {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 62px;
  min-height: 78px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  transition: border-color .2s ease, background-color .2s ease, transform .12s ease;
}
.date:active { transform: scale(0.96); }
.date .dow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }
.date .dnum { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.date .dmon { font-size: 11px; color: var(--text-soft); }
.date.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.date.selected .dow, .date.selected .dmon { color: rgba(255,255,255,0.85); }
.date.off {
  opacity: 0.45;
  pointer-events: none;
  background: repeating-linear-gradient(-45deg, #fff, #fff 6px, #faf0f3 6px, #faf0f3 12px);
}

/* Сетка слотов времени */
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.slot {
  min-height: var(--tap);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, background-color .2s ease, transform .12s ease;
}
.slot:hover { border-color: var(--accent); }
.slot:active { transform: scale(0.96); }
.slot.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.slot.busy {
  opacity: 0.4;
  pointer-events: none;
  background: #f4ecef;
  color: var(--text-soft);
  text-decoration: line-through;
}
.slots-empty { grid-column: 1 / -1; color: var(--text-soft); font-size: 14px; padding: 8px 0; }

/* Итог записи */
.summary {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14.5px; }
.summary-row + .summary-row { border-top: 1px solid rgba(224,87,111,0.14); }
.summary-row .k { color: var(--text-soft); }
.summary-row .v { font-weight: 600; text-align: right; }

/* Ловушка для ботов - скрыта от людей, но доступна автозаполнялкам ботов */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Поля ввода */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  font-size: 16px; /* >=16px чтобы iOS не зумил при фокусе */
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.invalid { border-color: #e0576f; }
.field-error { display: block; min-height: 16px; margin-top: 6px; font-size: 12.5px; color: #d24765; }

.submit-status { margin-top: 14px; text-align: center; font-size: 14px; min-height: 20px; }
.submit-status.err { color: #d24765; }
.submit-status.ok { color: #3f9d6b; }

/* Экран успеха */
.pane-success { text-align: center; padding: 10px 0; }
.success-ico {
  width: 66px; height: 66px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  box-shadow: var(--shadow-sm);
  animation: pop .4s ease;
}
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.success-text { color: var(--text-soft); margin-bottom: 18px; }
.pane-success .summary { text-align: left; }
.pane-success .btn-ghost { margin-top: 20px; }

/* -------------------- Footer -------------------- */
.site-footer {
  margin-top: 20px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 251, 0.5);
}
.footer-inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.brand-lg { font-size: 24px; }
.footer-tag { color: var(--text-soft); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }
.footer-contacts { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
}
.footer-link:hover { color: var(--accent-dark); }
.soc-ico { color: var(--accent-dark); display: inline-flex; }
.footer-copy { color: var(--text-soft); font-size: 13px; }

/* -------------------- Анимации появления (scroll reveal) -------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   ПЛАНШЕТ  (>= 768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --gutter: 32px; }

  .hero { padding: 40px 0 60px; }
  .hero-inner { flex-direction: row; align-items: center; gap: 40px; }
  .hero-copy { flex: 1 1 55%; }
  .hero-photo { flex: 0 0 40%; max-width: 440px; }

  .adv-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; } /* десктоп: 3 колонки */

  .services { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .booking { padding: 32px 30px 36px; max-width: 720px; margin-left: auto; margin-right: auto; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .step { font-size: 12px; }

  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .footer-contacts { flex-direction: row; gap: 24px; }
}

/* ============================================================
   ДЕСКТОП  (>= 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .hero-title { font-size: clamp(64px, 6vw, 96px); }
  .gallery { grid-template-columns: repeat(4, 1fr); } /* 4 колонки на широком */
  .adv-grid { grid-template-columns: repeat(4, 1fr); }
  .slots { grid-template-columns: repeat(5, 1fr); }
}
