/* ============================================================
 * YIO Header CSS — v3.9.0
 * Bundled with the yio-bulk-import plugin. Loaded globally on
 * every front-end page; the admin's Header appearance colours
 * and Custom header CSS are appended AFTER this file via
 * wp_add_inline_style(), so they always win the cascade.
 *
 * v3.9.0 — Full rewrite for responsiveness. Every selector now
 * matches the real markup emitted by includes/site-header.php:
 *   .yio-logo / .yio-logo-img / .yio-logo-svg  (was .yio-brand*)
 *   .yio-cta-wrap                              (was .yio-actions)
 *   .yio-cta-text — single span                (was -long/-short)
 *   .yio-hamburger > .yio-hamburger-bar ×3     (was span +
 *                                               ::before/::after)
 * Logo height is capped by the --logo-h token, which steps down
 * at each breakpoint. Responsive cascade: 320px → ultrawide.
 * The dead .yio-dropdown rules (no matching markup since v3.7)
 * have been removed.
 *
 * Companion files: yio-header.js, includes/site-header.php
 * ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --blue: #029CD7;
  --blue-deep: #0287BC;
  --blue-bright: #3DB7E0;
  --blue-soft: #E6F5FC;
  --blue-glow: rgba(2, 156, 215, .18);
  --blue-shadow: 0 12px 32px -8px rgba(2, 156, 215, .35);

  --ink: #0B1A2B;
  --ink-soft: #1A2942;
  --text: #3F4D5E;
  --muted: #7B8597;

  --line: #E5EAF0;
  --line-soft: #EFF2F6;
  --line-mute: #D9DEE6;

  --off: #F6F8FB;

  --r-sm: 8px;
  --r: 14px;

  --container: 1240px;
  --gut: clamp(20px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --header-top: 38px;
  --header-main: 72px;
  --header-main-compact: 58px;

  /* Logo height cap — steps down per breakpoint (see RESPONSIVE). */
  --logo-h: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--header-top) + var(--header-main));
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* ============================================================
   SITE HEADER — fixed, two rows
   ============================================================ */
.yio-site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: transform .35s var(--ease), box-shadow .3s var(--ease);
}

/* ---------- ROW 1 · Utility strip ---------- */
.yio-utility {
  height: var(--header-top);
  background: linear-gradient(90deg,
    rgba(2, 156, 215, .06) 0%,
    rgba(2, 156, 215, .10) 50%,
    rgba(2, 156, 215, .06) 100%);
  border-bottom: 1px solid var(--line-soft);
  transition: height .35s var(--ease), opacity .35s var(--ease);
  overflow: hidden;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}
.yio-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Live indicator (left of utility strip) */
.yio-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -.005em;
  min-width: 0;
}
.yio-live-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yio-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #16C172;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(22, 193, 114, .55);
  animation: yio-pulse 2.2s var(--ease) infinite;
}
@keyframes yio-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(22, 193, 114, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(22, 193, 114, 0);   }
  100% { box-shadow: 0 0 0 0    rgba(22, 193, 114, 0);   }
}
.yio-live-label strong { color: var(--ink); font-weight: 600; }
.yio-live-mute { color: var(--muted); font-weight: 500; }

