/* =============================================================
   The Unknowable Truth — site.css
   Palette sampled from the bathtub-guitar illustration:
     blue   #3376b3   (wall background)
     orange #e98f79   (rubber duck)
     white  #ffffff
     gray   #6b6e74 / #d8dadd / #2f3338
   ============================================================= */

:root {
  --blue:        #3376b3;
  --blue-dark:   #245686;
  --blue-darker: #163e63;
  --blue-light:  #5a96cc;

  --orange:      #e98f79;
  --orange-dark: #c46b54;

  --white:       #ffffff;
  --off-white:   #f6f4ee;

  --gray:        #6b6e74;
  --gray-light:  #d8dadd;
  --gray-x-light:#eceef0;
  --gray-dark:   #2f3338;
  --gray-darker: #1a1c1f;

  --ink:         #1f242c;     /* body text */
  --muted:       #5d636c;

  --page-bg:     #e1e3e6;     /* light gray page background — lets blues pop */

  --max-width:    780px;
  --radius:       10px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.08);
  --shadow-md:    0 6px 24px rgba(0,0,0,.18);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:"Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

/* ---- reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
a:hover { color: var(--orange-dark); }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
  padding: 28px 18px 56px;
}

/* ---- header -------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--orange);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img {
  height: 44px;
  width: auto;
  display: block;
}
.brand:hover { opacity: .85; }

/* nav */
.main-nav {
  display: flex;
}
.main-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 22px;
}
.main-nav a {
  display: inline-block;
  position: relative;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: .01em;
  color: var(--gray-dark);
  text-decoration: none;
  background: transparent;
  transition: color .25s ease;
}
.main-nav a:hover {
  color: var(--orange-dark);
}
.main-nav a.is-active {
  color: var(--blue-dark);
}
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

/* hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-dark);
  padding: 6px 10px;
  border-radius: 6px;
}
.nav-toggle:hover { background: var(--gray-x-light); }

/* ---- content card (the white module on blue) ----------------- */
.content-card {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.content-card .card-body {
  padding: clamp(24px, 4vw, 56px);
}
.content-card .card-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* typography inside cards */
.content-card h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 .25em;
  color: var(--gray-darker);
}
.content-card h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 1.6em 0 .4em;
  color: var(--gray-darker);
}
.content-card h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .95rem;
  color: var(--blue-dark);
  margin: 1.6em 0 .3em;
}
.content-card .subtitle {
  font-family: var(--font-sans);
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.2em;
}
.content-card .meta {
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 1.4em;
}
.content-card p {
  margin: 0 0 1em;
}
.content-card blockquote {
  margin: 1.4em 0;
  padding: .4em 1.2em;
  border-left: 4px solid var(--orange);
  color: var(--gray-dark);
  font-style: italic;
}
.content-card hr {
  border: 0;
  border-top: 1px solid var(--gray-light);
  margin: 2em 0;
}
.content-card .author-note {
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--muted);
  background: var(--off-white);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 2em;
}

/* essay-list (Back Patio / Lexicon) */
.essay-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 22px;
}
.essay-list li {
  border-top: 1px solid var(--gray-light);
  padding-top: 22px;
}
.essay-list li:first-child { border-top: 0; padding-top: 0; }
.essay-list a.essay-link {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  text-decoration: none;
  color: inherit;
}
.essay-list .thumb {
  width: 180px;
  height: 130px;
  border-radius: 8px;
  background: var(--gray-x-light);
  background-size: cover;
  background-position: center;
}
.essay-list h2 {
  margin: 0 0 .15em;
  font-size: 1.4rem;
  color: var(--gray-darker);
}
.essay-list a.essay-link:hover h2 { color: var(--blue-dark); }
.essay-list p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.essay-list .pubdate {
  font-family: var(--font-sans);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--orange-dark);
  margin: 0 0 .3em;
}

/* "feature" hero block on Front Porch */
.feature-hero {
  position: relative;
  background: var(--blue-darker);
}
.feature-hero img {
  width: 100%; height: auto; display: block;
  opacity: .92;
}
.feature-hero .feature-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
  color: var(--white);
}
.feature-hero .feature-overlay .pubdate {
  font-family: var(--font-sans);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--orange);
  margin: 0;
}
.feature-hero .feature-overlay h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  margin: .15em 0 .1em;
  color: var(--white);
}

