/* =====================================================================
   Fontali theme
   Layout language: warm paper page, huge condensed display headlines,
   rounded ink / stone panels, floating pill navigation.
   ===================================================================== */

:root {
  /* Palette */
  --paper: #e7e5df;
  --stone: #f6f5f1;
  --ink: #131313;
  --logo-ink: #3b3b3b;  /* the logo's own greys */
  --logo-soft: #737373;
  --ink-2: #2a2a2a;
  --muted: #6f6c66;
  --muted-dark: #a9a69e;
  --ochre: #d98a2b;
  --ochre-deep: #b56f1c;
  --jungle: #2f6e5a;
  --jungle-deep: #1e4b3d;
  --line: rgba(19, 19, 19, 0.15);
  --line-light: rgba(246, 245, 241, 0.15);

  /* Type */
  --font-display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;

  /* Layout */
  --page-max: 1440px;
  --gutter: clamp(12px, 1.4vw, 20px);
  --pad: clamp(20px, 4.2vw, 60px);
  --radius-panel: clamp(16px, 1.7vw, 24px);
  --radius-card: 20px;
  --radius-tile: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Base ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.1; }
::selection { background: var(--ochre); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--stone); padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

/* ============ Type scale ============ */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.01em;
}
.display em { font-style: normal; color: var(--jungle); }
.display--hero { font-size: clamp(4rem, 14.8vw, 13.4rem); max-width: 9.5em; }
.display--page { font-size: clamp(3.4rem, 11vw, 10rem); }
.display--cta { font-size: clamp(3.6rem, 13vw, 12rem); }

.title {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
.title em { font-family: var(--font-serif); font-style: italic; font-weight: 300; }
.title--xl { font-size: clamp(2.8rem, 7.2vw, 6.5rem); }
.title--lg { font-size: clamp(2.3rem, 5vw, 4.4rem); max-width: 14em; }
.title--md { font-size: clamp(1.6rem, 3vw, 2.4rem); }

/* ============ Chips & buttons ============ */
.chip {
  display: inline-flex; align-items: center;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1; padding: 6px 10px; border-radius: 999px;
  background: var(--ink); color: var(--stone);
  margin-bottom: 18px;
}
.chip--dark { background: var(--ink-2); color: #bdbab2; }
.chip--soft { background: var(--paper); color: var(--muted); }
.chip--ghost { background: transparent; color: var(--muted); padding-left: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 15px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 11px 18px; font-size: 0.72rem; }
.btn-lg { padding: 18px 30px; font-size: 0.85rem; }
.btn-ink { background: var(--ink); color: var(--stone); }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--stone); }
.btn-ghost-dark { background: var(--ink-2); color: var(--stone); }
.btn-ghost-dark:hover { background: #3a3a3a; }
.btn .arrow, .link-more .arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow, a:hover .link-more .arrow { transform: translate(2px, -2px); }

/* ============ Motion ============ */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.fx [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}
.fx [data-reveal].is-in { opacity: 1; transform: none; }
.fx [data-reveal="2"] { transition-delay: 0.08s; }
.fx [data-reveal="3"] { transition-delay: 0.16s; }
.fx [data-reveal="4"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ============ Header / nav ============ */
.site-header {
  position: fixed; z-index: 100; top: 0; left: 0; right: 0;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.site-nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 28px;
  max-width: var(--page-max); margin: 0 auto;
  padding: 10px calc(var(--pad) - var(--gutter));
  border-radius: 33px;
  transition: max-width 0.45s var(--ease), padding 0.45s var(--ease), background 0.3s, box-shadow 0.3s;
}
.is-compact .site-nav {
  max-width: 1080px;
  padding: 8px 8px 8px 22px;
  background: rgba(231, 229, 223, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 30px rgba(19, 19, 19, 0.08);
}
/* Phones: a solid bar instead of a live blur, which is costly to redraw
   on every scrolled frame on mobile GPUs. */
@media (max-width: 760px) {
  .is-compact .site-nav { background: rgba(231, 229, 223, 0.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.logo { display: inline-flex; align-items: center; margin-right: auto; text-decoration: none; }
.logo .logo-svg { height: 40px; width: auto; aspect-ratio: 862 / 356; }
.logo { padding-block: 5px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.95rem; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }

.nav-burger {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); border: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--stone); border-radius: 2px; transition: transform 0.3s var(--ease); }
.nav-burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.nav-drawer {
  pointer-events: auto;
  margin: 10px auto 0; max-width: 520px;
  background: var(--stone); border-radius: var(--radius-card);
  padding: 14px 22px 22px; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(19, 19, 19, 0.15);
  animation: rise 0.3s var(--ease) both;
}
.nav-drawer[hidden] { display: none !important; }
.nav-drawer a:not(.btn) {
  text-decoration: none; font-family: var(--font-display); font-weight: 900;
  text-transform: uppercase; font-size: 2.2rem; line-height: 1; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.nav-drawer .btn { margin-top: 18px; justify-content: center; }

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

@media (max-width: 900px) {
  .nav-links, .site-nav > .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .site-nav { padding-right: 8px; }
  .is-compact .site-nav { padding: 6px 6px 6px 18px; }
}

/* ============ Hero ============ */
.hero { padding: clamp(110px, 13vw, 170px) 0 0; position: relative; }
.hero-stage { position: relative; }
.hero .display--hero { position: relative; z-index: 1; animation: rise 1s var(--ease) 0.05s both; }
.hero-circle {
  position: absolute; z-index: 2;
  right: calc(var(--pad) + 2vw); top: 50%;
  width: min(40vw, 560px); aspect-ratio: 1;
  translate: 0 -50%; /* separate from transform so the pop animation can't override it */
  border-radius: 50%; overflow: hidden;
  background: var(--ochre);
  mix-blend-mode: multiply;
  animation: pop 1.2s var(--ease) 0.25s both;
}
.hero-circle img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.05); }
.hero-circle.has-img { background: var(--ink); }
.hero-foot {
  display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 32px;
  margin-top: clamp(32px, 4vw, 56px); padding-top: 20px; padding-bottom: clamp(48px, 6vw, 80px);
  position: relative;
  animation: rise 0.9s var(--ease) 0.45s both;
}
/* Rule above the hero foot, aligned to the content edges. */
.hero-foot::before {
  content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad);
  height: 1px; background: var(--line);
}
.hero-note { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; align-self: start; }
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ochre); flex-shrink: 0; }
.hero-intro p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.5; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.back-link {
  display: inline-block; text-decoration: none; font-size: 0.85rem; color: var(--muted);
  margin-bottom: 22px; transition: color 0.2s;
}
.back-link:hover { color: var(--ink); }
.hero--page { padding-bottom: clamp(40px, 5vw, 70px); }
/* Page heroes (single word titles): reserve the circle's height and sit
   the title on the bottom edge so the circle never spills out. */
