@font-face {
  font-family: "Wix Madefor Display";
  src: url("/fonts/WixMadeforDisplay-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  /* Брендбук «Природа», с.6 — только эти цвета. Мрамор — оттенок, не текстура */
  --snow: #FFFFFF;
  --marble: #F8F4F0;
  --sand: #D6C6B5;
  --bronze: #BFAE9E;
  --malachite: #417A68;
  --malachite-dark: #325A50;
  /* вспомогательные — точечно, только для акцента/действия */
  --oblepikha: #F5A24C;
  --terra: #D85A24;
  --leaf: #3FA070;

  --ink: var(--malachite-dark);
  --ink-soft: rgb(50 90 80 / .88);
  --line: rgb(191 174 158 / .55);     /* бронза, hairline */
  --line-strong: var(--bronze);

  --wrap: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --sec: clamp(80px, 10vw, 136px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --arch: 999px 999px 0 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Wix Madefor Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--marble);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
h1, h2, p, figure { margin: 0; }
address { font-style: normal; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 18px; border-radius: 999px;
  background: var(--malachite-dark); color: var(--marble); text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--malachite-dark); outline-offset: 4px; border-radius: 999px; }
.foot :focus-visible { outline-color: var(--oblepikha); }
main:focus { outline: none; }

/* ───────── волны бренда (контурные hairline-линии) ───────── */
.waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.waves path { stroke: var(--bronze); stroke-width: 1; vector-effect: non-scaling-stroke; }
.waves--hero path { opacity: .5; }

/* ───────── портал (арка бренда) ───────── */
.portal { position: relative; }
.portal__frame { position: relative; overflow: hidden; border-radius: var(--arch); }
.portal__frame img { width: 100%; height: 100%; object-fit: cover; }
.portal__echo {
  position: absolute; inset: -14px -14px 0;
  border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: var(--arch);
  pointer-events: none;
}

/* ───────── HERO ───────── */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(40px, 7vh, 88px) 0 clamp(16px, 3vh, 40px);
}
.hero .waves { z-index: -1; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  min-height: min(calc(100svh - 220px), 680px);
}
.hero__copy { display: grid; gap: clamp(40px, 6vh, 64px); }
.hero__title { display: grid; gap: clamp(22px, 3.2vh, 34px); font-weight: inherit; }
.hero__logo { width: min(100%, 520px); height: auto; aspect-ratio: 571 / 90.921; color: var(--malachite-dark); }
.hero__lead {
  display: block;
  max-width: 17ch;
  font-size: clamp(30px, 3.7vw, 52px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.hero__portal { justify-self: center; width: min(100%, 500px); }
.hero__portal img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(#000 78%, transparent 99%);
          mask-image: linear-gradient(#000 78%, transparent 99%);
}

/* соцсети — тонкие пилюли с hairline-рамкой */
.socials ul { display: flex; flex-wrap: wrap; gap: 10px; }
.soc {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 22px 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 500; letter-spacing: .005em;
  background: var(--marble);
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.soc__ic { width: 20px; height: 20px; fill: currentColor; flex: none; }
.soc__arr { width: 16px; height: 16px; flex: none; opacity: .5; transition: transform .4s var(--ease), opacity .4s; }

.soc:active { background: var(--malachite); }

/* ───────── секции ───────── */
.block { position: relative; padding: var(--sec) 0; }
.block + .block { border-top: 1px solid var(--line); }
.block--snow { background: var(--snow); border-top: 0 !important; }
.block--snow + .block { border-top: 0; }

.block__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(48px, 8vw, 128px);
  align-items: center;
}
.block__grid--rev .block__text { order: 2; }
.block__text { display: grid; gap: clamp(28px, 4vh, 40px); align-content: start; }

.label {
  display: flex; align-items: baseline; gap: 18px;
  font-size: 13px; line-height: 1.4; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--malachite);
}
.label__num { font-feature-settings: "tnum"; letter-spacing: .04em; color: var(--ink-soft); }
.label::after { content: ""; flex: 1; max-width: 120px; height: 1px; background: var(--line); align-self: center; }

.lead {
  font-size: clamp(20px, 1.75vw, 25px);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.008em;
  max-width: 34em;
  text-wrap: pretty;
}
.lead--wide { max-width: 46em; margin-top: clamp(40px, 6vh, 64px); }

/* четыре среды */
.envs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.envs li {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; font-size: 15px; letter-spacing: .02em; color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.envs li::before {
  content: ""; width: 9px; height: 12px; flex: none;
  border: 1px solid var(--malachite); border-bottom: 0; border-radius: 99px 99px 0 0;
}
.envs li:nth-child(odd) { padding-right: 16px; }

.portal--photo { width: min(100%, 460px); justify-self: center; margin-top: 14px; }
.portal--photo .portal__frame { aspect-ratio: 4 / 5; }
.portal--photo img { object-position: 50% 50%; }
/* фото в декоративной плите (арка, волны — в растре, как hero): низ растворяется в фон */
.portal--photo img, .card__media img {
  -webkit-mask-image: linear-gradient(#000 84%, transparent 100%);
          mask-image: linear-gradient(#000 84%, transparent 100%);
}

/* многослойная арка как в hero (it11): три концентричных пояса камня — светлое лицо, ступень, тёмный откос (цвета взяты с арки hero) —
   и проём с картинкой; радиус каждого слоя = внешний − толщины поясов, поэтому арки концентричны; низ растворяется как у hero */
.layers {
  --r: 999px; --d1: 5.4cqw; --d2: 3.8cqw; --d3: 2.4cqw;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  display: grid; padding: var(--d1) var(--d1) 0;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--grain), linear-gradient(#F0E9E0, #EAE1D6);
  -webkit-mask-image: linear-gradient(#000 82%, transparent 100%);
          mask-image: linear-gradient(#000 82%, transparent 100%);
}
.layers, .layers__b2, .layers__b3 { grid-template-rows: 1fr; }
.layers__b2, .layers__b3, .layers__open { display: grid; min-height: 0; }
.layers__b2 { padding: var(--d2) var(--d2) 0; border-radius: calc(var(--r) - var(--d1)) calc(var(--r) - var(--d1)) 0 0; background: var(--grain), linear-gradient(#DDCDBC, #D5C3AF); }
.layers__b3 { padding: var(--d3) var(--d3) 0; border-radius: calc(var(--r) - var(--d1) - var(--d2)) calc(var(--r) - var(--d1) - var(--d2)) 0 0; background: var(--grain), linear-gradient(#C2AD96, #B9A28A); }
.layers__open { position: relative; overflow: hidden; border-radius: calc(var(--r) - var(--d1) - var(--d2) - var(--d3)) calc(var(--r) - var(--d1) - var(--d2) - var(--d3)) 0 0; background: var(--marble); }
.layers__open img { position: absolute; inset: 0; }
.portal--layers { container-type: inline-size; }
.portal--layers img, .card--layers .card__media img { -webkit-mask-image: none; mask-image: none; }
.portal--layers .portal__frame img { object-position: 50% 40%; }

/* Верница */
.vern__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  gap: 32px; margin-bottom: clamp(36px, 5vh, 56px);
}
.facts { display: flex; gap: clamp(28px, 4vw, 64px); }
.facts li { display: grid; gap: 4px; padding-left: 18px; border-left: 1px solid var(--line-strong); }
.facts b { font-size: clamp(26px, 2.6vw, 38px); line-height: 1; font-weight: 400; letter-spacing: -.02em; }
.facts span { font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }

.map { position: relative; overflow: hidden; border-radius: clamp(160px, 30vw, 420px) clamp(160px, 30vw, 420px) 0 0; background: var(--marble); }
.map img { width: 100%; aspect-ratio: 1400 / 990; object-fit: cover; filter: saturate(.78) sepia(.06); }
.map__cap {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; width: max-content;
  padding: 9px 16px; border-radius: 999px;
  background: rgb(248 244 240 / .92); color: var(--ink);
  font-size: 13px; letter-spacing: .04em;
}
.map__cap svg { width: 14px; height: 14px; fill: var(--oblepikha); flex: none; }

/* СПб — цифры тонким кеглем */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.stat { display: grid; gap: 10px; padding: clamp(24px, 4vh, 40px) 0; border-bottom: 1px solid var(--line); }
.stat:nth-child(2) { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.stat b { font-size: clamp(48px, 6vw, 88px); line-height: .95; font-weight: 400; letter-spacing: -.04em; color: var(--malachite-dark); }
.stat span { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--malachite); }
.stat--addr { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.stat--addr svg { width: 16px; height: 16px; fill: var(--oblepikha); flex: none; }
.stat--addr span { text-transform: none; letter-spacing: .01em; font-size: 17px; color: var(--ink); }

/* ───────── Фестиваль / Детский клуб ───────── */
.duo { position: relative; isolation: isolate; padding: 0 0 var(--sec); }
.duo__grid { --g: clamp(32px, 4vw, 56px); --mh: calc((100cqw - var(--g)) / 2 * .8); position: relative; container-type: inline-size; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--g); }
/* волны-связки слева/справа и между арками — как в hero; под картинками, видны только по бокам */
.waves--duo { inset: auto; left: 50%; width: 100vw; transform: translateX(-50%); top: calc(var(--mh) * .5); height: calc(var(--mh) * .36); z-index: -1; }
.waves--duo path { stroke: url(#duo-fade); stroke-width: 1.2; opacity: 1; }
.waves--duo { --e1: calc(50% - 50cqw); --e2: calc(50% - var(--g) / 2); --e3: calc(50% + var(--g) / 2); --e4: calc(50% + 50cqw);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--e1) - 56px), transparent calc(var(--e1) - 18px), transparent calc(var(--e2) + 16px), #000 50%, transparent calc(var(--e3) - 16px), transparent calc(var(--e4) + 18px), #000 calc(var(--e4) + 56px));
  mask-image: linear-gradient(90deg, #000 calc(var(--e1) - 56px), transparent calc(var(--e1) - 18px), transparent calc(var(--e2) + 16px), #000 50%, transparent calc(var(--e3) - 16px), transparent calc(var(--e4) + 18px), #000 calc(var(--e4) + 56px)); }
.card__frame { position: relative; }
.card { display: grid; grid-template-rows: auto 1fr; gap: 32px; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 5 / 4; border-radius: 200px 200px 0 0; background: var(--marble); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Фестиваль и Детский клуб — одинаковая многослойная арка (как блок 01/hero), внешний контур — .portal__echo hero: 1px бронза в 14px от камня */
.card--layers .card__frame { --r: 200px; container-type: inline-size; }
.card--layers .card__media { --r: 200px; --d1: 4.4cqw; --d2: 3cqw; --d3: 1.9cqw; border-radius: var(--r) var(--r) 0 0; background: var(--grain), linear-gradient(#F0E9E0, #EAE1D6); }
.card--layers .card__media img { object-position: 50% 45%; }
.card__ring { position: absolute; inset: -14px -14px 0; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: calc(var(--r, 200px) + 14px) calc(var(--r, 200px) + 14px) 0 0; pointer-events: none; }

.card__body { display: grid; gap: 14px; align-content: start; }
.card__title { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; font-weight: 400; letter-spacing: -.02em; }
.card__text { color: var(--ink-soft); font-size: 17px; }
.card__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--malachite-dark);
  font-size: 15px; font-weight: 500; letter-spacing: .01em; text-decoration: none;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .4s var(--ease); }
.btn .btn__ic { width: 18px; height: 18px; fill: currentColor; }
.btn--solid { background: var(--malachite-dark); color: var(--marble); }
.btn--solid svg { color: var(--oblepikha); }

.btn--line { background: transparent; color: var(--ink); border-color: var(--line-strong); }

.btn:active { transform: translateY(1px); }

/* ───────── футер ───────── */
.foot { position: relative; overflow: hidden; isolation: isolate; background: var(--malachite-dark); color: var(--marble); padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 56px); }
.foot .waves { z-index: -1; }
.foot .waves path { stroke: var(--malachite); opacity: .9; }
.foot__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px 48px; }
.foot__logo { display: block; width: 200px; color: var(--marble); border-radius: 4px; }
.foot__logo svg { width: 100%; height: auto; aspect-ratio: 571 / 90.921; }
.foot__soc { display: flex; gap: 8px; justify-self: center; }
.foot__soc a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgb(248 244 240 / .28);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s;
}
.foot__soc svg { width: 19px; height: 19px; fill: currentColor; }
.foot__soc a:active, .foot__logo:active { transform: translateY(1px); }
.foot__logo { padding-block: 6px; transition: opacity .4s var(--ease); }
.foot__addr { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: rgb(248 244 240 / .86); }
.foot__addr svg { width: 15px; height: 15px; fill: var(--oblepikha); flex: none; }

@media (hover: hover) {
  .soc:hover { background: var(--malachite-dark); border-color: var(--malachite-dark); color: var(--marble); }
  .soc:hover .soc__arr { transform: translate(2px, -2px); opacity: 1; color: var(--oblepikha); }
  .btn--solid:hover { background: var(--malachite); border-color: var(--malachite); }
  .btn--solid:hover svg { transform: translate(2px, -2px); }
  .btn--line:hover { border-color: var(--malachite-dark); background: var(--malachite-dark); color: var(--marble); }
  .foot__soc a:hover { background: var(--marble); border-color: var(--marble); color: var(--malachite-dark); }
  .foot__logo:hover { opacity: .8; }
}

/* ───────── движение ───────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in, .js .reveal:focus-within { opacity: 1; transform: none; }
@media print { .js .reveal { opacity: 1; transform: none; } }
.block__grid .reveal + .reveal { transition-delay: .12s; }

@media (prefers-reduced-motion: no-preference) {
  .hero__portal img { animation: settle 2.4s var(--ease) both; }
  .card__media img { transition: transform 1.6s var(--ease); }
  .card:has(a:hover) .card__media img { transform: scale(1.025); }
  .hero__copy { animation: rise 1.4s var(--ease) .15s both; }
  .waves--hero path:not([stroke-dasharray]) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 4.5s var(--ease) .3s forwards; }
  .waves--hero path[stroke-dasharray] { animation: fade 3s var(--ease) .8s both; }
  .portal__echo, .card__ring { animation: fade 2s var(--ease) .6s both; }
}
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ───────── адаптив ───────── */
@media (max-width: 959px) {
  .hero__inner { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .hero__portal { order: -1; width: min(78%, 380px); }
  .block__grid { grid-template-columns: 1fr; gap: 56px; }
  .block__grid--rev .block__text { order: 0; }
  .portal--photo { width: min(88%, 420px); }
  .vern__head { grid-template-columns: 1fr; align-items: start; }
  .duo__grid { grid-template-columns: 1fr; --g: 64px; }
  .waves--duo { display: none; }
  .card__media { border-radius: 35% 35% 0 0 / 43.75% 43.75% 0 0; }
  .card--layers .card__frame, .card--layers .card__media { --r: 35cqw; }
  .foot__inner { grid-template-columns: 1fr; justify-items: start; }
  .foot__soc { justify-self: start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 28px; }
  .hero__portal { width: min(72%, 300px); }
  .hero__copy { gap: 36px; }
  .socials ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .socials li:last-child { grid-column: 1 / -1; }
  .soc { width: 100%; justify-content: flex-start; }
  .soc__arr { margin-left: auto; }
  .facts { gap: 20px; flex-wrap: wrap; }
  .facts li { padding-left: 12px; }
  .map { border-radius: 160px 160px 0 0; }
  .map__cap { bottom: 12px; }
  .card__media { border-radius: 140px 140px 0 0; }
  .card--layers .card__frame, .card--layers .card__media { --r: 140px; }
  .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 340px) {
  .socials ul { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .soc { padding: 0 14px; gap: 10px; font-size: 15px; }
  .facts b { font-size: 24px; }
}