/* call-to-action button */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--blue-dark);
  color: var(--white);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--orange-dark); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--blue-dark);
  border: 1px solid var(--blue-dark);
}
.btn-ghost:hover { background: var(--blue-dark); color: var(--white); }

/* ---- footer -------------------------------------------------- */
.site-footer {
  background: var(--gray-dark);
  color: var(--gray-light);
  padding: 32px 18px;
  font-family: var(--font-sans);
  font-size: .92rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-footer a {
  color: var(--gray-light);
  text-decoration: none;
}
.site-footer a:hover { color: var(--orange); }
.social-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 6px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-darker);
  transition: background .15s, transform .15s;
}
.social-links a:hover {
  background: var(--orange);
  color: var(--gray-darker);
  transform: translateY(-1px);
}
.social-links svg {
  width: 20px; height: 20px;
  fill: currentColor;
}
.copyright {
  color: var(--gray);
}

/* Footer meta row (copyright + social icons) */
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.copyright a {
  color: var(--gray-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.copyright a:hover { color: var(--orange); }

/* Site map page (the standalone /sitemap.html) */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 1em;
}
.sitemap-section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 .55em;
  color: var(--gray-darker);
  text-transform: none;
  letter-spacing: 0;
}
.sitemap-section h2 a {
  color: inherit;
  text-decoration: none;
}
.sitemap-section h2 a:hover { color: var(--blue-dark); }
.sitemap-section ul {
  list-style: none;
  margin: 0; padding: 0;
}
.sitemap-section li {
  margin-bottom: 8px;
  line-height: 1.4;
}
.sitemap-section li a {
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--blue-dark);
  text-decoration: none;
  display: inline-block;
}
.sitemap-section li a:hover { color: var(--orange-dark); }

/* ---- responsive ---------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 17px; }

  .nav-toggle { display: inline-block; }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    border-bottom: 4px solid var(--orange);
    padding: 8px 10px 14px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 2px;
  }
  .main-nav a {
    display: block;
    padding: 12px 14px;
    text-decoration: none;
    border-radius: 6px;
  }
  .main-nav a:hover {
    background: var(--gray-x-light);
    text-decoration: none;
  }

  .header-inner { position: relative; }

  .essay-list a.essay-link {
    grid-template-columns: 1fr;
  }
  .essay-list .thumb {
    width: 100%;
    height: 180px;
  }

  .footer-inner {
    text-align: center;
  }
  .sitemap-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-meta {
    flex-direction: column;
  }
}

/* =============================================================
   HOME DASHBOARD
   ============================================================= */

/* Stack multiple cards vertically with consistent spacing */
.home-main { padding: 28px 18px 56px; }
.home-main > .content-card + .content-card { margin-top: 28px; }

/* ---- Hero feature (most-recent-article) ---- */
.hero-feature .hero-image {
  display: block;
  background: var(--blue-darker);
  overflow: hidden;
}
.hero-feature .hero-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .6s ease;
}
.hero-feature .hero-image:hover img { transform: scale(1.02); }
.hero-feature h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem);
  margin: 0 0 .15em;
}
.hero-feature h1 a { color: inherit; text-decoration: none; }
.hero-feature h1 a:hover { color: var(--blue-dark); }

/* ---- Section module headers (each section card on home) ---- */
.section-module .section-head {
  margin-bottom: 24px;
}
.section-module .section-head .meta { margin: 0 0 .15em; }
.section-module .section-head h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  margin: 0 0 .15em;
  color: var(--gray-darker);
}
.section-module .section-head .subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

/* ---- Front Porch list — bigger thumbs, excerpt, read-more ---- */
.porch-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 28px;
}
.porch-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  border-top: 1px solid var(--gray-light);
  padding-top: 26px;
}
.porch-card:first-child { border-top: 0; padding-top: 0; }
.porch-card .porch-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-x-light);
  aspect-ratio: 16 / 9;
}
.porch-card .porch-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.porch-card .porch-thumb:hover img { transform: scale(1.03); }

