/* =====================================================
   Riegelhaus Boniswil — Landingpage
   Design tokens: warm creme, deep forest green, sage,
   rose accent (drawn from the Kolibri logo).
   ===================================================== */

:root {
  /* Surfaces */
  --bg:           #f5efe4;   /* warm creme / offwhite */
  --bg-soft:      #efe6d3;   /* slightly deeper creme */
  --bg-deep:      #1f2a22;   /* deep forest green (used for inverted blocks) */
  --surface:      #fbf7ee;   /* card surface */
  --surface-2:    #ece2cd;

  /* Ink */
  --ink:          #1d2620;
  --ink-soft:     #4a564e;
  --ink-mute:     #7a8378;
  --ink-line:     rgba(29, 38, 32, 0.12);
  --ink-line-strong: rgba(29, 38, 32, 0.22);

  /* Brand */
  --green:        #2e4a36;   /* deep brand green */
  --green-deep:   #213628;
  --green-soft:   #6b8169;   /* sage */
  --rose:         #8a3a55;   /* logo rose accent */
  --wood:         #b8895a;   /* warm wood accent (used sparingly) */

  /* Type */
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Radius / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(29,38,32,0.04), 0 2px 8px rgba(29,38,32,0.04);
  --shadow-md: 0 4px 14px rgba(29,38,32,0.06), 0 16px 40px rgba(29,38,32,0.06);

  /* Layout */
  --max: 1240px;
  --pad-x: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 9vw, 128px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #161d18;
    --bg-soft:      #1c241f;
    --bg-deep:      #0f1612;
    --surface:      #1f2823;
    --surface-2:    #283228;

    --ink:          #ecdfc8;
    --ink-soft:     #c2bcae;
    --ink-mute:     #8d9189;
    --ink-line:     rgba(236, 223, 200, 0.12);
    --ink-line-strong: rgba(236, 223, 200, 0.22);

    --green:        #8fb29a;
    --green-deep:   #b6d3bd;
    --green-soft:   #97ad96;
    --rose:         #d68aa1;
    --wood:         #c89a72;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 2px 8px rgba(0,0,0,0.30);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.35), 0 16px 40px rgba(0,0,0,0.35);
  }
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
h1 em, h2 em { font-style: italic; color: var(--green); font-weight: 400; }
p  { margin: 0; }

/* -------- Reusable -------- */
.section { padding: var(--section-y) var(--pad-x); max-width: var(--max); margin: 0 auto; }

.section-head { max-width: 720px; margin: 0 0 clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-weight: 500;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); display: inline-block;
}
.eyebrow-light { color: rgba(236, 223, 200, 0.85); }
.eyebrow-light .dot { background: var(--wood); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #f5efe4;
}
.btn-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0f1612; }
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-line-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