.hero--page .hero-stage {
  min-height: min(34vw, 440px);
  display: flex; align-items: flex-end;
}
.hero--page .hero-circle { width: min(34vw, 440px); top: 0; translate: none; }
.hero--page .hero-foot { padding-bottom: 0; }
.hero--page .display--page { animation: rise 1s var(--ease) 0.05s both; }
.page-lede { max-width: 38em; font-size: clamp(1.05rem, 1.4vw, 1.25rem); margin-top: 28px; color: var(--ink-2); }

@media (max-width: 900px) {
  /* Tablet and phone: the circle drops below the headline instead of covering it. */
  .hero-circle, .hero--page .hero-circle { position: relative; right: auto; top: auto; translate: none; width: min(72vw, 440px); margin: -14vw 0 0 auto; }
  .hero--page .hero-stage { min-height: 0; display: block; }
}
@media (max-width: 760px) {
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  /* Keeps the phone headline to three even lines. */
  .display--hero { font-size: 13.2vw; }
}

/* ============ Logo (inc/logo.php) ============ */
.logo-svg { display: block; overflow: visible; }
.logo-svg path { fill-rule: evenodd; } /* letter counters (o, a, D, O) stay open */
.lg-ink { fill: var(--logo-ink); }
.lg-soft { fill: var(--logo-soft); }

/* ============ Hero logo (animated, CSS only) ============
   template-parts/hero-mark.php. The ring draws itself and fills into the
   circle; the i is cut in with the page colour (the dot drops, the stem
   rises through the edge); then the letters settle in. */