.porch-card .porch-content .pubdate {
  font-family: var(--font-sans);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--orange-dark);
  margin: 0 0 .25em;
}
.porch-card .porch-content h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.55rem;
  margin: 0 0 .2em;
  color: var(--gray-darker);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
}
.porch-card .porch-content h3 a { color: inherit; text-decoration: none; }
.porch-card .porch-content h3 a:hover { color: var(--blue-dark); }
.porch-card .porch-content .card-subtitle {
  font-family: var(--font-sans);
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 .8em;
}
.porch-card .porch-content .excerpt {
  margin: 0 0 .8em;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
}
.porch-card .read-more {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .92rem;
  color: var(--blue-dark);
  text-decoration: none;
}
.porch-card .read-more:hover { color: var(--orange-dark); }

/* ---- Back Patio grid — 3 wide, square tiles, title overlay ---- */
.patio-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.patio-card a {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--blue-darker);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.patio-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.patio-card a::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,0) 75%);
  pointer-events: none;
}
.patio-card h3 {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* ---- Lexicon word cloud ---- */
.lex-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px 22px;
  padding: 18px 8px 28px;
}
.lex-word {
  font-family: var(--font-serif);
  font-weight: 700;
  text-decoration: none;
  color: var(--blue-dark);
  line-height: 1;
  display: inline-block;
  transition: color .15s, transform .15s;
}
.lex-word:hover {
  color: var(--orange-dark);
  transform: translateY(-2px);
}
.lex-word-xl { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); color: var(--blue-darker); }
.lex-word-lg { font-size: clamp(1.5rem, 1rem + 1.2vw, 2rem); }
.lex-word-md { font-size: 1.3rem; color: var(--blue); }
.lex-word-sm { font-size: 1.05rem; color: var(--gray); font-weight: 600; }

/* ---- Explore button at bottom of each section ---- */
/* NB: use .content-card .explore-button so this beats .content-card p {margin:0 0 1em}
   in CSS specificity. Without the .content-card prefix, that selector wins and
   silently zeros out our margin-top. */
.content-card .explore-button {
  text-align: right;
  margin: 32px 0 -20px;  /* gutter-sized breathing room above, pull closer to card edge below */
}

/* ---- Blues promo card (between hero and Front Porch) ---- */
.blues-promo {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: clamp(18px, 3vw, 28px);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blues-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.blues-promo .blues-icon {
  width: clamp(78px, 11vw, 108px);
  height: auto;
  flex: 0 0 auto;
  border-radius: 6px;
  display: block;
}
.blues-promo .blues-text { min-width: 0; }
.blues-promo .blues-prompt {
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin: 0 0 .25em;
}
.blues-promo .blues-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.35rem, 1rem + 1.3vw, 1.85rem);
  margin: 0;
  color: var(--gray-darker);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
  transition: color .15s ease;
}
.blues-promo:hover .blues-title { color: var(--blue-dark); }

/* ---- Snacks grid (image + caption cards, 3-wide) ---- */
.snacks-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.snack-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.snack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.snack-card .snack-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.snack-card .snack-body {
  padding: 16px 20px 22px;
}
.snack-card .pubdate {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin: 0 0 .55em;
}
.snack-card .snack-text {
  font-family: var(--font-serif);
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
/* When the snacks-grid is nested inside another content-card (home page module),
   soften the shadow so the inner cards feel embedded rather than floating. */
.content-card .snacks-grid .snack-card {
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
}
.content-card .snacks-grid .snack-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
}

/* Title card for the standalone snacks page — small intro w/ just the heading */
.snacks-page-heading {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 56px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.snacks-page-heading h1 {
  margin: 0;
}
/* And the grid below: same max-width so it lines up with everything else */
.snacks-page-grid {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Responsive: home dashboard ---- */
@media (max-width: 760px) {
  .blues-promo { flex-direction: column; text-align: center; gap: 14px; }
  .snacks-grid { grid-template-columns: repeat(2, 1fr); }
  .patio-grid { grid-template-columns: repeat(2, 1fr); }
  .explore-button { text-align: center; }
}
@media (max-width: 480px) {
  .patio-grid { grid-template-columns: 1fr; }
  .snacks-grid { grid-template-columns: 1fr; }
}