/* Phone tap-to-call (right of utility strip) */
.yio-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
  flex-shrink: 0;
}
.yio-phone:hover { color: var(--blue); }
.yio-phone-label {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.yio-phone-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.yio-phone-num::before {
  content: "";
  display: inline-flex;
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  mask-size: 14px 14px; mask-position: center; mask-repeat: no-repeat;
  -webkit-mask-size: 14px 14px; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat;
}
.yio-phone-divider {
  width: 1px; height: 14px;
  background: var(--line-mute);
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- ROW 2 · Main nav ---------- */
.yio-main {
  height: var(--header-main);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: height .35s var(--ease), background .3s var(--ease);
}
.yio-main-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

/* ---------- Logo ----------
   Real markup: <a.yio-logo> wrapping either <img.yio-logo-img>
   or the SVG wordmark fallback <svg.yio-logo-svg>. */
.yio-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}
.yio-logo-img,
.yio-logo-svg {
  height: var(--logo-h);
  width: auto;
  display: block;
  transition: height .35s var(--ease);
}
.yio-logo-img { max-width: 220px; }

/* ---------- Primary navigation ---------- */
.yio-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.yio-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: .94rem;
  font-weight: 500;
  letter-spacing: -.008em;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.yio-nav-item:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

/* ---------- [yio_mega_menu] bridge styling ----------
   The shortcode renders .yio-mm > .yio-mm-trigger + .yio-mm-panel.
   Panel internals are styled in styles.css; here we only match the
   trigger to the nav items and anchor the panel under the header. */
.yio-nav .yio-mm {
  position: static;
  display: inline-flex;
}
.yio-nav .yio-mm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: .94rem;
  font-weight: 500;
  letter-spacing: -.008em;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.yio-nav .yio-mm-trigger:hover,
.yio-nav .yio-mm.is-open .yio-mm-trigger {
  color: var(--blue);
  background: var(--blue-soft);
}
.yio-nav .yio-mm-trigger svg {
  width: 11px; height: 11px;
  transition: transform .25s var(--ease);
}
.yio-nav .yio-mm.is-open .yio-mm-trigger svg {
  transform: rotate(180deg);
}
.yio-nav .yio-mm-panel {
  position: fixed;
  top: calc(var(--header-top) + var(--header-main));
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  max-width: var(--container);
  width: calc(100% - var(--gut) * 2);
}
.yio-site-header.is-scrolled .yio-nav .yio-mm-panel {
  top: var(--header-main-compact);
}
.yio-nav .yio-mm.is-open .yio-mm-panel {
  transform: translateX(-50%) translateY(0);
}

/* ---------- CTA ----------
   Real markup: <div.yio-cta-wrap> > <a.yio-cta> >
   <span.yio-cta-text> + <span.yio-cta-dot> + <svg.yio-cta-arrow>. */
.yio-cta-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.yio-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  box-shadow: var(--blue-shadow);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
}
.yio-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 50%);
  transition: opacity .25s var(--ease);
}
.yio-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -10px rgba(2, 156, 215, .55);
  filter: brightness(1.05);
}
.yio-cta:hover::before { opacity: 1; }
.yio-cta:active { transform: translateY(0); }
.yio-cta-text { white-space: nowrap; }
.yio-cta-arrow {
  flex-shrink: 0;
  transition: transform .25s var(--ease);
}
.yio-cta:hover .yio-cta-arrow { transform: translateX(3px); }
.yio-cta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .6);
  animation: yio-cta-pulse 2.4s var(--ease) infinite;
}
@keyframes yio-cta-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(255, 255, 255, .6); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);  }
  100% { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0);  }
}

/* ---------- Hamburger (mobile only) ----------
   Real markup: <button.yio-hamburger> with 3× <span.yio-hamburger-bar>.
   Bars animate into an X via :nth-child when aria-expanded="true". */
.yio-hamburger {
  display: none;            /* shown below 840px */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.yio-hamburger:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.yio-hamburger-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
/* X-animation: bar 1 drops + rotates, bar 2 fades, bar 3 rises + rotates.
   Bars are 2px tall with 5px gaps, so a bar centre is 7px from its
   neighbour — translateY(±7px) collapses them onto the middle bar. */
.yio-hamburger[aria-expanded="true"] .yio-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.yio-hamburger[aria-expanded="true"] .yio-hamburger-bar:nth-child(2) {
  opacity: 0;
}
.yio-hamburger[aria-expanded="true"] .yio-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Fiber waveform · bottom edge of header ----------
   Real markup: <div.yio-fiber> > <span.yio-fiber-line> +
   <span.yio-fiber-packet>. A faint static line with a glowing
   packet that travels across it. */
.yio-fiber {
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.yio-fiber-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(2, 156, 215, 0) 0%,
    rgba(2, 156, 215, .35) 50%,
    rgba(2, 156, 215, 0) 100%);
}
.yio-fiber-packet {
  position: absolute;
  top: 0; left: 0;
  width: 120px; height: 2px;
  background: linear-gradient(90deg,
    rgba(2, 156, 215, 0) 0%,
    var(--blue) 50%,
    rgba(2, 156, 215, 0) 100%);
  animation: yio-packet-flow 6s linear infinite;
}
@keyframes yio-packet-flow {
  from { transform: translateX(-140px); }
  to   { transform: translateX(100vw); }
}

