/*
 * Theme Name:  Michael Guthrie
 * Theme URI:   https://michaelguthrie.com
 * Description: FSE block theme — Editorial Standard design system.
 * Version:     2.0.0
 * Requires at least: 7.0
 * Tested up to:      7.0
 * Requires PHP:      7.4
 * Author:      Michael Guthrie
 * License:     GNU General Public License v2 or later
 * Text Domain: michaelguthrie
 */

@layer reset, tokens, base, blocks, components, utilities;

/* ─── tokens ──────────────────────────────────────────────────────────────── */
@layer tokens {
  :root {
    /* colour aliases → WP preset vars */
    --bg:             var(--wp--preset--color--paper);
    --surface:        var(--wp--preset--color--white);
    --surface-2:      var(--wp--preset--color--surface-2);
    --ink:            var(--wp--preset--color--ink);
    --ink-muted:      var(--wp--preset--color--ink-muted);
    --ink-faint:      var(--wp--preset--color--ink-faint);
    --rule:           var(--wp--preset--color--rule);
    --rule-strong:    var(--wp--preset--color--rule-strong);
    --accent:         var(--wp--preset--color--accent);
    --accent-deep:    var(--wp--preset--color--accent-deep);
    --accent-soft:    var(--wp--preset--color--accent-soft);
    --on-accent:      var(--wp--preset--color--on-accent);

    /* font aliases */
    --font-display:   var(--wp--preset--font-family--serif);
    --font-sans:      var(--wp--preset--font-family--sans);
    --font-mono:      var(--wp--preset--font-family--mono);

    /* radii */
    --r-sm:           var(--wp--custom--radius--sm);
    --r-md:           var(--wp--custom--radius--md);
    --r-lg:           var(--wp--custom--radius--lg);
    --r-pill:         var(--wp--custom--radius--pill);

    /* shadows */
    --shadow-sm:      var(--wp--custom--shadow--sm);
    --shadow-md:      var(--wp--custom--shadow--md);
    --shadow-lg:      var(--wp--custom--shadow--lg);

    /* dark band tokens */
    --dark-bg:        var(--wp--custom--dark--bg);
    --dark-surface:   var(--wp--custom--dark--surface);
    --dark-ink:       var(--wp--custom--dark--ink);
    --dark-ink-muted: var(--wp--custom--dark--ink-muted);
    --dark-rule:      var(--wp--custom--dark--rule);
    --dark-accent:    var(--wp--custom--dark--accent);
  }
}

/* ─── reset ───────────────────────────────────────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  img, video, svg { display: block; max-width: 100%; }
  p, h1, h2, h3, h4, h5, h6 { margin: 0; overflow-wrap: break-word; }
  ul, ol { margin: 0; padding: 0; list-style: none; }
  button { cursor: pointer; border: none; background: none; font: inherit; }
  ::selection { background: var(--accent); color: #fff; }
}

/* ─── base ────────────────────────────────────────────────────────────────── */
@layer base {
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
  }
  h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.02em; line-height: 1.05; }
  h2 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -0.015em; line-height: 1.1; }
  h3 { font-size: clamp(21px, 2.5vw, 27px); letter-spacing: -0.01em; line-height: 1.15; }
  h4 { font-family: var(--font-sans); font-size: 21px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.25; }

  a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
  a:hover { color: var(--accent-deep); }

  p { max-width: 65ch; }
  p + p { margin-top: 1em; }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .lede {
    font-size: 20px;
    line-height: 1.55;
    color: var(--ink-muted);
    max-width: 65ch;
  }
}

