/* Should We Move to Asheville — a personal guide for John + Lilly */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #1a1a17;
  --ink-soft: #4a4a44;
  --paper: #faf7f0;
  --paper-raised: #ffffff;
  --line: #e4dfd2;
  --accent: #a34a28;
  --accent-soft: #f0dccb;
  --green: #3f5c3a;
  --max-width: 760px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}

a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

img { max-width: 100%; display: block; border-radius: var(--radius); }

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

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 920px;
}
.topnav .brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.topnav .brand:hover { color: var(--accent); }
.topnav .back {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.topnav .back:hover { color: var(--accent); }

/* Hero (landing page) */
.hero {
  padding: 56px 0 40px;
  max-width: 920px;
  margin: 0 auto;
}
.hero .kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero .dek {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 14px;
}
.hero .dek strong { color: var(--ink); }

.hero-photo {
  max-width: 920px;
  margin: 24px auto 0;
}
.hero-photo img {
  width: 100%;
  height: clamp(160px, 32vw, 320px);
  object-fit: cover;
  border-radius: var(--radius);
}

/* Section headers on landing */
.section-head {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-head h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 6px;
}
.section-head p {
  color: var(--ink-soft);
  margin: 0 0 20px;
  max-width: 60ch;
}

/* Neighborhood card grid */
.grid {
  max-width: 920px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.card {
  display: block;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.card .card-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.card .card-tagline {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.card .card-meta {
  margin-top: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}

/* Article (neighborhood page) */
.article-hero {
  padding: 40px 0 8px;
  max-width: 760px;
  margin: 0 auto;
}
.article-hero .kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.article-hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}
.article-hero .tagline {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

article.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}
article.content h3 {
  font-size: 1.25rem;
  margin-top: 2.2em;
  padding-top: 0.2em;
  border-top: 1px solid var(--line);
}
article.content h3:first-of-type { border-top: none; margin-top: 1em; }
article.content p { margin: 0.7em 0; }
article.content p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
}
article.content strong { color: var(--ink); font-weight: 650; }

ul.drive-times {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
ul.drive-times li {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
ul.drive-times li strong { display: block; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }

.our-take-heading { color: var(--accent); }
p.our-take {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 1.02rem;
}

/* Prev/next nav at bottom of article */
.article-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}
.article-nav a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
}
.article-nav a:hover { border-color: var(--accent); }
.article-nav .dir { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 2px; }
.article-nav .next { text-align: right; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 60px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Chat widget */
#chat-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 30px;
  padding: 13px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#chat-launcher:hover { background: var(--accent); }

#chat-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  max-width: 420px;
  height: min(72vh, 620px);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 480px) {
  #chat-panel { right: 20px; bottom: 20px; border-radius: var(--radius); }
}
#chat-panel.open { display: flex; }
#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-family: 'Fraunces', serif;
  font-weight: 600;
}
#chat-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink-soft);
  line-height: 1;
  padding: 4px 8px;
}
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg { font-size: 0.92rem; line-height: 1.5; max-width: 90%; }
.chat-msg.user { align-self: flex-end; background: var(--accent-soft); border-radius: 12px 12px 2px 12px; padding: 8px 12px; }
.chat-msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px 12px 12px 2px; padding: 8px 12px; }
.chat-msg.bot.loading { color: var(--ink-soft); font-style: italic; }
#chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
#chat-input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  resize: none;
}
#chat-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#chat-send {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 20px;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
#chat-send:disabled { opacity: 0.5; cursor: default; }