/* ---------- Scrolled state ----------
   (Logo shrink-on-scroll is handled in the LOGO CONTAINMENT block.) */
.yio-site-header.is-scrolled .yio-utility {
  height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}
.yio-site-header.is-scrolled .yio-main {
  height: var(--header-main-compact);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px -12px rgba(11, 26, 43, .15);
}

/* ============================================================
   MOBILE OVERLAY MENU
   Real markup: .yio-mobile-menu#yioMobileMenu >
     .yio-mobile-head  (.yio-mobile-logo + .yio-mobile-close)
     .yio-mobile-body  (.yio-mobile-section ×N)
     .yio-mobile-foot  (.yio-mobile-cta + .yio-mobile-phone)
   Sits ABOVE the site header (z-index 200 > 100) so its own
   head bar is visible. Toggled by yio-header.js via aria-hidden.
   ============================================================ */
.yio-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .25s var(--ease), visibility .25s var(--ease), transform .3s var(--ease);
}
.yio-mobile-menu[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Head */
.yio-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  min-height: var(--header-main);
  padding: 12px var(--gut);
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.yio-mobile-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.yio-mobile-logo .yio-logo-img,
.yio-mobile-logo .yio-logo-svg {
  height: var(--logo-h);
  width: auto;
  max-width: 200px;
  display: block;
}
.yio-mobile-close {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--off);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.yio-mobile-close:hover {
  background: var(--blue-soft);
  transform: rotate(90deg);
}
.yio-mobile-close svg { width: 18px; height: 18px; }

/* Body — the scrollable middle region */
.yio-mobile-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px var(--gut) 24px;
}
.yio-mobile-section {
  padding-block: 18px;
  border-top: 1px solid var(--line-soft);
}
.yio-mobile-section:first-child { border-top: none; }
.yio-mobile-section h4 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.yio-mobile-section ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 2px;
}
.yio-mobile-section li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  margin: 0 -14px;
  border-radius: 12px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  transition: background .15s var(--ease);
}
.yio-mobile-section li a:hover,
.yio-mobile-section li a:active {
  background: var(--blue-soft);
}

/* Foot — pinned CTA + phone */
.yio-mobile-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px var(--gut);
  border-top: 1px solid var(--line-soft);
  background: #fff;
}
.yio-mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: var(--blue-shadow);
  transition: filter .2s var(--ease);
}
.yio-mobile-cta:hover { filter: brightness(1.05); }
.yio-mobile-cta svg { flex-shrink: 0; }
.yio-mobile-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--off);
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.yio-mobile-phone span { color: var(--muted); font-weight: 500; }

/* Lock body scroll while the mobile menu is open */
body.yio-menu-open { overflow: hidden; }

/* ============================================================
   RESPONSIVE CASCADE — 320px → ultrawide
   --logo-h steps down at each breakpoint; header heights and
   inner spacing compact progressively. The header collapses to
   the hamburger + mobile menu below 840px.
   ============================================================ */

/* ───── Ultrawide · ≥ 1600px ───── */
@media (min-width: 1600px) {
  :root {
    --container: 1360px;
    --header-main: 78px;
    --logo-h: 56px;
  }
  .yio-main-inner { gap: 40px; }
  .yio-nav-item,
  .yio-nav .yio-mm-trigger { padding: 10px 16px; font-size: .98rem; }
}

