@import url("/css/fonts.css");

/* Токены описаны в брендбуке, значения синего и золотого сняты с фирменного макета */
:root {
  --navy: #13273a;
  --navy-2: #1e3040;
  --navy-3: #34495c;
  --gold: #cb9a66;
  --gold-mid: #dab584;
  --gold-light: #f1e2c3;
  --gold-deep: #86622f;
  --ivory: #faf7f1;
  --sand: #f2ecdf;
  --sand-2: #eae3d5;
  --surface: #fffdf9;
  --ink: #16273a;
  --muted: #566271;
  --line: #e3dccf;
  --on-navy: #f7f4ed;
  --on-navy-muted: #b9c2c9;
  --display: "Tenor Sans", "Optima", "Segoe UI", sans-serif;
  --sans: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 8px 14px; background: var(--surface); }
.skip:focus { left: 8px; }

/* Шапка */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--navy); color: var(--on-navy); border-bottom: 1px solid rgb(218 181 132 / .28); }
.topbar__row { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.topbar__brand { display: flex; align-items: center; gap: 12px; font: 400 15px/1 var(--display); letter-spacing: .14em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.topbar__brand img { width: 50px; height: auto; }
.topbar__nav { display: flex; gap: clamp(14px, 2.4vw, 30px); margin-left: auto; font-size: 15px; }
.topbar__nav a { padding-block: 6px; border-bottom: 1px solid transparent; text-decoration: none; transition: border-color .2s, color .2s; }
.topbar__nav a:hover { border-color: var(--gold-mid); color: var(--gold-light); }
.topbar__contact { padding: 7px 14px; background: transparent; border: 1px solid var(--gold-mid); color: var(--gold-light); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.topbar__contact:hover { background: var(--gold-mid); color: var(--navy); }

/* Главный экран: повторяет композицию фирменного макета */
.hero {
  background:
    linear-gradient(90deg, rgb(19 39 58 / .62) 0%, rgb(19 39 58 / .42) 46%, rgb(19 39 58 / 0) 68%),
    var(--navy) url("/img/hero.webp") center / cover no-repeat;
  color: var(--on-navy);
}
.hero__inner { display: flex; min-height: clamp(560px, 50vw, 720px); align-items: center; padding-block: clamp(40px, 5vw, 64px); }
.hero__brand { display: grid; justify-items: center; width: min(100%, 680px); text-align: center; }
.hero__logo { width: min(68%, 420px); }
.hero__name { display: grid; width: 100%; margin-top: 16px; font: 400 clamp(2.45rem, 6vw, 5.2rem)/1.06 var(--display); letter-spacing: .035em; text-transform: uppercase; }
.hero__name-top { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 24px); }
.hero__name-top::before, .hero__name-top::after { content: ""; flex: 1; height: 2px; }
.hero__name-top::before { background: linear-gradient(90deg, transparent, var(--gold-mid)); }
.hero__name-top::after { background: linear-gradient(90deg, var(--gold-mid), transparent); }
.hero__kicker { margin-top: 14px; color: var(--gold-mid); font: 400 clamp(1rem, 2.2vw, 1.75rem)/1.25 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.hero__slogan { max-width: 30em; margin-top: clamp(20px, 2.8vw, 34px); font-size: clamp(14px, 1.45vw, 18px); letter-spacing: .17em; line-height: 1.6; text-transform: uppercase; text-wrap: balance; }
.hero__rule { width: 180px; height: 2px; margin-top: clamp(16px, 2vw, 24px); background: linear-gradient(90deg, transparent, var(--gold-mid), transparent); }
.hero__segments { display: flex; flex-wrap: wrap; justify-content: center; margin-top: clamp(20px, 2.6vw, 30px); }
.segment { display: grid; justify-items: center; gap: 8px; padding-inline: clamp(18px, 3vw, 36px); font-size: 15px; line-height: 1.3; text-decoration: none; transition: color .2s; }
.segment + .segment { border-left: 2px solid rgb(218 181 132 / .7); }
.segment:hover { color: var(--gold-light); }
.segment svg { width: 54px; height: 50px; fill: none; stroke: var(--gold-mid); stroke-width: 2; }
.segment span { max-width: 9.5em; }

/* Обо мне */
.about { padding-block: clamp(56px, 7vw, 100px); }
.about__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 84px); align-items: start; }
.portrait { position: sticky; top: 96px; }
.portrait__frame { aspect-ratio: 4 / 5; background: var(--navy); outline: 1px solid var(--gold); outline-offset: 7px; overflow: hidden; margin: 8px; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__empty { display: grid; place-items: center; height: 100%; color: var(--gold-mid); font: 400 clamp(4rem, 8vw, 6.5rem)/1 var(--display); }
.portrait figcaption { margin-top: 24px; color: var(--muted); font-size: 15px; text-align: center; }
.portrait figcaption strong { color: var(--ink); font-weight: 600; }
.about h2, .section-head h2 { font: 400 clamp(1.8rem, 3.3vw, 2.75rem)/1.2 var(--display); }
.about h2::after, .section-head h2::after { content: ""; display: block; width: 72px; height: 2px; margin-top: 16px; background: var(--gold); }
.about__text { min-width: 0; }
.about__text p { margin-top: 1.05em; max-width: 42em; }
.about__text .about__lead { margin-top: 1.4em; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; }
.about__text .about__closing { margin-top: 1.5em; color: var(--gold-deep); font: 400 clamp(19px, 1.8vw, 23px)/1.4 var(--display); }

/* Объекты */
.listings { padding-block: clamp(56px, 7vw, 96px); background: var(--sand); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(26px, 3.4vw, 42px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 8px 15px; background: transparent; border: 1px solid #cfc3ad; font-size: 15px; line-height: 1.3; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.filter:hover { border-color: var(--gold-deep); }
.filter.is-active { background: var(--navy); border-color: var(--navy); color: var(--gold-light); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgb(19 39 58 / .08); }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__sold { position: absolute; top: 12px; left: 12px; padding: 3px 10px; background: var(--navy); color: var(--gold-light); font-size: 13px; font-weight: 600; }
.card--sold .card__media img { filter: saturate(.4); opacity: .78; }
.card__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.card__category { color: var(--gold-deep); font-size: 13px; }
.card h3 { margin-top: 4px; font: 400 21px/1.28 var(--display); }
.card__location { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.card__facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; font-size: 15px; }
.card__price { margin-top: auto; padding-top: 12px; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-placeholder { width: 100%; height: 100%; background: url("/img/plan.svg") center / cover; }
.more { margin-top: 32px; text-align: center; }
.button { display: inline-block; padding: 11px 22px; background: var(--navy); border: 1px solid var(--navy); color: var(--gold-light); font-size: 16px; font-weight: 600; line-height: 1.25; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.button:hover { background: var(--navy-3); border-color: var(--navy-3); color: #fff; }
.button--ghost { background: transparent; border-color: var(--gold-deep); color: var(--gold-deep); }
.button--ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--gold-light); }
.empty { padding: 28px 0; color: var(--muted); }

/* Отзывы */
.reviews { padding-block: clamp(56px, 7vw, 96px); }
.reviews__list { columns: 3 300px; column-gap: clamp(18px, 2.4vw, 28px); }
.review { break-inside: avoid; margin-bottom: clamp(18px, 2.4vw, 28px); padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); }
.review p { white-space: pre-line; }
.review footer { margin-top: 14px; font-size: 15px; line-height: 1.4; }
.review cite { display: block; color: var(--gold-deep); font-style: normal; font-weight: 600; }
.review span { color: var(--muted); }

/* Подвал */
.footer { padding-block: clamp(44px, 6vw, 72px) 24px; background: var(--navy); color: var(--on-navy); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 2fr); gap: 36px clamp(32px, 6vw, 80px); }
.footer__brand img { width: 150px; }
.footer__name { margin-top: 12px; font: 400 clamp(23px, 2.2vw, 28px)/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.footer__sub { margin-top: 5px; color: var(--gold-mid); font: 400 14px/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.footer__slogan { margin-top: 14px; max-width: 24em; color: var(--on-navy-muted); }
.footer h2 { color: var(--gold-mid); font: 400 14px/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.footer__cta { margin-top: 14px; }
.footer__channel { margin-top: 14px; color: var(--on-navy-muted); font-size: 15px; overflow-wrap: anywhere; }
.footer__channel a { color: var(--gold-light); text-underline-offset: 3px; }
.footer__nav { display: grid; align-content: start; gap: 7px; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.footer__legal { margin-top: 40px; color: var(--on-navy-muted); font-size: 14px; }
.footer__legal::before { content: ""; display: block; height: 1px; margin-bottom: 16px; background: rgb(218 181 132 / .28); }

/* Карточка объекта */
.sheet { width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; background: var(--surface); border: 0; color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgb(19 39 58 / .62); }
.sheet__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; background: var(--surface); border: 1px solid var(--line); font-size: 24px; line-height: 1; cursor: pointer; }
.sheet__layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.sheet__gallery { min-width: 0; background: var(--sand); }
.sheet__stage { position: relative; aspect-ratio: 4 / 3; background: var(--navy); }
.sheet__stage img { width: 100%; height: 100%; object-fit: contain; }
.sheet__nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 48px; background: rgb(19 39 58 / .78); border: 0; color: var(--gold-light); font-size: 26px; line-height: 1; cursor: pointer; }
.sheet__nav:hover { background: var(--navy); }
.sheet__nav--prev { left: 0; }
.sheet__nav--next { right: 0; }
.sheet__thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.sheet__thumbs button { flex: none; width: 76px; aspect-ratio: 4 / 3; padding: 0; background: none; border: 2px solid transparent; cursor: pointer; opacity: .75; }
.sheet__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.sheet__thumbs button.is-active { border-color: var(--gold); opacity: 1; }
.sheet__info { min-width: 0; padding: clamp(22px, 3vw, 36px); }
.sheet__meta { padding-right: 44px; color: var(--gold-deep); font-size: 14px; }
.sheet h2 { margin-top: 6px; font: 400 clamp(23px, 2.4vw, 29px)/1.25 var(--display); }
.sheet__location { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.sheet__price { margin-top: 14px; font-size: 23px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.sheet__facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; padding-block: 10px; border-block: 1px solid var(--line); font-size: 15px; }
.sheet__facts:empty { display: none; }
.sheet__description { margin-top: 14px; font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.sheet__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* Форма заявки */
.button--gold { background: var(--gold-mid); border-color: var(--gold-mid); color: var(--navy); }
.button--gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }
.button:disabled { opacity: .6; cursor: wait; }
.hero__cta { margin-top: clamp(18px, 2.4vw, 26px); }
.about__cta { margin-top: 18px; }
.contact-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: clamp(22px, 4vw, 34px); background: var(--surface); border: 0; color: var(--ink); overflow: auto; }
.contact-dialog::backdrop { background: rgb(19 39 58 / .62); }
.contact-dialog h2 { padding-right: 40px; font: 400 clamp(24px, 3vw, 30px)/1.2 var(--display); }
.contact-form { display: grid; gap: 14px; }
.contact-form__lead { margin-top: -6px; color: var(--muted); font-size: 15px; }
.contact-field { display: grid; gap: 5px; }
.contact-field span { font-size: 14px; font-weight: 600; }
.contact-field input, .contact-field textarea { width: 100%; padding: 10px 12px; background: #fff; border: 1px solid #cfc3ad; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; }
.contact-field textarea { resize: vertical; }
.contact-field input:focus, .contact-field textarea:focus { border-color: var(--gold-deep); outline: 1px solid var(--gold-deep); }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-consent { display: flex; align-items: start; gap: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.contact-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); }
.contact-consent a, .contact-form__alt a { color: var(--gold-deep); text-underline-offset: 3px; }
.contact-error { padding: 9px 12px; background: #f8e6dc; color: #7a2f12; font-size: 14px; }
.contact-form__alt { color: var(--muted); font-size: 14px; text-align: center; }
.contact-done { display: grid; gap: 14px; justify-items: start; }

/* Политика конфиденциальности */
.legal { padding-block: clamp(40px, 6vw, 72px); }
.legal__body > * { max-width: 44rem; }
.legal h1 { font: 400 clamp(1.9rem, 4vw, 3rem)/1.15 var(--display); }
.legal__date { margin-top: 10px; color: var(--muted); font-size: 15px; }
.legal h2 { margin-top: 2em; font: 400 clamp(1.25rem, 2.2vw, 1.55rem)/1.25 var(--display); }
.legal p { margin-top: .8em; }
.legal ul { display: grid; gap: 8px; margin-top: .8em; padding-left: 1.2em; list-style: disc; }
.legal li::marker { color: var(--gold); }
.legal strong { font-weight: 600; }
.legal a { color: var(--gold-deep); text-underline-offset: 3px; }
.footer--short { padding-block: 0 24px; }
.footer--short .footer__legal { margin-top: 0; }
.footer__legal a { text-underline-offset: 3px; }
.footer__legal a:hover { color: var(--gold-light); }

/* Уведомление о cookie */
.cookie { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 16px; width: min(560px, calc(100vw - 32px)); padding: 14px 18px; background: var(--navy); border: 1px solid rgb(218 181 132 / .5); color: var(--on-navy); font-size: 14px; line-height: 1.45; box-shadow: 0 8px 28px rgb(19 39 58 / .28); }
.cookie p { flex: 1; min-width: 0; }
.cookie a { color: var(--gold-light); text-underline-offset: 3px; }
.cookie .button { flex: none; padding: 8px 16px; background: var(--gold-mid); border-color: var(--gold-mid); color: var(--navy); font-size: 14px; }
.cookie .button:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }

@media (max-width: 860px) {
  .topbar__row { gap: 14px; min-height: 56px; }
  .topbar__brand span, .topbar__contact { display: none; }
  .topbar__nav { margin-left: 0; font-size: 14px; }
  .hero {
    background:
      linear-gradient(rgb(19 39 58 / .72), rgb(19 39 58 / .6)),
      var(--navy) url("/img/hero.webp") 78% center / cover no-repeat;
  }
  .hero__inner { justify-content: center; min-height: 0; }
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { position: static; max-width: 420px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .sheet__layout { grid-template-columns: minmax(0, 1fr); }
  .sheet__meta { padding-right: 0; }
  .cookie { flex-direction: column; align-items: stretch; gap: 10px; }
}

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