/* ==========================================================================
   Seatown Window & Wash — Blog styles

   Loaded after service-page.css and reuses its tokens (navy / cream / gold,
   Playfair + Inter + Caveat) so the Opinly-powered blog reads as the same
   site. Nothing here restyles an existing class.
   ========================================================================== */

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--navy-900);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 0.75rem 0;
}
.skip-link:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Hero variant ---------- */
.blog-hero { padding: 7.5rem 0 3.5rem; }
@media (min-width: 900px) {
  .blog-hero { padding: 9rem 0 4rem; }
  /* Text-only heroes stay a single column so there is no empty half. */
  .blog-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .blog-hero--split .wrap { grid-template-columns: 1.15fr 0.85fr; }
}
.blog-hero:not(.blog-hero--split) .wrap > div { max-width: 52rem; }
.blog-hero h1 {
  text-transform: none;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.12;
}
.blog-hero .lead { font-size: 1.05rem; }
.blog-hero .hero-media { aspect-ratio: 16 / 10; }
.blog-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media--avatar {
  aspect-ratio: 1 / 1;
  max-width: 16rem;
  margin-inline: auto;
  border-radius: 50%;
}

.crumbs { margin: 0 0 1.1rem; font-size: 0.78rem; }
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  color: rgba(244, 237, 224, 0.6);
}
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.crumbs a { color: rgba(244, 237, 224, 0.85); text-decoration: none; }
.crumbs a:hover { color: var(--cream-100); text-decoration: underline; }
.crumbs [aria-current="page"] {
  color: var(--gold);
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: rgba(244, 237, 224, 0.78);
}
.hero-meta .dot { opacity: 0.5; }
.byline { display: inline-flex; align-items: center; gap: 0.45rem; }
.byline a { color: var(--gold); text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.byline-avatar { width: 1.6rem; height: 1.6rem; border-radius: 50%; object-fit: cover; }

/* ---------- Section nav ---------- */
.blog-nav {
  background: var(--navy-900);
  border-top: 1px solid rgba(244, 237, 224, 0.08);
}
.blog-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.blog-nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(244, 237, 224, 0.62);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.blog-nav-link:hover { color: var(--cream-100); }
.blog-nav-link.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.blog-nav-link--feed { margin-left: auto; }

/* ---------- Listing ---------- */
.blog-listing { padding-top: 3.5rem; }
.post-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: var(--cream-50);
  border: 1px solid rgba(26, 50, 68, 0.09);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 18px 40px -34px rgba(19, 39, 54, 0.65);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(19, 39, 54, 0.5); }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.post-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream-200); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-media--empty {
  background: linear-gradient(140deg, var(--navy-800), var(--navy-600));
  position: relative;
}
.post-card-media--empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(201, 184, 151, 0.35) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
}
.post-card-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-400);
}
.post-card-cat { color: var(--gold); font-weight: 700; text-decoration: none; }
.post-card-cat:hover { text-decoration: underline; }
.post-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 0.6rem;
  color: var(--navy-900);
}
.post-card-desc {
  margin: 0 0 1.2rem;
  color: var(--navy-700);
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy-800);
}
.post-card-link:hover .post-card-more svg { transform: translateX(4px); }
.post-card-more svg { transition: transform 0.25s ease; }

.pagination { margin-top: 3rem; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.pagination-status { margin: 0; font-size: 0.85rem; color: var(--navy-400); min-height: 1.2rem; }
.pagination .btn[aria-busy="true"] { opacity: 0.65; pointer-events: none; }
.listing-more { margin-top: 2rem; }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { text-decoration: underline; }

/* ---------- Empty / error state ---------- */
.empty-state {
  margin: 2.5rem auto 0;
  max-width: 34rem;
  text-align: center;
  padding: 3rem 1.75rem;
  background: var(--cream-50);
  border: 1px dashed rgba(26, 50, 68, 0.2);
  border-radius: 1.5rem;
  color: var(--navy-700);
}
.empty-state svg { margin: 0 auto 1rem; color: var(--navy-400); }
.empty-state h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
  color: var(--navy-900);
}
.empty-state p { margin: 0; font-size: 0.97rem; }
.empty-state .btn-row { justify-content: center; }

/* ---------- Post body ---------- */
.post-body { padding: 3.5rem 0 1rem; }
.post-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) {
  .post-layout { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; gap: 3.5rem; }
}