/* ───── Standard laptop · ≤ 1279px ───── */
@media (max-width: 1279px) {
  .yio-main-inner { gap: 24px; }
  .yio-nav { gap: 0; }
  .yio-nav-item,
  .yio-nav .yio-mm-trigger { padding: 9px 12px; }
}

/* ───── Small laptop / iPad landscape · ≤ 1099px ───── */
@media (max-width: 1099px) {
  :root {
    --header-main: 68px;
    --header-main-compact: 56px;
    --logo-h: 44px;
  }
  .yio-main-inner { gap: 18px; }
  .yio-nav-item,
  .yio-nav .yio-mm-trigger { padding: 8px 10px; font-size: .89rem; }
}

/* ───── Tablet portrait / large mobile · ≤ 839px ─────
   Desktop nav collapses; hamburger + mobile menu take over. */
@media (max-width: 839px) {
  :root {
    --header-main: 66px;
    --header-main-compact: 56px;
    --logo-h: 40px;
  }
  .yio-nav { display: none; }
  .yio-hamburger { display: inline-flex; }

  /* Logo absorbs the free space so the CTA + hamburger sit hard
     against the right edge — works whether or not the CTA shows. */
  .yio-logo { margin-right: auto; }

  .yio-main-inner { gap: 12px; }
  .yio-utility-inner { gap: 12px; justify-content: flex-end; }
  .yio-live { display: none; }
  .yio-phone-label,
  .yio-phone-divider { display: none; }

  .yio-cta { padding: 10px 18px; }
}

/* ───── Mobile · ≤ 639px ───── */
@media (max-width: 639px) {
  :root {
    --header-top: 36px;
    --header-main: 62px;
    --header-main-compact: 54px;
    --logo-h: 34px;
  }
  .yio-utility-inner { justify-content: center; }
  .yio-main-inner { gap: 10px; }
  .yio-cta { padding: 9px 15px; font-size: .88rem; }
  .yio-mobile-section li a { font-size: 1rem; }
}

/* ───── Small mobile · ≤ 479px ───── */
@media (max-width: 479px) {
  :root {
    --gut: 16px;
    --header-top: 34px;
    --header-main: 58px;
    --logo-h: 30px;
  }
  .yio-cta { padding: 8px 13px; font-size: .85rem; gap: 6px; }
  .yio-cta-dot { width: 6px; height: 6px; }
  .yio-cta-arrow { width: 12px; height: 12px; }
  .yio-phone-num { font-size: .8rem; gap: 5px; }
  .yio-phone-num::before {
    width: 18px; height: 18px;
    mask-size: 12px 12px; -webkit-mask-size: 12px 12px;
  }
  .yio-hamburger { width: 40px; height: 40px; }
}

/* ───── Tiny mobile (iPhone SE, older Android) · ≤ 359px ───── */
@media (max-width: 359px) {
  :root {
    --gut: 12px;
    --header-top: 32px;
    --header-main: 56px;
    --logo-h: 28px;
  }
  .yio-main-inner { gap: 8px; }
  .yio-cta-wrap { gap: 8px; }
  .yio-cta { padding: 7px 11px; font-size: .8rem; }
  .yio-cta-arrow { width: 11px; height: 11px; }
  .yio-cta-dot { display: none; }
  .yio-phone-num { font-size: .75rem; }
  .yio-hamburger { width: 38px; height: 38px; border-radius: 10px; }
}

/* ───── Landscape phone · short viewport ───── */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 959px) {
  :root {
    --header-top: 0px;
    --header-main: 52px;
    --logo-h: 28px;
  }
  .yio-utility { display: none; }
}

