/* ============================================================
   Judd Hybrid Hub FSE — v5 Design System
   Author: Claude (Anthropic)
   Aesthetic: Editorial maritime — warm paper, deep ocean, refined serif
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --jhh-ink:        #12191f;
  --jhh-ocean:      #1d5068;
  --jhh-ocean-mid:  #2d7a9c;
  --jhh-copper:     #b5682a;
  --jhh-sand:       #e8ddd0;
  --jhh-mist:       #f4f1ec;
  --jhh-warm-white: #faf8f4;
  --jhh-border:     rgba(18, 25, 31, 0.09);
  --jhh-border-mid: rgba(18, 25, 31, 0.15);

  --jhh-shadow-xs:  0 1px 3px rgba(18,25,31,0.06);
  --jhh-shadow-sm:  0 4px 16px rgba(18,25,31,0.07);
  --jhh-shadow-md:  0 12px 40px rgba(18,25,31,0.08);
  --jhh-shadow-lg:  0 24px 64px rgba(18,25,31,0.10);

  --jhh-radius-sm:  8px;
  --jhh-radius:     14px;
  --jhh-radius-lg:  22px;

  --jhh-font-serif: "Playfair Display", "Libre Baskerville", Georgia, serif;
  --jhh-font-sans:  "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --jhh-font-mono:  "DM Mono", "Courier New", monospace;

  --jhh-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ─────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }

/* ── Header ───────────────────────────────────────────────── */
.jhh-site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(250, 248, 244, 0.85);
  border-bottom: 1px solid var(--jhh-border);
  transition: box-shadow var(--jhh-transition);
}
.jhh-site-header:where(:has(+ *:not([hidden]))) {
  box-shadow: var(--jhh-shadow-xs);
}

/* Site title in header */
.jhh-site-header .wp-block-site-title a {
  color: var(--jhh-ink) !important;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.jhh-site-header .wp-block-site-title a:hover {
  color: var(--jhh-ocean) !important;
}

/* Nav links */
.jhh-site-header .wp-block-navigation a {
  color: rgba(18,25,31,0.72);
  text-decoration: none;
  transition: color var(--jhh-transition);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.jhh-site-header .wp-block-navigation a:hover {
  color: var(--jhh-ink);
}

/* ── Typography helpers ───────────────────────────────────── */
.jhh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--jhh-font-mono);
  color: var(--jhh-ocean-mid);
  margin-bottom: 0.15rem;
}
.jhh-kicker::before {
  content: '';
  display: inline-block;
  width: 1.6em;
  height: 1.5px;
  background: var(--jhh-ocean-mid);
  opacity: 0.7;
  flex-shrink: 0;
}

.jhh-muted { color: rgba(18,25,31,0.64); }

.jhh-meta,
.jhh-topic-line,
.jhh-archive-intro {
  color: rgba(18,25,31,0.60);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--jhh-font-mono);
}

/* ── Section headings ─────────────────────────────────────── */
.jhh-page-title,
.jhh-archive-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-family: var(--jhh-font-serif);
}

.jhh-single-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* ── Card system ──────────────────────────────────────────── */
.jhh-info-card,
.jhh-content-card,
.jhh-project-card,
.jhh-about-card,
.jhh-shell {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--jhh-border);
  border-radius: var(--jhh-radius);
  box-shadow: var(--jhh-shadow-sm);
  transition: box-shadow var(--jhh-transition), transform var(--jhh-transition), border-color var(--jhh-transition);
}
.jhh-info-card:hover,
.jhh-content-card:hover,
.jhh-project-card:hover {
  box-shadow: var(--jhh-shadow-md);
  border-color: var(--jhh-border-mid);
  transform: translateY(-2px);
}

/* Card heading accent */
.jhh-info-card h3,
.jhh-project-card h3,
.jhh-content-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  font-family: var(--jhh-font-serif);
  margin-bottom: 0.5rem;
}

