/* Well Plumbed Home — single stylesheet, system fonts, mobile-first. */
:root {
  --navy: #15233b;
  --navy-deep: #0e1828;
  --copper: #8f5428;
  --copper-soft: #c4894a;
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --ink: #1c1917;
  --muted: #5c564e;
  --line: #ddd4c6;
  --white: #fffcf7;
  --danger-ink: #6b3a12;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --wrap: 42rem;
  --wrap-wide: 64rem;
  --space: 1.25rem;
  --radius: 0.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: var(--copper);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.85rem, 3.5vw, 2.5rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.45rem; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
h4 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }

p, ul, ol, figure { margin: 0 0 1.15rem; }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: 0.35rem; }

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

.wrap-wide {
  width: min(100% - 2rem, var(--wrap-wide));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.8rem;
  z-index: 10;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--white);
}

/* Header */
.site-header {
  background: var(--navy-deep);
  color: var(--white);
  border-bottom: 3px solid var(--copper);
}

.header-inner {
  width: min(100% - 2rem, var(--wrap-wide));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.15rem 0;
}

.wordmark {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.15rem;
}

.wordmark:hover { color: inherit; }

.wordmark__name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.wordmark__tag {
  font-size: 0.8rem;
  color: #d8d0c4;
  max-width: 34rem;
  line-height: 1.35;
}

.nav {
  display: flex;
  gap: 1.15rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--copper-soft);
}

/* Footer */
.site-footer {
  margin-top: 3.5rem;
  background: var(--navy-deep);
  color: #d8d0c4;
  padding: 2.5rem 0 2rem;
  border-top: 3px solid var(--copper);
}

.footer-name {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.footer-note,
.footer-copy {
  font-size: 0.9rem;
  max-width: 40rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  margin: 1.15rem 0;
  font-size: 0.9rem;
}

.footer-nav a,
.site-footer a {
  color: #e8c49a;
}

.site-footer a:hover {
  color: var(--white);
}

/* Home */
.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40rem;
}

.section-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  font-family: var(--font-sans);
  font-weight: 650;
  margin: 0 0 1.25rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  gap: 1.15rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.2rem;
  box-shadow: 0 1px 0 rgba(21, 35, 59, 0.04);
}

.post-card h2 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.35rem;
}

.post-card h2 a {
  color: var(--navy);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--copper);
  text-decoration: underline;
}

.post-card .meta {
  color: var(--copper);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.post-card .excerpt {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.post-card .more {
  font-weight: 600;
  text-decoration: none;
}

.post-card .more:hover {
  text-decoration: underline;
}

.home-about {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  margin-bottom: 3rem;
}

.home-about h2 {
  margin-top: 0;
}

/* Posts & pages */
.post,
.page {
  padding-top: 2.25rem;
  padding-bottom: 1rem;
}

.post-header,
.page-header {
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.post-kicker {
  color: var(--copper);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  margin: 0 0 0.6rem;
}

.post-byline {
  color: var(--muted);
  margin: 0.4rem 0 0;
  font-size: 0.98rem;
}

.prose > h1:first-child { display: none; } /* safety if a leftover H1 slips through */

.prose a[rel~="sponsored"] {
  text-decoration-style: dotted;
}

.disclosure {
  background: var(--paper-2);
  border-left: 3px solid var(--copper);
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  color: var(--danger-ink);
}

.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.post-footer p { margin-bottom: 0; }

/* Photo placeholders and real photos */
.post-photo,
.photo-placeholder {
  margin: 1.6rem 0 1.5rem;
}

.post-photo img,
.photo-placeholder__frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  background: var(--paper-2);
}

.photo-placeholder__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px dashed var(--copper);
  background:
    repeating-linear-gradient(
      -45deg,
      var(--paper-2),
      var(--paper-2) 12px,
      #eadfcf 12px,
      #eadfcf 13px
    );
  color: var(--navy);
}

.photo-placeholder__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--copper);
}

