:root {
  --cobalt: #3157D5;
  --deep-blue: #1F2A5A;
  --apricot: #F4A261;
  --soft-apricot: #FDE8D5;
  --cloud: #F4F7FB;
  --pale-blue: #E7EDFF;
  --text: #1D2433;
  --muted: #697386;
  --white: #FFFFFF;
  --line: rgba(31, 42, 90, 0.12);
  --shadow: 0 24px 70px rgba(31, 42, 90, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 12px 34px rgba(31, 42, 90, 0.12); }
.brand { display: grid; gap: 0; color: var(--deep-blue); }
.brand span { font-weight: 900; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 0.78rem; }
.main-nav { display: flex; justify-content: center; gap: 18px; font-size: 0.92rem; color: var(--muted); }
.main-nav a:hover { color: var(--cobalt); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.language { color: var(--deep-blue); font-weight: 800; font-size: 0.86rem; white-space: nowrap; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--deep-blue); }

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--white); background: var(--cobalt); box-shadow: 0 12px 26px rgba(49, 87, 213, 0.24); }
.btn-secondary { color: var(--deep-blue); background: var(--soft-apricot); }
.btn-dark { color: var(--white); background: var(--deep-blue); }
.btn-small { min-height: 40px; padding-inline: 16px; font-size: 0.9rem; }

.hero {
  min-height: 710px;
  padding: 92px 20px 34px;
  background:
    radial-gradient(circle at 12% 18%, rgba(253, 232, 213, 0.9), transparent 28%),
    linear-gradient(180deg, var(--cloud), var(--white));
  overflow: hidden;
}
.hero-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--cobalt); font-weight: 900; font-size: 0.78rem; letter-spacing: 0.08em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 0;
  color: var(--deep-blue);
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 900;
}
.hero-copy { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 1.14rem; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 30px 0 22px; }
.hero-art { max-width: 800px; margin: 0 auto; animation: floatHouse 7s ease-in-out infinite; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(31,42,90,0.14)); }
.cloud-shape { fill: var(--white); opacity: 0.82; }
.sun, .marker-dot { fill: var(--apricot); }
.house-shadow { fill: rgba(31,42,90,0.12); }
.roof { fill: var(--cobalt); }
.home-body { fill: var(--white); stroke: var(--deep-blue); stroke-width: 4; }
.side-building { fill: var(--pale-blue); stroke: var(--deep-blue); stroke-width: 4; }
.door { fill: var(--apricot); }
.window, .mini-window { fill: var(--pale-blue); stroke: var(--cobalt); stroke-width: 4; }
.path { fill: var(--soft-apricot); }
.plant-pot { fill: var(--deep-blue); }
.plant { fill: var(--cobalt); opacity: 0.85; }

.search-wrap { max-width: 1120px; margin: -38px auto 70px; padding: 0 20px; position: relative; z-index: 3; }
.search-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.search-panel h2 { grid-column: 1 / -1; margin: 0; font-size: 1.4rem; color: var(--deep-blue); }
label { display: grid; gap: 7px; color: var(--deep-blue); font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--white);
}
textarea { min-height: 118px; resize: vertical; }
.filter-note { color: var(--muted); text-align: center; margin: 14px 0 0; }

.section { max-width: 1120px; margin: 0 auto; padding: 76px 20px; }
.section-heading { max-width: 670px; margin-bottom: 28px; }
.section h2, .brand-statement h2, .owner-band h2 { margin: 0; color: var(--deep-blue); font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.08; font-weight: 900; }
.section-copy { max-width: 760px; }
.section-copy p:last-child, .section-heading + p { color: var(--muted); }
.statement-grid, .why-grid, .safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}
.statement-grid article, .why-grid article, .safety-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.statement-grid b, .statement-grid span { display: block; }
.statement-grid span, .why-grid p, .safety-grid p { color: var(--muted); margin-bottom: 0; }

.lifestyle { background: linear-gradient(180deg, var(--white), var(--cloud)); max-width: none; }
.lifestyle > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.lifestyle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lifestyle-grid article { min-height: 210px; padding: 24px; border-radius: 8px; display: grid; align-content: end; }
.lifestyle-grid h3 { margin: 0; color: var(--deep-blue); font-size: 1.35rem; }
.lifestyle-grid p { margin-bottom: 0; color: var(--muted); }
.life-a { background: var(--pale-blue); }
.life-b { background: var(--soft-apricot); }
.life-c { background: color-mix(in srgb, var(--soft-apricot) 62%, var(--white)); }
.life-d { background: color-mix(in srgb, var(--pale-blue) 72%, var(--white)); }