/* -------- Header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--pad-x);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
}
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.72rem; color: var(--ink-mute); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px;
}
.nav {
  margin-left: auto;
  display: flex; gap: 28px; align-items: center;
}
.nav a {
  font-size: 0.93rem; color: var(--ink-soft); position: relative;
  transition: color 180ms;
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--green); transform: scaleX(0); transform-origin: left;
  transition: transform 250ms ease;
}
.nav a:hover::after { transform: scaleX(1); }
.header-cta { margin-left: 8px; }

.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: transform 200ms; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 73px;
  left: 0;
  right: 0;
  z-index: 45;
  flex-direction: column;
  gap: 10px;
  padding: 18px var(--pad-x) 24px;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
  box-shadow: var(--shadow-sm);
}
.mobile-nav a { padding: 10px 0; color: var(--ink-soft); border-bottom: 1px solid var(--ink-line); }
.mobile-nav a.btn { border-bottom: 0; margin-top: 8px; color: #f5efe4; }
.mobile-nav[hidden] { display: none; }
.mobile-nav.open { display: flex; }

@media (max-width: 880px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
}

/* -------- Hero -------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--pad-x) clamp(48px, 6vw, 80px);
}
.hero-text h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 14px 0 28px;
}
.hero .lede {
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}
.hero-ctas {
  margin-top: 36px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.hero-image {
  position: relative;
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.hero-image img {
  width: 100%; height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.hero-image figcaption {
  position: absolute; left: 16px; bottom: 14px;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 34px;
  }
  .hero-text h1 {
    font-size: clamp(2.55rem, 12vw, 3.8rem);
    margin-bottom: 22px;
  }
  .hero .lede {
    font-size: 1rem;
  }
  .hero-ctas {
    margin-top: 28px;
  }
  .hero-image {
    max-height: none;
  }
  .hero-image img {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 520px) {
  :root {
    --pad-x: 20px;
    --section-y: 56px;
  }

  body {
    font-size: 16px;
  }

  .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .mobile-nav {
    top: 55px;
  }

  .brand {
    gap: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 0.96rem;
  }

  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.11em;
  }

  .hero {
    padding-top: 28px;
    padding-bottom: 44px;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    line-height: 1.35;
  }

  .hero-text h1 {
    font-size: clamp(2.35rem, 13vw, 3.15rem);
    line-height: 1.04;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
    white-space: normal;
  }

  .hero-image figcaption {
    left: 12px;
    bottom: 12px;
    font-size: 0.72rem;
  }
}

/* -------- Open House Banner -------- */
.open-house {
  padding: 0 var(--pad-x) clamp(48px, 6vw, 80px);
  max-width: var(--max);
  margin: 0 auto;
}
.oh-card {
  background: var(--bg-deep);
  color: #f1e7d2;
  border-radius: var(--r-xl);
  padding: clamp(32px, 4.5vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.oh-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(184,137,90,0.18), transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(143,178,154,0.14), transparent 50%);
  pointer-events: none;
}
.oh-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: rgba(245, 239, 228, 0.06);
  border: 1px solid rgba(245, 239, 228, 0.16);
  border-radius: var(--r-lg);
  padding: 16px 22px;
  min-width: 132px;
  position: relative;
}
.oh-day {
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245,239,228,0.7);
}
.oh-num {
  font-family: var(--serif);
  font-size: 4rem; line-height: 1;
  margin: 6px 0 4px;
  color: #f5efe4;
  font-weight: 400;
}
.oh-month {
  font-size: 0.9rem; color: rgba(245,239,228,0.75);
  letter-spacing: 0.05em;
}
.oh-body { position: relative; }
.oh-body h2 {
  color: #f5efe4;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  margin: 8px 0 14px;
}
.oh-body p { color: rgba(241,231,210,0.86); max-width: 520px; }
.oh-body strong { color: #f5efe4; font-weight: 500; }
.oh-meta {
  margin-top: 12px !important;
  font-size: 0.9rem;
  color: rgba(241,231,210,0.65) !important;
}
.oh-actions { display: flex; flex-direction: column; gap: 10px; position: relative; }
.oh-actions .btn-primary { background: #f5efe4; color: #213628; }
.oh-actions .btn-primary:hover { background: #fff; color: #1a2b1f; }
.oh-actions .btn-ghost { color: #f1e7d2; border-color: rgba(241,231,210,0.3); }
.oh-actions .btn-ghost:hover { background: rgba(245,239,228,0.08); border-color: #f1e7d2; }

@media (max-width: 880px) {
  .oh-card { grid-template-columns: 1fr; text-align: left; }
  .oh-date { flex-direction: row; gap: 12px; min-width: 0; align-self: start; padding: 12px 18px; }
  .oh-num { font-size: 2.2rem; margin: 0; }
  .oh-actions { flex-direction: row; flex-wrap: wrap; }
}

/* -------- Intro -------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.intro-headline h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
}
.intro-text p + p { margin-top: 18px; }
.intro-text p { color: var(--ink-soft); font-size: 1.05rem; }
@media (max-width: 880px) {
  .intro-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* -------- Features -------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-line-strong);
}
.feature-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  background: color-mix(in oklab, var(--green) 12%, transparent);
  border-radius: 12px;
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 1.2rem; margin: 0 0 8px;
  font-family: var(--serif); font-weight: 500;
}
.feature p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }

@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* -------- Apartments -------- */
.apt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.apt-card {
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-xl);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.apt-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-line-strong);
}
.apt-kind {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--green); font-weight: 500; margin-bottom: 14px;
}
.apt-head h3 {
  font-size: 1.45rem; line-height: 1.2; font-weight: 500;
  margin: 0 0 14px;
}
.apt-stats {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.92rem; color: var(--ink-soft);
  font-family: var(--sans);
}
.apt-stats strong { color: var(--ink); font-weight: 600; }
.apt-list {
  border-top: 1px solid var(--ink-line);
  padding-top: 18px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 0.95rem; color: var(--ink-soft);
}
.apt-list li {
  position: relative; padding-left: 20px; line-height: 1.5;
}
.apt-list li::before {
  content: ''; position: absolute; left: 0; top: 0.6em;
  width: 8px; height: 1px; background: var(--green-soft);
}
.apt-foot {
  margin-top: auto;
  border-top: 1px solid var(--ink-line);
  padding-top: 20px;
  display: flex; align-items: end; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
}
.apt-price { display: flex; flex-direction: column; gap: 4px; }
.apt-price-main {
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.1;
}
.apt-price-suffix { font-size: 0.9rem; color: var(--ink-mute); font-weight: 400; }
.apt-price-sub { font-size: 0.82rem; color: var(--ink-mute); }

@media (max-width: 1080px) { .apt-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .apt-grid { grid-template-columns: 1fr; } }

.apt-shared {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 30px 28px;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  border: 1px solid var(--ink-line);
}
.apt-shared h3 { font-size: 1.15rem; font-weight: 500; margin: 0 0 6px; }
.apt-shared p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.55; }
@media (max-width: 720px) { .apt-shared { grid-template-columns: 1fr; gap: 22px; } }

/* -------- Location -------- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.location-text h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: 22px; }
.location-text p { color: var(--ink-soft); max-width: 520px; }
.location-facts {
  margin: 28px 0 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.location-facts > div {
  display: grid; grid-template-columns: 130px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-line);
}
.location-facts dt {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0;
}
.location-facts dd { margin: 0; color: var(--ink); }

.location-card {
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-xl);
  padding: 28px;
  color: var(--green);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.map-decoration { width: 100%; height: 100%; }

@media (max-width: 880px) {
  .location-grid { grid-template-columns: 1fr; }
  .location-card { aspect-ratio: 16/10; }
}

/* -------- Contact -------- */
.contact { padding-bottom: clamp(48px, 6vw, 80px); }
.contact-card {
  background: var(--bg-deep);
  color: #f1e7d2;
  border-radius: var(--r-xl);
  padding: clamp(36px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 12%, rgba(143,178,154,0.16), transparent 50%),
    radial-gradient(circle at 8% 92%, rgba(184,137,90,0.14), transparent 50%);
  pointer-events: none;
}
.contact-card h2 {
  color: #f5efe4;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  margin: 8px 0 18px;
}
.contact-card h2 em { color: var(--wood); }
.contact-lede { color: rgba(241,231,210,0.85); max-width: 620px; position: relative; }
.contact-people {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px;
  align-items: end;
  position: relative;
}
.contact-role {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(241,231,210,0.55); margin-bottom: 8px;
}
.contact-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #f5efe4;
}
.contact-meta { color: rgba(241,231,210,0.65); font-size: 0.95rem; margin-top: 4px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-actions .btn-primary { background: #f5efe4; color: #213628; }
.contact-actions .btn-primary:hover { background: #fff; color: #1a2b1f; }
.contact-actions .btn-ghost { color: #f1e7d2; border-color: rgba(241,231,210,0.3); }
.contact-actions .btn-ghost:hover { background: rgba(245,239,228,0.08); border-color: #f1e7d2; }

/* -------- Footer -------- */
.site-footer {
  border-top: 1px solid var(--ink-line);
  padding: 36px var(--pad-x) 56px;
  background: var(--bg-soft);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { object-fit: contain; }
.footer-name { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
.footer-sub { font-size: 0.82rem; color: var(--ink-mute); margin-top: 2px; }
.footer-nav { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { font-size: 0.92rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }
.footer-copy {
  font-size: 0.82rem; color: var(--ink-mute); text-align: right;
}
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-nav { justify-content: flex-start; }
  .footer-copy { text-align: left; }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* -------- Focus styles -------- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 999px;
}
