/* ============================================================
   Countryside Plumbing — design system
   Quiet, editorial, built around the 1979 heritage mark.
   Paper cream + deep navy ink + a single red accent.
   ============================================================ */

:root {
  --paper: #F7F3EB;
  --paper-deep: #EFE8DA;
  --ink: #1A2742;
  --ink-soft: #4B5571;
  --ink-faint: #8B91A5;
  --red: #B5283A;
  --red-deep: #93202F;
  --line: rgba(26, 39, 66, 0.14);
  --line-strong: rgba(26, 39, 66, 0.32);
  --cream-on-ink: #F2EDE1;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  /* Safety net: nothing may widen the page past the screen, or phones zoom the whole site out (large text settings did this). */
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--ink); color: var(--cream-on-ink); }

/* ---------- type ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 110, "SOFT" 40;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.2vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.15; }

p { max-width: 64ch; }

a { color: inherit; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--red);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- layout ---------- */

.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.wrap--narrow { max-width: 860px; }

.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section--hairline { border-top: 1px solid var(--line); }
.section--deep { background: var(--paper-deep); }
.section--ink { background: var(--ink); color: var(--cream-on-ink); }
.section--ink .eyebrow { color: #E0A8B0; }
.section--ink .lede { color: rgba(242, 237, 225, 0.78); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 243, 235, 0.97);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.site-header__logo img { height: 36px; width: auto; }
@media (max-width: 480px) { .site-header__logo img { height: 30px; } }

.site-nav { display: flex; align-items: center; gap: 2rem; }

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.01em;
  position: relative;
  padding: 0.3rem 0;
  white-space: nowrap;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transition: right 0.35s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: pointer;
  max-width: 100%;
  text-align: center;
  text-wrap: balance;
}
.btn:hover { background: var(--ink); color: var(--cream-on-ink); }

.btn--solid { background: var(--ink); color: var(--cream-on-ink); }
.btn--solid:hover { background: var(--red-deep); border-color: var(--red-deep); }

.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }

.btn--ghost-light { border-color: rgba(242, 237, 225, 0.5); color: var(--cream-on-ink); }
.btn--ghost-light:hover { background: var(--cream-on-ink); color: var(--ink); }

.site-header .btn { padding: 0.6rem 1.25rem; font-size: 0.88rem; }

/* mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 80;
  padding: 0.6rem 0.2rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.35s var(--ease), opacity 0.25s, background 0.3s;
}

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-header .btn--header-call { display: none; }
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 5rem var(--pad-x) 2rem;
    gap: 0.4rem;
    overflow-y: auto;
    justify-content: safe center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
    z-index: 70;
  }
  .site-nav.open { opacity: 1; visibility: visible; }
  .site-nav a {
    font-family: var(--serif);
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 500;
    color: var(--cream-on-ink);
    padding: 0.45rem 0;
    white-space: normal;
    max-width: 100%;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  }
  .site-nav.open a { opacity: 1; transform: none; }
  .site-nav.open a:nth-child(1) { transition-delay: 0.06s; }
  .site-nav.open a:nth-child(2) { transition-delay: 0.1s; }
  .site-nav.open a:nth-child(3) { transition-delay: 0.14s; }
  .site-nav.open a:nth-child(4) { transition-delay: 0.18s; }
  .site-nav.open a:nth-child(5) { transition-delay: 0.22s; }
  .site-nav.open a:nth-child(6) { transition-delay: 0.26s; }
  .site-nav.open a:nth-child(7) { transition-delay: 0.3s; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span { background: var(--cream-on-ink); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- hero ---------- */

.hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem); }

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

.hero .lede { margin-top: 1.8rem; max-width: 46ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.6rem; }

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.trust-row > div {
  padding: 1.6rem 1.2rem 0;
  border-right: 1px solid var(--line);
  text-align: center;
}
.trust-row > div:last-child { border-right: none; }
.trust-row strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 560;
  line-height: 1.1;
}
.trust-row span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 21ch;
  margin: 0.4rem auto 0;
  text-wrap: balance;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-row strong { overflow-wrap: break-word; }
  .trust-row > div { border-right: none; border-bottom: 1px solid var(--line); padding: 1.3rem 0.75rem; }
  .trust-row > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .trust-row > div:nth-last-child(-n+2) { border-bottom: none; }
}

/* ---------- service index rows ---------- */

.service-rows { border-top: 1px solid var(--line); }

