/* ==========================================================================
   NestAndNoook - styles.css
   One stylesheet for every page. Sections:
   1. Design tokens   2. Base   3. Buttons & links   4. Header & navigation
   5. Search panel    6. Home hero & sections   7. Cards & grids
   8. Layout & sidebar   9. Advertisement placeholders   10. Inner pages
   11. Article page   12. Forms   13. Footer   14. Modals & cookie banner
   15. Responsive rules
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  --warm-white: #fdfbf7;
  --cream: #f6f0e4;
  --beige: #ebe1cf;
  --taupe: #7d6e5c;
  --taupe-dark: #574c40;
  --sage: #8da38a;
  --sage-dark: #52694e;
  --sage-light: #e5ece0;
  --charcoal: #2c2a27;
  --ochre: #a8803e;
  --border: #e2d8c6;
  --error: #9b2c2c;
  --success: #2f6b3a;

  /* System font stacks: no third-party font requests, so pages load fast. */
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --radius: 4px;
  --shadow: 0 12px 32px rgba(44, 42, 39, 0.14);
}

/* 2. BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--warm-white);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 200;
  padding: 0.6rem 1rem; background: var(--charcoal); color: #fff;
}
.skip-link:focus { top: 0.5rem; }

:focus-visible { outline: 3px solid var(--sage-dark); outline-offset: 2px; }

.section { padding: clamp(2.25rem, 5vw, 3.75rem) 0; }
.section-tight { padding: clamp(1.25rem, 3vw, 2rem) 0; }
.section-cream { background: var(--cream); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; margin-bottom: 1.75rem; padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--charcoal);
}
.section-head h2 { margin: 0; }
.section-intro { max-width: 60ch; margin: -0.75rem 0 1.75rem; color: var(--taupe-dark); }

.eyebrow {
  margin: 0 0 0.5rem; font-size: 0.88rem; font-weight: 700; color: var(--sage-dark);
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.lead { font-size: 1.15rem; color: var(--taupe-dark); max-width: 60ch; }

/* 3. BUTTONS & LINKS ----------------------------------------------------- */
.btn {
  display: inline-block; padding: 0.8rem 1.6rem; border: 1px solid var(--charcoal);
  border-radius: var(--radius); background: var(--charcoal); color: #fff;
  font: 600 0.95rem var(--font-sans); text-decoration: none; text-align: center;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-outline { background: transparent; color: var(--charcoal); }
.btn-outline:hover { color: #fff; }
.btn-sage { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-sage:hover { background: var(--charcoal); border-color: var(--charcoal); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.85rem; }

.link-more { font-weight: 700; color: var(--sage-dark); text-decoration: none; border-bottom: 2px solid var(--sage); }
.link-more:hover { color: var(--charcoal); border-color: var(--charcoal); }

.link-button {
  padding: 0; border: 0; background: none; color: inherit; font: inherit;
  text-decoration: underline; cursor: pointer;
}

/* 4. HEADER & NAVIGATION ------------------------------------------------- */
.topbar { background: var(--charcoal); color: var(--cream); font-size: 0.85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.4rem 0; }
.topbar p { margin: 0; }
.topbar .link-button { color: #fff; font-weight: 600; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--warm-white); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }

.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700;
  text-decoration: none; letter-spacing: -0.02em;
}
.logo-mark { width: 30px; height: 30px; color: var(--sage-dark); }

.primary-nav { flex: 1; display: flex; justify-content: center; }
.primary-nav ul { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  display: block; padding: 0.4rem 0; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-color: var(--sage-dark); }
.nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.icon-button {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.7rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: transparent;
  font: 600 0.9rem var(--font-sans); color: inherit; cursor: pointer;
}
.icon-button:hover { background: var(--cream); }
.icon-button svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

/* Room and topic links under the header. Scrolls sideways on small screens. */
.subnav { border-bottom: 1px solid var(--border); background: var(--cream); }
.subnav ul { display: flex; gap: 1.75rem; margin: 0; padding: 0.6rem 0; list-style: none; overflow-x: auto; white-space: nowrap; }
.subnav a { font-size: 0.92rem; text-decoration: none; color: var(--taupe-dark); }
.subnav a:hover { color: var(--charcoal); text-decoration: underline; }

/* 5. SEARCH PANEL -------------------------------------------------------- */
.search-panel { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(44, 42, 39, 0.6); }
.search-panel.is-open { display: block; }
.search-box {
  width: min(100% - 2rem, 680px); margin: 8vh auto 0; padding: 1.5rem;
  background: var(--warm-white); border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-box-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.search-box-top h2 { margin: 0; font-size: 1.4rem; }
.search-row { display: flex; gap: 0.5rem; }
.search-row input { flex: 1; }
.search-results { margin: 1rem 0 0; padding: 0; list-style: none; }
.search-results li { border-top: 1px solid var(--border); }
.search-results a { display: block; padding: 0.7rem 0.25rem; text-decoration: none; }
.search-results a:hover strong { text-decoration: underline; }
.search-results small { display: block; color: var(--taupe); }
.search-hint { margin: 1rem 0 0; color: var(--taupe); font-size: 0.9rem; }

/* 6. HOME HERO & SECTIONS ------------------------------------------------ */
/* The hero is the one bold moment: a large photograph with the story
   headline set on a card that overlaps the image edge. */
.hero { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.hero-media { grid-column: 1 / span 8; grid-row: 1; display: block; overflow: hidden; background: var(--beige); }
.hero-media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.hero-body {
  grid-column: 7 / -1; grid-row: 1; position: relative; z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--warm-white);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-title { font-size: clamp(1.9rem, 3.4vw, 3rem); margin-bottom: 0.4em; }
.hero-title a { text-decoration: none; }
.hero-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 1rem; font-size: 0.88rem; color: var(--taupe); }

.trending { border-block: 1px solid var(--border); background: var(--cream); }
.trending-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 0.9rem 0; }
.trending-label { margin: 0; font-size: 1.05rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-block; padding: 0.35rem 0.95rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--warm-white); font-size: 0.9rem; text-decoration: none;
}
.chip:hover, .chip.is-active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }

/* Room-by-room tiles */
.room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.room-tile { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: var(--beige); }
.room-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.room-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(44, 42, 39, 0.78), rgba(44, 42, 39, 0) 60%); }
.room-tile:hover img { transform: scale(1.04); }
.room-tile-text { position: absolute; left: 1rem; right: 1rem; bottom: 0.9rem; z-index: 1; }
.room-tile-text h3 { margin: 0; font-size: 1.4rem; }
.room-tile-text p { margin: 0; font-size: 0.88rem; opacity: 0.92; }

