/* ==========================================================================
   Neribo Realty
   Palette:  lagoon ink #10353F, deep ink #0A2229, sea-glass #E7EFEF,
             white, agent green #0F7A40, brass #C79632
   Type:     Bricolage Grotesque (headings, prices), Figtree (body)
   ========================================================================== */

:root {
  --ink: #10353f;
  --ink-deep: #0a2229;
  --text: #1d2b31;
  --muted: #465a62;
  --glass: #e7efef;
  --paper: #ffffff;
  --green: #0f7a40;
  --green-dark: #0b6132;
  --brass: #c79632;
  --line: #cfdcdc;
  --ph-1: #d3dfe0;
  --ph-2: #e9f0f0;

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius: 6px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1rem; max-width: 62ch; }
h1, h2, h3, h4 { margin: 0; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

a { color: var(--green-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible { outline-color: #e9c46a; }

.wrap {
  width: min(100% - 2.5rem, 74rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; outline-color: #e9c46a; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-deep); color: #fff; }
.btn-sm { min-height: 2.6rem; padding: 0.45rem 1.05rem; font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; width: auto; height: 3rem; }
.brand-mark-footer {
  height: 3rem;
  background: #fff;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.site-nav a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }

.bar-cta { min-height: 2.75rem; padding-inline: 1.1rem; white-space: nowrap; }

.menu-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.15rem; height: 2px;
  background: var(--ink);
  content: "";
  position: relative;
}
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 34rem) {
  .bar { gap: 0.5rem; }
  .brand { font-size: 1rem; gap: 0.45rem; }
  .brand-mark { height: 2.5rem; }
  .brand-mark-footer { height: 2.75rem; }
  .bar-cta { padding-inline: 0.7rem; font-size: 0.9rem; min-height: 2.6rem; }
  .menu-toggle { width: 2.6rem; height: 2.6rem; }
}

@media (max-width: 24rem) {
  .brand { font-size: 0.95rem; gap: 0.4rem; }
  .brand-mark { height: 2.25rem; }
  .brand-mark-footer { height: 2.5rem; }
  .bar-cta {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    white-space: normal;
    line-height: 1.15;
  }
  .menu-toggle { width: 2.4rem; height: 2.4rem; }
}

@media (max-width: 56rem) {
  .bar-cta { margin-left: auto; }
  .site-nav { margin-left: 0; }

  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a {
    padding: 0.9rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav a:hover { border-bottom-color: var(--line); }

  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .bar { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .site-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
}

/* ---------- Photo placeholder ---------- */
.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ph-1), var(--ph-2));
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--muted);
}
.photo-fill { position: absolute; inset: 0; }
.photo-portrait { aspect-ratio: 4 / 5; }

/* ---------- Hero: photo cut to a house silhouette ---------- */
.hero {
  background: var(--glass);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  max-width: 11em;
  text-wrap: balance;
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 34rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-house {
  position: relative;
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 4 / 5;
  margin: 0.6rem;
  justify-self: start;
}
.house,
.house-back {
  position: absolute;
  clip-path: polygon(0 20%, 50% 0, 100% 20%, 100% 100%, 0 100%);
}
.house { inset: 0; animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
.house-back {
  inset: -0.6rem;
  background: var(--brass);
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

@keyframes rise {
  from { clip-path: polygon(0 100%, 50% 100%, 100% 100%, 100% 100%, 0 100%); }
}

@media (min-width: 56rem) {
  .hero-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; }
  .hero-house { justify-self: end; }
}

/* ---------- Shared section styles ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-glass { background: var(--glass); }
.section-ink { background: var(--ink); color: #fff; }

.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.9rem;
  text-wrap: balance;
}
.section-ink .h2 { color: #fff; }
.section-intro { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 40rem; }

/* ---------- Listings ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 2.6rem;
  padding: 0.4rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--glass); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.listings {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .listings { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .listings { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card[hidden] { display: none; }

.card-media { aspect-ratio: 4 / 3; }
.tag {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: 1;
  padding: 0.2rem 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 3px;
}
.tag-sale { background: #fff; color: var(--ink); }
.tag-rent { background: var(--brass); color: var(--ink); }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.25rem 1.4rem;
}
.card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.85rem;
}
.price .per {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--muted);
}

.specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  color: var(--text);
}
.specs li { display: inline-flex; align-items: center; gap: 0.4rem; }
.icon { width: 1.25rem; height: 1.25rem; color: var(--ink); flex: none; }

.card-note { font-size: 1.02rem; color: var(--muted); margin-bottom: 1.1rem; }

.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
}
.text-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

/* Wide cards (only in the full 3-column grid, and only when unfiltered) */
@media (min-width: 64rem) {
  .listings:not(.is-filtered) .card-wide {
    grid-column: span 2;
    flex-direction: row;
  }
  .listings:not(.is-filtered) .card-wide .card-media {
    flex: 0 0 52%;
    aspect-ratio: auto;
    min-height: 20rem;
  }
  .listings:not(.is-filtered) .card-wide .card-body { padding: 1.5rem 1.75rem; }
  .listings:not(.is-filtered) .card-wide h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
  .listings:not(.is-filtered) .card-wide .price { font-size: 2.1rem; margin-bottom: 1.1rem; }
  .listings:not(.is-filtered) .card-wide .specs { font-size: 1.05rem; margin-bottom: 1.1rem; }
  .listings:not(.is-filtered) .card-wide .card-note { font-size: 1.1rem; }
}

/* ---------- Why work with us ---------- */
.why { display: grid; gap: 2.25rem; }
.trust {
  list-style: none;
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: 1fr;
}
.trust li { border-top: 1px solid rgba(16, 53, 63, 0.3); padding-top: 1rem; }
.trust h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.trust p { margin: 0; }

@media (min-width: 40rem) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) {
  .why { grid-template-columns: 4fr 8fr; gap: 4rem; align-items: start; }
  .why-head { position: sticky; top: 6rem; }
}

/* ---------- Agent ---------- */
.agent { display: grid; gap: 2.5rem; }
.agent-copy p { color: #d2e1e3; font-size: 1.2rem; }
.agent-copy .agent-alt { font-size: 1.05rem; }
.agent-copy a { color: #fff; }
.agent-copy a:hover { color: #e9c46a; }

.agent-card {
  width: 100%;
  max-width: 24rem;
  background: var(--paper);
  color: var(--text);
  border-radius: var(--radius);
  overflow: hidden;
}
.agent-card-body { padding: 1.25rem 1.5rem 1.6rem; }
.agent-card h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.agent-card p { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.1rem; }

@media (min-width: 58rem) {
  .agent { grid-template-columns: 6fr 5fr; gap: 4rem; align-items: center; }
  .agent-card { justify-self: end; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: #d2e1e3;
  border-top: 3px solid var(--brass);
  padding-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #e9c46a; }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }

.footer-grid { display: grid; gap: 2rem; }
.footer-brand p { margin-top: 1rem; max-width: 26rem; }
.site-footer h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: #e9c46a;
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }

.footer-base {
  margin-top: 2.5rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
}
.footer-base p { margin: 0 0 0.35rem; max-width: none; }

@media (min-width: 52rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .house,
  .house-back { animation: none; }
  .btn, .chip { transition: none; }
}