.hero--mark { overflow-x: clip; }
/* Headline on the left, the logo on the right. */
.hero--mark .hero-stage {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center; gap: clamp(28px, 4vw, 72px);
}
.hero-logo { width: 100%; max-width: 620px; justify-self: end; }
.hero-logo .logo-svg { width: 100%; height: auto; }
.hero--mark .display--hero { font-size: clamp(3rem, 6.1vw, 6.6rem); }
@media (max-width: 900px) {
  /* Tablet and phone: the logo sits above the headline. */
  .hero--mark .hero-stage { grid-template-columns: 1fr; gap: clamp(22px, 5vw, 36px); }
  .hero-logo { order: -1; justify-self: start; max-width: 520px; }
  .hero--mark .display--hero { font-size: clamp(3rem, 9vw, 5.6rem); }
}
.hl-ring { fill: none; stroke: var(--logo-ink); stroke-width: 3; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; } /* draws from the top */
.hl-stem, .hl-dot { fill: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .hl-ring { stroke-dasharray: 1 1; animation: hl-draw 1.1s var(--ease) 0.1s both; }
  .hl-disc { transform-box: fill-box; transform-origin: center; animation: hl-fill 0.95s var(--ease) 0.55s both; }
  .hl-stem { animation: hl-rise 0.8s var(--ease) 1.2s both; }
  .hl-dot { animation: hl-drop 0.8s cubic-bezier(0.34, 1.45, 0.64, 1) 1.45s both; }
  .logo-svg--hero .lg-word path { animation: hl-letter 0.8s var(--ease) both; animation-delay: calc(1.45s + var(--i) * 80ms); }
  .logo-svg--hero .lg-tag path { animation: hl-tag 0.9s var(--ease) both; animation-delay: calc(2.05s + var(--i) * 35ms); }
}
@keyframes hl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hl-fill { from { transform: scale(0); } to { transform: none; } }
@keyframes hl-rise { from { transform: translateY(230px); } to { transform: none; } }
@keyframes hl-drop { from { transform: translateY(-80px); } to { transform: none; } }
@keyframes hl-letter { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes hl-tag { from { opacity: 0; transform: translateX(calc((var(--i) - 5.5) * 7px)); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .hero-logo { max-width: min(80vw, 380px); }
}

/* ============ Marquee ============ */
.marquee {
  overflow: hidden; padding: 22px 0 clamp(36px, 5vw, 64px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; will-change: transform; }
.marquee:hover .marquee-track,
.marquee.is-off .marquee-track { animation-play-state: paused; } /* is-off: scrolled out of view (site.js) */
.marquee-list { display: flex; flex-shrink: 0; }
.marquee-list li {
  display: flex; align-items: center; gap: 36px; padding-right: 36px;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.6rem); color: rgba(19, 19, 19, 0.55); white-space: nowrap;
}
.marquee-list li::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ochre); }
.marquee-list li:nth-child(even)::after { background: var(--jungle); }

/* ============ Panels & sections ============ */
.panel {
  max-width: calc(var(--page-max) - 2 * var(--gutter));
  margin: 0 var(--gutter) var(--gutter);
  border-radius: var(--radius-panel);
  padding: clamp(48px, 7vw, 110px) var(--pad);
}
@media (min-width: 1480px) { .panel { margin-left: auto; margin-right: auto; } }
.panel--ink { background: var(--ink); color: var(--stone); }
.panel--stone { background: var(--stone); color: var(--ink); }
.section { padding: clamp(64px, 9vw, 130px) 0; }

.panel-head--center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; margin-bottom: clamp(40px, 6vw, 80px); }
.panel-intro { color: var(--muted-dark); max-width: 34em; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-intro { color: var(--muted); max-width: 36em; margin-top: 18px; }
.panel--ink .section-intro { color: var(--muted-dark); }
.section-intro--side { margin-top: 0; max-width: 26em; }

.empty-note {
  grid-column: 1 / -1; border: 1.5px dashed var(--line); border-radius: var(--radius-card);
  padding: 48px; text-align: center; color: var(--muted);
}
.panel--ink .empty-note { border-color: var(--line-light); color: var(--muted-dark); }

/* ============ Work cards ============ */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(36px, 4vw, 56px) 22px; }
.work-card { text-decoration: none; display: block; }
.work-media {
  aspect-ratio: 4 / 3; border-radius: var(--radius-tile); overflow: hidden;
  background: var(--ink-2); position: relative;
}
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.035); }
.work-media-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; text-align: center;
  font-size: clamp(2rem, 4vw, 3.4rem); color: #3c3c3c;
}
.work-meta { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; margin-top: 18px; }
.work-meta h3 { font-size: 1.35rem; font-weight: 500; margin-bottom: 10px; }
.work-meta .chip { margin-bottom: 0; }
.work-meta p { color: var(--muted-dark); font-size: 1.05rem; line-height: 1.45; }
.panel--stone .work-meta p, .section .work-meta p { color: var(--muted); }
@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-meta { grid-template-columns: 1fr; gap: 8px; }
}

