/* ============================================================
   Детский сад «Ромашка» — светлая тёплая визитка
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --bg-2: #FDF1DC;          /* мягкий янтарь */
  --card: #FFFFFF;
  --paper: #F3EEE6;
  --text: #2B2A26;
  --sec: #6E6A61;
  --sec-dim: #9B968B;
  --line: #E4DFD5;
  --green: #3E7C4F;
  --green-deep: #2F6B41;
  --green-soft: #E8F1E7;
  --amber: #E8A84C;
  --amber-deep: #8C5A17;
  --error: #C2604F;

  --font-sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-m: 16px;
  --r-l: 22px;
  --shadow: 0 22px 44px rgba(43, 42, 38, .07);
  --ease: cubic-bezier(.2, .7, .25, 1);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 clamp(16.5px, 1.25vw, 18.5px) / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }

::selection { background: #D8E8D4; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: calc(1180px + 8rem);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 64px);
}

/* ---------- shared ---------- */

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  font: 600 14px/1 var(--font-sans);
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus-visible { top: 16px; }

.kicker {
  display: flex;
  gap: 12px;
  font: 500 12px/1.6 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sec);
}
.kicker__num { color: var(--amber-deep); }

h2 {
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-top: 20px;
}

.lead { margin-top: 16px; max-width: 620px; color: var(--sec); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #fff;
  font: 600 15px/1 var(--font-sans);
  padding: 15px 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, transform .12s ease;
  box-shadow: 0 10px 22px rgba(62, 124, 79, .22);
}
.btn:hover { background: var(--green-deep); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .62; cursor: wait; transform: none; box-shadow: none; }
.btn--sm {
  padding: 10px 18px;
  font-size: 13.5px;
  box-shadow: 0 6px 14px rgba(62, 124, 79, .2);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  color: var(--green-deep);
  text-decoration: none;
  font-weight: 550;
}
.link-more__arrow { width: 15px; height: 15px; stroke: var(--green-deep); stroke-width: 2; stroke-linecap: round; fill: none; }

/* ---------- header ---------- */

.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.header.scrolled {
  background: rgba(250, 247, 242, .82);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(43, 42, 38, .05);
}

.header__in {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand__mark { width: 26px; height: 26px; }
.brand__img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(43, 42, 38, .1);
}
.footer .brand__img { width: 28px; height: 28px; border-radius: 8px; }

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 14.5px;
  color: var(--sec);
  text-decoration: none;
  padding-block: 8px;
  transition: color .15s ease;
}
.nav a:hover { color: var(--text); }

.header .btn--sm { margin-left: auto; }

/* ---------- hero ---------- */

.hero { padding: 150px 0 40px; }

.hero__grid { display: block; }

.hero__text { max-width: 860px; margin-inline: auto; text-align: center; }
.hero .kicker { justify-content: center; }
.hero__logo { margin-inline: auto; }
.hero__lead { margin-inline: auto; }
.hero__cta, .hero__chips, .hero__contacts { justify-content: center; }
.hero__title { margin-inline: auto; }

.hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 22px;
  box-shadow: 0 12px 26px rgba(43, 42, 38, .12);
}

.hero__title {
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -.025em;
  margin-top: 24px;
}

.hero__lead { margin-top: 22px; max-width: 520px; color: var(--sec); font-size: clamp(17px, 1.35vw, 19px); }

