/* ============================================
   TERENCE DOOHEN — THE LAKE HOUSE GUY
   Design system: sand, brick red, deep water teal
   Fonts: Fraunces (display) / Nunito Sans (body) / Caveat (accent)
   ============================================ */

:root {
  --ink: #211F1C;
  --teal: #1B3A3D;
  --teal-light: #2C5457;
  --red: #A63A2E;
  --red-light: #C24A3C;
  --lake-blue: #4A7C8C;
  --sand: #F3ECD8;
  --sand-light: #FAF6EA;
  --white: #FFFFFF;
  --slate: #6B6B63;
  --slate-light: #9B9B8F;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito Sans', -apple-system, sans-serif;
  --font-accent: 'Caveat', cursive;

  --max-width: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.accent {
  font-family: var(--font-accent);
  color: var(--red);
  font-size: 1.4em;
  font-weight: 600;
}

p { color: var(--ink); }

.lede {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--lake-blue); outline-offset: 3px; }

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(166,58,46,0.28);
}
.btn-primary:hover { background: var(--red-light); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-light {
  background: var(--white);
  color: var(--ink);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sand-light);
  border-bottom: 1px solid rgba(33,31,28,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: 16px; }
.nav-logo-badge { height: 108px; width: auto; }
.nav-logo-divider { width: 1px; height: 62px; background: rgba(33,31,28,0.18); }
.nav-logo-kw { height: 56px; width: auto; }
.nav-logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.nav-logo-text span { display: block; font-family: var(--font-accent); color: var(--red); font-size: 1.1rem; }

.nav-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  transition: transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}
.nav-call-btn svg { width: 18px; height: 18px; fill: var(--white); }
.nav-call-btn:hover { background: var(--red); transform: translateY(-2px); }

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.nav-links a { padding: 6px 2px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { border-color: var(--red); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 1240px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-call-btn, .nav-cta .btn-primary { display: none; }
}

/* ---------- Wave divider ---------- */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  margin-bottom: -1px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,58,61,0.15) 0%, rgba(20,26,22,0.75) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 60px 28px 70px; max-width: var(--max-width); margin: 0 auto; width: 100%; }
.hero-eyebrow {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  color: #F2CFAE;
}
.hero h1 { color: var(--white); margin: 4px 0 18px; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

.page-hero {
  min-height: 42vh;
  align-items: center;
}
.page-hero .hero-content { padding: 50px 28px; text-align: center; margin: 0 auto; }
.page-hero .lede { margin: 0 auto; color: #EDE6D6; }

.page-hero-plain {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  position: relative;
  overflow: hidden;
}
.page-hero-plain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(242,207,174,0.12) 0%, transparent 45%),
                     radial-gradient(circle at 85% 70%, rgba(74,124,140,0.35) 0%, transparent 50%);
}
.page-hero-plain::after { display: none; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--teal); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .lede { color: #C9DBDA; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  font-family: var(--font-accent);
  color: var(--red);
  font-size: 1.35rem;
  display: block;
  margin-bottom: 4px;
}
.section-dark .eyebrow { color: #F2CFAE; }

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 8px 30px rgba(33,31,28,0.06);
}

.stamp-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(33,31,28,0.1);
}
.stamp-card img { width: 100%; height: 260px; object-fit: cover; }
.stamp-card .stamp-body { padding: 22px; }
.stamp-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-accent);
  font-size: 1.1rem;
  padding: 4px 16px;
  border-radius: 999px;
  transform: rotate(4deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.stat-row { display: flex; gap: 50px; flex-wrap: wrap; }
.stat b { font-family: var(--font-display); font-size: 2.6rem; display: block; color: var(--red); }
.stat span { color: var(--slate); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #D8D3C4;
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--red-light); }
.footer-logo { height: 60px; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--slate-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--sand-light);
  padding: 10px 28px 24px;
  gap: 14px;
  font-weight: 700;
}
.mobile-nav.open { display: flex; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Reveal-on-scroll (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Floating chat widget ---------- */
.chat-widget-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(166,58,46,0.4);
  z-index: 300;
  transition: transform 0.2s ease;
}
.chat-widget-btn:hover { transform: scale(1.06); }

.chat-widget-panel {
  position: fixed;
  bottom: 100px;
  right: 26px;
  width: 320px;
  max-width: calc(100vw - 52px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(33,31,28,0.25);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.chat-widget-panel.open { display: block; }
.chat-widget-header {
  background: var(--teal);
  color: var(--white);
  padding: 18px 20px;
}
.chat-widget-header h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight:600; }
.chat-widget-header p { font-size: 0.85rem; color: #C9DBDA; margin-top:2px; }
.chat-widget-body { padding: 18px 20px; }
.chat-widget-body input, .chat-widget-body textarea {
  width:100%; padding:10px 12px; border-radius:8px; border:2px solid #E2DAC5;
  font-family: var(--font-body); font-size:0.9rem; margin-bottom:10px; background:var(--sand-light);
}
.chat-widget-body input:focus, .chat-widget-body textarea:focus { outline:none; border-color:var(--lake-blue); }
.chat-widget-close {
  position: absolute; top: 14px; right: 16px; background:none; border:none;
  color: var(--white); font-size: 1.2rem; cursor:pointer; line-height:1;
}

/* ---------- Proactive greeting bubble ---------- */
.greet-bubble {
  position: fixed;
  bottom: 100px;
  right: 26px;
  width: 300px;
  max-width: calc(100vw - 52px);
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(33,31,28,0.22);
  padding: 18px 40px 18px 18px;
  z-index: 290;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.greet-bubble.show { display: block; }
.greet-bubble.show.in { opacity: 1; transform: translateY(0); }
.greet-bubble-inner { display:flex; gap:12px; align-items:flex-start; cursor:pointer; }
.greet-bubble img { width: 44px; height: 44px; border-radius: 50%; flex-shrink:0; }
.greet-bubble p { font-size: 0.9rem; color: var(--ink); line-height:1.5; }
.greet-bubble-close {
  position:absolute; top:10px; right:12px; background:none; border:none;
  color: var(--slate); font-size:1.1rem; cursor:pointer; line-height:1;
}
.greet-bubble::after {
  content:"";
  position:absolute;
  bottom:-9px;
  right:36px;
  width:18px; height:18px;
  background:var(--white);
  transform:rotate(45deg);
  box-shadow: 4px 4px 8px rgba(33,31,28,0.06);
}