.toc {
  background: var(--cream-50);
  border: 1px solid rgba(26, 50, 68, 0.1);
  border-radius: 1.25rem;
  padding: 1.4rem 1.5rem;
}
@media (min-width: 1000px) { .toc { position: sticky; top: 2rem; } }
.toc-title {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--navy-400);
  margin: 0 0 0.9rem;
  font-family: Inter, sans-serif;
  font-weight: 700;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.toc a { color: var(--navy-700); text-decoration: none; font-size: 0.9rem; line-height: 1.35; }
.toc a:hover { color: var(--navy-900); text-decoration: underline; }
.toc .toc-l3 { padding-left: 0.9rem; font-size: 0.85rem; }
.toc .toc-l4 { padding-left: 1.7rem; font-size: 0.82rem; }
.toc .toc-l5,
.toc .toc-l6 { padding-left: 2.4rem; font-size: 0.8rem; }

.prose { max-width: 44rem; color: var(--navy-800); font-size: 1.04rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.35rem; }
.prose h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.22;
  margin: 2.75rem 0 1rem;
  color: var(--navy-900);
  scroll-margin-top: 2rem;
}
.prose h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  margin: 2.1rem 0 0.75rem;
  color: var(--navy-900);
  scroll-margin-top: 2rem;
}
.prose h4 { font-size: 1.05rem; margin: 1.8rem 0 0.6rem; color: var(--navy-900); }
.prose h5,
.prose h6 {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.6rem 0 0.5rem;
  color: var(--navy-700);
}
.prose a { color: var(--navy-800); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--navy-900); text-decoration-thickness: 2px; }
.prose strong { color: var(--navy-900); }
.prose ul, .prose ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.55rem; }
.prose li::marker { color: var(--gold); }
.prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--gold);
  background: var(--cream-50);
  border-radius: 0 1rem 1rem 0;
  font-size: 1.06rem;
  color: var(--navy-700);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--cream-200);
  padding: 0.15em 0.4em;
  border-radius: 0.35rem;
}
.prose pre {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  background: var(--navy-900);
  color: var(--cream-100);
  border-radius: 1rem;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; font-size: 0.88rem; color: inherit; }
.prose hr { border: 0; border-top: 1px solid rgba(26, 50, 68, 0.15); margin: 2.75rem 0; }
.prose-figure { margin: 2.25rem 0; }
.prose-figure img { width: 100%; border-radius: 1.25rem; box-shadow: 0 22px 45px -32px rgba(19, 39, 54, 0.7); }
.prose-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--navy-400);
  text-align: center;
}
.prose-table { overflow-x: auto; margin: 2rem 0; }
.prose-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose-table th, .prose-table td {
  border: 1px solid rgba(26, 50, 68, 0.14);
  padding: 0.7rem 0.9rem;
  text-align: left;
}
.prose-table th { background: var(--cream-200); font-weight: 600; }

/* ---------- Post footer ---------- */
.post-footer { margin-top: 0; }
.post-back { margin: 2.5rem 0 0; }

/* ---------- Tags + author ---------- */
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
}
.tag-list a { text-decoration: none; }

.author-card {
  margin: 2.5rem 0 0;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.75rem;
  background: var(--cream-50);
  border: 1px solid rgba(26, 50, 68, 0.1);
  border-radius: 1.5rem;
}
.author-card img { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; flex: none; }
.author-card-label {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-400);
  font-weight: 700;
}
.author-card h2 { font-family: "Playfair Display", Georgia, serif; font-size: 1.25rem; margin: 0 0 0.5rem; }
.author-card h2 a { color: var(--navy-900); text-decoration: none; }
.author-card h2 a:hover { text-decoration: underline; }
.author-card p { margin: 0; color: var(--navy-700); font-size: 0.95rem; }

.author-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .author-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .author-grid { grid-template-columns: repeat(3, 1fr); } }
.author-tile {
  background: var(--cream-50);
  border: 1px solid rgba(26, 50, 68, 0.1);
  border-radius: 1.25rem;
  padding: 1.75rem;
  text-align: center;
}
.author-tile img,
.author-tile-initial {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
}
.author-tile-initial {
  background: var(--navy-800);
  color: var(--cream-100);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
}
.author-tile h2 { font-family: "Playfair Display", Georgia, serif; font-size: 1.15rem; margin: 0 0 0.5rem; }
.author-tile h2 a { color: var(--navy-900); text-decoration: none; }
.author-tile h2 a:hover { text-decoration: underline; }
.author-tile p { margin: 0 0 0.6rem; color: var(--navy-700); font-size: 0.92rem; }
.author-tile-count {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-400);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card-more svg, .btn { transition: none; }
  .post-card:hover { transform: none; }
}