.hero__cta { margin-top: 32px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.hero__chips {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__chips li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(43, 42, 38, .05);
}

.hero__art svg { width: 100%; height: auto; border-radius: var(--r-l); }
.hero__art {
  background: linear-gradient(180deg, #EAF3F7 0%, #F6F1E4 100%);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 8px;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(64px, 8vw, 120px); }
.section--paper { background: var(--paper); }

.facts {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 26px;
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.fact:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.fact__icon { width: 40px; height: 40px; margin-bottom: 14px; }
.fact h3 { font-size: 17.5px; font-weight: 700; letter-spacing: -.01em; }
.fact p { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--sec); }

/* cards (program) */
.cards {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 26px;
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CFE3C4; }
.card__tag {
  display: inline-block;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 16px;
}
.card h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.card p { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--sec); }

/* day schedule */
.day {
  margin-top: 52px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 56px;
  border-left: 2px solid var(--line);
  padding-left: 28px;
}
.day__row { position: relative; padding: 12px 0; }
.day__row::before {
  content: '';
  position: absolute;
  left: calc(-28px - 2px - 5px + 2px);
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--amber);
}
.day__time {
  font: 600 13px/1 var(--font-mono);
  letter-spacing: .04em;
  color: var(--amber-deep);
  white-space: nowrap;
}
.day__row h3 { font-size: 17.5px; font-weight: 700; margin-top: 8px; }
.day__row p { font-size: 14.5px; color: var(--sec); margin-top: 4px; line-height: 1.5; }

/* reviews */
.reviews {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--r-m);
  padding: 28px;
  box-shadow: 0 10px 26px rgba(43, 42, 38, .05);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.review__text { font-size: 15.5px; line-height: 1.62; color: var(--text); flex: 1; }
.review__stars { margin-top: 0; }
.review .review__who { margin-top: 0; }
.review__who { font: 600 12.5px/1.5 var(--font-mono); letter-spacing: .04em; color: var(--sec); }

/* ---------- contact ---------- */

.contact { background: var(--green-soft); border-top: 1px solid #DCE9D8; padding-block: clamp(64px, 8vw, 120px); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact__text { margin-top: 18px; color: var(--sec); max-width: 470px; }
.contact__hint { margin-top: 16px; font-size: 14.5px; color: var(--sec); }

/* form */
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 30px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow);
}
.form__title {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sec);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--sec);
  margin-bottom: 8px;
  font-weight: 550;
}
.field input, .field textarea {
  width: 100%;
  background: #FCFBF8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text);
  font: 400 15.5px/1.5 var(--font-sans);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #B3AEA3; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(62, 124, 79, .12);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--sec);
  cursor: pointer;
  user-select: none;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid #C9C3B7;
  border-radius: 5px;
  background: #FCFBF8;
  cursor: pointer;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.check input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.check a { color: var(--sec); text-underline-offset: 3px; }
.check a:hover { color: var(--text); }

.form .btn { justify-self: start; }
.form__status { min-height: 1.2em; font-size: 14.5px; }
.form__status.ok { color: var(--green-deep); }
.form__status.err { color: var(--error); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 30px; background: var(--bg); }
.footer__in { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.footer__copy { color: var(--sec); font-size: 14px; }
.footer__links { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.footer__links a { font-size: 14px; color: var(--sec); text-decoration: none; transition: color .15s ease; }
.footer__links a:hover { color: var(--text); }
.totop:hover { color: var(--green-deep) !important; }

/* ---------- motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- breakpoints ---------- */

@media (max-width: 1000px) {
  .facts, .cards { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .facts, .cards, .reviews--2col, .promo { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .form { padding: 22px; }
  .crow { grid-template-columns: 1fr; gap: 6px; }
  .gal-t { width: 56px; height: 56px; }
  .hero__logo { width: 72px; height: 72px; border-radius: 17px; }
  .lightbox__close { top: 8px; right: 8px; }
}

/* ---------- hero contacts / chips ---------- */

.hero__contacts { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 550;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(43, 42, 38, .05);
  transition: border-color .15s ease, transform .15s ease;
}
a.chip:hover { border-color: #CFE3C4; transform: translateY(-2px); }
.chip--tel { color: var(--green-deep); font-weight: 650; }

/* ---------- promo ---------- */

.promo {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.promo__card {
  background: linear-gradient(150deg, #FFFFFF 0%, #FDF1DC 100%);
  border: 1px solid #EFD9B4;
  border-radius: var(--r-l);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.promo__card::after {
  content: '';
  position: absolute;
  right: -42px;
  top: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(232, 168, 76, .18);
}
.promo__card > * { position: relative; z-index: 1; }
.promo__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.promo__tag {
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  background: rgba(255, 255, 255, .7);
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 16px;
}
.promo__card h3 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.promo__card p { margin-top: 10px; font-size: 15px; color: var(--sec); line-height: 1.55; }
.promo__note { margin-top: 22px; font-size: 14px; color: var(--sec-dim); }

/* ---------- photos: compact thumb strip + lightbox ---------- */

.gal {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gal-t {
  width: 68px;
  height: 68px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
}
.gal-t img { width: 100%; height: 100%; object-fit: cover; }
.gal-t:hover, .gal-t:focus-visible { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 22px rgba(43,42,38,.12); border-color: #CFE3C4; }
.gal__hint { margin-top: 16px; font-size: 13.5px; color: var(--sec); }

.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(43, 42, 38, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox__stage {
  position: relative;
  max-width: min(880px, 92vw);
  margin: 0;
  animation: lb-in .25s var(--ease);
}
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lightbox__img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(43, 42, 38, .35);
}
.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(43,42,38,.25);
  transition: background .15s ease, transform .12s ease;
}
.lightbox__close:hover { background: var(--green-deep); }
.lightbox__close:active { transform: scale(.94); }

/* ---------- rating ---------- */

.rating { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.rating__score {
  font: 750 26px/1 var(--font-sans);
  color: var(--green-deep);
  background: var(--green-soft);
  border-radius: 12px;
  padding: 10px 14px;
}
.rating__meta { color: var(--sec); font-size: 14.5px; }
.rating__meta a { color: var(--sec); text-underline-offset: 3px; }
.rating__meta a:hover { color: var(--text); }

.reviews--2col { grid-template-columns: repeat(2, 1fr); }

.review__stars {
  color: var(--amber);
  font-size: 17px;
  letter-spacing: 3px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.review__stars__num {
  font: 600 12.5px/1 var(--font-mono);
  color: var(--amber-deep);
  background: #FDF1DC;
  border-radius: 999px;
  padding: 4px 9px;
  letter-spacing: 0;
}

/* ---------- contact rows ---------- */

.contact__rows { margin-top: 30px; display: grid; gap: 0; border-top: 1px solid #CFE0CB; }
.crow {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 4px;
  border-bottom: 1px solid #CFE0CB;
  text-decoration: none;
  transition: background .2s ease;
}
.crow:hover { background: rgba(255, 255, 255, .45); }
.crow__label { font: 500 11.5px/1.6 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sec); }
.crow__value { font-size: 15.5px; color: var(--text); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.crow__value--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.crow__hint { font-size: 13px; color: var(--green-deep); font-weight: 550; white-space: nowrap; }

/* ---------- accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .fact, .card, .btn, .gal-t { transition: none; }
  .lightbox__stage { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .header.scrolled { background: rgba(250, 247, 242, .98); -webkit-backdrop-filter: none; backdrop-filter: none; }
}


/* ---------- final responsive overrides (keep last) ---------- */

@media (max-width: 900px) {
  .reviews--2col { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .promo { grid-template-columns: 1fr; }
  .header__in { gap: 16px; }
  .header .brand { font-size: 17px; gap: 8px; }
  .review { padding: 24px; }
  .contact__rows { margin-top: 24px; }
}

@media (max-width: 380px) {
  .header .brand span { display: none; }
}