/* Split image + text sections */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--cream); }
.split-media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; aspect-ratio: 4 / 3; }
.split-body { padding: clamp(1.75rem, 4vw, 3.5rem); align-self: center; }
.split.reverse .split-media { order: 2; }
.check-list { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 0.35rem 0 0.35rem 1.6rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.8rem; width: 0.9rem; height: 0.5rem; border-left: 2px solid var(--sage-dark); border-bottom: 2px solid var(--sage-dark); transform: rotate(-45deg) scale(0.85); }

/* Colour trend palettes */
.palette-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.palette-card { border: 1px solid var(--border); background: var(--warm-white); }
.swatch-row { display: flex; height: 110px; }
.swatch-row span { flex: 1; }
.palette-body { padding: 1.1rem 1.25rem 1.25rem; }
.palette-body h3 { margin-bottom: 0.3em; }
.palette-body p { margin-bottom: 0.5em; font-size: 0.95rem; }
.palette-codes { color: var(--taupe); font-size: 0.8rem; }

/* Idea cards (furniture, styling, small spaces) */
.idea-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.idea-grid.three { grid-template-columns: repeat(3, 1fr); }
.idea img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--beige); }
.idea h3 { margin: 0.9rem 0 0.35rem; font-size: 1.15rem; }
.idea p { font-size: 0.95rem; color: var(--taupe-dark); }
.section-action { margin-top: 1.75rem; }

.newsletter-band { background: var(--sage-light); text-align: center; }
.newsletter-band .lead { margin-inline: auto; }