/* ─── blocks ──────────────────────────────────────────────────────────────── */
@layer blocks {
  /* Dark band group style */
  .wp-block-group.is-style-dark {
    background: var(--dark-bg);
    color: var(--dark-ink);
    --ink:       var(--dark-ink);
    --ink-muted: var(--dark-ink-muted);
    --rule:      var(--dark-rule);
    --accent:    var(--dark-accent);
  }
  .wp-block-group.is-style-dark h1,
  .wp-block-group.is-style-dark h2,
  .wp-block-group.is-style-dark h3 { color: var(--dark-ink); }
  .wp-block-group.is-style-dark p   { color: var(--dark-ink-muted); }
  .wp-block-group.is-style-dark a   { color: var(--dark-accent); }
  .wp-block-group.is-style-dark .eyebrow { color: var(--dark-accent); }
  .wp-block-group.is-style-dark hr,
  .wp-block-group.is-style-dark .wp-block-separator { border-color: var(--dark-rule); }

  /* Card group style */
  .wp-block-group.is-style-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .wp-block-group.is-style-card:hover { box-shadow: var(--shadow-md); }

  /* Separator */
  .wp-block-separator { border: none; border-top: 1px solid var(--rule); }

  /* Quote */
  .wp-block-quote {
    border-left: 3px solid var(--accent);
    margin: 0;
    padding-left: 1.25em;
  }
  .wp-block-quote p { font-family: var(--font-display); font-size: 20px; line-height: 1.5; font-style: italic; }
  .wp-block-quote cite { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

  /* Gallery — native lightbox + columns always flex */
  .wp-block-gallery.has-nested-images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--style--unstable-gallery-gap, 16px);
    align-items: flex-start;
  }
}

/* ─── components ──────────────────────────────────────────────────────────── */
@layer components {
  /* ── site header ─────────────────────────────────────────────────────────── */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .site-header.is-scrolled {
    border-color: var(--rule);
    box-shadow: var(--shadow-sm);
  }

  .site-header__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .site-logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
  }
  .site-logo:hover { color: var(--ink); }

  .nav-primary {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .nav-primary a {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.15s;
  }
  .nav-primary a:hover { color: var(--ink); }
  .nav-primary a.btn-cta {
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--r-sm);
    transition: background 0.15s;
  }
  .nav-primary a.btn-cta:hover { background: var(--accent-deep); color: var(--on-accent); }

  .nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--ink);
  }
  .nav-toggle:hover { background: var(--surface-2); }
  .nav-toggle svg { pointer-events: none; }

  .mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--rule);
    padding: 16px 24px 24px;
  }
  .mobile-nav a {
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    display: block;
  }
  .mobile-nav a:last-child { border-bottom: none; }

  @media (max-width: 720px) {
    .nav-primary { display: none; }
    .nav-toggle  { display: flex; }
    .mobile-nav[data-open="true"] { display: flex; }
  }

  /* ── site footer ──────────────────────────────────────────────────────────── */
  .site-footer {
    border-top: 1px solid var(--rule);
    padding: 48px 24px;
  }
  .site-footer__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .site-footer__copy {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
  }
  .site-footer__links {
    display: flex;
    gap: 20px;
  }
  .site-footer__links a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    text-decoration: none;
  }
  .site-footer__links a:hover { color: var(--accent); }

  /* ── marquee ──────────────────────────────────────────────────────────────── */
  .marquee-track {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
  }
  .marquee-inner {
    display: inline-flex;
    gap: 48px;
    animation: marquee-scroll 42s linear infinite;
  }
  .marquee-inner span {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    flex-shrink: 0;
  }
  @keyframes marquee-scroll { to { transform: translateX(-50%); } }

  /* ── pill / track filter ─────────────────────────────────────────────────── */
  .pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    border: 1px solid var(--rule-strong);
    color: var(--ink-muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .pill[aria-pressed="true"],
  .pill.is-active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
  }

  /* ── stat / metric block ─────────────────────────────────────────────────── */
  .stat-block { display: flex; flex-direction: column; gap: 4px; }
  .stat-block__number {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
  }
  .stat-block__label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }

  /* ── buttons (non-block-editor contexts) ─────────────────────────────────── */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    border: none;
  }
  .btn-primary {
    background: var(--accent);
    color: var(--on-accent);
  }
  .btn-primary:hover { background: var(--accent-deep); color: var(--on-accent); }
  .btn-primary:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

  .btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
    padding: 10px 19px;
  }
  .btn-ghost:hover { background: var(--ink); color: var(--bg); }
  .btn-ghost:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

  /* Dark band button overrides */
  .is-style-dark .btn-ghost {
    color: var(--dark-ink);
    border-color: var(--dark-ink);
  }
  .is-style-dark .btn-ghost:hover { background: var(--dark-ink); color: var(--dark-bg); }

  /* ── case / work card accent stripe ─────────────────────────────────────── */
  .work-card {
    position: relative;
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
    transition: box-shadow 0.2s;
  }
  .work-card:hover { box-shadow: var(--shadow-md); }
  .work-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
  }
  .work-card__no {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
  }

  /* ── sticky CTA ──────────────────────────────────────────────────────────── */
  .sticky-cta {
    position: sticky;
    bottom: 24px;
    z-index: 50;
    display: flex;
    justify-content: center;
    pointer-events: none;
  }
  .sticky-cta > * { pointer-events: auto; box-shadow: var(--shadow-lg); }

  /* ── scroll reveal ───────────────────────────────────────────────────────── */
  @supports (animation-timeline: view()) {
    [data-reveal] {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    @keyframes reveal-in {
      from { opacity: 0; translate: 0 18px; }
      to   { opacity: 1; translate: none;   }
    }
    @media (prefers-reduced-motion: reduce) {
      [data-reveal] { animation: none; }
    }
  }

  /* IO fallback — controlled by nav.js adding .is-visible */
  @supports not (animation-timeline: view()) {
    [data-reveal] {
      opacity: 0;
      translate: 0 18px;
      transition: opacity 0.6s ease, translate 0.6s ease;
    }
    [data-reveal].is-visible { opacity: 1; translate: none; }
    @media (prefers-reduced-motion: reduce) {
      [data-reveal] { opacity: 1; translate: none; transition: none; }
    }
  }
}