/* ── About card — dark treatment ─────────────────────────── */
.jhh-about-card {
  background: linear-gradient(135deg, #12191f 0%, #1d3d52 100%);
  border: none;
  box-shadow: var(--jhh-shadow-lg);
  color: rgba(255,255,255,0.88);
}
.jhh-about-card:hover {
  transform: none;
  box-shadow: var(--jhh-shadow-lg);
}
.jhh-about-card h2,
.jhh-about-card .jhh-page-title { color: #fff; }
.jhh-about-card p { color: rgba(255,255,255,0.72); }
.jhh-about-card .jhh-kicker {
  color: #6fb8d8;
}
.jhh-about-card .jhh-kicker::before {
  background: #6fb8d8;
}
.jhh-about-card .wp-block-button__link {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  transition: background var(--jhh-transition), border-color var(--jhh-transition);
}
.jhh-about-card .wp-block-button__link:hover {
  background: rgba(255,255,255,0.22) !important;
  border-color: rgba(255,255,255,0.45) !important;
}

/* ── Ghost button ─────────────────────────────────────────── */
.jhh-ghost-button .wp-block-button__link {
  background: transparent !important;
  color: var(--jhh-ink) !important;
  border: 1.5px solid var(--jhh-border-mid) !important;
  transition: background var(--jhh-transition), border-color var(--jhh-transition), color var(--jhh-transition);
}
.jhh-ghost-button .wp-block-button__link:hover {
  background: var(--jhh-ink) !important;
  color: #fff !important;
  border-color: var(--jhh-ink) !important;
}

/* ── Section tinted ───────────────────────────────────────── */
.jhh-section-tinted {
  border-top: 1px solid var(--jhh-border);
  border-bottom: 1px solid var(--jhh-border);
  background: rgba(232, 221, 208, 0.20);
}

/* ── Hero ─────────────────────────────────────────────────── */
.jhh-hero-columns {
  align-items: center;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.jhh-hero-photo-column,
.jhh-hero-content-column,
.jhh-hero-copy,
.jhh-hero-side {
  min-width: 0;
}

.jhh-hero-image-wrap { margin: 0; }

.jhh-hero-image {
  display: block;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--jhh-radius-lg);
  box-shadow: var(--jhh-shadow-lg);
  border: 3px solid rgba(255,255,255,0.6);
}

.jhh-hero-title {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 13ch;
  margin-bottom: 1rem;
  text-wrap: balance;
  font-family: var(--jhh-font-serif);
  font-weight: 800;
}

/* Italic "flavor" word in headline */
.jhh-hero-title em {
  font-style: italic;
  color: var(--jhh-ocean);
}

.jhh-hero-title-inline br { display: block; }

.jhh-hero-content-column .jhh-muted,
.jhh-hero-copy .jhh-muted {
  max-width: 36ch;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: rgba(18,25,31,0.62);
}

.jhh-hero-content-column .wp-block-buttons,
.jhh-hero-copy .wp-block-buttons {
  margin-top: 1.5rem;
  gap: 0.65rem;
}

/* Focus panel */
.jhh-hero-panel {
  min-height: 0;
  height: fit-content;
  max-width: 34rem;
  margin-left: 0;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--jhh-border);
  border-radius: var(--jhh-radius);
  box-shadow: var(--jhh-shadow-sm);
  position: relative;
  overflow: hidden;
}
.jhh-hero-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--jhh-ocean) 0%, var(--jhh-ocean-mid) 60%, var(--jhh-copper) 100%);
}

.jhh-focus-list {
  margin: 0.65rem 0 0;
  padding-left: 0;
  list-style: none;
}
.jhh-focus-list li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.3rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--jhh-border);
  color: rgba(18,25,31,0.80);
}
.jhh-focus-list li:last-child { border-bottom: none; }
.jhh-focus-list li::before {
  content: '→';
  color: var(--jhh-ocean-mid);
  font-family: var(--jhh-font-mono);
  font-size: 0.8em;
  flex-shrink: 0;
}

/* ── Single post ──────────────────────────────────────────── */
.jhh-single-shell > .wp-block-post-content > *:first-child { margin-top: 0; }

.jhh-single-shell .wp-block-post-content h2,
.jhh-single-shell .wp-block-post-content h3,
.jhh-single-shell .wp-block-post-content h4 {
  margin-top: 2.5rem;
  letter-spacing: -0.02em;
}

.jhh-single-shell .wp-block-post-content blockquote {
  border-left: 3px solid var(--jhh-ocean);
  padding: 1rem 1.25rem;
  margin-left: 0;
  margin-right: 0;
  background: rgba(29,80,104,0.04);
  border-radius: 0 var(--jhh-radius-sm) var(--jhh-radius-sm) 0;
  color: rgba(18,25,31,0.78);
  font-style: italic;
  font-family: var(--jhh-font-serif);
  font-size: 1.1rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.jhh-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--jhh-border);
  background: rgba(244, 241, 236, 0.6);
}
.jhh-footer .wp-block-site-title a { color: var(--jhh-ink) !important; text-decoration: none; }
.jhh-footer .wp-block-navigation a {
  color: rgba(18,25,31,0.60);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--jhh-transition);
}
.jhh-footer .wp-block-navigation a:hover { color: var(--jhh-ocean); }

/* Copyright / small text in footer */
.jhh-footer .has-small-font-size {
  color: rgba(18,25,31,0.45);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ── Buttons — global polish ──────────────────────────────── */
.wp-block-button__link {
  transition: background var(--jhh-transition), color var(--jhh-transition),
              box-shadow var(--jhh-transition), transform var(--jhh-transition) !important;
  font-family: var(--jhh-font-sans);
}
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(18,25,31,0.14);
}

/* ── Query / post grid ────────────────────────────────────── */
.wp-block-post-template.is-layout-grid {
  column-gap: 1.5rem !important;
  row-gap: 1.5rem !important;
}

