:root {
  --bg: #f8f5ef;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #5b6775;
  --brand: #284b63;
  --brand-dark: #17324a;
  --accent: #d9a441;
  --border: #d8dee7;
  --shadow: 0 20px 45px rgba(31, 41, 51, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  min-height: 92vh;
  background:
    linear-gradient(120deg, rgba(23, 50, 74, 0.88), rgba(40, 75, 99, 0.62)),
    url("assets/house-front.svg") center/cover no-repeat;
  color: #ffffff;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem min(6vw, 5rem);
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.92;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.hero {
  max-width: 920px;
  padding: 12vh min(6vw, 5rem) 6rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy {
  max-width: 650px;
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.unit-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(31, 41, 51, 0.2);
}

.button.primary {
  color: #ffffff;
  background: var(--brand);
}

.site-header .button.primary {
  background: var(--accent);
  color: var(--ink);
}

.button.secondary {
  color: var(--brand-dark);
  background: #ffffff;
  border-color: rgba(40, 75, 99, 0.18);
}

.section {
  padding: 5rem min(6vw, 5rem);
}

.section-muted {
  background: #eef2f5;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.video-card {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.video-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.gallery-item {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: zoom-in;
  box-shadow: 0 12px 25px rgba(31, 41, 51, 0.10);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.unit-card,
.form-card {
  overflow: hidden;
  border: 1px solid rgba(216, 222, 231, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.unit-card.is-selected {
  outline: 4px solid rgba(217, 164, 65, 0.55);
}

.unit-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.unit-content {
  padding: 1.2rem;
}

.unit-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.unit-title-row h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.tag {
  flex: 0 0 auto;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e8f6ef;
  color: #14683f;
  font-size: 0.8rem;
  font-weight: 900;
}

.price {
  margin: 0.7rem 0 0.2rem;
  color: var(--brand-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.features {
  padding-left: 1.2rem;
  color: var(--muted);
}

.form-card {
  max-width: 980px;
  padding: clamp(1.1rem, 3vw, 2rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

label,
legend {
  display: grid;
  gap: 0.4rem;
  margin: 0.9rem 0;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(217, 164, 65, 0.38);
  border-color: var(--accent);
}

.unit-choice-box {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.unit-choice-box label,
.consent-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.unit-choice-box input,
.consent-row input {
  width: auto;
  min-height: auto;
}

.selected-summary {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 14px;
  color: var(--brand-dark);
  background: #fff8e8;
  font-weight: 800;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-status.success {
  color: #14683f;
}

.form-status.error {
  color: #9f1239;
}

.hp-field,
.submission-frame {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem min(6vw, 5rem);
  color: #ffffff;
  background: var(--brand-dark);
}

.image-dialog {
  width: min(94vw, 1100px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #111827;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
}

.dialog-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .unit-grid,
  .gallery,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: auto;
  }

  .nav,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 4rem;
  }

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

  .button {
    width: 100%;
  }
}
