/* ECHOES design system — tokens, base, layout.
   Brand colours are injected by build.py from content/site.json → brand.theme (see <style id="theme">). */

:root {
  --forest: #162B1B;
  --moss: #2E4A37;
  --linen: #ECE7DF;
  --paper: #F5F1EA;
  --walnut: #8A6B4B;
  --sand: #C9B49A;
  --sage: #A2A59C;
  --graphite: #2F3330;

  --ink: var(--forest);
  --text: var(--graphite);
  --muted: color-mix(in srgb, var(--graphite) 68%, var(--linen));
  --line: rgba(22, 43, 27, 0.15);
  --line-light: rgba(236, 231, 223, 0.22);
  --on-dark: #ECE7DF;
  --on-dark-muted: rgba(236, 231, 223, 0.72);

  --q-poliana: #B08A55;
  --q-voda: #4B8C9C;
  --q-lis: #3F6A4B;

  --st-free: #4F8A5B;
  --st-reserved: #C29A3E;
  --st-sold: #9A9A94;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Onest", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --pad: 20px;
  --max: 1320px;
  --header-h: 64px;
  --sec: 72px;
  --sec-lg: 96px;

  --r: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 200ms;
  --t-slow: 600ms;

  --fs-h1: 40px; --lh-h1: 44px;
  --fs-h2: 30px; --lh-h2: 36px;
  --fs-h3: 20px; --lh-h3: 28px;
  --fs-body: 16px; --lh-body: 26px;
  --fs-num: 44px; --lh-num: 48px;
}

@media (min-width: 768px) {
  :root { --pad: 32px; --gutter: 24px; --fs-h1: 56px; --lh-h1: 60px; --fs-h2: 40px; --lh-h2: 46px; --fs-num: 54px; --lh-num: 58px; }
}
@media (min-width: 1280px) {
  :root {
    --pad: 48px; --sec: 120px; --sec-lg: 160px;
    --fs-h1: 72px; --lh-h1: 76px; --fs-h2: 48px; --lh-h2: 54px; --fs-h3: 24px; --lh-h3: 32px;
    --fs-body: 18px; --lh-body: 30px; --fs-num: 64px; --lh-num: 68px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--linen); color: var(--text);
  font: 400 var(--fs-body)/var(--lh-body) var(--sans);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--walnut); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .h1, .h2 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2, .h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3, .h3 { font-family: var(--sans); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 500; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
.eyebrow { font: 500 12px/16px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--walnut); margin: 0 0 16px; }
.lead { max-width: 34em; margin-top: 16px; color: var(--text); }
.muted { color: var(--muted); }
.num { font-family: var(--serif); font-weight: 500; font-size: var(--fs-num); line-height: var(--lh-num); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.note { font-size: 13px; line-height: 20px; color: var(--muted); max-width: 46em; }
.placeholder-text { color: var(--walnut); }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--sec) 0; }
.section--lg { padding: var(--sec-lg) 0; }
.section--paper { background: var(--paper); }
.section--forest { background: var(--forest); color: var(--on-dark); }
.section--forest h1, .section--forest h2, .section--forest h3, .section--forest .num { color: var(--on-dark); }
.section--forest .eyebrow { color: var(--sand); }
.section--forest .muted, .section--forest .note { color: var(--on-dark-muted); }
.section-head { display: grid; gap: 0; margin-bottom: 40px; }
@media (min-width: 1280px) {
  .section-head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--gutter); margin-bottom: 64px; }
  .section-head--split .lead { margin-top: 0; justify-self: end; }
}