/* Post title links in cards */
.jhh-content-card .wp-block-post-title a {
  color: var(--jhh-ink);
  text-decoration: none;
  transition: color var(--jhh-transition);
}
.jhh-content-card .wp-block-post-title a:hover {
  color: var(--jhh-ocean);
}

/* Lesson number / reading time meta */
.jhh-content-card .jhh-meta {
  font-family: var(--jhh-font-mono);
  font-size: 0.78rem;
  color: var(--jhh-ocean-mid);
  letter-spacing: 0.04em;
}

/* Post excerpt */
.jhh-content-card .wp-block-post-excerpt__excerpt {
  font-size: 0.93rem;
  color: rgba(18,25,31,0.65);
  line-height: 1.6;
}

/* ── Hero section wrapper ─────────────────────────────────── */
.jhh-hero-section .jhh-hero-columns {
  max-width: none;
}
.jhh-hero-lead {
  max-width: 36ch;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
}

/* ── Post row (blog/archive list view) ───────────────────── */
.jhh-post-row {
  border-bottom: 1px solid var(--jhh-border);
}
.jhh-post-row:last-child { border-bottom: none; }

.jhh-post-row .wp-block-post-title {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0.25rem 0 0.5rem;
}
.jhh-post-row .wp-block-post-title a {
  color: var(--jhh-ink);
  text-decoration: none;
  transition: color var(--jhh-transition);
}
.jhh-post-row .wp-block-post-title a:hover { color: var(--jhh-ocean); }

.jhh-post-row .wp-block-post-excerpt__excerpt {
  color: rgba(18,25,31,0.65);
  line-height: 1.65;
}

/* ── Pagination ───────────────────────────────────────────── */
.wp-block-query-pagination {
  margin-top: 2rem;
  font-family: var(--jhh-font-mono);
  font-size: 0.88rem;
}
.wp-block-query-pagination-numbers .page-numbers {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--jhh-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--jhh-ink);
  transition: background var(--jhh-transition), border-color var(--jhh-transition);
}
.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-block-query-pagination-numbers .page-numbers.current {
  background: var(--jhh-ink);
  color: #fff;
  border-color: var(--jhh-ink);
}

/* ── Separator / divider ──────────────────────────────────── */
.jhh-divider {
  border: none;
  border-top: 1px solid var(--jhh-border);
  margin: 2rem 0;
}

/* ── Footer expanded ──────────────────────────────────────── */
.jhh-footer-copy {
  color: rgba(18,25,31,0.45);
  line-height: 1.6;
}
.jhh-footer-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.jhh-footer-list li { padding: 0.2rem 0; }
.jhh-footer-list a {
  color: rgba(18,25,31,0.60);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--jhh-transition);
}
.jhh-footer-list a:hover { color: var(--jhh-ocean); }

/* ── Search block ─────────────────────────────────────────── */
.wp-block-search__input {
  border: 1px solid var(--jhh-border-mid);
  border-radius: var(--jhh-radius-sm);
  padding: 0.65rem 1rem;
  font-family: var(--jhh-font-sans);
  font-size: 1rem;
  background: rgba(255,255,255,0.8);
  transition: border-color var(--jhh-transition), box-shadow var(--jhh-transition);
}
.wp-block-search__input:focus {
  outline: none;
  border-color: var(--jhh-ocean);
  box-shadow: 0 0 0 3px rgba(29,80,104,0.12);
}
.wp-block-search__button {
  background: var(--jhh-ink);
  color: #fff;
  border: none;
  border-radius: var(--jhh-radius-sm);
  padding: 0.65rem 1.2rem;
  font-family: var(--jhh-font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--jhh-transition);
}
.wp-block-search__button:hover { background: var(--jhh-ocean); }

/* ── Post navigation links ────────────────────────────────── */
.wp-block-post-navigation-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: rgba(18,25,31,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--jhh-transition);
}
.wp-block-post-navigation-link a:hover { color: var(--jhh-ocean); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1280px) {
  .jhh-hero-columns {
    display: block;
    max-width: 780px;
  }
  .jhh-hero-photo-column,
  .jhh-hero-content-column,
  .jhh-hero-copy,
  .jhh-hero-side {
    width: 100% !important;
    flex-basis: 100% !important;
  }
  .jhh-hero-photo-column { margin-bottom: 2rem; }
  .jhh-hero-image { max-width: 340px; }
  .jhh-hero-title {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    max-width: 16ch;
  }
  .jhh-hero-panel { max-width: 40rem; margin-top: 1.5rem; }
}

@media (max-width: 782px) {
  .jhh-site-header { position: relative; }
  .jhh-hero-columns { max-width: none; }
  .jhh-hero-image { max-width: 100%; }
  .jhh-hero-title {
    font-size: clamp(2rem, 9vw, 3rem);
    max-width: 12ch;
  }
  .jhh-hero-content-column .jhh-muted,
  .jhh-hero-copy .jhh-muted { max-width: none; }
  .jhh-hero-panel { max-width: none; }
  .jhh-kicker::before { display: none; }
}