.featured-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--white);
}
.featured-card img { width: 100%; height: 100%; object-fit: cover; min-height: 430px; }
.featured-content { padding: clamp(26px, 4vw, 48px); align-self: center; }
.status { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: var(--pale-blue); color: var(--cobalt); font-weight: 900; font-size: 0.86rem; }
.featured-content h3 { margin: 18px 0 8px; color: var(--deep-blue); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.06; }
.price { color: var(--cobalt); font-weight: 900; font-size: 1.2rem; }
.desc { color: var(--muted); }

.city-network {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cloud), var(--pale-blue));
  overflow: hidden;
}
.city-network::before {
  content: "";
  position: absolute;
  inset: 18px;
  background-image: radial-gradient(var(--apricot) 2px, transparent 3px);
  background-size: 44px 44px;
  opacity: 0.7;
  animation: driftDots 8s linear infinite;
}
.city-network button, .budget-row button {
  position: relative;
  border: 1px solid rgba(49, 87, 213, 0.18);
  background: rgba(255,255,255,0.86);
  color: var(--deep-blue);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 900;
}
.city-network button.is-active, .budget-row button.is-active { color: var(--white); background: var(--cobalt); }
.budget-row { display: flex; flex-wrap: wrap; gap: 12px; }

.brand-statement {
  padding: 94px 20px;
  text-align: center;
  color: var(--white);
  background: var(--deep-blue);
}
.brand-statement p { color: var(--apricot); font-weight: 900; }
.brand-statement h2 { color: var(--white); }
.brand-statement span { display: block; max-width: 700px; margin: 22px auto 0; color: rgba(255,255,255,0.76); font-size: 1.1rem; }

.why-grid { grid-template-columns: repeat(4, 1fr); }
.why-grid i { display: block; width: 28px; height: 28px; background: linear-gradient(135deg, var(--cobalt) 50%, var(--apricot) 50%); transform: rotate(12deg); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--pale-blue); gap: 18px; }
.steps article { position: relative; padding-top: 28px; }
.steps article::before { content: ""; position: absolute; top: -8px; width: 14px; height: 14px; background: var(--apricot); border-radius: 50%; }
.steps b { color: var(--cobalt); font-size: 1.7rem; }
.steps h3 { margin: 8px 0 4px; color: var(--deep-blue); }
.steps p { color: var(--muted); margin: 0; }

.owner-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 74px clamp(20px, 7vw, 90px);
  background: var(--apricot);
}
.owner-band p { max-width: 620px; color: rgba(29,36,51,0.78); }
.owner-band .eyebrow { color: var(--deep-blue); }

.safety-grid { grid-template-columns: repeat(4, 1fr); }
.contact {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: start;
  background: var(--cloud);
  max-width: none;
  padding-inline: max(20px, calc((100vw - 1120px) / 2));
}
.contact-copy a { display: inline-block; margin-top: 14px; color: var(--cobalt); font-weight: 900; font-size: 1.25rem; }
.contact-form, .modal form { display: grid; gap: 14px; }
.form-status { margin: 0; color: var(--cobalt); font-weight: 800; }
.form-status.error { color: #b42318; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 28px;
  padding: 42px clamp(20px, 5vw, 64px);
  color: rgba(255,255,255,0.82);
  background: var(--deep-blue);
}
.site-footer strong { color: var(--white); font-size: 1.2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--white); font-weight: 800; }

.sticky-contact {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  display: none;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--cobalt);
  box-shadow: 0 12px 28px rgba(49, 87, 213, 0.32);
  font-weight: 900;
}

.modal {
  width: min(620px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 30px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(31, 42, 90, 0.42); backdrop-filter: blur(4px); }
.modal-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 1.4rem;
}

@keyframes floatHouse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes driftDots {
  from { transform: translateY(0); }
  to { transform: translateY(18px); }
}

@media (max-width: 960px) {
  .site-header { grid-template-columns: auto auto; justify-content: space-between; }
  .menu-toggle { display: block; }
  .main-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }
  .main-nav.is-open { display: flex; }
  .header-actions { grid-column: 1 / -1; justify-content: space-between; display: none; }
  .header-actions.is-open { display: flex; }
  .search-panel, .featured-card, .contact, .site-footer { grid-template-columns: 1fr; }
  .statement-grid, .why-grid, .safety-grid, .lifestyle-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--pale-blue); padding-left: 20px; }
  .steps article { padding: 0 0 22px 18px; }
  .steps article::before { top: 6px; left: -28px; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 62px; }
  h1 { font-size: 2.8rem; }
  .hero-copy { font-size: 1rem; }
  .statement-grid, .why-grid, .safety-grid, .lifestyle-grid { grid-template-columns: 1fr; }
  .city-network { flex-wrap: nowrap; overflow-x: auto; }
  .city-network button { white-space: nowrap; }
  .owner-band { display: grid; }
  .featured-card img { min-height: 270px; }
  .sticky-contact { display: inline-flex; }
}

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