.grid { display: grid; gap: var(--gutter); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- header ---------- */
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--forest); color: var(--on-dark); padding: 10px 14px; }
.skip:focus { top: 8px; }
.header {
  position: fixed; inset: 0 0 auto; z-index: 90; height: var(--header-h);
  color: var(--ink); background: var(--linen); border-bottom: 1px solid var(--line);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.header--over { background: transparent; color: var(--on-dark); border-color: transparent; }
.header__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.header__logo { display: grid; justify-items: center; gap: 3px; width: 128px; color: currentColor; }
.header__logo svg { width: 100%; height: auto; }
.header__nav { display: none; margin-left: auto; gap: 28px; }
.header__nav a { font-size: 15px; position: relative; padding: 6px 0; }
.header__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; }
.header .header__cta { display: none; }
.header__phone { display: none; font-size: 15px; white-space: nowrap; }
.header__descr { font: 500 7.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; opacity: .9; }
.burger { margin-left: auto; width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid currentColor; border-radius: 12px; }
.burger i { display: block; width: 20px; height: 1.5px; border-radius: 1px; background: currentColor; }
.header--over .burger { background: rgba(12, 24, 15, .25); }
@media (min-width: 1100px) {
  .header__nav { display: flex; }
  .header .header__cta { display: inline-flex; }
  .burger { display: none; }
  .header__logo { width: 144px; }
  .header__descr { font-size: 8.5px; }
}
@media (min-width: 1440px) { .header__phone { display: block; } }
main { display: block; }
.page-offset { padding-top: var(--header-h); }

/* ---------- mobile menu ---------- */
.menu { position: fixed; inset: 0; z-index: 150; background: var(--forest); color: var(--on-dark); display: flex; flex-direction: column; padding: 0 var(--pad) 32px; visibility: hidden; opacity: 0; transition: opacity var(--t-fast), visibility 0s linear var(--t-fast); }
.menu.is-open { visibility: visible; opacity: 1; transition: opacity var(--t-fast); }
.menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.menu__top .header__logo { color: var(--on-dark); }
.menu__close { width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.menu__nav { display: flex; flex-direction: column; margin-top: 32px; }
.menu__nav a { font: 500 32px/1.2 var(--serif); padding: 12px 0; border-bottom: 1px solid var(--line-light); }
.menu__nav a[aria-current="page"] { color: var(--sand); }
.menu__foot { margin-top: auto; display: grid; gap: 16px; padding-top: 32px; }
.menu__foot .phone { font: 500 24px/1 var(--sans); }

/* ---------- footer ---------- */
.footer { background: var(--forest); color: var(--on-dark-muted); padding: 72px 0 32px; font-size: 15px; line-height: 24px; border-top: 1px solid var(--line-light); }
.footer a:hover { color: var(--on-dark); }
.footer__grid { display: grid; gap: 40px; }
.footer__logo { width: 180px; }
.footer__nav { display: grid; gap: 8px; }
.footer__phone { font: 500 22px/1.2 var(--sans); color: var(--on-dark); }
.footer__messengers { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-light); display: grid; gap: 12px; font-size: 13px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1280px) { .footer__bottom { grid-template-columns: 1fr auto; } }

/* ---------- media ---------- */
.media { position: relative; overflow: hidden; background: #cfc8bc; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-1610 { aspect-ratio: 16 / 10; }
.ratio-32 { aspect-ratio: 3 / 2; }
/* .cover: image box that behaves like object-fit:cover but keeps overlays aligned to the picture */
.cover { container-type: size; width: 100%; height: 100%; isolation: isolate; } /* keeps ambient layers under section scrims */
.cover[class*="ratio-"] { height: auto; }
.cover__in {
  --W: max(100cqw, 100cqh * var(--ar));
  --H: max(100cqh, 100cqw / var(--ar));
  position: absolute; width: var(--W); height: var(--H);
  left: clamp(100cqw - var(--W), 50cqw - var(--fx, .5) * var(--W), 0px);
  top: clamp(100cqh - var(--H), 50cqh - var(--fy, .5) * var(--H), 0px);
  transition: transform var(--t-slow) var(--ease);
}
.cover__in > img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-media { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #ddd6cb 0 12px, #d6cfc3 12px 24px); color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; }
}
