:root {
  --bg: #f2efe9;
  --paper: #f7f4ee;
  --ink: #191816;
  --muted: #69645d;
  --line: rgba(25, 24, 22, .18);
  --olive: #1f2a26;
  --sand: #b48a57;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 16px/1.55 "Montserrat", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sand); outline-offset: 4px; }
.shell { width: min(calc(100% - 80px), var(--max)); margin: 0 auto; }

.nav { position: relative; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 116px; padding: 22px 0; }
.brand { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 62px; }
.brand strong { font: 400 clamp(1.55rem, 2.4vw, 2.45rem)/1 "Cormorant Garamond", Georgia, serif; letter-spacing: -.02em; }
.brand span { color: var(--muted); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-links a { position: relative; padding: 12px 0; }
.nav-links a::after { content: ""; position: absolute; right: 100%; bottom: 6px; left: 0; height: 1px; background: var(--sand); transition: right 220ms ease; }
.nav-links a:hover::after, .nav-links a.is-current::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 8px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.lang-link.active { color: var(--ink); box-shadow: inset 0 -1px var(--sand); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 14px 22px; border: 1px solid transparent; font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; transition: background 220ms, color 220ms, border-color 220ms, transform 220ms; }
.button-dark { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.button-dark:hover, .button-gold { color: var(--ink); background: var(--sand); border-color: var(--sand); }
.button-gold:hover { color: var(--paper); background: transparent; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: none; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.top-mobile-menu { display: none; padding-bottom: 18px; border-top: 1px solid var(--line); }
.top-mobile-menu.open { display: grid; }

.guide-heading { padding: clamp(62px, 8vw, 120px) 0; border-bottom: 1px solid var(--line); }
.heading-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 70px; align-items: end; }
.eyebrow { margin: 0 0 22px; color: var(--sand); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; letter-spacing: -.04em; }
h1 { font-size: clamp(4.5rem, 9vw, 9rem); line-height: .74; }
.heading-note { max-width: 520px; margin: 0 0 4px; color: var(--muted); font-size: 1rem; line-height: 1.85; }

.neighborhoods { display: grid; grid-template-columns: minmax(300px, .42fr) minmax(0, 1.58fr); border-bottom: 1px solid var(--line); }
.neighborhood-list { display: flex; flex-direction: column; justify-content: center; padding: 38px clamp(28px, 4vw, 64px); background: var(--paper); border-right: 1px solid var(--line); }
.area-link { display: grid; grid-template-columns: 34px 1fr 22px; gap: 8px; align-items: baseline; width: 100%; padding: clamp(17px, 2.1vh, 24px) 0; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); background: transparent; text-align: left; cursor: pointer; transition: color 220ms, padding-left 220ms, background 220ms; }
.area-link:first-child { border-top: 1px solid var(--line); }
.area-link span { color: var(--sand); font-size: .65rem; }
.area-link strong { font: 400 clamp(1.55rem, 2.4vw, 2.5rem)/1 "Cormorant Garamond", Georgia, serif; }
.area-link i { font-style: normal; opacity: 0; transition: opacity 220ms; }
.area-link:hover, .area-link:focus-visible, .area-link.is-active { padding-left: 10px; color: var(--ink); background: rgba(180,138,87,.08); }
.area-link:hover i, .area-link:focus-visible i, .area-link.is-active i { opacity: 1; }

.map-wrap { position: relative; align-self: center; min-width: 0; overflow: hidden; background: #0b3038; }
.map-image { position: relative; width: 100%; height: auto; background: #071d2e; filter: saturate(.77) contrast(1.04) brightness(.82); }
.map-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,29,46,.12), transparent 45%, rgba(7,29,46,.12)); pointer-events: none; }
.map-caption { position: absolute; right: 24px; bottom: 18px; margin: 0; color: rgba(255,255,255,.58); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; }
.map-marker { position: absolute; z-index: 3; left: var(--x); top: var(--y); width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; transform: translate(-50%, -50%); touch-action: manipulation; }
.marker-dot { position: absolute; inset: 15px; border: 2px solid var(--paper); border-radius: 50%; background: var(--olive); transition: transform 220ms, background 220ms; }
.marker-ring { position: absolute; inset: 6px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; opacity: 0; transform: scale(.55); transition: opacity 220ms, transform 220ms; }
.marker-name { position: absolute; left: 50%; bottom: 43px; width: max-content; max-width: 180px; padding: 8px 11px; color: var(--ink); background: var(--paper); font-size: .67rem; font-weight: 600; letter-spacing: .04em; opacity: 0; transform: translate(-50%, 5px); transition: opacity 220ms, transform 220ms; pointer-events: none; }
.map-marker:hover .marker-dot, .map-marker:focus-visible .marker-dot, .map-marker.is-active .marker-dot { background: var(--sand); transform: scale(1.25); }
.map-marker:hover .marker-ring, .map-marker:focus-visible .marker-ring, .map-marker.is-active .marker-ring { opacity: 1; transform: scale(1); }
.map-marker:hover .marker-name, .map-marker:focus-visible .marker-name, .map-marker.is-active .marker-name { opacity: 1; transform: translate(-50%, 0); }
.map-marker.is-pulsing .marker-ring { animation: marker-pulse 620ms ease-out; }

.area-detail { grid-column: 1 / -1; width: 100%; padding: clamp(58px, 7vw, 96px) 0; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.area-detail-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); gap: clamp(48px, 9vw, 140px); transition: opacity 150ms ease, transform 180ms ease; }
.area-detail.is-updating .area-detail-grid { opacity: 0; transform: translateY(10px); }
.detail-number, .detail-kicker { margin: 0; color: var(--sand); font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; }
.detail-kicker { margin-top: 56px; }
.area-detail-heading h2 { margin-top: 16px; font-size: clamp(3.5rem, 6.4vw, 6.8rem); line-height: .86; }
.detail-description { max-width: 660px; margin: 4px 0 30px; color: var(--muted); font-size: 1.02rem; line-height: 1.8; }
.area-detail-copy dl { margin: 0 0 34px; border-top: 1px solid var(--line); }
.area-detail-copy dl div { display: grid; grid-template-columns: 150px 1fr; gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.area-detail-copy dt { color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.area-detail-copy dd { margin: 0; font-size: .88rem; }
.area-contact { width: fit-content; }

.guide-cta { padding: clamp(76px, 10vw, 150px) 0; color: var(--paper); background: var(--ink); }
.cta-grid { display: grid; grid-template-columns: 1fr .8fr; gap: clamp(48px, 8vw, 120px); align-items: start; }
.cta-grid h2 { font-size: clamp(3.6rem, 7vw, 7rem); line-height: .88; }
.cta-grid p { max-width: 560px; margin: 8px 0 32px; color: rgba(247,244,238,.68); line-height: 1.8; }
.footer { padding: 42px 0 110px; color: rgba(247,244,238,.62); background: var(--ink); border-top: 1px solid rgba(255,255,255,.16); font-size: .92rem; }
.footer-license { display: inline-block; margin-top: 6px; color: rgba(247,244,238,.44); font-size: .72rem; letter-spacing: .05em; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.footer-links a { color: var(--paper); border-bottom: 1px solid var(--sand); }
.mobile-bar { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: none; grid-template-columns: repeat(3, 1fr); padding: 7px; color: var(--paper); background: rgba(24,30,28,.94); border-top: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(16px); }
.mobile-bar a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 8px; text-align: center; font-size: .82rem; font-weight: 600; }
.mobile-bar a.primary { color: var(--ink); background: var(--sand); }

.detail-page { color: var(--paper); background: var(--olive); }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 116px; padding: 22px max(40px, calc((100vw - var(--max))/2)); color: var(--ink); background: var(--bg); border-bottom: 1px solid var(--line); }
.detail-brand { display: flex; flex-direction: column; gap: 4px; }
.detail-brand strong { font: 400 clamp(1.55rem, 2.4vw, 2.45rem)/1 "Cormorant Garamond", Georgia, serif; }
.detail-brand span { color: var(--muted); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.detail-hero { display: grid; grid-template-columns: .75fr 1.4fr; min-height: calc(100vh - 116px); }
.detail-copy { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(45px, 6vw, 90px); }
.detail-copy h1 { font-size: clamp(4.3rem, 8vw, 8rem); line-height: .8; }
.detail-copy p { max-width: 520px; margin: 30px 0; color: rgba(255,255,255,.68); line-height: 1.8; }
.back-link { color: var(--sand); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.detail-map { min-height: 650px; overflow: hidden; border-left: 1px solid rgba(255,255,255,.16); }
.detail-map img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) brightness(.76); }

@media (max-width: 1320px) {
  .nav-actions > .button { display: none; }
  .nav-links { gap: 18px; }
}

@media (max-width: 1080px) {
  .nav-links, .nav-actions > .button { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .neighborhoods { grid-template-columns: minmax(270px, .55fr) 1.45fr; }
}

@media (max-width: 760px) {
  .shell { width: min(calc(100% - 32px), var(--max)); }
  .nav-inner { min-height: 82px; padding: 12px 0; }
  .brand { min-height: 46px; }
  .brand strong { font-size: 1.35rem; }
  .brand span { display: none; }
  .top-mobile-menu.open { display: grid; gap: 0; }
  .top-mobile-menu a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
  .guide-heading { padding: 58px 0; }
  .heading-grid { grid-template-columns: 1fr; gap: 34px; }
  h1 { font-size: clamp(4rem, 19vw, 6.2rem); }
  .neighborhoods { display: flex; flex-direction: column; min-height: 0; }
  .map-wrap { order: -2; min-height: 0; }
  .area-detail { order: -1; }
  .neighborhood-list { order: 0; }
  .map-marker { width: 48px; height: 48px; }
  .marker-dot { inset: 16px; }
  .marker-ring { inset: 7px; }
  .marker-name { display: none; }
  .map-marker.is-active .marker-name { display: block; bottom: 47px; opacity: 1; }
  .map-marker.is-upper.is-active .marker-name { top: 47px; bottom: auto; transform: translate(-50%, -5px); }
  .map-marker.is-right.is-active .marker-name { right: 8px; left: auto; transform: translate(0, 0); }
  /* Размеры точек меняются, но географические координаты остаются без смещения. */
  .map-marker[data-area="reem"],
  .map-marker[data-area="maryah"] { width: 44px; height: 44px; }
  .neighborhood-list { padding: 36px 22px 54px; border-top: 1px solid var(--line); border-right: 0; }
  .area-link { padding: 18px 0; }
  .area-detail { padding: 54px 0 72px; }
  .area-detail-grid { grid-template-columns: 1fr; gap: 34px; }
  .detail-kicker { margin-top: 30px; }
  .area-detail-copy dl div { grid-template-columns: 1fr; gap: 7px; }
  .cta-grid { grid-template-columns: 1fr; }
  .cta-grid h2 { font-size: clamp(3.5rem, 15vw, 5.3rem); }
  .footer { padding: 42px 8px 110px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .mobile-bar { display: grid; }
  .mobile-bar { padding: 0; }
  .mobile-bar a { min-height: 50px; padding: 12px 4px; font-size: .75rem; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-map { min-height: 430px; order: -1; border-left: 0; }
  .detail-copy { padding: 48px 22px 100px; }
  .site-header { min-height: 82px; padding: 12px 16px; }
  .detail-brand strong { font-size: 1.35rem; }
  .detail-brand span { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .guide-heading .eyebrow,
  .guide-heading h1,
  .heading-note,
  .map-wrap,
  .neighborhood-list {
    opacity: 0;
    animation: guide-enter 700ms cubic-bezier(.22, 1, .36, 1) forwards;
  }

  .guide-heading h1 { animation-delay: 80ms; }
  .heading-note { animation-delay: 150ms; }
  .map-wrap { animation-delay: 230ms; }
  .neighborhood-list { animation-delay: 300ms; }
  .guide-cta .cta-grid { opacity: 0; transform: translateY(22px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.22, 1, .36, 1); }
  .guide-cta.is-visible .cta-grid { opacity: 1; transform: none; }

  @keyframes guide-enter {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes marker-pulse {
    0% { opacity: .9; transform: scale(.7); }
    70% { opacity: .2; transform: scale(1.65); }
    100% { opacity: 0; transform: scale(1.9); }
  }
}

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