/* ============================================================
   NORR — Дизайн-система (спільна для всіх сторінок)
   ============================================================ */

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

:root {
  /* Фірмова палітра «Атмосфери»: тёмно-зелений + бордо на теплому льоні */
  --linen:       #F2EEE5;
  --cream:       #E9E3D7;
  --warm-white:  #FAF7F0;
  --charcoal:    #1C3A2C;   /* глибокий хвойний — текст і темні секції */
  --dark:        #122720;
  --sage:        #2F6349;   /* фірмовий зелений — акценти */
  --sage-light:  rgba(47,99,73,0.10);
  --sage-border: rgba(47,99,73,0.22);
  --stone:       #8C8578;
  --muted:       rgba(28,58,44,0.52);
  --faint:       rgba(28,58,44,0.34);
  --off-white:   #F2EEE5;
  --terracotta:  #7E2B34;   /* бордо */

  --nav-h: 82px;
  --pad-x: 64px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── Типографіка / утиліти ───────────────────────────────── */
.serif { font-family: 'Cormorant Garamond', serif; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stone);
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 300;
  line-height: 1.12;
  color: var(--dark);
}
.section-title em { font-style: italic; color: var(--sage); }

.container { max-width: var(--maxw); margin: 0 auto; }
.section { padding: 140px var(--pad-x); }
.section--dark { background: var(--charcoal); }
.section--linen { background: var(--linen); }
.section--warm { background: var(--warm-white); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
}

.section-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  border-bottom: 1px solid var(--sage-border);
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.section-link:hover { color: var(--charcoal); border-color: rgba(28,26,23,0.4); }

/* ─── Кнопки ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 17px 34px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--primary { background: var(--terracotta); color: #F6EFE6; }
.btn--primary:hover { background: #6A222B; transform: translateY(-2px); }
.btn--sage { background: var(--sage); color: var(--off-white); }
.btn--sage:hover { background: #798d76; transform: translateY(-2px); }
.btn--outline { color: var(--charcoal); border-color: rgba(28,26,23,0.22); }
.btn--outline:hover { background: var(--charcoal); color: var(--warm-white); border-color: var(--charcoal); }

.btn-ghost {
  font-size: 13px;
  font-weight: 300;
  color: var(--stone);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--sage-border);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-ghost:hover { color: var(--charcoal); border-color: rgba(28,26,23,0.4); }

/* ─── NAV ─────────────────────────────────────────────────── */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  padding: 26px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
#nav.is-scrolled {
  background: rgba(250,248,244,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(28,26,23,0.07);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--charcoal);
  text-decoration: none;
  text-transform: uppercase;
}
@media (max-width: 380px) { .nav-logo { font-size: 17px; letter-spacing: 0.14em; } }

.nav-links { display: flex; align-items: center; gap: 36px; }

.nav-link {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--charcoal); }

.nav-cta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
  padding: 11px 26px;
  border: 1px solid rgba(28,26,23,0.22);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav-cta:hover { background: var(--terracotta); color: #F6EFE6; border-color: var(--terracotta); }

/* Бургер */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--charcoal);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Мобільне меню */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--warm-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 32px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 300;
  color: var(--dark);
  text-decoration: none;
  padding: 10px 0;
}
.mobile-menu a em { font-style: italic; color: var(--sage); }

/* ─── Медіа-слоти (місце під фото) ────────────────────────── */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #EAE4DB 0%, #D8CEC0 55%, #C8BAA8 100%);
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}
.media .media-hover { opacity: 0; }
.media-tag {
  position: absolute;
  bottom: 14px; left: 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(28,26,23,0.45);
  background: rgba(245,242,236,0.6);
  padding: 5px 10px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ─── Картка товару ───────────────────────────────────────── */
.product-card { text-decoration: none; color: inherit; display: block; }
.product-card .media { aspect-ratio: 3/4; }
.product-card:hover .media img { transform: scale(1.03); }
.product-card:hover .media .media-hover { opacity: 1; }

.master-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(28,26,23,0.55);
  background: rgba(245,242,236,0.78);
  padding: 5px 10px;
  backdrop-filter: blur(6px);
}

.product-info { padding: 20px 0 0; }
.product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 6px;
}
.product-meta {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.product-price {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--charcoal);
}

/* ─── FOOTER ──────────────────────────────────────────────── */
.site-footer { background: var(--charcoal); color: rgba(245,242,236,0.5); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding: 96px var(--pad-x) 64px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.footer-logo-img { width: 220px; max-width: 60vw; height: auto; display: block; }
.brand-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--sage);
  margin-top: 14px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245,242,236,0.45);
  max-width: 300px;
  margin-top: 12px;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,242,236,0.35);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(245,242,236,0.6);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.footer-col a:hover { color: var(--off-white); }
.footer-bottom {
  border-top: 1px solid rgba(245,242,236,0.08);
  padding: 26px var(--pad-x);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(245,242,236,0.25);
}
.footer-bottom a { color: rgba(245,242,236,0.4); text-decoration: none; transition: color 0.3s var(--ease); }
.footer-bottom a:hover { color: var(--off-white); }