/* 7. CARDS & GRIDS ------------------------------------------------------- */
.grid-2, .grid-3 { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card { display: flex; flex-direction: column; }
.card-media { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--beige); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding-top: 1rem; }
.card h3 { margin-bottom: 0.4rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-excerpt { margin-bottom: 0.6rem; color: var(--taupe-dark); font-size: 0.97rem; }

/* Large image cards with the text laid over the photo */
.feature-card { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; color: #fff; text-decoration: none; background: var(--beige); }
.feature-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.feature-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(44, 42, 39, 0.85), rgba(44, 42, 39, 0) 65%); }
.feature-card:hover img { transform: scale(1.03); }
.feature-text { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; z-index: 1; }
.feature-text h3 { margin-bottom: 0.3rem; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.feature-text .eyebrow { color: #dfe9da; }
.feature-text .meta { margin: 0; color: #eee5d6; }

/* Compact list used for "Latest articles" */
.list-item { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item .card-media { aspect-ratio: 3 / 2; }
.list-item h3 { font-size: 1.4rem; }
.list-item h3 a { text-decoration: none; }
.list-item h3 a:hover { text-decoration: underline; }

.empty-state { padding: 2.5rem 1.5rem; border: 1px dashed var(--taupe); background: var(--cream); text-align: center; }
.empty-state h2, .empty-state h3 { font-size: 1.4rem; }

/* 8. LAYOUT & SIDEBAR ---------------------------------------------------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
.sidebar { position: sticky; top: 100px; display: grid; gap: 1.75rem; }
.widget { padding: 1.25rem; border: 1px solid var(--border); background: var(--cream); }
.widget-title { margin-bottom: 0.75rem; font-size: 1.15rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--taupe); }
.category-list { margin: 0; padding: 0; list-style: none; }
.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: 0; }
.category-list a { display: flex; justify-content: space-between; padding: 0.5rem 0; text-decoration: none; }
.category-list a:hover { text-decoration: underline; }
.category-list span { color: var(--taupe); }
.widget p { font-size: 0.95rem; }

/* 9. ADVERTISEMENT PLACEHOLDERS ------------------------------------------ */
/* Leaderboard 728x90 and rectangle 300x250. aspect-ratio keeps the correct
   shape while the box scales down on small screens. */
.ad-slot { margin: 1.25rem auto; text-align: center; }
.ad-label { margin: 0 0 0.25rem; font-size: 0.72rem; color: var(--taupe); }
.ad-box {
  display: flex; align-items: center; justify-content: center; width: 100%; margin: 0 auto;
  background: var(--beige); color: var(--taupe); font-size: 0.78rem;
}
.ad-leaderboard .ad-box { max-width: 728px; aspect-ratio: 728 / 90; }
.ad-rectangle .ad-box { max-width: 300px; aspect-ratio: 300 / 250; }
.ad-primary .ad-box { overflow: hidden; border-radius: 8px; background: #191414; }
.spotify-ad {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  box-sizing: border-box; width: 100%; height: 100%; padding: 0.6rem 1rem;
  color: #fff; text-align: center; text-decoration: none;
}
.spotify-ad-image { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.spotify-ad-copy { display: flex; flex: 1; flex-direction: column; align-items: center; min-width: 0; }
.spotify-ad-brand { margin-bottom: 2px; color: #1db954; font-size: 18px; font-weight: 700; }
.spotify-ad-headline { font-size: 20px; line-height: 1.2; }
.spotify-ad-description { margin-top: 3px; font-size: 13px; opacity: 0.8; }
.spotify-ad-button {
  flex: none; padding: 0.55rem 1.25rem; border-radius: 25px; background: #1db954;
  color: #000; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.spotify-ad:hover .spotify-ad-button { background: #1ed760; }
.ad-rectangle .spotify-ad { flex-direction: column; justify-content: center; gap: 0.5rem; padding: 0.5rem; }
.ad-rectangle .spotify-ad-image { width: 90px; height: 90px; }
.ad-rectangle .spotify-ad-copy { flex: none; }
.ad-secondary .ad-box, .ad-post-sidebar .ad-box { box-sizing: border-box; overflow: hidden; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.zillow-ad {
  display: flex; align-items: center; box-sizing: border-box; width: 100%; height: 100%;
  gap: 0.75rem; padding: 0.5rem 0.625rem; color: #333; text-align: left; text-decoration: none;
}
.zillow-ad-image { flex: none; width: 120px; height: 72px; border-radius: 3px; object-fit: cover; }
.zillow-ad-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; overflow: hidden; }
.zillow-ad-brand { color: #006aff; font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.zillow-ad-description { margin-top: 4px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.zillow-ad-button {
  flex: none; padding: 0.625rem 1.125rem; border-radius: 20px; background: #006aff;
  color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.zillow-ad:hover .zillow-ad-button { background: #0054cc; }
.ad-rectangle .zillow-ad { flex-direction: column; justify-content: center; gap: 0.55rem; padding: 0.75rem; text-align: center; }
.ad-rectangle .zillow-ad-copy { flex: none; align-items: center; }
.ad-third .ad-box { box-sizing: border-box; overflow: hidden; border: 1px solid #ddd; border-radius: 8px; background: #fff; }
.ultahost-ad {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box; width: 100%; height: 100%; gap: 0.5rem; padding: 0.75rem;
  color: #333; text-align: center; text-decoration: none;
}
.ultahost-ad-image { flex: none; width: 90px; height: 58px; border-radius: 4px; object-fit: cover; }
.ultahost-ad-copy { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ultahost-ad-headline { font-size: 20px; line-height: 1.2; }
.ultahost-ad-description { margin-top: 4px; color: #666; font-size: 14px; }
.ultahost-ad-button {
  flex: none; padding: 0.55rem 1.25rem; border-radius: 20px; background: #0056b3;
  color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.ultahost-ad:hover .ultahost-ad-button { background: #00448f; }
.ad-leaderboard .ultahost-ad { flex-direction: row; gap: 0.5rem; padding: 0.4rem; }
.ad-leaderboard .ultahost-ad-image { width: 64px; height: 42px; }
.ad-leaderboard .ultahost-ad-headline { font-size: 14px; }
.ad-leaderboard .ultahost-ad-description { margin-top: 2px; font-size: 10px; }
.ad-leaderboard .ultahost-ad-button { padding: 0.4rem 0.6rem; font-size: 11px; }
.leaderboard-wrap { border-bottom: 1px solid var(--border); }
.leaderboard-wrap .ad-slot { margin: 0.75rem auto; }
.sidebar .ad-slot { margin: 0; }

/* 10. INNER PAGES -------------------------------------------------------- */
.page-hero { padding: clamp(2.25rem, 5vw, 3.75rem) 0; background: var(--cream); border-bottom: 1px solid var(--border); text-align: center; }
.page-hero .lead { margin-inline: auto; margin-bottom: 0; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.88rem; color: var(--taupe); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { margin: 0 0.4rem; }

.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.principle { padding: 1.25rem; border-left: 4px solid var(--sage); background: var(--cream); }
.principle h3 { font-size: 1.1rem; }
.principle p { margin: 0; font-size: 0.95rem; }

.standard-list { display: grid; gap: 1.25rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.standard-list li { padding: 1.25rem 1.5rem; border: 1px solid var(--border); background: var(--warm-white); }
.standard-list h3 { margin-bottom: 0.3em; font-size: 1.2rem; }
.standard-list p { margin: 0; }

.notice { margin: 0 0 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--ochre); background: #f8efdc; font-size: 0.95rem; }
.legal { max-width: 78ch; margin-inline: auto; }
.legal h2 { margin-top: 2em; font-size: 1.55rem; }
.legal h3 { margin-top: 1.5em; font-size: 1.2rem; }
.legal address { margin: 0 0 1rem; font-style: normal; padding: 1rem; background: var(--cream); border-left: 4px solid var(--ochre); }

.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.contact-card { padding: 1.5rem; border: 1px solid var(--border); background: var(--cream); }
.contact-card address { font-style: normal; }
.example-flag { display: inline-block; margin-bottom: 0.4rem; padding: 0.15rem 0.6rem; background: #f8efdc; border: 1px solid var(--ochre); font-size: 0.8rem; font-weight: 700; }

/* 11. ARTICLE PAGE ------------------------------------------------------- */
.post-header { max-width: 860px; margin: 0 auto 1.75rem; text-align: center; }
.post-header h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.post-header .meta { justify-content: center; margin-bottom: 0; }
.post-excerpt { font-size: 1.15rem; color: var(--taupe-dark); }
.post-hero { margin: 0 0 2.5rem; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--beige); }

.prose { max-width: 68ch; }
.prose p, .prose li { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.85; }
.prose h2 { margin-top: 1.8em; font-size: 1.75rem; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--sage-dark); text-underline-offset: 3px; }
.prose blockquote { margin: 2rem 0; padding: 0.5rem 0 0.5rem 1.5rem; border-left: 4px solid var(--sage); font-family: var(--font-serif); font-size: 1.35rem; font-style: italic; line-height: 1.5; }
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--beige); }
.prose figcaption { margin-top: 0.5rem; font-family: var(--font-sans); font-size: 0.85rem; color: var(--taupe); }
.prose .ad-slot { margin: 2rem auto; }

.post-tags { margin: 2rem 0; }
.author-box { display: flex; gap: 1.25rem; align-items: flex-start; margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--border); background: var(--cream); }
.author-avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sage-dark); color: #fff; font: 700 1.3rem var(--font-serif); }
.author-box h3 { margin-bottom: 0.2em; font-size: 1.15rem; }
.author-box p { margin: 0; font-size: 0.95rem; }

/* Blog list page */
.blog-search { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.blog-search input { flex: 1; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.results-status { margin-bottom: 1.5rem; color: var(--taupe-dark); }
.load-more-wrap { margin: 2rem 0; text-align: center; }

/* 12. FORMS -------------------------------------------------------------- */
label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--taupe); border-radius: var(--radius);
  background: #fff; font: inherit; color: inherit;
}
textarea { min-height: 150px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.field { margin-bottom: 1.1rem; }
.field-error { min-height: 1.2em; margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--error); }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.7rem; }
.checkbox-row input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--sage-dark); }
.checkbox-row label { margin: 0; font-weight: 400; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-message { display: none; margin: 1rem 0; padding: 0.8rem 1rem; border-left: 4px solid var(--taupe); background: var(--cream); font-size: 0.95rem; }
.form-message.is-visible { display: block; }
.form-message.success { border-color: var(--success); background: #e8f3ea; }
.form-message.error { border-color: var(--error); background: #f9e7e7; }
.form-note { margin-top: 0.75rem; font-size: 0.82rem; color: var(--taupe); }

/* 13. FOOTER ------------------------------------------------------------- */
.site-footer { margin-top: 3rem; padding: 3rem 0 1.5rem; background: var(--charcoal); color: #e9e1d2; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { margin-bottom: 0.75rem; color: #fff; font-size: 1.05rem; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { color: var(--sage); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer .link-button:hover { text-decoration: underline; }
.site-footer p { font-size: 0.95rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #4d4943; font-size: 0.85rem; color: #bdb3a1; }
.footer-bottom p { margin-bottom: 0.4rem; }

/* 14. MODALS & COOKIE BANNER --------------------------------------------- */
dialog.modal { width: min(100% - 2rem, 480px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: var(--warm-white); color: var(--charcoal); box-shadow: var(--shadow); overflow-y: auto; }
dialog.modal::backdrop { background: rgba(44, 42, 39, 0.6); }
.modal-inner { position: relative; padding: 2rem 1.75rem 1.75rem; }
.modal-inner h2 { padding-right: 2.5rem; font-size: 1.7rem; }
.modal-close { position: absolute; top: 0.5rem; right: 0.5rem; width: 44px; height: 44px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--taupe-dark); }
.modal-close:hover { color: var(--charcoal); }
.option-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.option-row h3 { margin-bottom: 0.2em; font-size: 1.05rem; }
.option-row p { margin: 0; font-size: 0.9rem; color: var(--taupe-dark); }
.option-row input { flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.3rem; accent-color: var(--sage-dark); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

.cookie-banner {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 90; width: min(100% - 2rem, 440px);
  padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--warm-white); box-shadow: var(--shadow);
}
.cookie-banner h2 { margin-bottom: 0.3em; font-size: 1.15rem; }
.cookie-banner p { margin-bottom: 0.8rem; font-size: 0.9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* 15. RESPONSIVE RULES --------------------------------------------------- */
@media (max-width: 1000px) {
  .content-layout { grid-template-columns: 1fr; gap: 2rem; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .sidebar .ad-slot { grid-column: 1 / -1; }
  .idea-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-media { grid-column: 1 / -1; }
  .hero-body { grid-column: 1 / -1; grid-row: 2; margin: -3rem 1rem 0; }
}
@media (max-width: 480px) {
  .ad-leaderboard .spotify-ad { gap: 0.4rem; padding: 0.3rem; }
  .ad-leaderboard .spotify-ad-image { width: 44px; height: 44px; }
  .ad-leaderboard .spotify-ad-brand { font-size: 12px; }
  .ad-leaderboard .spotify-ad-headline { font-size: 13px; }
  .ad-leaderboard .spotify-ad-description { font-size: 9px; }
  .ad-leaderboard .spotify-ad-button { padding: 0.4rem 0.5rem; font-size: 10px; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 0.5rem 1.25rem 1.25rem;
    background: var(--warm-white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .nav-cta { display: block; margin-top: 1rem; }
  .grid-3, .palette-grid, .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .idea-grid.three { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-layout { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .split-media img { min-height: 0; }
  .room-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar p { display: none; }
  .topbar-inner { justify-content: center; }
  .header-subscribe { display: none; }
  .icon-button .btn-label { display: none; }
  .logo { font-size: 1.45rem; }
  .grid-2, .grid-3, .palette-grid, .principle-grid, .idea-grid, .idea-grid.three { grid-template-columns: 1fr; }
  .room-grid { gap: 0.6rem; }
  .room-tile-text h3 { font-size: 1.1rem; }
  .room-tile-text p { display: none; }
  .list-item { grid-template-columns: 110px 1fr; gap: 1rem; }
  .list-item .card-excerpt { display: none; }
  .list-item h3 { font-size: 1.1rem; }
  .hero-body { margin: -2rem 0.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .blog-search { flex-direction: column; }
  .author-box { flex-direction: column; }
  .prose p, .prose li { font-size: 1.05rem; }
  .cookie-banner { left: 0.5rem; bottom: 0.5rem; width: calc(100% - 1rem); padding: 0.9rem; }
  .cookie-actions .btn { flex: 1 1 auto; }
}

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