/* ─── P1 home components ──────────────────────────────────────────────────── */
@layer components {
  /* ghost button block style */
  .wp-block-button.is-style-ghost .wp-block-button__link {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
    box-shadow: none;
  }
  .wp-block-button.is-style-ghost .wp-block-button__link:hover {
    background: var(--ink);
    color: var(--bg);
  }
  .is-style-dark .wp-block-button.is-style-ghost .wp-block-button__link {
    color: var(--dark-ink);
    border-color: var(--dark-ink);
  }
  .is-style-dark .wp-block-button.is-style-ghost .wp-block-button__link:hover {
    background: var(--dark-ink);
    color: var(--dark-bg);
  }

  /* availability badge */
  .availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-faint);
    max-width: none;
  }
  .avail-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3DB85C;
    animation: avail-pulse 2.4s ease-in-out infinite;
  }
  @keyframes avail-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
  }

  /* hero portrait + dark stat card overlay */
  .hero-portrait-wrap { position: relative; }
  .hero-portrait img, .about-portrait-img  { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center top; }
  .hero-portrait-img[src=""], .about-portrait-img[src=""] { background: var(--rule); min-height: 320px; display: block; }
  .hero-stat-card {
    position: absolute;
    bottom: 20px;
    right: -16px;
    min-width: 156px;
    background: var(--dark-bg);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
  }
  .hero-stat-card p { color: var(--dark-ink); }
  @media (max-width: 960px) { .hero-stat-card { right: 0; } }

  /* stats strip top border */
  .stats-strip { border-top: 1px solid var(--rule); }

  /* credibility strip */
  .credibility-strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .credibility-cols  { gap: 0 !important; }
  .credibility-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px !important;
    border-right: 1px solid var(--rule);
  }
  .credibility-col:last-child { border-right: none; }
  .credibility-name {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--ink-faint) !important;
    text-align: center;
    max-width: none !important;
    margin: 0 !important;
  }
  @media (max-width: 720px) {
    .credibility-col { border-right: none; border-bottom: 1px solid var(--rule); }
    .credibility-col:last-child { border-bottom: none; }
  }

  /* service card */
  .service-card {
    position: relative;
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: box-shadow 0.2s;
    overflow: hidden;
    height: 100%;
  }
  .service-card:hover  { box-shadow: var(--shadow-md); }
  .service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
  }
  .service-card__no {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--ink-faint) !important;
    max-width: none !important;
    margin-bottom: 12px !important;
  }

  /* tech stack tags */
  .stack-tag-group { display: flex; flex-direction: column; gap: 8px; }
  .stack-tag-group__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0;
  }
  .stack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .stack-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    border: 1px solid var(--rule-strong);
    color: var(--ink-muted);
    background: var(--surface);
    white-space: nowrap;
  }

  /* process steps — dark band */
  .process-step {
    padding-top: 28px;
    border-top: 1px solid var(--dark-rule);
  }
  .process-step__no {
    font-family: var(--font-mono) !important;
    font-size: 10px !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--dark-accent) !important;
    max-width: none !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
  }

  /* contact info list — dark CTA */
  .contact-info-list { display: flex; flex-direction: column; gap: 20px; }
  .contact-info-item { display: flex; flex-direction: column; gap: 2px; }
  .contact-info-item__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dark-ink-muted);
    margin: 0;
  }
  .contact-info-item__value {
    font-size: 15px;
    color: var(--dark-ink);
    margin: 0;
    max-width: none;
  }
  .contact-info-item__value a { color: var(--dark-accent); text-decoration: none; }
  .contact-info-item__value a:hover { text-decoration: underline; }
}