.service-row {
  display: grid;
  grid-template-columns: 5rem 1fr 1.2fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.8rem, 3.5vw, 2.8rem) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left 0.4s var(--ease);
}

.service-row__num {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-faint);
}

.service-row__title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.service-row__desc { font-size: 0.97rem; color: var(--ink-soft); max-width: 44ch; }

.service-row__arrow {
  width: 3rem; height: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  flex: none;
}
.service-row__arrow svg { width: 1.1rem; transition: transform 0.35s var(--ease); }
/* Hover only where there is a real pointer. On phones a tap leaves :hover stuck,
   so the row stayed indented with a red arrow after the visitor came back. */
@media (hover: hover) {
  .service-row:hover { padding-left: 0.8rem; }
  .service-row:hover .service-row__arrow { background: var(--red); border-color: var(--red); }
  .service-row:hover .service-row__arrow svg { transform: translateX(2px); }
  .service-row:hover .service-row__arrow svg path { stroke: #fff; }
}

@media (max-width: 820px) {
  .service-row { grid-template-columns: minmax(0, 1fr) auto; }
  .service-row__num { display: none; }
  .service-row__desc { grid-column: 1 / -1; }
}

/* ---------- imagery ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.hero-grid h1 { font-size: clamp(2.4rem, 4.8vw, 4.3rem); }
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  filter: saturate(0.9);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-media img { aspect-ratio: 3 / 2; }
}

/* homepage hero: same treatment as the service pages, framed on the subject */
.hero .hero-media img { object-position: 28% center; }

.owner-photo { max-width: 480px; justify-self: end; width: 100%; }
.owner-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  filter: saturate(0.92);
}
@media (max-width: 820px) { .owner-photo { justify-self: start; } }

.about-portrait {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 8px;
  margin-top: 1.8rem;
  filter: saturate(0.95);
}

.post-hero-img { margin-top: 2.4rem; }
.post-hero-img img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 6px;
  filter: saturate(0.85);
}

.post-card__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  filter: saturate(0.85);
}

.service-row--media { grid-template-columns: 5rem 150px 1fr 1.2fr auto; }
.service-row__img {
  width: 150px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  filter: saturate(0.85);
}
@media (max-width: 820px) {
  .service-row--media { grid-template-columns: minmax(0, 1fr) auto; }
  .service-row__img { display: none; }
  /* Title and arrow share the first line, description runs full width under them. */
  .service-row { row-gap: 0.7rem; }
  .service-row__title { grid-column: 1; grid-row: 1; }
  .service-row__arrow { grid-column: 2; grid-row: 1; width: 2.6rem; height: 2.6rem; }
  .service-row__desc { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- split sections ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.split--even { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .split, .split--even { grid-template-columns: 1fr; } }

.sticky-col { position: sticky; top: 7rem; }
@media (max-width: 820px) { .sticky-col { position: static; } }

/* ---------- principle list ---------- */

.principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.principle__num { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 1.05rem; padding-top: 0.2rem; }
.principle h3 { margin-bottom: 0.5rem; }
.principle p { color: var(--ink-soft); font-size: 0.99rem; }

/* ---------- stat band ---------- */

.stat-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stat-band strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-band span { display: block; margin-top: 0.8rem; font-size: 0.9rem; color: rgba(242, 237, 225, 0.72); max-width: 26ch; }
@media (max-width: 720px) {
  .stat-band { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5em), 1fr)); gap: 1.1rem; }
  .stat-band strong { font-size: clamp(1.9rem, 9.5vw, 3rem); }
  .stat-band span { font-size: 0.76rem; line-height: 1.45; margin-top: 0.5rem; }
}

/* ---------- owner / quote ---------- */

.owner-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 480;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: balance;
}
.owner-sig { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; }
.owner-sig img { width: 52px; height: 52px; }
.owner-sig strong { display: block; font-size: 0.98rem; }
.owner-sig span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- towns ---------- */

.town-list {
  columns: 3;
  column-gap: 3rem;
  list-style: none;
  font-size: 1rem;
  line-height: 2.3;
  color: var(--ink-soft);
}
.town-list strong { color: var(--ink); font-weight: 600; }
.town-list a { text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: border-color .3s, color .3s; }
.town-list a:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 720px) { .town-list { columns: 9em 2; column-gap: 2rem; } }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.5rem 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 540;
  line-height: 1.25;
  transition: color 0.3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-faint);
  transition: transform 0.35s var(--ease), color 0.3s;
  flex: none;
}
.faq details[open] summary { color: var(--red-deep); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--red); }
.faq .faq__a { padding: 0 0 1.7rem; color: var(--ink-soft); max-width: 62ch; }
.faq .faq__a p + p { margin-top: 0.8rem; }

