:root {
  --text: #27302d;
  --soft-text: #64706b;
  --muted: #f5f7f4;
  --paper: #ffffff;
  --teal: #1b8e7a;
  --teal-dark: #126b5c;
  --teal-soft: rgba(27, 142, 122, 0.14);
  --line: rgba(39, 48, 45, 0.12);
  --shadow: 0 18px 50px rgba(39, 48, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #fbfcfa;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 126px;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 28px;
}

.brand img {
  width: 116px;
  height: 118px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.main-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft-text);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--muted);
}

.main-nav .active {
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 700;
}

.hero {
  padding: 58px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 620px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 64px;
}

.hero h1 {
  margin: 0 0 24px;
  color: var(--teal-dark);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  text-shadow: none;
}

.hero p {
  max-width: 430px;
  margin: 0 0 34px;
  color: var(--soft-text);
  font-size: 20px;
}

.button,
.footer-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0 24px;
  border: 1px solid var(--teal-dark);
  border-radius: 999px;
  color: #fff;
  background: var(--teal-dark);
  font-size: 16px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.button:hover,
.footer-button:hover {
  background: #fff;
  color: var(--teal-dark);
}

.hero-image {
  width: 100%;
  height: 620px;
  object-fit: cover;
}

.teal-strip,
.footer-strip {
  height: 12px;
  margin-top: 48px;
  border: 0;
  background: linear-gradient(90deg, var(--teal-dark), rgba(27, 142, 122, 0.12));
}

.apartments {
  padding: 76px 0 60px;
}

.apartment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.apartment {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(39, 48, 45, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.apartment:hover,
.apartment:focus-within {
  border-color: rgba(18, 107, 92, 0.28);
  box-shadow: 0 18px 46px rgba(39, 48, 45, 0.12);
  transform: translateY(-2px);
}

.apartment img {
  width: 100%;
  height: 292px;
  object-fit: cover;
}

.apartment div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 30px 32px 34px;
}

.apartment-link {
  margin-top: auto;
  align-self: flex-start;
}

.apartment h2,
.faq h2 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 700;
}

.apartment p,
.region-text p,
.faq p {
  font-size: 18px;
  margin: 0;
  color: var(--soft-text);
}

.apartment p {
  margin-bottom: 26px;
}

.quote-section {
  padding: 42px 0 80px;
  background: var(--muted);
}

.quote-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 62px;
  align-items: center;
}

.quote-photo {
  margin: 0;
}

.quote-photo img {
  width: 390px;
  height: 474px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quote-photo figcaption {
  margin-top: 12px;
  color: var(--soft-text);
  font-size: 14px;
}

.region-text {
  padding: 20px 0;
}

.region-text .quote {
  margin-bottom: 24px;
  color: var(--teal-dark);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.08;
}

.region-text p + p {
  margin-top: 18px;
}

.gallery {
  padding: 78px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 236px;
  object-fit: cover;
  border-radius: 8px;
}

.faq {
  padding: 76px 0 82px;
  background: var(--paper);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.faq h2 {
  text-align: center;
  margin-bottom: 38px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.faq article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--muted);
  padding: 32px;
}

.faq article.wide {
  grid-column: 1 / -1;
  width: min(860px, 100%);
  justify-self: center;
}

.faq h3 {
  margin: 0 0 22px;
  font-size: 20px;
  line-height: 1.35;
}

.legal-main {
  min-height: 560px;
  background: var(--paper);
}

.legal-strip {
  margin-top: 0;
}

.legal-content {
  max-width: 920px;
  padding: 68px 40px 88px;
  margin-top: 56px;
  margin-bottom: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 38px rgba(39, 48, 45, 0.08);
}

.legal-content h1 {
  margin: 0 0 38px;
  color: var(--teal-dark);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 700;
  line-height: 1.05;
}

.legal-content h2 {
  margin: 34px 0 12px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

.legal-content h4 {
  margin: 34px 0 12px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.legal-content p {
  max-width: 850px;
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--soft-text);
}

.legal-content ul {
  max-width: 850px;
  margin: 0 0 18px;
  padding: 0;
}

.legal-content li {
  margin: 0 0 16px;
  color: var(--soft-text);
  font-size: 18px;
}

.legal-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  padding-bottom: 22px;
  background: #f7f9f6;
  border-top: 1px solid var(--line);
}

.footer-strip {
  height: 8px;
  margin-top: 0;
  background: linear-gradient(90deg, var(--teal-dark), rgba(27, 142, 122, 0.12));
}

.footer-top {
  min-height: 158px;
  display: grid;
  grid-template-columns: 120px 300px 1fr;
  gap: 26px;
  align-items: center;
}

.footer-logo img {
  width: 100px;
  height: 102px;
  object-fit: contain;
}

.partner-logo img {
  width: 300px;
  height: 104px;
  object-fit: cover;
  border-radius: 6px;
}

.contact-lines {
  justify-self: end;
  width: min(100%, 460px);
  padding-left: 26px;
  border-collapse: collapse;
}

.contact-lines th,
.contact-lines td {
  padding: 7px 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  text-align: left;
  vertical-align: top;
}

.contact-lines th {
  width: 116px;
  padding-right: 24px;
  font-weight: 700;
}

.contact-lines td {
  font-weight: 400;
}

.contact-lines a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.address {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: var(--soft-text);
}

.pin {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--teal-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.footer-button {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  font-size: 15px;
}

.footer-button.small {
  padding-inline: 20px;
}

@media (max-width: 900px) {
  .wrap {
    width: min(100% - 28px, 680px);
  }

  .header-inner,
  .hero-grid,
  .apartment-grid,
  .quote-grid,
  .faq-grid,
  .footer-top,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .header-inner {
    min-height: 0;
    padding: 14px 0 18px;
    justify-items: center;
    gap: 10px;
  }

  .brand img {
    width: 98px;
    height: auto;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
  }

  .main-nav a {
    min-height: 36px;
    padding: 0 11px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-copy {
    padding: 38px 28px 34px;
  }

  .hero h1 {
    margin-bottom: 28px;
    color: var(--teal);
    text-shadow: none;
  }

  .hero-image,
  .apartment img,
  .quote-photo img {
    width: 100%;
    height: auto;
  }

  .teal-strip {
    height: 8px;
    margin-top: 30px;
  }

  .apartments,
  .gallery,
  .faq {
    padding-block: 48px;
  }

  .apartment-grid,
  .quote-grid {
    gap: 32px;
  }

  .apartment div {
    padding: 24px;
  }

  .quote-section {
    padding: 48px 0;
  }

  .region-text {
    padding: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .faq article.wide {
    grid-column: auto;
  }

  .footer-top {
    justify-items: center;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .contact-lines {
    justify-self: center;
    width: auto;
    padding-left: 0;
  }

  .contact-lines th,
  .contact-lines td {
    color: var(--text);
    font-size: 20px;
  }

  .footer-bottom {
    justify-items: center;
    text-align: center;
  }

  .address {
    justify-content: center;
  }

  .legal-content {
    width: min(100% - 28px, 680px);
    padding: 38px 24px 46px;
    margin-top: 36px;
    margin-bottom: 48px;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    border-color: var(--line);
  }

  .footer-bottom {
    justify-items: stretch;
  }

  .footer-button {
    width: 100%;
  }

  .contact-lines th,
  .contact-lines td {
    font-size: 18px;
  }

  .contact-lines th {
    width: 92px;
    padding-right: 14px;
  }

  .legal-content h1 {
    font-size: 38px;
  }
}
