/*
Theme Name: Radar Creative
Theme URI: https://www.radarcreative.net
Author: Radar Creative Studio
Description: Clean rebuild of the Radar Creative Studio site. Replaces the compromised Zoo theme (Web Dingo, 2014). Modern CSS, no jQuery, no legacy options framework. Carries the original layout and brand DNA.
Version: 1.4.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: radar
*/

/* ==========================================================================
   Tokens — colors/fonts also declared in theme.json for the editor.
   Change the accent in ONE place: --radar-accent.
   ========================================================================== */
:root {
  --radar-accent:        #de6e3c;  /* burnt orange — the brand color */
  --radar-accent-dark:   #c25a2c;
  --radar-accent-2:      #dc976e;  /* warm secondary */
  --radar-ink:           #2e2e2e;  /* headings */
  --radar-ink-strong:    #111;
  --radar-body:          #7a7a79;  /* body copy */
  --radar-muted:         #a4a4a3;
  --radar-rule:          #d9d9d9;
  --radar-bg:            #fff;
  --radar-bg-alt:        #f4f4f4;
  --radar-bar:           #2b2b2b;  /* nav bar */
  --radar-footer:        #000;

  --radar-nav-h:  60px;
  --radar-max:    1170px;
  --radar-gap:    30px;

  --radar-font:   'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--radar-font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--radar-body);
  background: var(--radar-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--radar-font); color: var(--radar-ink); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 300; letter-spacing: .06em; }
h6 { font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; }

a { color: var(--radar-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--radar-accent-dark); }

img { max-width: 100%; height: auto; display: block; }

.radar-wrap { max-width: var(--radar-max); margin-inline: auto; padding-inline: 20px; }

/* ==========================================================================
   Header / nav — fixed bar, scroll-spy underline, mobile drawer
   ========================================================================== */
.radar-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--radar-nav-h);
  background: var(--radar-bar);
  display: flex; align-items: center;
}
/* Home puts the bar at the bottom of the hero, as in the original */
body.home .radar-header { top: auto; bottom: 0; }