/* ─── Reveal (анімація появи) ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.is-in .reveal, .reveal.is-in { opacity: 1; transform: none; }

/* ─── Кінетична типографіка ───────────────────────────────────
   Великі серифні заголовки виїжджають з-під маски (clip-path),
   а не просто зʼявляються. Запас у clip — щоб курсив і виносні
   елементи літер не обрізались у показаному стані. */
/* Головний заголовок героя лишається на простому reveal (без маски),
   щоб він завжди був на місці. Кінетика — на внутрішніх заголовках. */
.page-hero h1, .closing h2, .section-title, .rental-headline {
  clip-path: inset(-0.14em -0.06em -0.22em -0.06em);
}
.page-hero h1.reveal, .closing h2.reveal {
  transition: opacity 1s var(--ease), transform 1s var(--ease), clip-path 1s var(--ease);
}
.page-hero h1.reveal:not(.is-in), .closing h2.reveal:not(.is-in) {
  clip-path: inset(0 -0.06em 100% -0.06em);
}
.reveal .section-title, .reveal .rental-headline {
  transition: clip-path 1.05s var(--ease) 0.08s;
}
.reveal:not(.is-in) .section-title, .reveal:not(.is-in) .rental-headline {
  clip-path: inset(0 -0.06em 100% -0.06em);
}
/* Каскад великих цифр (01–04, 4×) — зʼявляються з легким підйомом */
.reveal .col-num, .reveal .rs-num {
  transition: opacity 0.85s var(--ease) 0.18s, transform 0.85s var(--ease) 0.18s;
}
.reveal:not(.is-in) .col-num, .reveal:not(.is-in) .rs-num {
  opacity: 0; transform: translateY(0.28em) scale(0.92);
}

/* ─── «Дихання»: живі градієнтні заглушки там, де ще немає фото ─
   Мʼяке світло повільно дрейфує в порожніх .media / hero-media
   (напр. тизер оренди на головній). Коли фото додано — img є,
   :not(:has(img)) не спрацьовує, анімація зникає сама. */
@keyframes atmoBreathe {
  0%, 100% { transform: translate3d(-6%, -4%, 0) scale(1.08); opacity: 0.40; }
  50%      { transform: translate3d(6%, 4%, 0)  scale(1.22); opacity: 0.72; }
}
.media:not(:has(img))::after,
.hero-media:not(:has(img))::after,
.rental-lead:not(:has(img))::after {
  content: '';
  position: absolute;
  inset: -14%;
  z-index: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255,252,245,0.6), rgba(255,252,245,0) 62%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  animation: atmoBreathe 15s ease-in-out infinite;
}

/* ─── Живі частинки у зонах без фото ──────────────────────────
   Canvas додається скриптом у будь-який контейнер із [data-particles].
   Частинки — під текстом, але над фоном секції. */
[data-particles] { position: relative; }
[data-particles] > .particles-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
[data-particles] > *:not(.particles-canvas) { position: relative; z-index: 1; }

/* ─── АДАПТИВ ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --pad-x: 40px; }
  .section { padding: 110px var(--pad-x); }
  .section-title { font-size: 42px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --pad-x: 24px; }
  .section { padding: 84px var(--pad-x); }
  .section-title { font-size: 34px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* ─── Cookie-згода ────────────────────────────────────────── */
.cookie-bar {
  position: fixed;
  left: 24px; right: 24px; bottom: 24px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 26px;
  background: var(--charcoal);
  border: 1px solid rgba(245,242,236,0.10);
  box-shadow: 0 18px 50px rgba(20,40,30,0.35);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.cookie-bar.is-in { opacity: 1; transform: none; }
.cookie-text {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245,242,236,0.72);
  margin: 0;
}
.cookie-text a { color: var(--off-white); text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cookie-btn--accept { background: var(--sage); color: var(--off-white); }
.cookie-btn--accept:hover { background: #3a7657; }
.cookie-btn--ghost { background: transparent; color: rgba(245,242,236,0.7); border-color: rgba(245,242,236,0.24); }
.cookie-btn--ghost:hover { color: var(--off-white); border-color: rgba(245,242,236,0.5); }
@media (max-width: 680px) {
  .cookie-bar { left: 14px; right: 14px; bottom: 14px; flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 20px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* ─── Згода на обробку даних (галочка у формі) ─────────────── */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 4px 0 22px;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--sage);
  cursor: pointer;
}
.consent span { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.consent a { color: var(--sage); text-decoration: underline; text-underline-offset: 2px; }
.consent.is-invalid span { color: var(--terracotta); }
.consent.is-invalid input[type="checkbox"] { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* ─── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section-title, .rental-headline, .hero h1, .page-hero h1, .closing h2 { clip-path: none !important; }
  .col-num, .rs-num { opacity: 1 !important; transform: none !important; }
  .rental-icon path, .rental-icon line, .rental-icon rect, .rental-icon circle { stroke-dashoffset: 0 !important; }
}
