/*
Theme Name: Przemek Wrzesiński
Theme URI: https://przemekwrzesinski.com
Author: Przemek Wrzesiński
Author URI: https://przemekwrzesinski.com
Description: Monochrome / Acid — an editorial high-contrast block theme for a Warsaw-based photographer, filmmaker and data visualizer. Pure white inverting to near-black via a front-end light/dark toggle, one restrained acid-lime accent, Archivo throughout.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: przemek-wrzesinski
*/

/* ============================================================
   THEME TOKENS (from design-1.html — exact values)
   ============================================================ */
:root {
  --bg: #ffffff;
  --fg: #0c0c0c;
  --muted: #6b6b6b;
  --hairline: rgba(12, 12, 12, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --on-lime: #0c0c0c;
  --acid: #c2f23a;
  --acid-deep: #a9d72e;
}

[data-theme="dark"] {
  --bg: #0c0c0c;
  --fg: #f4f4f4;
  --muted: #9a9a9a;
  --hairline: rgba(244, 244, 244, 0.16);
  --glass: rgba(12, 12, 12, 0.66);
  --on-lime: #0c0c0c;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

.wp-site-blocks > footer {
  margin-block-start: 0;
}

a { color: var(--fg); }

/* ============================================================
   HEADER / STICKY NAV — glass blur + scroll hairline
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.site-nav.scrolled {
  border-bottom-color: var(--hairline);
}

.site-nav .nav-inner {
  min-height: 76px;
}

/* Align header content with the hero on wide screens:
   brand name lines up with "Image"; right cluster ends near the
   end of "the data." instead of the far wide edge. */
@media (min-width: 1280px) {
  .site-nav .nav-inner {
    padding-right: 6.75rem;
  }
}

.brand {
  margin: 0;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

/* Brand is a home link (dot + name). */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--fg);
}

/* Homepage contact CTA button (lime). */
.pgm-cta-button .wp-block-button__link {
  background: var(--acid);
  color: var(--on-lime);
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1.05rem 1.8rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.pgm-cta-button .wp-block-button__link:hover,
.pgm-cta-button .wp-block-button__link:focus-visible {
  background: var(--acid-deep);
  color: var(--on-lime);
  transform: translateY(-2px);
}

/* Lime slashes in the footer "Image / Motion / Data" line. */
.site-footer .lime-slash {
  color: var(--acid);
  font-weight: 700;
}

.brand-dot {
  width: 9px;
  height: 9px;
  background: var(--acid);
  display: inline-block;
  border-radius: 50%;
  flex: none;
}

.site-nav .wp-block-navigation {
  gap: 1.9rem;
}

.site-nav .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 2px 0;
  transition: color 0.2s ease;
}

.site-nav .wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.site-nav .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.site-nav .wp-block-navigation .wp-block-navigation-item__content:focus-visible::after {
  transform: scaleX(1);
}

/* Theme toggle — minimal monochrome pill */
.theme-toggle .wp-block-button__link,
.theme-toggle a,
button.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle .wp-block-button__link:hover,
button.theme-toggle:hover {
  border-color: var(--fg);
  background: transparent;
  color: var(--fg);
}

.theme-toggle .glyph {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: inset -3px -3px 0 0 var(--bg);
  flex: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .theme-toggle .glyph {
  background: var(--acid);
  box-shadow: none;
}

.theme-label-light { display: inline; }
.theme-label-dark { display: none; }
[data-theme="dark"] .theme-label-light { display: none; }
[data-theme="dark"] .theme-label-dark { display: inline; }

/* ============================================================
   HERO — exact reproduction of preview
   ============================================================ */
.hero {
  min-height: calc(100vh - 76px);
  position: relative;
}

.hero::before {
  content: "PW";
  position: absolute;
  top: 8%;
  right: -2%;
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 20rem);
  line-height: 1;
  color: var(--fg);
  opacity: 0.03;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero > .wp-block-group {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.2rem;
}

.hero-meta .mark {
  width: 26px;
  height: 2px;
  background: var(--acid);
  display: inline-block;
}

.hero-meta .sep {
  color: var(--acid);
  font-weight: 900;
  font-size: 1.25em;
  line-height: 1;
  margin: 0 -0.3rem;
}

.hero-headline {
  margin: 0;
  font-weight: 900;
  font-size: clamp(3.2rem, 11.5vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  max-width: 14ch;
}

.hero-headline .line { display: block; }
.hero-headline .indent { margin-left: 1.6em; }

.hero-headline em {
  font-style: normal;
  position: relative;
}

.hero-headline em::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  bottom: 0.08em;
  height: 0.14em;
  background: var(--acid);
  z-index: -1;
}

.hero-lower {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  margin-left: 1.6em;
}

.hero-tagline {
  margin: 0;
  max-width: 52ch;
  position: relative;
  padding-left: 1.4rem;
  border-left: 2px solid var(--acid);
}

.hero-tagline strong {
  display: block;
  color: var(--fg);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.hero-tagline .body {
  display: block;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ============================================================
   SECTION SCAFFOLDING
   ============================================================ */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.section-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--acid);
  display: inline-block;
  flex: none;
}

.section-index {
  color: var(--acid-deep);
  font-weight: 900;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

[data-theme="dark"] .section-index { color: var(--acid); }

.section-heading {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
}

.hairline-top {
  border-top: 1px solid var(--hairline);
}

/* ============================================================
   WORK / PHOTOGRAPHY GRID — placeholder tiles
   ============================================================ */
.work-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  background: transparent;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.work-tile:hover {
  border-color: var(--fg);
}

.work-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 11px, var(--hairline) 11px, var(--hairline) 12px);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.work-frame .corner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 10px;
  height: 10px;
  background: var(--acid);
}

.work-frame .frame-no {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.2rem 0.2rem;
}

.work-title {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.2;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
  text-wrap: balance;
}

.work-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Video / motion — wide thumbnail with runtime */
.film-frame {
  aspect-ratio: 16 / 9;
}

/* ============================================================
   IMAGE-READY FRAMES — core/cover as the work / film thumbnail
   The cover block carries the .work-frame class. With no media set
   it shows the on-brand diagonal-hairline placeholder; once the
   owner sets a cover image it fills the frame via object-fit cover.
   Overlay elements (corner, frame-no, runtime-chip, play cue) stay
   pinned over either state, with a scrim for legibility on photos.
   ============================================================ */
.work-frame.wp-block-cover {
  /* Reset cover defaults; keep our editorial frame proportions. */
  min-height: 0;
  aspect-ratio: 4 / 5;
  padding: 1rem;
  align-items: flex-end;
  justify-content: flex-start;
  border-radius: 0;
  overflow: hidden;
}

.work-frame.film-frame.wp-block-cover {
  aspect-ratio: 16 / 9;
}

/* Empty state: hide the solid cover overlay span so the diagonal
   hairline placeholder (from .work-frame) reads as intentional. */
.work-frame.wp-block-cover > .wp-block-cover__background {
  display: none;
}

/* Uploaded image fills the frame. */
.work-frame.wp-block-cover img.wp-block-cover__image-background,
.work-frame.wp-block-cover video.wp-block-cover__video-background {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* When a real image is present, re-show the overlay span as a subtle
   bottom scrim so the corner / frame-no / runtime chip stay legible. */
.work-frame.wp-block-cover:has(img.wp-block-cover__image-background) > .wp-block-cover__background,
.work-frame.wp-block-cover:has(video.wp-block-cover__video-background) > .wp-block-cover__background {
  display: block;
  background: linear-gradient(to top, rgba(12, 12, 12, 0.55), rgba(12, 12, 12, 0) 55%) !important;
  opacity: 1 !important;
}

/* Inner container holds the overlay elements; span them to the frame. */
.work-frame.wp-block-cover > .wp-block-cover__inner-container {
  position: static;
  width: 100%;
  z-index: 2;
}

/* Re-pin overlay accents to the frame corners regardless of cover flow. */
.work-frame.wp-block-cover .corner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
}

.work-frame.wp-block-cover .frame-no {
  position: relative;
  z-index: 3;
}

.work-frame.wp-block-cover:has(img.wp-block-cover__image-background) .frame-no {
  color: #f4f4f4;
}

.work-frame.wp-block-cover .runtime-chip {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 3;
}

/* CSS play-triangle cue — marks a film tile as video even before a
   thumbnail is added. Centred, monochrome, lime fill. */
.work-frame .play-cue {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-frame .play-cue::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 13px solid var(--acid);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}

.work-frame.wp-block-cover:has(img.wp-block-cover__image-background) .play-cue {
  background: rgba(12, 12, 12, 0.4);
  border-color: rgba(244, 244, 244, 0.4);
}

.runtime {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.runtime::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid var(--acid);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* ============================================================
   DATA & VIZ — case rows with lime key figures
   ============================================================ */
.case-row {
  border-top: 1px solid var(--hairline);
  padding-top: 2.4rem;
}

.case-figure {
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--acid-deep);
  margin: 0;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.case-figure .unit {
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
}

[data-theme="dark"] .case-figure { color: var(--acid); }

.case-figure .unit {
  font-size: 0.32em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: block;
  margin-top: 0.6rem;
}

.case-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.case-title {
  font-weight: 900;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  /* Never split words mid-character; balance lines between words. */
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
  text-wrap: balance;
}

.case-body {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
  max-width: 56ch;
}

/* ============================================================
   STUDIO / PRACTICE — inverted band
   ============================================================ */
.invert-band {
  background: #0c0c0c;
  color: #f4f4f4;
}

.invert-band .section-eyebrow,
.invert-band .case-body,
.invert-band .studio-lead-muted {
  color: #9a9a9a;
}

.invert-band .section-index { color: var(--acid); }

.studio-statement {
  font-weight: 600;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 24ch;
}

.studio-statement em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.studio-statement em::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.06em;
  height: 0.16em;
  background: var(--acid);
  z-index: 0;
}

.studio-statement em > * { position: relative; z-index: 1; }

.studio-lead-muted {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 50ch;
  margin: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-email {
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  margin: 0;
  display: inline-block;
  text-decoration: none;
  color: var(--fg);
  position: relative;
}

.contact-email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.05em;
  width: 100%;
  height: 0.08em;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.contact-email:hover::after { transform: scaleX(1); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
}

.site-footer .footer-brand {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 1rem;
}

.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer .muted, .site-footer p { color: var(--muted); }

.social-links a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-links a:hover { color: var(--fg); }

/* ============================================================
   PAGE TITLE
   ============================================================ */
.page-title-band .wp-block-post-title {
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
  max-width: 18ch;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
  text-wrap: balance;
}

.page-title-mark {
  width: 40px;
  height: 4px;
  background: var(--acid);
  margin-bottom: 1.4rem;
}

/* ============================================================
   ENTRANCE MOTION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  animation: pwFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.27s; }
.d4 { animation-delay: 0.38s; }

@keyframes pwFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
}

/* ============================================================
   EQUAL CARDS
   ============================================================ */
.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}
.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ============================================================
   EDITOR VISIBILITY — keep animated content visible while editing
   ============================================================ */
.editor-styles-wrapper .fade-up,
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .hero-meta.fade-up,
.editor-styles-wrapper .hero-headline .line {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ============================================================
   PHOTOGRAPHY — FILTER BAR (visual)
   ============================================================ */
.work-filter {
  border-bottom: 1px solid var(--hairline);
  align-items: center;
}

.work-filter .filter-item {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-bottom: 0.3rem;
  cursor: default;
  transition: color 0.2s ease;
}

.work-filter .filter-item.is-active {
  color: var(--fg);
}

.work-filter .filter-item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--acid);
}

