/* ==========================================================================
   Living in Midway — Base Styles
   Palette derived from DMG brand guidelines (subtle nod, not forward-facing):
   Charcoal #1C323A, Forest Green #04301C, Burgundy #2D1827, Pink #FCD2D2
   Fonts: Fraunces (serif headlines) + Inter (sans body) — free stand-ins for
   DMG's licensed Freight Display Pro / Repro until those licenses are shared.
   ========================================================================== */

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

:root {
  --cream: #FAF7F2;
  --cream-deep: #F2ECE2;
  --charcoal: #1C323A;
  --forest: #0B3D24;
  --forest-deep: #04301C;
  --burgundy: #2D1827;
  --pink: #FCD2D2;
  --white: #FFFFFF;
  --line: rgba(28, 50, 58, 0.12);
  --max-width: 1180px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
}

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

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--forest-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
.logo span { color: var(--forest-deep); font-style: italic; }

nav.main-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

nav.main-nav a {
  color: var(--charcoal);
  font-size: 0.88rem;
  font-weight: 500;
}
nav.main-nav a:hover { color: var(--forest-deep); text-decoration: none; border-bottom: 2px solid var(--forest-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--charcoal);
}

@media (max-width: 900px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 24px; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--forest-deep); color: var(--white); }
.btn-primary:hover { background: var(--charcoal); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--white); }
.btn-burgundy { background: var(--burgundy); color: var(--pink); }
.btn-burgundy:hover { background: var(--charcoal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,50,58,0.05) 0%, rgba(28,50,58,0.75) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 48px 24px; max-width: var(--max-width); margin: 0 auto; width: 100%; }
.hero .eyebrow { color: var(--pink); }
.hero h1 { color: var(--white); max-width: 720px; }
.hero p.lede { max-width: 560px; font-size: 1.1rem; color: var(--cream); }

.page-hero {
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-deep);
}
.page-hero .eyebrow { margin-bottom: 10px; }

/* ---------- Cards / Grid ---------- */
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-alt { background: var(--cream-deep); }

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body .eyebrow { margin-bottom: 8px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: rgba(28,50,58,0.75); font-size: 0.95rem; }
.card-body .read-more { margin-top: auto; font-weight: 600; font-size: 0.88rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head a.view-all { font-weight: 600; font-size: 0.9rem; }

/* ---------- Callout / Lead boxes ---------- */
.callout {
  background: var(--pink);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.callout h3 { margin-bottom: 6px; }
.callout p { color: rgba(28,50,58,0.8); margin-bottom: 16px; }

.callout-dark {
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 34px 36px;
}
.callout-dark h3 { color: var(--white); }
.callout-dark p { color: rgba(250,247,242,0.8); }

/* ---------- Forms (Netlify) ---------- */
form.lead-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}
form.lead-form input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
}
form.lead-form input:focus { outline: 2px solid var(--forest-deep); }
.honeypot { position: absolute; left: -9999px; }

/* ---------- Article ---------- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article-body h2 { margin-top: 1.4em; }
.article-body p { font-size: 1.05rem; color: rgba(28,50,58,0.88); }
.article-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.article-meta .eyebrow { color: var(--burgundy); }

/* ---------- Table (market reports) ---------- */
table.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
table.report-table th, table.report-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
table.report-table th { font-family: 'Fraunces', serif; font-weight: 600; background: var(--cream-deep); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--charcoal);
  color: rgba(250,247,242,0.85);
  padding: 48px 0 28px;
  margin-top: 60px;
}
footer.site-footer .grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 900px) { footer.site-footer .grid { grid-template-columns: 1fr; gap: 32px; } }
footer.site-footer h4 { color: var(--white); font-family: 'Inter', sans-serif; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
footer.site-footer a { color: rgba(250,247,242,0.85); font-size: 0.92rem; display: block; margin-bottom: 8px; }
footer.site-footer a:hover { color: var(--pink); }
footer.site-footer .footer-logo { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--white); margin-bottom: 10px; }
footer.site-footer .dmg-note {
  border-top: 1px solid rgba(250,247,242,0.15);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(250,247,242,0.55);
}

/* Placeholder image flag */
.placeholder-flag {
  display: inline-block;
  background: var(--burgundy);
  color: var(--pink);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}
.media-wrap { position: relative; }
