/* TT Ricordi Allegria © ООО «ТАЙПТАЙП» 2021. https://typetype.ru/fonts/tt-ricordi-allegria/ */
@font-face {
  font-family: 'TT Ricordi Allegria';
  src: url('./assets/tt-ricordi-allegria-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #242920;
  --muted: #55594d;
  --paper: #f4f2e9;
  --tint: #e9ecdf;
  --accent: #384633;
  --line: #c1c6b6;
  --cream: #fffaf0;
  --font: 'TT Ricordi Allegria', Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --section-space: clamp(4.5rem, 8vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: auto; }
a { color: inherit; }
button { color: inherit; font: inherit; }
figure, h1, h2, h3, p { margin: 0; }
[hidden] { display: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.frame {
  width: min(100% - 2 * var(--gutter), 83rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  transform: translateY(-150%);
  background: var(--cream);
}

.skip-link:focus { transform: none; }

.header-inner, .footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.625rem;
  gap: 1.25rem;
}

.wordmark {
  justify-self: start;
  display: inline-grid;
  gap: 0.22rem;
  line-height: 1;
  text-decoration: none;
}

.wordmark span:first-child {
  font-size: 2rem;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.wordmark span:last-child {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.navigation { display: flex; gap: clamp(1.25rem, 4vw, 3.75rem); }
.navigation a, .header-contact { font-size: 0.9rem; text-decoration: none; text-transform: uppercase; }
.navigation a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.header-contact { justify-self: end; border-bottom: 1px solid var(--accent); }

.hero {
  display: grid;
  position: relative;
  isolation: isolate;
  align-items: end;
  min-height: clamp(31rem, 76svh, 47rem);
  overflow: clip;
  background: #282b21;
  color: var(--cream);
}

.hero-picture, .hero-picture img, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-picture { z-index: -2; }
.hero-picture img { object-fit: cover; object-position: center 49%; }

.hero::after {
  z-index: -1;
  content: '';
  background: linear-gradient(90deg, #12170fd6 0%, #12170f65 43%, transparent 76%),
              linear-gradient(0deg, #12170f91, transparent 64%);
}

.hero-content { padding-block: clamp(3.5rem, 7.2vh, 6rem); }

.eyebrow {
  margin-bottom: 1.2rem;
  font-size: 0.875rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(3.55rem, 8vw, 8.2rem); }
h2 { font-size: clamp(2.65rem, 5vw, 5.4rem); }
h3 { font-size: clamp(2rem, 3.25vw, 3.6rem); }

.hero-description { max-width: 34ch; margin: 1.55rem 0 1.65rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.button-light { border-color: currentColor; color: var(--cream); }
.button-light:hover { background: var(--cream); color: var(--ink); }
.button-primary { background: var(--accent); color: var(--cream); }
.button-primary:hover { background: var(--ink); }
.button-primary:focus-visible { outline-color: var(--accent); }

.section { padding-block: var(--section-space); }

.houses {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(3rem, 10vw, 11rem);
}

.house-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 48%; }
.house-photo figcaption { margin-top: 0.65rem; color: var(--muted); font-size: 0.875rem; }
.house-copy h2, .place-copy h2 { max-width: 12ch; }
.house-copy p, .place-copy p { max-width: 45ch; margin-top: 1.2rem; }

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 0.3em;
}

.text-link:hover { text-decoration-thickness: 2px; }

.ownership { background: var(--tint); }
.section-intro { max-width: 55ch; margin-top: 1.25rem; }

.ownership-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1fr);
  gap: clamp(2rem, 8vw, 9rem);
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.ownership-options:not([role]) { display: none; }
.ownership-options:not([role]) + .ownership-panels { grid-column: 1 / -1; }

.ownership-options button {
  display: block;
  width: 100%;
  min-height: 3.8rem;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color 160ms ease;
}

.ownership-options button:hover { background: #dbe0d1; }
.ownership-options button[aria-selected='true'] { background: var(--accent); color: var(--cream); }
.ownership-options button:focus-visible { outline-color: var(--accent); }
.ownership-panel { padding-block: 1.4rem; }
.ownership-panel p { max-width: 50ch; margin-top: 0.9rem; }
.ownership-panel .mode-detail { color: var(--muted); }
.ownership-panel + .ownership-panel:not([role]) { border-top: 1px solid var(--line); }

.place-copy { max-width: 43rem; margin-bottom: 2.2rem; }
.place-copy h2 { max-width: 17ch; }
.place-photo { aspect-ratio: 2.1 / 1; object-fit: cover; object-position: center 55%; }

.contact { padding-block: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.contact-inner p { max-width: 49ch; margin-top: 1rem; }
.contact-action { display: grid; justify-items: start; gap: 0.55rem; }
.contact-action span { color: var(--muted); font-size: 0.875rem; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { grid-template-columns: 1fr auto; padding-block: 1.15rem; }
.footer-inner > span { color: var(--muted); font-size: 0.875rem; }

@media (max-width: 720px) {
  .header-inner { grid-template-columns: 1fr 1fr; gap: 0.95rem; padding-top: 1rem; }
  .header-contact { grid-column: 2; grid-row: 1; }
  .navigation { grid-column: 1 / -1; padding-bottom: 0.65rem; }
  .navigation a { display: inline-block; padding-block: 0.25rem; }
  .hero { min-height: clamp(30rem, 73svh, 40rem); }
  .hero-picture img { object-position: 55% center; }
  .hero::after { background: linear-gradient(0deg, #12170ff2, #12170f66 58%, transparent); }
  h1 { font-size: clamp(2rem, 10vw, 3.6rem); }
  .hero-content { padding-bottom: 2.4rem; }
  .hero-description { margin-block: 1.2rem 1.35rem; }
  .houses, .ownership-layout { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  .house-photo { order: 1; }
  .house-photo img { aspect-ratio: 4 / 3; }
  .ownership-layout { margin-top: 1.75rem; }
  .ownership-panel { padding-block: 0.7rem 0; }
  .ownership-panel + .ownership-panel:not([role]) { margin-top: 1rem; }
  .place-photo { aspect-ratio: 4 / 3; }
  .contact-inner { display: grid; }
  .footer-inner { align-items: end; }
  .footer-inner > span { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