/* ============ Story tiles ============ */
.story-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.tile { border-radius: var(--radius-card); background: var(--stone); padding: clamp(24px, 2.6vw, 38px); overflow: hidden; position: relative; }
.tile--photo { grid-column: span 2; grid-row: span 2; padding: 0; min-height: 420px; background: var(--ink-2); }
.tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--muted-dark); font-size: 0.9rem; }
.tile--text { grid-column: span 2; font-size: 1.08rem; color: var(--ink-2); }
.tile--text p + p { margin-top: 14px; }
.tile--quote { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.tile--quote blockquote { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.3; letter-spacing: -0.005em; }
.tile--quote figcaption { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gutter); }
.tile--stat { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 230px; }
.tile--stat strong { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 9vw, 8.5rem); line-height: 0.8; }
.tile--stat span { font-size: 0.98rem; max-width: 16em; }
.tile--ochre { background: var(--ochre); color: var(--ink); }
.tile--jungle { background: var(--jungle); color: var(--stone); }
.tile--ink { background: var(--ink); color: var(--stone); }
@media (max-width: 600px) {
  /* Stacked stats: number and label side by side so three tiles stay short. */
  .tile--stat { flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; min-height: 0; }
  .tile--stat strong { font-size: 4.2rem; min-width: 1.2em; }
}
@media (max-width: 1000px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .tile--photo { min-height: 520px; }
}
@media (max-width: 600px) {
  .story-grid { grid-template-columns: 1fr; }
  .tile--photo, .tile--text, .tile--quote { grid-column: auto; grid-row: auto; }
  .tile--photo { min-height: 0; aspect-ratio: 4 / 5; }
}

/* ============ Service cards ============ */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gutter); }
.svc-card {
  text-decoration: none; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius-card); overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.panel--stone .svc-card { background: var(--paper); }