/* ───── Notched-device safe areas ───── */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(var(--gut), env(safe-area-inset-left));
    padding-right: max(var(--gut), env(safe-area-inset-right));
  }
  .yio-mobile-head,
  .yio-mobile-body,
  .yio-mobile-foot {
    padding-left: max(var(--gut), env(safe-area-inset-left));
    padding-right: max(var(--gut), env(safe-area-inset-right));
  }
  .yio-mobile-foot {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* ───── Touch-target minimums (WCAG 2.5.5) ───── */
@media (hover: none) and (pointer: coarse) {
  .yio-cta { min-height: 44px; }
  .yio-hamburger { min-width: 44px; min-height: 44px; }
  .yio-phone { min-height: 38px; }
  .yio-mobile-close { min-width: 44px; min-height: 44px; }
  .yio-mobile-section li a { min-height: 48px; }
}

/* ───── Keyboard focus rings ───── */
.yio-logo:focus-visible,
.yio-nav-item:focus-visible,
.yio-hamburger:focus-visible,
.yio-cta:focus-visible,
.yio-phone:focus-visible,
.yio-mobile-logo:focus-visible,
.yio-mobile-cta:focus-visible,
.yio-mobile-phone:focus-visible,
.yio-mobile-section li a:focus-visible,
.yio-mobile-close:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.yio-cta:focus-visible,
.yio-mobile-cta:focus-visible { outline-offset: 3px; }

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .yio-live-dot,
  .yio-cta-dot,
  .yio-fiber-packet { animation: none; }
  .yio-fiber-packet { opacity: .35; }
}

/* ============================================================
   DEFENSIVE OVERRIDES
   Wins specificity battles against themes (e.g. Elementor Theme
   Builder headers) that try to suppress the utility strip or
   constrain header height. If the two-row header renders as one
   row, check the theme's Header template: Min-Height = Auto,
   Padding = 0, Width = Full Width / Stretch.
   ============================================================ */
.yio-site-header,
.yio-site-header.yio-site-header { display: block !important; }

.yio-site-header .yio-utility,
.yio-site-header.yio-site-header .yio-utility { display: block !important; }

.yio-site-header.is-scrolled .yio-utility,
.yio-site-header.is-scrolled.yio-site-header .yio-utility {
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

@media (max-height: 480px) and (orientation: landscape) and (max-width: 959px) {
  .yio-site-header .yio-utility,
  .yio-site-header.yio-site-header .yio-utility { display: none !important; }
}

/* ============================================================
   LOGO CONTAINMENT — defensive
   Some themes ship aggressive `header img { … }` resets, or set
   the logo image to width:100% / height:auto, which blows the
   logo right out of the header bar (oversized-wordmark bug).
   These ID-scoped !important rules pin the logo image AND the
   SVG wordmark fallback to the --logo-h token so the logo always
   fits the bar — on the header and inside the mobile menu.
   If a logo still looks wrong, this is the block to adjust.
   ============================================================ */
#yioHeader .yio-logo,
#yioMobileMenu .yio-mobile-logo {
  height: var(--logo-h);
  max-height: var(--logo-h);
  overflow: hidden;            /* clip any residual bleed */
}
#yioHeader .yio-logo .yio-logo-img,
#yioHeader .yio-logo .yio-logo-svg,
#yioMobileMenu .yio-mobile-logo .yio-logo-img,
#yioMobileMenu .yio-mobile-logo .yio-logo-svg {
  height: var(--logo-h) !important;
  max-height: var(--logo-h) !important;
  width: auto !important;
  max-width: 320px !important;
  min-width: 0 !important;
  object-fit: contain !important;
  object-position: left center;
  display: block !important;
}
/* Logo shrinks slightly once the header enters its scrolled state. */
#yioHeader.is-scrolled .yio-logo,
#yioHeader.is-scrolled .yio-logo .yio-logo-img,
#yioHeader.is-scrolled .yio-logo .yio-logo-svg {
  height: calc(var(--logo-h) - 6px) !important;
  max-height: calc(var(--logo-h) - 6px) !important;
}