.radar-header .radar-wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.radar-logo { color: #fff; font-weight: 700; letter-spacing: .18em; font-size: 1rem; text-transform: uppercase; }
.radar-logo:hover { color: #fff; }

.radar-nav ul { display: flex; gap: 2.5rem; list-style: none; margin: 0; padding: 0; }
.radar-nav a {
  color: #d9d9d9; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .5rem 0; position: relative; display: block;
}
.radar-nav a:hover, .radar-nav .current-menu-item > a { color: #fff; }
.radar-nav .current-menu-item > a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.35rem;
  height: 2px; background: var(--radar-accent);
}

.radar-burger {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  width: 42px; height: 42px;
}
.radar-burger span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }
.radar-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.radar-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.radar-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Content sits below the fixed bar (except home, where the bar is at the bottom) */
.radar-main { padding-top: var(--radar-nav-h); }
body.home .radar-main { padding-top: 0; }

@media (max-width: 768px) {
  .radar-burger { display: block; }
  .radar-nav {
    position: fixed; top: var(--radar-nav-h); left: 0; right: 0;
    background: var(--radar-bar);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  body.home .radar-nav { top: auto; bottom: var(--radar-nav-h); }
  .radar-nav[data-open="true"] { max-height: 60vh; }
  .radar-nav ul { flex-direction: column; gap: 0; padding: .5rem 20px 1.25rem; }
  .radar-nav a { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ==========================================================================
   Hero (homepage) — full-bleed plate, wordmark parallaxes on scroll
   ========================================================================== */
.radar-hero { position: relative; min-height: 100svh; overflow: hidden; }
.radar-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.radar-hero__plate {
  position: absolute; display: flex; align-items: center;
  will-change: transform;
}
.radar-hero__plate--left  { left: 0;  top: 40%; }
.radar-hero__plate--right { right: 0; top: 55%; }

.radar-hero__label {
  background: rgba(180,190,180,.82); color: var(--radar-ink);
  padding: 1.75rem 2rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
}
.radar-hero__word {
  background: rgba(180,190,180,.82); color: var(--radar-accent);
  padding: 1.25rem 2.5rem 1.25rem 1.5rem;
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: .02em;
  border-left: 2px solid #fff;
}
.radar-hero__tag-a { background: rgba(233,233,233,.9); color: var(--radar-ink); padding: 1.4rem 2.5rem; font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; }
.radar-hero__tag-b { background: var(--radar-accent); color: #fff; padding: 1.4rem 2.5rem; font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .radar-hero__plate { transform: none !important; }
}
@media (max-width: 768px) {
  .radar-hero__plate--left, .radar-hero__plate--right { position: static; margin: 1rem 0; }
  .radar-hero { display: flex; flex-direction: column; justify-content: center; padding: 6rem 0; }
}

/* ==========================================================================
   Section intro — the big drop-cap letter + italic lede
   ========================================================================== */
.radar-intro { display: flex; gap: 1.5rem; align-items: flex-start; padding: 4rem 0 2rem; }
.radar-intro__cap { font-size: 6rem; font-weight: 700; line-height: .8; color: var(--radar-ink-strong); }
.radar-intro__text { font-style: italic; font-size: 1.05rem; padding-top: .75rem; }
.radar-intro__text strong { font-style: normal; font-weight: 700; color: var(--radar-ink-strong); }

/* On the orange About band, flip the ink to dark-on-orange */
.radar-band--accent { background: var(--radar-accent); color: #fff; padding-bottom: 4rem; }
.radar-band--accent .radar-intro__cap,
.radar-band--accent h1, .radar-band--accent h2 { color: var(--radar-ink-strong); }
.radar-band--accent .radar-intro__text,
.radar-band--accent p { color: #fff; }
.radar-band--accent a { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Cover / parallax bands
   ========================================================================== */
.radar-cover {
  position: relative; display: grid; place-items: center;
  min-height: 420px; padding: 5rem 20px;
  background-size: cover; background-position: center;
  text-align: center;
}
.radar-cover--fixed { background-attachment: fixed; }
@media (hover: none) { .radar-cover--fixed { background-attachment: scroll; } }

.radar-cover__overlay { position: absolute; inset: 0; }
.radar-cover__inner { position: relative; z-index: 1; }
.radar-cover h1, .radar-cover h2 {
  color: #fff; font-weight: 300; letter-spacing: .1em; text-transform: uppercase;
  font-size: clamp(1.4rem, 3.5vw, 2.6rem); margin: 0;
}
.radar-cover .accent { color: #fff; }

/* ==========================================================================
   Tabs (About Us)
   ========================================================================== */
.radar-tabs__list {
  display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 2.5rem; padding: 0;
  border: 1px solid rgba(0,0,0,.12);
}
.radar-tabs__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 1.05rem 1.75rem; color: var(--radar-ink);
  transition: background .2s, color .2s;
}
.radar-tabs__btn[aria-selected="true"] { background: var(--radar-ink-strong); color: #fff; }
.radar-tabs__panel[hidden] { display: none; }

/* ==========================================================================
   Skill bars (team bios)
   ========================================================================== */
.radar-skill { margin: .6rem 0; }
.radar-skill__label {
  display: flex; justify-content: space-between;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--radar-ink); margin-bottom: .3rem;
}
.radar-skill__track { height: 6px; background: rgba(0,0,0,.12); overflow: hidden; }
.radar-skill__fill {
  height: 100%; width: 0; background: var(--radar-accent);
  transition: width 1.1s cubic-bezier(.22,1,.36,1);
}
.radar-skill.is-visible .radar-skill__fill { width: var(--level); }
@media (prefers-reduced-motion: reduce) {
  .radar-skill__fill { transition: none; width: var(--level); }
}

/* ==========================================================================
   Portfolio grid + category filter
   ========================================================================== */
.radar-filter {
  display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 2rem; padding: 0;
  border: 1px solid rgba(0,0,0,.12);
}
.radar-filter__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 1rem 1.6rem; color: var(--radar-ink);
}
.radar-filter__btn[aria-pressed="true"] { background: var(--radar-ink-strong); color: #fff; }

.radar-grid {
  display: grid; gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.radar-card { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #111; }
.radar-card[hidden] { display: none; }
.radar-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.radar-card:hover img { transform: scale(1.06); opacity: .35; }
.radar-card__meta {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  padding: 1rem; opacity: 0; transition: opacity .3s;
}
.radar-card:hover .radar-card__meta, .radar-card:focus-within .radar-card__meta { opacity: 1; }
.radar-card__title { color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: .06em; }
.radar-card__cat { color: var(--radar-accent); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .35rem; }
.radar-card__link { position: absolute; inset: 0; }

/* Video lightbox */
.radar-modal { border: 0; padding: 0; background: transparent; max-width: min(1170px, 92vw); width: 100%; }
.radar-modal::backdrop { background: rgba(0,0,0,.9); }
.radar-modal__frame { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.radar-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.radar-modal__close {
  position: absolute; top: -2.5rem; right: 0; background: none; border: 0;
  color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1;
}

/* ==========================================================================
   Service icons (circular, on the wood band)
   ========================================================================== */
.radar-services { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem; }
.radar-service { text-align: center; width: 150px; }
.radar-service img { width: 140px; height: 140px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; margin-inline: auto; }
.radar-service em { display: block; margin-top: .75rem; color: var(--radar-ink); font-size: .9rem; }

/* ==========================================================================
   Scroll animation utility (replaces [scroll_animation])
   ========================================================================== */
.radar-anim { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1); }
.radar-anim.is-visible { opacity: 1; transform: none; }
.radar-anim--left  { transform: translateX(-60px); }
.radar-anim--right { transform: translateX(60px); }
@media (prefers-reduced-motion: reduce) {
  .radar-anim { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Posts / news
   ========================================================================== */
.radar-post { border-top: 1px solid var(--radar-rule); padding: 2rem 0; }
.radar-post__title {
  display: inline-block; background: var(--radar-ink-strong); color: #fff;
  padding: .6rem 1.1rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
}
.radar-post__title a { color: #fff; }
.radar-post__foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--radar-rule); padding-top: 1rem; margin-top: 1.25rem;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
}

/* ==========================================================================
   Contact / forms
   ========================================================================== */
.radar-block-title {
  display: inline-block; background: var(--radar-ink-strong); color: #fff;
  padding: .6rem 1.1rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.radar-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
@media (max-width: 768px) { .radar-cols-2 { grid-template-columns: 1fr; gap: 2.5rem; } }

.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
  width: 100%; padding: .7rem .9rem; margin-top: .35rem;
  border: 1px solid var(--radar-rule); font-family: inherit; font-size: 1rem;
  background: #fff; color: var(--radar-ink);
}
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible {
  outline: 2px solid var(--radar-accent); outline-offset: 1px; border-color: var(--radar-accent);
}
.wpcf7 textarea { min-height: 160px; resize: vertical; }
.wpcf7 input[type="submit"] {
  background: var(--radar-accent); color: #fff; border: 0; cursor: pointer;
  padding: .9rem 2.5rem; font-family: inherit; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase; transition: background .2s;
}
.wpcf7 input[type="submit"]:hover { background: var(--radar-accent-dark); }

.radar-map { width: 100%; aspect-ratio: 16 / 6; border: 0; background: var(--radar-bg-alt); }
@media (max-width: 768px) { .radar-map { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   Social
   ========================================================================== */
.radar-social { display: flex; gap: .5rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.radar-social a {
  display: grid; place-items: center; width: 52px; height: 52px;
  background: var(--radar-muted); color: #fff; transition: background .2s;
}
.radar-social a:hover { background: var(--radar-accent); color: #fff; }
.radar-social svg { width: 22px; height: 22px; fill: currentColor; }

/* ==========================================================================
   Footer
   ========================================================================== */
.radar-footer { background: var(--radar-footer); color: #888; text-align: center; padding: 3.5rem 20px; }
.radar-footer .radar-logo { display: inline-block; margin-bottom: 1.25rem; }
.radar-footer .radar-social { justify-content: center; }
.radar-footer .radar-social a { width: 30px; height: 30px; background: #333; }
.radar-footer .radar-social svg { width: 14px; height: 14px; }
.radar-footer__copy { font-size: .75rem; margin-top: 1.5rem; color: #666; }

/* ==========================================================================
   A11y
   ========================================================================== */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: .5rem; left: .5rem; z-index: 999;
  width: auto; height: auto; clip: auto;
  background: #fff; color: var(--radar-ink); padding: .75rem 1.25rem;
}
:focus-visible { outline: 2px solid var(--radar-accent); outline-offset: 2px; }

/* ==========================================================================
   SCROLL — v2
   ==========================================================================

   The first pass used WordPress's `has-parallax` (background-attachment:fixed)
   and a scroll-event listener. Both are jank sources:

     - background-attachment:fixed cannot be composited. The browser repaints
       the entire layer every scroll frame.
     - scroll events fire less often than the display refreshes, so any motion
       driven by them lags a step behind the actual scroll position.

   Fix: move a ::before layer with `transform` (composited), driven by a CSS
   scroll timeline where supported, and by a damped rAF loop otherwise.
   ========================================================================== */

/* Kill the fixed-attachment repaint. JS moves the ::before instead. */
.wp-block-cover.has-parallax,
.radar-cover--fixed {
  background-attachment: scroll !important;
}

.radar-parallax {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.radar-parallax::before {
  content: '';
  position: absolute;
  /* Oversized so the drift never exposes an edge. */
  inset: -12% 0;
  z-index: -1;
  background-image: var(--radar-bg);
  background-size: cover;
  background-position: center;
  transform: translate3d(0, var(--radar-shift, 0px), 0);
  will-change: transform;
}

/* Hero plates: transform-only, GPU. */
.radar-hero__plate {
  will-change: transform;
  backface-visibility: hidden;
}

/* --------------------------------------------------------------------------
   Scroll-driven animations (Chrome/Edge 115+, Safari 26+).
   These run on the compositor thread — the motion stays locked to the
   scrollbar even if the main thread is busy. This is what makes it feel
   "connected" rather than clunky.
   -------------------------------------------------------------------------- */
@supports (animation-timeline: scroll()) {

  /* Hero wordmark: top 40% -> 70% over the first 800px, matching the original.
     `scroll()` normalises 0..100% over the document, so we cap the motion with
     an eased keyframe rather than letting it run the whole page. */
  .radar-hero__plate.radar-scroll-driven {
    animation: radar-hero-drift linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 800px;
  }

  @keyframes radar-hero-drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, 30vh, 0); }
  }

  /* The right-hand plate moves less — the depth cue. */
  .radar-hero__plate--right.radar-scroll-driven {
    animation-name: radar-hero-drift-slow;
  }

  @keyframes radar-hero-drift-slow {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, 16vh, 0); }
  }

  /* Cover backgrounds drift as they cross the viewport. */
  .radar-parallax.radar-scroll-driven::before {
    animation: radar-cover-drift linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }

  @keyframes radar-cover-drift {
    from { transform: translate3d(0, -8%, 0); }
    to   { transform: translate3d(0,  8%, 0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar-parallax::before,
  .radar-hero__plate {
    transform: none !important;
    animation: none !important;
  }
}

@media (max-width: 768px) {
  /* Parallax on touch is mostly jank for no payoff. Hold it still. */
  .radar-parallax::before { transform: none; animation: none; }
}

/* ==========================================================================
   Vimeo lightbox — tighten it up
   ========================================================================== */
.radar-modal__frame iframe { display: block; background: #000; }
.radar-modal__close {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  transition: background .2s;
}
.radar-modal__close:hover { background: var(--radar-accent); }

/* ==========================================================================
   ONE-PAGE MODE — v1.2
   ==========================================================================

   Two corrections to the first build:

   1. The hero plates are IMAGES (thisisradar.png, Dynamic.png), not text.
      Rebuilding them as styled type in a guessed orange looked nothing like
      the brand. The originals are transparent PNGs with the wordmark baked in.

   2. The site is a ONE-PAGER. Zoo stacked every page onto the front page and
      used the nav as an anchor scroller with a scroll-spy. Building it as five
      separate pages broke the whole feel of the thing.
   ========================================================================== */

/* --- hero plates: images, not text ------------------------------------- */
.radar-hero__plate img {
  display: block;
  max-width: min(48vw, 780px);
  height: auto;
}
.radar-hero__plate--left  { left: 0;  top: 40%; }
.radar-hero__plate--right { right: 0; top: 55%; }

/* The old text-based plates are gone. Kill their chrome so nothing bleeds
   through if a cached page still has the markup. */
.radar-hero__label,
.radar-hero__word,
.radar-hero__tag-a,
.radar-hero__tag-b { display: none; }

/* --- scroll-down cue ---------------------------------------------------- */
.radar-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(var(--radar-nav-h) + 1.25rem);
  transform: translateX(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: #fff;
  opacity: .75;
  animation: radar-bob 2.2s ease-in-out infinite;
}
.radar-hero__scroll:hover { opacity: 1; color: #fff; }
.radar-hero__scroll svg { width: 28px; height: 28px; }

@keyframes radar-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .radar-hero__scroll { animation: none; }
}

/* --- stacked sections --------------------------------------------------- */
.radar-section {
  /* Anchor targets must clear the fixed nav bar. */
  scroll-margin-top: var(--radar-nav-h);
}

/* Give the inner content its gutter, but let cover blocks go full-bleed. */
.radar-section > *:not(.wp-block-cover):not(.alignfull):not(.radar-parallax) {
  max-width: var(--radar-max);
  margin-inline: auto;
  padding-inline: 20px;
}
.radar-section .wp-block-cover,
.radar-section .radar-parallax {
  max-width: none;
  width: 100%;
}

/* --- nav: active state driven by scroll-spy ----------------------------- */
.radar-nav a.is-active,
.radar-nav .current-menu-item > a { color: #fff; }

.radar-nav a.is-active::after,
.radar-nav .current-menu-item > a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -.35rem;
  height: 2px;
  background: var(--radar-accent);
}

/* On the home hero the bar sits at the bottom, so the underline goes on top. */
body.home .radar-header { top: auto; bottom: 0; }
body.home .radar-nav a.is-active::after,
body.home .radar-nav .current-menu-item > a::after {
  bottom: auto;
  top: -.35rem;
}

/* Smooth scrolling for anyone who didn't get the JS. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (max-width: 768px) {
  .radar-hero__plate img { max-width: 82vw; }
  .radar-hero__scroll { display: none; }
}

/* ==========================================================================
   SERVICE ICON STRIP (the wood band)
   ==========================================================================

   The Zoo shortcodes wrapped each icon in <div class="iconholder">, but the
   opening and closing tags sat on OPPOSITE sides of a [scroll_animation]
   shortcode. Converting that to blocks split the raw HTML mid-element, and
   the result is a bit mangled:

       <p></div>
       <div class="iconholder"></p>

   The browser untangles that into five sibling <div>s — which is structurally
   fine, but they're block-level, so they stack vertically. The original laid
   them out in a row.

   Rather than hand-repair the imported markup (which the client would undo the
   first time they edit the page), lay them out from CSS against the DOM that
   actually exists.
   ========================================================================== */

.wp-block-cover__inner-container:has(.iconholder),
.wp-block-group:has(.iconholder),
.grid:has(.iconholder) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem 2.5rem;
  max-width: var(--radar-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.iconholder {
  flex: 0 0 auto;
  width: 170px;
  text-align: center;
}

.iconholder img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  margin: 0 auto;
}

.iconholder em {
  display: block;
  margin-top: .75rem;
  font-size: .9rem;
  font-style: italic;
  line-height: 1.3;
}

/* Empty paragraphs the shortcode split left behind. */
.wp-block-group:has(.iconholder) > p:empty,
.wp-block-cover__inner-container:has(.iconholder) > p:empty,
.grid:has(.iconholder) > p:empty { display: none; }

/* Fallback for anything without :has() — still beats a vertical stack. */
@supports not selector(:has(*)) {
  .iconholder { display: inline-block; vertical-align: top; }
  .wp-block-cover__inner-container { text-align: center; }
}

@media (max-width: 568px) {
  .iconholder { width: 130px; }
  .iconholder img { width: 110px; height: 110px; }
}

/* --- static map card ---------------------------------------------------- */
.radar-map--static {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 6;
  border: 1px solid var(--radar-rule);
  background: var(--radar-bg-alt);
  color: var(--radar-ink);
  text-align: center;
  transition: background .2s, border-color .2s;
}
.radar-map--static:hover { background: #fff; border-color: var(--radar-accent); color: var(--radar-ink); }
.radar-map__pin { width: 34px; height: 34px; color: var(--radar-accent); margin: 0 auto .5rem; display: block; }
.radar-map__city {
  display: block;
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--radar-ink-strong);
}
.radar-map__cta {
  display: block; margin-top: .6rem;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--radar-accent);
}
@media (max-width: 768px) { .radar-map--static { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   ICON STRIP — alignment fix
   ==========================================================================

   Bubble one sat higher than the other four.

   Cause: when the converter split <div class="iconholder"> across the
   [scroll_animation] boundary, the browser's error recovery left a stray <p>
   at the START of holders 2-5 (but not 1). Empty, but carrying the default
   paragraph top margin — so four bubbles got pushed down ~45px and the first
   one looked out of line. It was actually the only one in the right place.

   Kill the stray paragraphs and the row settles.
   ========================================================================== */

.iconholder p,
.wp-block-group:has(.iconholder) > p,
.wp-block-cover__inner-container:has(.iconholder) > p,
.grid:has(.iconholder) > p {
  display: none !important;
  margin: 0 !important;
}

/* Strip inherited margins so every holder measures from the same top edge. */
.iconholder > *,
.iconholder .radar-anim,
.iconholder .wp-block-radar-scroll-animation {
  margin-top: 0;
  margin-bottom: 0;
}

.iconholder img { margin-top: 0; }

/* Belt and braces: all five holders share one baseline. */
.wp-block-cover__inner-container:has(.iconholder),
.wp-block-group:has(.iconholder),
.grid:has(.iconholder) { align-items: flex-start; }