/* ─── P2 marketing page components ───────────────────────────────────────── */
@layer components {
  /* Contact form */
  .contact-form-wrap { max-width: 560px; }
  .contact-form .form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
  .contact-form label { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 15px;
    line-height: 1.5; transition: border-color 0.15s;
  }
  .contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wp--preset--color--accent-soft); }
  .contact-form textarea { resize: vertical; min-height: 160px; }
  .contact-form .btn.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 20px; background: var(--accent); color: #fff;
    font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1;
    border: none; border-radius: var(--r-sm); cursor: pointer; transition: background 0.15s;
  }
  .contact-form .btn.btn-primary:hover { background: var(--wp--preset--color--accent-deep); }
  .contact-form__success { padding: 16px 20px; background: #EDF7EE; border-left: 3px solid #3DB85C; border-radius: var(--r-sm); font-size: 15px; }
  .contact-form__error   { padding: 16px 20px; background: #FEF2F2; border-left: 3px solid #EF4444; border-radius: var(--r-sm); font-size: 15px; margin-bottom: 20px; }

  /* Service deliverables list */
  .service-deliverables { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
  .service-deliverables li { padding-left: 20px; position: relative; font-size: 14px; color: var(--ink-muted); }
  .service-deliverables li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

  /* About values list */
  .about-values-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 28px; }
  .about-value-item { display: flex; gap: 24px; align-items: flex-start; }
  .about-value-no { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--custom--dark--ink-muted); flex-shrink: 0; padding-top: 3px; }
  .about-value-item div { color: var(--wp--custom--dark--ink); line-height: 1.65; }
  .about-value-item strong { color: var(--wp--custom--dark--ink); }

  /* Conversion landing */
  .conv-benefit { max-width: 280px; }
  .conv-benefit__icon { font-family: var(--font-mono); font-size: 18px; color: var(--accent); }
}

