/* =========================================================================
   layout.css — структура страницы «Не дома»: шапка, hero, finder,
   секции, сетки, конструктор, календарь, мозаика, шаги, финал, footer.
   ========================================================================= */

/* --- Шапка / навигация --- */
.header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}
.nav {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 20px;
  border: 1px solid rgba(242, 246, 255, .13);
  background: rgba(3, 11, 25, .72);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border-radius: 999px;
  box-shadow: 0 18px 64px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .08em; }
.nav-links { display: flex; gap: 22px; color: rgba(242, 246, 255, .70); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--cream); }

/* --- Hero --- */
.hero {
  padding: 150px 0 44px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 360px;
  background: linear-gradient(180deg, rgba(3, 11, 25, .92), transparent);
  pointer-events: none;
}
.hero-bg {
  position: absolute;
  right: -8vw;
  top: 0;
  width: 58vw;
  height: 100%;
  isolation: isolate;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(7, 18, 15, .46) 38%, rgba(7, 18, 15, .10)),
    url("../img/hero/hero-bg.jpg") center / cover no-repeat;
  opacity: .86;
  clip-path: polygon(11% 0, 100% 0, 100% 100%, 0 100%);
  filter: saturate(.82) contrast(1.03) brightness(.7);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, #030b19 0%, rgba(3, 11, 25, .72) 42%, rgba(3, 11, 25, .20) 100%),
    radial-gradient(circle at 74% 18%, rgba(33, 92, 164, .38), transparent 32%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(3, 11, 25, .75));
}
.hero-inner {
  display: grid;
  grid-template-columns: .98fr 1.02fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-copy {
  margin-top: 28px;
  max-width: 630px;
  font-size: 20px;
  line-height: 1.6;
  font-weight: 500;
  color: rgba(242, 246, 255, .76);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 42px; max-width: 720px; }

.visual-stack { position: relative; min-height: 650px; }
.card-main { left: 70px; top: 20px; width: 420px; height: 530px; }
.card-side { right: 10px; top: 110px; width: 280px; height: 360px; }
.card-small { left: 0; bottom: 10px; width: 312px; height: 210px; }
.card-note {
  position: absolute;
  right: 70px;
  bottom: 35px;
  width: 310px;
  border: 1px solid rgba(240, 208, 138, .22);
  background: rgba(5, 14, 31, .82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* --- Finder (быстрый подбор) — под hero, не перекрывает статистику --- */
.finder-wrap { position: relative; z-index: 5; margin-top: 40px; }
.finder {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(140px, .5fr) 2.9fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid rgba(240, 208, 138, .24);
  border-radius: 34px;
  background:
    radial-gradient(130% 190% at 9% -20%, rgba(240, 208, 138, .16), transparent 44%),
    linear-gradient(180deg, rgba(11, 27, 52, .92), rgba(6, 16, 34, .95));
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.finder-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; min-width: 0; }

/* --- Секции --- */
section { padding: 105px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 34px;
}
.section-head h2 {
  font-size: clamp(38px, 4.3vw, 64px);
  line-height: .91;
  letter-spacing: -.065em;
  max-width: 780px;
}
.section-head p { max-width: 420px; color: var(--muted); line-height: 1.55; margin: 0; font-weight: 500; }

/* --- Витрина офферов --- */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* --- Конструктор сценария --- */
.build {
  background: linear-gradient(180deg, rgba(244, 234, 219, .035), rgba(244, 234, 219, .018));
  border-top: 1px solid rgba(242, 246, 255, .08);
  border-bottom: 1px solid rgba(242, 246, 255, .08);
}
.builder { display: grid; grid-template-columns: .82fr 1.18fr; gap: 22px; align-items: stretch; }
.builder-panel, .itinerary {
  border: 1px solid rgba(242, 246, 255, .115);
  background: linear-gradient(180deg, rgba(255, 255, 255, .072), rgba(255, 255, 255, .030));
  border-radius: 34px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.selector-group { margin-bottom: 22px; }
.timeline { display: grid; gap: 14px; }

/* --- Календарь сезонов --- */
.season {
  background:
    radial-gradient(circle at 18% 2%, rgba(240, 208, 138, .105), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(45, 111, 169, .23), transparent 26%);
}
.months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* --- Мозаика Green Club --- */
.mosaic { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 18px; }

/* --- Финальный блок с формой --- */
.final { padding-bottom: 60px; }
.final-box {
  border: 1px solid rgba(240, 208, 138, .24);
  background:
    linear-gradient(135deg, rgba(9, 28, 55, .94), rgba(3, 11, 25, .97)),
    url("../img/sections/final-cta.jpg") right center / 52% auto no-repeat;
  border-radius: 42px;
  overflow: hidden;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: grid;
  grid-template-columns: 1fr .9fr;
  min-height: 520px;
}
.final-copy { padding: 54px; }
.final-copy h2 {
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: .91;
  letter-spacing: -.065em;
  margin-bottom: 20px;
  max-width: 700px;
}
.final-copy p { color: rgba(242, 246, 255, .74); font-size: 18px; line-height: 1.58; max-width: 560px; font-weight: 500; }

/* --- Footer (добавлен поверх прототипа для прода) --- */
.footer {
  border-top: 1px solid rgba(242, 246, 255, .10);
  padding: 56px 0 40px;
  background: linear-gradient(180deg, transparent, rgba(3, 11, 25, .6));
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand p { color: var(--muted); line-height: 1.6; margin: 16px 0 0; max-width: 320px; font-weight: 500; }
.footer-col h4 {
  margin: 0 0 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold2);
  font-weight: 700;
}
.footer-col a, .footer-col span { display: block; color: rgba(242, 246, 255, .74); line-height: 2; font-weight: 500; }
.footer-col a:hover { color: var(--cream); }
.footer-legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(242, 246, 255, .08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(242, 246, 255, .44);
  font-size: 13px;
}
.footer-legal-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover { color: var(--cream); }

/* --- Юридические страницы --- */
.legal-page { padding: 150px 0 60px; }
.legal-shell { max-width: 920px; }
.legal-shell > h1 {
  max-width: 900px;
  margin-bottom: 28px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .98;
}
.legal-lead { max-width: 760px; color: var(--muted); font-size: 19px; line-height: 1.65; }
.legal-shell section {
  padding: 34px 0;
  border-bottom: 1px solid rgba(242, 246, 255, .10);
}
.legal-shell section:last-child { border-bottom: 0; }
.legal-shell section h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.legal-shell p, .legal-shell li { color: rgba(242, 246, 255, .78); line-height: 1.7; }
.legal-shell p { margin: 0 0 14px; }
.legal-shell p:last-child { margin-bottom: 0; }
.legal-shell ul { margin: 0; padding-left: 22px; }
.legal-shell a { color: var(--gold2); text-decoration: underline; text-underline-offset: 3px; }
.legal-footer { padding-top: 24px; }

/* --- Адаптив --- */
@media (max-width: 1050px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-bg { width: 100%; right: 0; opacity: .45; clip-path: none; }
  .visual-stack { min-height: 520px; }
  .card-main { left: 0; }
  .card-side { right: 0; }
  .finder { grid-template-columns: 1fr; gap: 16px; }
  .finder-fields { grid-template-columns: repeat(2, 1fr); }
  .finder-go { width: 100%; }
  .offer-grid, .months { grid-template-columns: repeat(2, 1fr); }
  .builder, .final-box { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 740px) {
  .container, .nav { width: min(100% - 28px, 1200px); }
  .header { top: 10px; }
  .nav-links, .nav-cta { display: none; }
  .nav { padding: 10px 12px; }
  .hero { min-height: auto; padding: 116px 0 56px; }
  h1 { font-size: clamp(34px, 9vw, 46px); line-height: .98; letter-spacing: -.045em; }
  .section-head h2, .final-copy h2 { font-size: clamp(30px, 7.6vw, 42px); }
  .hero-copy { font-size: 17px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .visual-stack { display: none; }
  .finder-wrap { margin-top: 20px; }
  .finder { border-radius: 28px; padding: 18px; }
  .finder-fields { grid-template-columns: 1fr 1fr; }
  section { padding: 76px 0; }
  .section-head { display: block; }
  .section-head h2, .final-copy h2 { letter-spacing: -.055em; }
  .section-head p { margin-top: 18px; }
  .offer-grid, .months, .mosaic { grid-template-columns: 1fr; }
  .builder-panel, .itinerary { padding: 22px; border-radius: 28px; }
  .final-copy { padding: 32px 24px 16px; }
  .final-box { border-radius: 32px; background: linear-gradient(135deg, rgba(9, 28, 55, .94), rgba(3, 11, 25, .97)); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-legal-links { justify-content: flex-start; }
  .legal-page { padding-top: 116px; }
  .legal-shell > h1 { font-size: clamp(34px, 10vw, 48px); }
  .legal-lead { font-size: 17px; }
  body { padding-bottom: 76px; }
}