/* ============================================================
   VIDEO — RUNTIME CHIP + FILM META
   ============================================================ */
.work-frame .runtime-chip {
  margin: 0;
  align-self: flex-start;
  background: var(--acid);
  color: var(--on-lime);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.work-frame .runtime-chip::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid var(--on-lime);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.film-role {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ============================================================
   DATA & VIZ — CSS CHART MOTIFS + TAG LIST
   ============================================================ */
.viz-bars {
  width: 100%;
  gap: 0.5rem;
}

.viz-bars .viz-bar {
  height: 10px;
  min-height: 10px;
  background: var(--acid);
  border-radius: 0;
}

.viz-bars .viz-bar:nth-child(even) {
  background: var(--hairline);
}

.viz-grid {
  width: 100%;
  gap: 0.4rem;
}

.viz-grid .viz-cell {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--hairline);
  background: transparent;
}

.viz-grid .viz-cell.on {
  background: var(--acid);
  border-color: var(--acid);
}

/* ------------------------------------------------------------
   CHART FIGURE — image-ready chart frame (core/cover)
   Holds the CSS viz (bars / grid) as the default empty state; the
   owner can drop an exported chart image in and it fills the frame.
   ------------------------------------------------------------ */
.chart-figure {
  width: 100%;
}

.case-figure-frame.wp-block-cover {
  min-height: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  padding: 1.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 0;
  overflow: hidden;
}

/* Empty state: drop the solid cover span so the framed CSS viz shows. */
.case-figure-frame.wp-block-cover > .wp-block-cover__background {
  display: none;
}

.case-figure-frame.wp-block-cover > .wp-block-cover__inner-container {
  position: static;
  width: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-figure-frame.wp-block-cover img.wp-block-cover__image-background {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* With a real chart image, hide the CSS viz so the upload stands alone. */
.case-figure-frame.wp-block-cover:has(img.wp-block-cover__image-background) > .wp-block-cover__inner-container {
  display: none;
}

.tag-list {
  gap: 0;
}

.tag-list .tag {
  margin: 0;
  padding: 0.5rem 0;
  width: 100%;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.tag-list .tag:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* ============================================================
   CONTACT PAGE — ELSEWHERE BLOCK
   ============================================================ */
.contact-elsewhere {
  border-top: 1px solid var(--hairline);
}

.contact-elsewhere .social-links a {
  font-size: 1.05rem;
}

/* ============================================================
   BLOG — INDEX / HOME
   ============================================================ */
.page-title-band .page-title-heading.wp-block-post-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.blog-feed {
  margin-top: 1rem;
}

.post-row {
  border-top: 1px solid var(--hairline);
}

.post-row:first-child {
  border-top: none;
}

.post-meta {
  align-items: baseline;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-meta .post-date,
.post-meta .post-date a {
  color: var(--acid-deep);
  text-decoration: none;
}

[data-theme="dark"] .post-meta .post-date,
[data-theme="dark"] .post-meta .post-date a {
  color: var(--acid);
}

.post-meta .post-cat,
.post-meta .post-cat a {
  color: var(--muted);
  text-decoration: none;
}

.post-meta .post-cat a:hover {
  color: var(--fg);
}

.post-row-title {
  margin: 0;
}

.post-row-title a,
.post-row-title {
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--fg);
  text-decoration: none;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
  text-wrap: balance;
}

.post-row-title a:hover {
  color: var(--acid-deep);
}

[data-theme="dark"] .post-row-title a:hover {
  color: var(--acid);
}

.post-row-excerpt {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 62ch;
  margin-top: 0.4rem;
}

.post-row-excerpt .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--acid);
  padding-bottom: 1px;
}

.blog-pagination {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-pagination a {
  color: var(--muted);
  text-decoration: none;
}

.blog-pagination a:hover,
.blog-pagination .current {
  color: var(--fg);
}

/* ============================================================
   SINGLE POST — LONG-FORM READING
   ============================================================ */
.single-meta .post-date,
.single-meta .post-date a {
  color: var(--acid-deep);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

[data-theme="dark"] .single-meta .post-date,
[data-theme="dark"] .single-meta .post-date a {
  color: var(--acid);
}

.single-meta .post-cat,
.single-meta .post-cat a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.single-body .wp-block-post-content {
  font-size: 1.12rem;
  line-height: 1.75;
}

.single-body .wp-block-post-content p {
  color: var(--fg);
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.single-body .wp-block-post-content .wp-block-quote {
  border-left: 2px solid var(--acid);
  padding-left: 1.6rem;
  margin: 2.5rem 0;
}

.single-body .wp-block-post-content .wp-block-quote p {
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 0;
}

.back-to-blog {
  margin: 0;
}

.back-to-blog a {
  color: var(--fg);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--acid);
  padding-bottom: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 781px) {
  .hero-headline .indent { margin-left: 0; }
  .hero-lower { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .fade-up,
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   CONTACT FORM — [pw_contact_form]
   ============================================================ */
.pw-contact {
  max-width: 680px;
}

.pw-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 0;
}

.pw-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pw-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pw-input,
.pw-textarea {
  width: 100%;
  background: transparent;
  color: var(--fg);
  font-family: "Archivo", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.85rem 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pw-textarea {
  resize: vertical;
  min-height: 9rem;
}

.pw-input::placeholder,
.pw-textarea::placeholder {
  color: var(--muted);
}

.pw-input:focus,
.pw-textarea:focus {
  outline: none;
  border-color: var(--acid);
  box-shadow: 0 0 0 2px rgba(194, 242, 58, 0.35);
}

.pw-submit {
  appearance: none;
  align-self: flex-start;
  margin-top: 0.4rem;
  background: var(--acid);
  color: var(--on-lime);
  font-family: "Archivo", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--acid);
  border-radius: 2px;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pw-submit:hover,
.pw-submit:focus-visible {
  background: var(--acid-deep);
  border-color: var(--acid-deep);
  transform: translateY(-2px);
}

.pw-submit:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Honeypot — visually hidden, off-screen for bots only. */
.pw-hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success / error notices — monochrome, no red accent. */
.pw-notice {
  margin: 0 0 2.4rem;
  padding: 1rem 1.2rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--fg);
}

.pw-notice--success {
  border-left: 3px solid var(--acid);
  background: transparent;
}

.pw-notice--error {
  border: 1px solid var(--fg);
  border-left-width: 3px;
}

/* Dark-mode: keep the focus ring legible against the dark surface. */
[data-theme="dark"] .pw-input:focus,
[data-theme="dark"] .pw-textarea:focus {
  box-shadow: 0 0 0 2px rgba(194, 242, 58, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .pw-submit:hover,
  .pw-submit:focus-visible {
    transform: none;
  }
}

/* ============================================================
   POWER BI EMBED — [powerbi] shortcode wrapper
   Responsive 16:9 report frame, full width within the content
   column, hairline border to match the editorial frames.
   ============================================================ */
.pw-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  background: transparent;
  margin: 2rem 0;
  overflow: hidden;
}

.pw-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pw-embed--note {
  aspect-ratio: auto;
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