/* ─── P3 work + blog components ──────────────────────────────────────────── */
@layer components {
  /* hidden state for Interactivity API filter */
  .is-hidden { display: none !important; }

  /* work filter block wrapper */
  .work-filter-block { display: flex; flex-direction: column; gap: 40px; }

  .work-filter__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* pill small variant (track labels on cards) */
  .pill--sm {
    padding: 2px 8px;
    font-size: 10px;
  }

  /* work card grid */
  .work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }

  /* work card (archive grid) */
  .work-card-full {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
    transition: box-shadow 0.2s;
  }
  .work-card-full:hover { box-shadow: var(--shadow-md); }

  .work-card-full__thumb-link { display: block; flex-shrink: 0; }
  .work-card-full__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
  }
  .work-card-full__thumb--empty {
    background: var(--rule);
    position: relative;
  }
  .work-card-full__thumb--empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--rule) 100%);
  }

  .work-card-full__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    flex: 1;
  }
  .work-card-full__tracks { display: flex; flex-wrap: wrap; gap: 6px; }
  .work-card-full__title {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
  }
  .work-card-full__title a { color: var(--ink); text-decoration: none; }
  .work-card-full__title a:hover { color: var(--accent); }
  .work-card-full__excerpt {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
  }
  .work-card-full__cta {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.01em;
    margin-top: auto;
  }
  .work-card-full__cta:hover { color: var(--accent-deep); }

  /* journal post list */
  .journal-card {
    border-bottom: 1px solid var(--rule);
  }
  .journal-card:first-child { border-top: 1px solid var(--rule); }

  .journal-card__date {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.10em !important;
    text-transform: uppercase;
    color: var(--ink-faint) !important;
    display: block;
  }
  .journal-card__title { line-height: 1.2 !important; }
  .journal-card__title a { color: var(--ink); text-decoration: none; }
  .journal-card__title a:hover { color: var(--accent); }
  .journal-card__excerpt { color: var(--ink-muted); font-size: 15px; }
  .journal-card__excerpt .wp-block-post-excerpt__more-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
  }

  /* journal pagination */
  .journal-pagination .wp-block-query-pagination-numbers a,
  .journal-pagination .wp-block-query-pagination-previous a,
  .journal-pagination .wp-block-query-pagination-next a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    border: 1px solid var(--rule);
    transition: background 0.15s, color 0.15s;
  }
  .journal-pagination .wp-block-query-pagination-numbers a:hover,
  .journal-pagination .wp-block-query-pagination-previous a:hover,
  .journal-pagination .wp-block-query-pagination-next a:hover {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
  }

  /* single post: post-terms used as eyebrow */
  .wp-block-post-terms.eyebrow a { color: inherit; text-decoration: none; }
  .wp-block-post-terms.eyebrow a:hover { text-decoration: underline; }
}

/* ─── P4 gallery + block styles ──────────────────────────────────────────── */
@layer components {
  /* gallery-lead-thumbs: ensure thumbs flex-row and share equal width */
  .gallery-thumbs { display: flex; flex-wrap: nowrap; gap: 16px; }
  .gallery-thumb  { flex: 1; min-width: 0; }
  .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .gallery-lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* quote — highlight style: filled accent-soft background */
  .wp-block-quote.is-style-highlight {
    background: var(--accent-soft);
    border-left: none;
    border-radius: var(--r-md);
    padding: 24px 28px;
  }
  .wp-block-quote.is-style-highlight p { color: var(--accent-deep); }

  /* list — checked: swap bullets for ✓ */
  .wp-block-list.is-style-checked { list-style: none; padding-left: 0; }
  .wp-block-list.is-style-checked li { padding-left: 24px; position: relative; }
  .wp-block-list.is-style-checked li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
  }

  /* table — striped: alternating row tint */
  .wp-block-table.is-style-striped tbody tr:nth-child(even) td { background: var(--surface-2); }
  .wp-block-table.is-style-striped th { background: var(--accent-soft); color: var(--accent-deep); }
  .wp-block-table.is-style-striped td,
  .wp-block-table.is-style-striped th { padding: 10px 14px; border: 1px solid var(--rule); }

  /* heading — ruled-below: accent underline beneath */
  .wp-block-heading.is-style-ruled-below {
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: block;
  }
}

/* ─── utilities ───────────────────────────────────────────────────────────── */
@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  .text-mono   { font-family: var(--font-mono); }
  .text-serif  { font-family: var(--font-display); }
  .text-accent { color: var(--accent); }
  .text-muted  { color: var(--ink-muted); }
  .text-faint  { color: var(--ink-faint); }
}
