/* ГК «Кавказ». Mobile-first: base rules are for phones, media queries widen the layout.
   Breakpoints: 37.5em = 600px, 48em = 768px, 56.25em = 900px, 64em = 1024px, 77.5em = 1240px. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Navy and mountain blue for the Caucasus, gold from the Stavropol Krai flag, cool light tints.
   Gold is too light for text on a light background: use it under dark text, on dark sections and for small marks.
   The logo and icons are drawn in --ink (INK in tools/build_media.py): change both together. */
:root {
  --ink: #152233;
  --text: #2a3442;
  --muted: #566275;
  --line: #dde4ec;
  --tint: #eef3f8;
  --tint-2: #e1e8f0;
  --accent: #27659b;
  --accent-hover: #1e5280;
  --accent-soft: #e5eef7;
  --gold: #d9a441;
  /* The MAX messenger gradient with its blues darkened, so white text on it keeps a 4.5:1 contrast */
  --max: radial-gradient(136% 141% at 100% 99%, #8d28c8 0%, #7c42fa 20%, #0068e8 80%, #3a72d6 100%);
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgb(21 34 51 / .05), 0 12px 32px -16px rgb(21 34 51 / .22);
  --gutter: 16px;
  --header-h: 64px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (min-width: 48em) { :root { --gutter: 24px; } }
@media (min-width: 64em) { :root { --header-h: 76px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
  scrollbar-gutter: stable;
}
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 8px; }

/* A row of cards that scrolls sideways edge to edge on phones and tablets and becomes a grid on desktops */
.scroller {
  display: grid;
  grid-auto-flow: column;
  gap: 12px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}
.scroller > * { scroll-snap-align: start; }
@media (min-width: 64em) {
  .scroller { grid-auto-flow: row; margin: 0; padding: 0; overflow: visible; }
}

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 860px); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tint { background: var(--tint); }
.section--dark {
  background: radial-gradient(70% 60% at 100% 0%, rgb(39 101 155 / .45), transparent 70%), var(--ink);
  color: rgb(255 255 255 / .78);
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { max-width: 780px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__title { font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.625rem); }
.section__lead { margin-top: 14px; font-size: clamp(1rem, .95rem + .3vw, 1.125rem); color: var(--muted); }
.section--dark .section__lead { color: rgb(255 255 255 / .72); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--gold); }
.section--dark .eyebrow { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 20px; height: 20px; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -12px rgb(39 101 155 / .7); }
.btn--accent:hover { background: var(--accent-hover); }
/* border-box: the gradient also fills the transparent border instead of repeating under it */
.btn--max { background: var(--max) border-box; color: #fff; }
.btn--max:hover { background: linear-gradient(rgb(0 0 0 / .15), rgb(0 0 0 / .15)) border-box, var(--max) border-box; }
.btn--ghost { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding-inline: 24px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.icon-btn .icon { width: 22px; height: 22px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand img { width: 46px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 1.25rem; font-weight: 700; letter-spacing: .12em; }
.brand__sub { font-size: .625rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.header__actions { display: flex; align-items: center; gap: 8px; }
.header__phone {
  display: none;
  flex-direction: column;
  margin-right: 4px;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
  color: var(--ink);
}
.header__phone small { font-size: .6875rem; font-weight: 600; color: var(--muted); }
.header__phone span { font-weight: 800; white-space: nowrap; }
.header__call { border-color: var(--accent); background: var(--accent); color: #fff; }
.header__max { display: none; border-color: transparent; background: var(--max) border-box; color: #fff; }
.header__burger .i-close,
.header__burger[aria-expanded="true"] .i-open { display: none; }
.header__burger[aria-expanded="true"] .i-close { display: block; }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  /* The open menu covers the whole screen under the header, so the page never peeks out below it. */
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
}
.header.is-menu-open .nav { display: block; animation: drop .2s ease-out; }
@media not all and (min-width: 77.5em) { html:has(.header.is-menu-open) { overflow: hidden; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.nav__list { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; padding-block: 4px; }
.nav__list a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav__contacts {
  display: grid;
  gap: 12px;
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-inline: auto;
  padding-block: 16px 24px;
}
.nav__label { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav__phone { display: flex; flex-direction: column; font-size: 1.25rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.nav__phone small { font-size: .875rem; font-weight: 500; color: var(--muted); }

@media (min-width: 37.5em) {
  .header__phone { display: flex; }
  .header__call { display: none; }
  .header__max { display: grid; }
}
@media (min-width: 77.5em) {
  .header__inner { gap: 28px; }
  .nav {
    display: block;
    position: static;
    height: auto;
    overflow: visible;
    background: none;
  }
  .nav__list { display: flex; gap: 22px; width: auto; padding: 0; }
  .nav__list a { position: relative; padding: 8px 0; border: 0; font-size: .9375rem; }
  .nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s;
  }
  .nav__list a:hover::after { transform: scaleX(1); }
  .nav__contacts, .header__burger { display: none; }
}

/* Hero */
.hero { padding-bottom: 48px; background: var(--tint); }
.hero__inner { display: grid; gap: 28px; }
.hero__media { position: relative; order: -1; margin-inline: calc(-1 * var(--gutter)); }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__badge {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgb(255 255 255 / .95);
  box-shadow: var(--shadow);
  font-size: .8125rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}
.hero__badge .icon { width: 28px; height: 28px; color: var(--accent); }
.hero__badge b { display: block; font-size: .875rem; color: var(--ink); }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
}
.hero__eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
/* The heading scales with its own column, so «Строительство домов» keeps to one line from 375px up. */
.hero__content { container-type: inline-size; }
.hero__title { margin-top: 18px; font-size: clamp(1.75rem, 8cqi, 3.25rem); letter-spacing: -.02em; }
.hero__title span { display: block; color: var(--accent); }
.hero__lead { max-width: 560px; margin-top: 16px; font-size: clamp(1rem, .95rem + .4vw, 1.1875rem); color: var(--muted); }
.hero__actions { display: grid; gap: 10px; margin-top: 26px; }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #d3dce6;
}
.hero__facts li { display: flex; flex-direction: column; gap: 6px; }
.hero__facts b { font-size: clamp(1.375rem, 1rem + 1.5vw, 2rem); font-weight: 800; line-height: 1; color: var(--ink); }
.hero__facts span { font-size: .8125rem; line-height: 1.35; color: var(--muted); overflow-wrap: break-word; hyphens: auto; }

@media (min-width: 37.5em) {
  .hero__actions { display: flex; flex-wrap: wrap; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__badge { left: 20px; right: auto; bottom: 20px; }
}
@media (min-width: 56.25em) {
  .hero { padding-block: 56px 72px; }
  .hero__inner { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; }
  .hero__media { order: 0; margin: 0; }
  .hero__media img { aspect-ratio: 1 / .9; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
}

/* About */
.about__inner { display: grid; gap: 40px; }
.about__media { position: relative; margin: 0 0 20px; }
.about__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.about__badge {
  position: absolute;
  right: 16px;
  bottom: -20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 16px 30px -14px rgb(21 34 51 / .6);
}
.about__badge b { font-size: 2.75rem; font-weight: 800; line-height: 1; }
.about__badge span { max-width: 8.5em; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.about__content .section__title { margin-bottom: 24px; }
.about__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .1em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327659b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checklist a { color: var(--accent); font-weight: 600; }

@media (min-width: 56.25em) {
  .about__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .about__media { margin: 0; }
}

/* Packages */
.packs-tabs {
  display: none;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.js .packs-tabs { display: flex; }
.packs-tabs button {
  flex: 1;
  min-height: 44px;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: .875rem;
  font-weight: 700;
  color: var(--muted);
}
.packs-tabs button[aria-current="true"] { background: var(--ink); color: #fff; }
.packs {
  position: relative; /* the tabs scroll to card.offsetLeft, which is measured from here */
  grid-auto-columns: min(86%, 380px);
  scrollbar-width: none;
}
.packs::-webkit-scrollbar { display: none; }
.pack {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
.pack__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.pack__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 20px; }
.pack__level { display: flex; gap: 4px; }
.pack__level i { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.pack__level i:first-child,
.pack--comfort .pack__level i:nth-child(2),
.pack--premium .pack__level i { background: var(--accent); }
.pack__title { margin-top: 8px; font-size: 1.375rem; letter-spacing: .04em; text-transform: uppercase; }
.pack__note { margin-bottom: 10px; font-size: .9375rem; color: var(--muted); }
.specs { margin: 0 0 20px; font-size: .875rem; line-height: 1.45; }
.specs div { display: grid; grid-template-columns: 7rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.specs dt { font-weight: 700; color: var(--ink); }
.specs dd { margin: 0; }
.specs dd span { display: block; }
.pack .btn { margin-top: auto; }
.packs__note { margin-top: 20px; color: var(--muted); }
.packs__note a { color: var(--accent); font-weight: 700; }

@media (min-width: 64em) {
  .js .packs-tabs { display: none; }
  .packs { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .packs__note { text-align: center; margin-top: 32px; }
}

/* Quiz */
.podbor { display: grid; gap: 32px; }
.podbor__intro .checklist { margin-top: 24px; }
.quiz { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--tint); }
.quiz__top, .quiz__progress { display: none; }
.js .quiz__top { display: flex; justify-content: space-between; font-size: .875rem; font-weight: 700; color: var(--muted); }
.js .quiz__progress { display: block; height: 6px; margin: 10px 0 24px; overflow: hidden; border-radius: 99px; background: var(--tint-2); }
.quiz__bar { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s; }
.quiz__step { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.js .quiz__step { margin: 0; }
.quiz__step:focus { outline: none; }
.quiz__step legend { margin-bottom: 16px; padding: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.25; color: var(--ink); }
.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.option:hover { border-color: #c3cfdc; }
.option input {
  display: grid;
  place-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #8391a3;
  border-radius: 50%;
  appearance: none;
}
.option input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .15s; }
.option input:checked { border-color: var(--accent); }
.option input:checked::before { transform: scale(1); }
.option input:focus-visible { outline: none; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field__label { font-size: .875rem; font-weight: 700; color: var(--ink); }
.field__label small { font-weight: 500; color: var(--muted); }
.field__input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.field__input:focus { border-color: var(--accent); outline: none; }
/* The quiz answers as a chat message: one line per answer */
.quiz__message {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.quiz__text { margin-bottom: 18px; color: var(--muted); }
.quiz__hint { margin-top: 14px; font-size: .875rem; color: var(--muted); }
.quiz__hint a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.quiz__nav { display: flex; gap: 12px; margin-top: 24px; }
.quiz__next { margin-left: auto; }

@media (min-width: 37.5em) {
  .quiz { padding: 32px; }
  .options { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64em) {
  .podbor { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 56px; }
}

/* Advantages */
.features { display: grid; gap: 14px; }
.feature { padding: 24px; border: 1px solid rgb(255 255 255 / .09); border-radius: var(--radius-lg); background: rgb(255 255 255 / .04); }
.feature__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--ink);
}
.feature__icon .icon { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 8px; font-size: 1.125rem; }
.feature p { font-size: .9375rem; }
@media (min-width: 37.5em) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* Videos */
.videos { grid-auto-columns: 64%; }
.vcard {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.vcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.vcard::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgb(10 12 15 / .88)); }
.vcard__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgb(255 255 255 / .94);
  color: var(--accent);
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / .5);
  translate: -50% -50%;
  transition: scale .2s;
}
.vcard__play svg { width: 24px; height: 24px; margin-left: 3px; }
.vcard__meta { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; gap: 2px; }
.vcard__title { font-size: .9375rem; font-weight: 700; line-height: 1.25; }
.vcard__time { font-size: .8125rem; opacity: .8; }
.vcard:hover img { transform: scale(1.04); }
.vcard:hover .vcard__play { scale: 1.08; }
@media (min-width: 37.5em) { .videos { grid-auto-columns: 38%; } }
@media (min-width: 64em) { .videos { grid-template-columns: repeat(5, 1fr); gap: 16px; } }

/* Photos */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery a { display: block; overflow: hidden; border-radius: 12px; background: var(--tint-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.05); }
.js .gallery:not(.is-open) .is-extra { display: none; }
.gallery__more { display: none; justify-content: center; margin-top: 28px; }
.js .gallery__more { display: flex; }
@media (min-width: 37.5em) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 64em) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* Accreditation */
.accr { display: grid; gap: 16px; }
.accr__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.accr__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.accr__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.accr__icon .icon { width: 28px; height: 28px; }
.accr__org { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.accr__name { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; line-height: 1.15; color: var(--ink); }
.accr__text { color: var(--muted); }
.accr__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 700;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.accr__link .icon { width: 18px; height: 18px; }
.accr__card:hover .accr__link { text-decoration: underline; }
.accr__note { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; color: var(--muted); }
.accr__note .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
@media (min-width: 48em) { .accr { grid-template-columns: 1fr 1fr; gap: 20px; } }

/* Mortgage */
.mortgage { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.mortgage__title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 28px; }
.stat { padding: 16px; border-radius: 14px; background: var(--tint); }
.stat b { display: block; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; line-height: 1.1; color: var(--accent); }
.stat b small { font-size: .6em; font-weight: 700; }
.stat span { display: block; margin-top: 6px; font-size: .8125rem; line-height: 1.35; color: var(--muted); overflow-wrap: break-word; hyphens: auto; }
.mortgage__body { display: grid; gap: 24px; }
.mortgage__req h4 { margin-bottom: 14px; font-size: 1.0625rem; }
.matcap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  border-radius: 18px;
  background: var(--ink);
  color: rgb(255 255 255 / .78);
}
.matcap h4 { font-size: 1.125rem; color: #fff; }
.matcap .btn { margin-top: 6px; }
.note { margin-top: 18px; font-size: .8125rem; color: var(--muted); }
@media (min-width: 48em) {
  .mortgage { padding: 32px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .mortgage__body { grid-template-columns: 1.3fr 1fr; align-items: start; gap: 32px; }
}

/* Steps */
.steps { display: grid; gap: 12px; counter-reset: step; }
.step { padding: 22px; border-radius: var(--radius-lg); background: var(--tint); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--accent); }
.step h3 { margin-bottom: 8px; font-size: 1.0625rem; }
.step p { font-size: .9375rem; color: var(--muted); }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .steps { grid-template-columns: repeat(5, 1fr); gap: 14px; } }

/* Floor plans */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.plans a { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.plans a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.plans img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
@media (min-width: 48em) { .plans { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 64em) { .plans { grid-template-columns: repeat(6, 1fr); } }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s; }
.faq details[open] { border-color: #c3cfdc; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327659b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq__body { padding: 0 20px 20px; color: var(--muted); }
.faq__body a { color: var(--accent); font-weight: 600; }

/* Contacts */
.contact__inner { display: grid; gap: 32px; }
.contact__label { margin: 28px 0 12px; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.managers { display: grid; gap: 12px; }
.manager { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.manager__name { font-weight: 700; color: var(--ink); }
.manager__phone { display: inline-block; margin: 2px 0 14px; font-size: 1.3125rem; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
.manager__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.manager__actions .btn { flex: 1; padding-inline: 10px; }
.contact__meta { display: grid; gap: 16px; margin-top: 24px; }
.contact__meta li { display: flex; gap: 14px; }
.contact__icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--accent); }
.contact__meta small { display: block; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.contact__meta p { font-weight: 600; color: var(--ink); }
.contact__meta a { color: var(--accent); font-weight: 700; }
.map { position: relative; min-height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--tint-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 37.5em) { .managers { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) {
  .contact__inner { grid-template-columns: 1fr 1.05fr; gap: 48px; }
  .map { min-height: 100%; }
}

/* Footer */
.footer { padding-block: 56px 28px; background: var(--ink); color: rgb(255 255 255 / .68); font-size: .9375rem; }
.footer a { color: rgb(255 255 255 / .9); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: 32px; }
.footer__logo { width: 116px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer__title { margin: 0 0 12px; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.footer__title + p { max-width: 34em; }
.footer__list { display: grid; gap: 8px; }
.footer__list + .footer__title { margin-top: 24px; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / .1);
  font-size: .8125rem;
  color: rgb(255 255 255 / .55);
}
@media (min-width: 48em) { .footer__grid { grid-template-columns: 1.4fr 1fr; } }
@media (min-width: 64em) { .footer__grid { grid-template-columns: 1.5fr .8fr 1.1fr 1fr; gap: 40px; } }

/* Call bar (phones) */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  visibility: hidden;
  transform: translateY(105%);
  transition: transform .25s ease, visibility 0s .25s;
}
.callbar.is-visible { visibility: visible; transform: none; transition: transform .25s ease; }
.callbar .btn { min-height: 48px; gap: 8px; padding-inline: 10px; font-size: .9375rem; }
@media (max-width: 56.24em) {
  .footer { padding-bottom: calc(28px + 70px + env(safe-area-inset-bottom)); }
  /* keyboard focus and anchor jumps stop above the call bar, not under it */
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (min-width: 56.25em) { .callbar { display: none; } }

/* Photo and video viewer */
.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgb(10 12 15 / .96);
  color: #fff;
}
.viewer[open] { display: grid; grid-template-rows: 1fr auto; }
.viewer::backdrop { background: rgb(10 12 15 / .6); }
.viewer__stage { display: grid; place-items: center; min-height: 0; padding: 64px 12px 0; touch-action: pan-y pinch-zoom; }
.viewer__stage img, .viewer__stage video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  border-radius: 8px;
}
.viewer__stage video { background: #000; }
.viewer__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  min-height: 72px;
  padding: 14px 68px calc(14px + env(safe-area-inset-bottom));
  font-size: .9375rem;
  line-height: 1.35;
  text-align: center;
  color: rgb(255 255 255 / .88);
}
.viewer__count { color: rgb(255 255 255 / .55); font-variant-numeric: tabular-nums; }
.viewer__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
  color: #fff;
  transition: background-color .2s;
}
.viewer__btn:hover { background: rgb(255 255 255 / .26); }
.viewer__btn .icon { width: 26px; height: 26px; }
.viewer__close { top: 10px; right: 10px; }
.viewer__prev, .viewer__next { bottom: 12px; }
.viewer__prev { left: 10px; }
.viewer__next { right: 10px; }
@media (min-width: 48em) {
  .viewer__stage { padding: 64px 80px 0; }
  .viewer__prev, .viewer__next { top: 50%; bottom: auto; translate: 0 -50%; }
  .viewer__prev { left: 16px; }
  .viewer__next { right: 16px; }
  .viewer__close { top: 16px; right: 16px; }
}

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