.section .svc-card { background: var(--stone); }
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(19, 19, 19, 0.08); }
.svc-media { aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.svc-card:hover .svc-media img { transform: scale(1.04); }
.svc-media--ochre { background: var(--ochre); }
.svc-media--jungle { background: var(--jungle); }
.svc-media--ink { background: var(--ink); }
.svc-num {
  position: absolute; left: 22px; bottom: 14px;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 7vw, 6rem); line-height: 0.8;
  color: var(--stone); mix-blend-mode: normal;
}
.svc-media--ochre .svc-num { color: var(--ink); }
.svc-media img + .svc-num { color: var(--stone); text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.svc-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.svc-body h3 { font-size: 1.6rem; font-weight: 500; }
.svc-body p { color: var(--muted); flex: 1; }
.link-more { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 8px; }

/* ============ Gallery (masonry) ============
   Photos and videos keep their own shape and stack in columns. */
.gal-grid { column-count: 4; column-gap: var(--gutter); }
.gal-grid > .empty-note { column-span: all; }
.gal-item {
  break-inside: avoid; margin: 0 0 var(--gutter);
  border-radius: var(--radius-tile); overflow: hidden; position: relative; background: var(--ink-2);
  transform: translateZ(0); /* keeps the rounded corners clipping while the photo zooms */
}
.gal-item img, .gal-item video { display: block; width: 100%; height: auto; transition: transform 0.8s var(--ease); }
.gal-item:hover img { transform: scale(1.04); }
.gal-item.is-video::after { /* small "video" mark */
  content: ""; position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(19, 19, 19, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.5 2.5v5l4-2.5z' fill='%23f6f5f1'/%3E%3C/svg%3E") center / 14px no-repeat;
  pointer-events: none;
}
.gal-item .cap {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  background: rgba(19, 19, 19, 0.72); color: var(--stone);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 0.75rem; padding: 6px 11px; border-radius: 999px;
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s;
}
.gal-item:hover .cap { opacity: 1; transform: none; }
.gal-grid--case { column-count: 2; }
.case-gallery { margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 1100px) { .gal-grid { column-count: 3; } }
@media (max-width: 760px) { .gal-grid { column-count: 2; } .gal-grid--case { column-count: 1; } }
/* "View the full gallery" under the home-page selection. */
.more-link { display: flex; justify-content: center; margin-top: clamp(28px, 3vw, 44px); }

/* ============ Service detail ============ */
.svc-detail-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.prose { max-width: 50em; }
.prose-text { font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.5; color: var(--ink-2); }
.prose-text p + p { margin-top: 1em; }
.prose-text ul, .prose-text ol { list-style: disc; padding-left: 1.2em; margin: 1em 0; }
.prose-text a { text-decoration-color: var(--ochre); text-underline-offset: 3px; }
.prose > * + * { margin-top: clamp(36px, 4vw, 56px); }
.deliv .title { margin-bottom: 22px; }
.deliv-list { border-top: 1px solid var(--line); }
.deliv-list li {
  display: flex; align-items: baseline; gap: 22px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}
.deliv-num { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; color: var(--ochre-deep); min-width: 2ch; }
@media (max-width: 760px) { .svc-detail-grid { grid-template-columns: 1fr; gap: 8px; } }

/* ============ Project case study ============ */
.hero--project .chip { margin-left: 14px; vertical-align: middle; }
.case-cover { border-radius: var(--radius-panel); overflow: hidden; margin-bottom: var(--gutter); background: var(--ink-2); }
.case-cover img { width: 100%; max-height: 82vh; object-fit: cover; }
.case-body { max-width: 46em; margin: 0 auto; }
.next-case {
  display: flex; flex-direction: column; align-items: flex-start; text-decoration: none;
  margin-top: clamp(48px, 6vw, 90px); padding-top: 28px; border-top: 1px solid var(--line);
}
.next-case-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 0.9; }
.next-case:hover .next-case-title { color: var(--jungle); }

/* ============ Journal ============ */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px 22px; }
.post-card { text-decoration: none; display: flex; flex-direction: column; }
.post-media { aspect-ratio: 16 / 10; border-radius: var(--radius-tile); overflow: hidden; background: var(--paper); margin-bottom: 16px; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.post-card:hover .post-media img { transform: scale(1.035); }
.post-card .chip { align-self: flex-start; margin-bottom: 12px; }
.post-card h3 { font-size: 1.45rem; font-weight: 500; margin-bottom: 10px; }
.post-card p { color: var(--muted); }
@media (max-width: 760px) { .post-grid { grid-template-columns: 1fr; } }

.pagination .nav-links, .post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.pagination .page-numbers.current { background: var(--ink); color: var(--stone); }
.post-navigation a { text-decoration: none; font-weight: 600; }

/* ============ Block-editor content ============ */
.entry-content { max-width: 46em; margin: 0 auto; font-size: 1.1rem; line-height: 1.65; color: var(--ink-2); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-top: 1.6em; color: var(--ink); }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.4em; color: var(--ink); }
.entry-content ul { list-style: disc; padding-left: 1.3em; }
.entry-content ol { list-style: decimal; padding-left: 1.3em; }
.entry-content a { text-decoration-color: var(--ochre); text-underline-offset: 3px; }
.entry-content blockquote { font-size: 1.5rem; line-height: 1.3; border-left: 3px solid var(--ochre); padding-left: 22px; color: var(--ink); }
.entry-content img { border-radius: var(--radius-tile); }
.entry-content figcaption, .wp-element-caption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.entry-content .alignwide { max-width: min(1200px, calc(100vw - 2 * var(--pad))); margin-left: 50%; transform: translateX(-50%); width: 100vw; }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull img { border-radius: 0; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }

/* ============ Big CTA ============ */
.cta { padding: clamp(80px, 11vw, 160px) 0; text-align: center; }
.cta .container { display: flex; flex-direction: column; align-items: center; }
.cta .display--cta { max-width: 9em; }
.cta-text { color: var(--muted); max-width: 32em; margin-top: 28px; font-size: 1.1rem; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 34px; }
.cta-email { text-decoration: none; font-size: 0.95rem; border-bottom: 1.5px solid var(--ochre); padding-bottom: 2px; }
/* ============ Contact form ============ */
.contact-form, .cf-done {
  width: min(100%, 760px); margin-top: clamp(32px, 4vw, 48px);
  background: var(--stone); border-radius: var(--radius-panel);
  padding: clamp(22px, 3.4vw, 44px); text-align: left;
}
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cf-topics { border: 0; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topics legend { float: left; width: 100%; }
.cf-topic { position: relative; cursor: pointer; }
.cf-topic input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cf-topic span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: 999px; font-size: 0.92rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cf-topic:hover span { border-color: var(--ink); }
.cf-topic input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--stone); }
.cf-topic input:focus-visible + span { outline: 2px solid var(--ochre); outline-offset: 2px; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.cf-field { margin: 0; }
.cf-field--full { grid-column: 1 / -1; }
.cf-field input, .cf-field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid transparent; border-radius: 12px;
  padding: 13px 15px; transition: border-color 0.2s, background 0.2s;
}
.cf-field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.cf-field input:hover, .cf-field textarea:hover { border-color: var(--line); }
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.cf-field [aria-invalid="true"] { border-color: var(--ochre-deep); background: #fff; }
.cf-status {
  margin: 18px 0 0; padding: 12px 16px; border-radius: 10px;
  background: rgba(217, 138, 43, 0.14); border-left: 3px solid var(--ochre); font-size: 0.95rem;
}
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 24px; }
.cf-alt { font-size: 0.92rem; color: var(--muted); margin: 0; }
.contact-form.is-sending button[type="submit"] { opacity: 0.6; pointer-events: none; }
.cf-done { display: flex; align-items: center; gap: 18px; outline: none; }
.cf-done p { font-size: 1.15rem; margin: 0; }
.cf-done-mark {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--jungle); color: var(--stone); font-size: 1.4rem;
}
@media (max-width: 600px) {
  .cf-grid { grid-template-columns: 1fr; }
  .cf-foot .btn { width: 100%; justify-content: center; }
}
.cta--404 { padding-top: clamp(140px, 16vw, 220px); }
/* Contact page: the contact section is the page. */
.cta--page { padding-top: clamp(130px, 14vw, 200px); }
.cta--page .crumbs { margin-bottom: 18px; }

/* ============ Studio pages ============ */
.story--page { padding-top: clamp(24px, 3vw, 48px); }
.page-body { padding-block: clamp(56px, 7vw, 100px); }
/* Breadcrumbs (Rank Math, when turned on). */
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.crumbs p { margin: 0; }
.crumbs a { color: inherit; text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--ink); }
.crumbs .separator { margin: 0 0.4em; opacity: 0.6; }
.crumbs .last { color: var(--ink); }

/* ============ Footer ============ */
.site-footer { padding-top: clamp(40px, 5vw, 64px); padding-bottom: 28px; }
.foot-top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding-bottom: clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line);
}
.foot-top .chip { margin-bottom: 12px; }
.foot-tagline { font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em; max-width: 18em; }
.foot-tagline em { font-family: var(--font-serif); font-style: italic; font-weight: 300; }
.foot-main {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: end;
  padding: clamp(36px, 5vw, 64px) 0; border-bottom: 1px solid var(--line);
}
.foot-wordmark { display: block; width: min(100%, 560px); text-decoration: none; }
.foot-wordmark .logo-svg { width: 100%; height: auto; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-head { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-cols li { padding: 3px 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; text-decoration-color: var(--ochre); text-underline-offset: 3px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: 0.8rem; color: var(--muted); }
.foot-bottom a { text-decoration: none; }
@media (max-width: 900px) {
  .foot-main { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  /* Comfortable tap targets for the footer links. */
  .foot-cols li { padding: 0; }
  .foot-cols a { display: inline-block; padding: 10px 0; }
}
@media (max-width: 600px) {
  .chip { font-size: 0.72rem; }
}

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--stone); text-decoration: none; font-size: 1.1rem;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.3s, transform 0.3s;
}
.is-scrolled .to-top { opacity: 1; transform: none; pointer-events: auto; }