/* ---------- CTA band ---------- */

.cta-band { text-align: center; }
.cta-band h2 { max-width: 18ch; margin: 0 auto; }
.cta-band .lede { margin: 1.4rem auto 0; max-width: 44ch; }
.cta-band .hero__cta { justify-content: center; }
.cta-band .phone-big {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 520;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-top: 2rem;
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.2rem;
  transition: color 0.3s;
}
.section--ink .phone-big:hover { color: #E0A8B0; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(242, 237, 225, 0.16);
}
.footer-brand-mini {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--cream-on-ink);
}
.site-footer__brand p { margin-top: 1.2rem; font-size: 0.9rem; color: rgba(242, 237, 225, 0.65); max-width: 30ch; }

.footer-wordmark {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  font-family: "Alfa Slab One", "Cooper Black", Georgia, serif;
  font-weight: 400;
  font-size: clamp(0.9rem, 4.6vw, 4.1rem);
  letter-spacing: 0.03em;
  overflow: hidden;
  text-transform: uppercase;
  color: rgba(242, 237, 225, 0.2);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}
.site-footer h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 237, 225, 0.5);
  margin-bottom: 1.1rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.94rem; }
.site-footer li a:hover { color: #E0A8B0; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: rgba(242, 237, 225, 0.5);
}
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); } }

/* ---------- sticky mobile call bar ---------- */

.call-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  letter-spacing: 0.02em;
  text-wrap: balance;
  box-shadow: 0 -6px 24px rgba(26, 39, 66, 0.18);
}
@media (max-width: 720px) {
  .call-bar { display: block; }
  body { padding-bottom: 3.4rem; }
}

/* ---------- page hero (interior) ---------- */

.page-hero { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 2.2rem;
  letter-spacing: 0.02em;
}
.breadcrumbs a { text-decoration: none; color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs span { margin: 0 0.5rem; }

/* ---------- prose (blog + service body) ---------- */

.prose { max-width: 68ch; }
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 3rem 0 1.1rem;
}
.prose h3 { margin: 2.2rem 0 0.8rem; }
.prose p { margin-bottom: 1.15rem; color: #2A3553; }
.prose ul, .prose ol { margin: 0 0 1.3rem 1.3rem; color: #2A3553; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); }
.prose a { color: var(--red-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a.btn { text-decoration: none; color: var(--ink); }
.prose a.btn:hover { color: var(--cream-on-ink); }
a.btn--red, a.btn--red:visited, .prose a.btn--red, .prose a.btn--red:hover { color: #fff; }
.prose blockquote {
  border-left: 2px solid var(--red);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.8rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.95rem; }
.prose th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--line-strong); padding: 0.6rem 0.8rem 0.6rem 0; }
.prose td { border-bottom: 1px solid var(--line); padding: 0.7rem 0.8rem 0.7rem 0; vertical-align: top; color: #2A3553; }

.callout {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem 1.7rem;
  margin: 2rem 0;
}
.callout p { margin-bottom: 0; }
.callout--cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.callout--cta .callout__text strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 560; display: block; margin-bottom: 0.2rem; }
.callout--cta .callout__text span { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- blog cards ---------- */

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.post-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.8rem 2.2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.35s var(--ease);
}
.post-card:hover { background: var(--paper-deep); }
.post-card__tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.post-card h3 { font-size: 1.3rem; line-height: 1.2; }
.post-card p { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.post-card time { font-size: 0.8rem; color: var(--ink-faint); }
@media (max-width: 980px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

/* homepage: swipeable card row on mobile instead of a tall stack */
@media (max-width: 640px) {
  .post-grid--scroll {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border: none;
    gap: 0.9rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .post-grid--scroll::-webkit-scrollbar { display: none; }
  .post-grid--scroll .post-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    scroll-snap-align: start;
  }
}

.post-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.post-meta .post-card__tag { font-size: 0.7rem; }

/* ---------- forms ---------- */

.form-grid { display: grid; gap: 1.2rem; }
.form-grid label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 0.45rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.6rem 0;
  border-radius: 0;
  transition: border-color 0.3s;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.form-grid .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 640px) { .form-grid .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------- reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- misc ---------- */

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: 0.7rem 1.2rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.nowrap { white-space: nowrap; }