.photo-placeholder__desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  max-width: 28rem;
  line-height: 1.4;
}

.post-photo figcaption,
.photo-placeholder figcaption {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Email signup placeholder */
.signup {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.25rem;
  margin: 1.5rem 0 1.6rem;
}

.signup__title {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}

.signup__note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0.9rem;
}

.signup__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 0.3rem;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signup input {
  flex: 1 1 12rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
}

.signup button {
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 0.3rem;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 650;
  opacity: 0.55;
  cursor: not-allowed;
}

/* Contact email placeholder */
.contact-email {
  display: inline-block;
  background: var(--paper-2);
  border: 1px dashed var(--copper);
  color: var(--navy);
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

/* Future ad slot (kept in comments in HTML; this is only used if uncommented) */
.ad-slot {
  min-height: 120px;
  margin: 2rem 0;
  background: var(--paper-2);
  border: 1px dashed var(--line);
}

@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .header-inner { align-items: flex-start; padding: 1rem 0 1.05rem; }
  .wordmark__name { font-size: 1.28rem; }
  .nav { width: 100%; }
}

/* Topics bar */
.topics-bar {
  border-top: 1px solid rgba(255, 252, 247, 0.12);
  padding: 0.55rem 0 0.7rem;
}

.topics-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.05rem;
  font-size: 0.9rem;
}

.topics-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--copper-soft);
}

.topics-nav a {
  color: #f3ece3;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.05rem;
}

.topics-nav a:hover,
.topics-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--copper-soft);
}

/* Breadcrumbs */
.breadcrumb {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  color: var(--muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: #b3aa9e;
}

.breadcrumb a {
  color: var(--copper);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

/* Post hero */
.post-hero {
  margin: 0 0 1.6rem;
}

.post-hero img,
.post-hero__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--paper-2);
}

/* Cards */
.card-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 2.4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card-grid--related {
  margin-bottom: 1.5rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(21, 35, 59, 0.04);
  height: 100%;
}

.post-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--navy);
}

.post-card__media img,
.post-card__img,
.featured-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.post-card__body {
  padding: 1.05rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card .card-cat {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.post-card .card-cat a {
  color: var(--copper);
  text-decoration: none;
}

.post-card .card-cat a:hover {
  text-decoration: underline;
}

.post-card .meta {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.post-card h2 {
  margin: 0.1rem 0 0.45rem;
  font-size: 1.22rem;
}

.post-card h2 a {
  color: var(--navy);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--copper);
  text-decoration: underline;
}

.post-card .excerpt {
  color: var(--muted);
  margin: 0 0 0.8rem;
  flex: 1;
}

.post-card--featured {
  margin-bottom: 2.4rem;
}

@media (min-width: 860px) {
  .post-card--featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .post-card--featured .post-card__media {
    aspect-ratio: auto;
    min-height: 22rem;
    height: 100%;
  }

  .post-card--featured .post-card__body {
    padding: 1.6rem 1.7rem 1.5rem;
    justify-content: center;
  }

  .post-card--featured h2 {
    font-size: 1.7rem;
  }
}

/* Topic pills on the homepage */
.topic-index {
  margin-bottom: 2.2rem;
}

.topic-pills {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.topic-pills a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
}

.topic-pills a:hover {
  border-color: var(--copper);
  color: var(--copper);
}

.topic-count {
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

/* Related + in-article photos */
.related {
  margin-top: 2.75rem;
  padding-top: 0.4rem;
}

.post-photo {
  margin: 1.6rem 0 1.5rem;
}

.post-photo img,
.post-photo__img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
  background: var(--paper-2);
}

.post-kicker a {
  color: var(--copper);
  text-decoration: none;
}

.post-kicker a:hover {
  text-decoration: underline;
}

.page.wrap-wide {
  padding-top: 2.25rem;
  padding-bottom: 1rem;
}
