/*
 * layout.css — header, footer, containers, page grids, hero, breadcrumb, mega-menu.
 */

/* ---- Container ------------------------------------------------------------ */
.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px) {
  .container { padding-inline: var(--space-6); }
}

.page {
  background: var(--grad-page);
}
.page-hero-bg {
  background-image: var(--grad-hero);
  background-repeat: no-repeat;
}

/* ---- Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .site-header-inner { padding-inline: var(--space-6); }
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex: none;
}
.logo-img { height: 60px; width: auto; display: block; }
.logo-me { color: var(--blue-600); }
.logo-tools { color: var(--neutral-900); }

.header-spacer { flex: 1 1 auto; }

/* Mega-menu ------------------------------------------------------------------- */
.mega-menu { position: relative; flex: none; }
.mega-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font: 600 14px/1 var(--font-sans);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.mega-menu-toggle:hover { background: var(--blue-50); color: var(--blue-700); }
.mega-menu-toggle .icon { transition: transform var(--dur-fast) var(--ease-out); }
.mega-menu-toggle[aria-expanded="true"] { background: var(--blue-50); color: var(--blue-700); }
.mega-menu-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.mega-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(760px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  display: grid;
  /* 3 columns × 2 rows fits all 6 categories in a balanced block */
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5) var(--space-6);
  align-items: start;
  /* Never taller than the viewport — scroll inside the panel when it would overflow */
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
  z-index: 60;
}
.mega-menu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 767px) {
  .mega-menu-panel { grid-template-columns: repeat(2, 1fr); }
}
/* Full-width "view all tools" link at the bottom of the mega-menu */
.mega-menu-all {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--border);
  font: 600 14px var(--font-sans);
  color: var(--blue-600);
  border-radius: var(--radius-sm);
}
.mega-menu-all:hover { background: var(--blue-50); color: var(--blue-700); }

/* All-tools index page header */
.all-tools-page { padding-top: var(--space-6); }
.all-tools-head { text-align: center; margin-bottom: var(--space-10); }
.all-tools-head h1 { font-size: var(--text-3xl-size, 30px); margin-bottom: var(--space-3); }
.all-tools-intro { color: var(--text-secondary); max-width: 60ch; margin: 0 auto var(--space-6); }
.all-tools-search { position: relative; max-width: 560px; margin: 0 auto var(--space-5); }
.all-tools-page .hero-chips { justify-content: center; }

.mega-menu-col-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 600 14px/1.4 var(--font-sans);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}
.mega-menu-col-title .icon-tile {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  background: var(--blue-50);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mega-menu-col-title .icon-tile .icon { width: 14px; height: 14px; }

.mega-menu-list { display: flex; flex-direction: column; gap: 2px; }
.mega-menu-link {
  display: block;
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  font: 500 14px/1.4 var(--font-sans);
  color: var(--text-secondary);
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.mega-menu-link:hover, .mega-menu-link:focus-visible {
  background: var(--blue-50);
  color: var(--blue-600);
}

/* Header search ----------------------------------------------------------------- */
.header-search { position: relative; flex: none; }
.header-search-input {
  width: 200px;
  height: 40px;
  padding: 0 var(--space-3) 0 40px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--surface) var(--search-icon-bg, none) no-repeat;
  font: 400 14px var(--font-sans);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
@media (min-width: 1024px) {
  .header-search-input { width: 280px; }
}
.header-search-input:hover { border-color: var(--neutral-400); }
.header-search-input:focus {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-xs), var(--shadow-focus);
}
.header-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  pointer-events: none;
}
.header-search-kbd {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  font: 500 11px/1 var(--font-sans);
  color: var(--neutral-400);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-xs);
  padding: 3px 5px;
  pointer-events: none;
}
@media (hover: none) {
  .header-search-kbd { display: none; }
}

.search-dropdown {
  /* display:none when closed so the hidden panel never contributes to layout width
     (a visibility:hidden panel with min-width still forces horizontal page scroll on mobile). */
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: min(280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 60;
}
.search-dropdown.is-open { display: block; animation: mt-dropdown-in var(--dur-fast) var(--ease-out); }
@keyframes mt-dropdown-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.search-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.search-result:hover, .search-result.is-active, .search-result[aria-selected="true"] {
  background: var(--blue-50);
}
.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.search-result-icon .icon { width: 16px; height: 16px; }
.search-result-name { font: 500 14px/1.4 var(--font-sans); color: var(--text-primary); }
.search-result-empty {
  padding: var(--space-4);
  text-align: center;
  font: 400 14px var(--font-sans);
  color: var(--text-muted);
}

/* Mobile search overlay ---------------------------------------------------------- */
.header-search-toggle {
  display: none;
}
@media (max-width: 767px) {
  .header-search-input { display: none; }
  .header-search-kbd { display: none; }
  .header-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
  }
  .header-search.is-mobile-open .header-search-input {
    display: block;
    position: fixed;
    left: var(--space-4);
    right: var(--space-4);
    top: 12px;
    width: auto;
    z-index: 70;
  }
}

/* Hamburger ------------------------------------------------------------------------ */
.hamburger-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  flex: none;
}
@media (max-width: 767px) {
  .hamburger-toggle { display: inline-flex; }
  /* The hamburger + mobile panel replace the desktop Tools mega-menu below 768px,
     so hide the whole mega-menu (not just its label) to avoid a redundant, overflowing button. */
  .mega-menu { display: none; }
}

.mobile-panel-all {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font: 600 15px var(--font-sans);
  color: var(--blue-600);
}
.mobile-panel-all .icon-chev { margin-left: auto; }
.mobile-panel {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 55;
  background: var(--surface);
  overflow-y: auto;
  padding: var(--space-4);
}
.mobile-panel.is-open { display: block; }
.mobile-panel details {
  border-bottom: 1px solid var(--border);
}
.mobile-panel summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  font: 600 15px var(--font-sans);
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}
.mobile-panel summary::-webkit-details-marker { display: none; }
.mobile-panel summary .icon-chev { margin-left: auto; transition: transform var(--dur-fast) var(--ease-out); }
.mobile-panel details[open] summary .icon-chev { transform: rotate(180deg); }
.mobile-panel-links { display: flex; flex-direction: column; gap: 2px; padding: 0 0 var(--space-3) var(--space-2); }
.mobile-panel-links a {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font: 500 14px var(--font-sans);
  color: var(--text-secondary);
}
.mobile-panel-links a:hover { background: var(--blue-50); color: var(--blue-600); }

@media (max-width: 767px) {
  .mega-menu-panel { display: none; }
}

/* ---- Hero -------------------------------------------------------------------------- */
.hero {
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
}
.hero-title {
  font-size: 30px;
  line-height: 42px;
  font-weight: 700;
  max-width: 760px;
  margin-inline: auto;
}
@media (min-width: 640px) {
  .hero-title { font-size: 34px; line-height: 44px; }
}
@media (min-width: 1024px) {
  .hero-title { font-size: var(--text-4xl-size); line-height: var(--text-4xl-line); }
}
.hero-subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-lg-size);
  line-height: var(--text-lg-line);
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
}
.hero-search {
  margin: var(--space-8) auto 0;
  max-width: 640px;
  position: relative;
}
.hero-search-input {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-4) 0 48px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font: 400 16px var(--font-sans);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.hero-search-input:focus {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-md), var(--shadow-focus);
}
.hero-search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  pointer-events: none;
}
.hero-search .search-dropdown { text-align: left; }

.hero-chips {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* ---- Category sections (homepage) -------------------------------------------------- */
.category-section { margin-top: var(--space-16); }
.category-section-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.category-icon-tile {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.category-section-title { font-size: var(--text-xl-size); line-height: var(--text-xl-line); font-weight: 600; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}

/* ---- Tool page --------------------------------------------------------------------- */
.tool-page-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px) {
  .tool-page-container { padding-inline: var(--space-6); }
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: 13px;
  color: var(--text-muted);
  margin: var(--space-6) 0 var(--space-3);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb .icon { width: 14px; height: 14px; color: var(--neutral-300); }
.breadcrumb-current { color: var(--neutral-800); }

.tool-page-h1 {
  margin-bottom: var(--space-3);
}
.tool-page-intro {
  font-size: var(--text-base-size);
  line-height: var(--text-base-line);
  color: var(--text-secondary);
  max-width: 760px;
  margin-bottom: var(--space-6);
}

.tool-panel {
  margin-bottom: var(--space-10);
}
.tool-panel--split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-6);
}
@media (max-width: 1023px) {
  /* minmax(0,1fr) (not plain 1fr) lets the column shrink below its content's
     min-content, so non-shrinkable children (tab strips, long code) scroll
     inside their own container instead of blowing out the page width. */
  .tool-panel--split { grid-template-columns: minmax(0, 1fr); }
}
/* Grid/flex children must be allowed to shrink below content size (min-width:auto
   is the default and causes horizontal overflow on mobile). */
.tool-input, .tool-output { min-width: 0; }
.tool-panel--stack > * + * {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.seo-section { margin-top: var(--space-10); }

.related-tools { margin: var(--space-16) 0; }

/* ---- Footer ------------------------------------------------------------------------ */
.site-footer {
  background: var(--neutral-50);
  border-top: 1px solid var(--border);
  margin-top: var(--space-24);
  padding: var(--space-12) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--space-6);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(5, 1fr); }
}
.footer-col-title {
  font: 600 13px/1.4 var(--font-sans);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { font: 400 14px var(--font-sans); color: var(--text-secondary); }
.footer-links a:hover { color: var(--blue-600); }

.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 13px;
  color: var(--text-muted);
}
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--blue-600); }
.footer-copyright { font-size: 13px; color: var(--text-muted); }

/* ---- Static / prose pages ------------------------------------------------------------ */
.static-page { max-width: 760px; margin: 0 auto var(--space-16); padding: 0 var(--space-4); }
@media (min-width: 640px) {
  .static-page { padding: 0 var(--space-6); }
}

/* ---- Interstitial / gone / blocked pages ---------------------------------------------- */
.notice-page {
  max-width: 560px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-4);
  text-align: center;
}
.notice-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--blue-50);
  color: var(--blue-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}
.notice-icon.is-warning { background: var(--warning-50); color: var(--warning-500); }
.notice-icon.is-error { background: var(--error-50); color: var(--error-600); }
.notice-icon .icon { width: 32px; height: 32px; }
.notice-title { margin-bottom: var(--space-3); }
.notice-body { color: var(--text-secondary); margin-bottom: var(--space-8); }

/* ---- Hero decoration: aurora glow + floating tool tiles ----------------------------
   Purely decorative and inert (aria-hidden + pointer-events:none). The clipping lives on
   .hero-deco itself, NOT on .page-hero-bg — putting overflow:hidden on the parent would
   crop the search dropdown that opens out of the hero. */
.page-hero-bg { position: relative; }
.page-hero-bg > .container { position: relative; z-index: 1; }

.hero-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .55;
  will-change: transform;
  animation: hero-drift 26s ease-in-out infinite alternate;
}
.hero-aurora--1 {
  width: 420px; height: 420px; top: -170px; left: 6%;
  background: radial-gradient(circle, var(--blue-300), transparent 70%);
}
.hero-aurora--2 {
  width: 360px; height: 360px; top: -60px; right: 5%;
  background: radial-gradient(circle, #C7D8FF, transparent 70%);
  animation-duration: 32s; animation-delay: -7s;
}
.hero-aurora--3 {
  width: 320px; height: 320px; bottom: -180px; left: 40%;
  background: radial-gradient(circle, #DCE7FF, transparent 70%);
  animation-duration: 36s; animation-delay: -14s;
}
@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(26px, -20px, 0) scale(1.08); }
}

/* Frosted tiles carrying real sprite icons — the "floating tools" motif. */
.hero-float {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(37, 99, 235, .12);
  backdrop-filter: blur(6px);
  color: var(--blue-600);
  will-change: transform;
  animation: hero-bob 8s ease-in-out infinite;
}
.hero-float .icon { width: 22px; height: 22px; }
@keyframes hero-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-14px) rotate(3deg); }
}
/* Staggered so they never move as one block; varied size reads as depth. */
.hero-float--1 { top: 16%; left: 4%;   animation-duration: 7.4s; }
.hero-float--2 { top: 47%; left: 9%;   width: 44px; height: 44px; opacity: .85; animation-duration: 9.1s; animation-delay: -2s; }
.hero-float--3 { top: 71%; left: 3%;   width: 60px; height: 60px; animation-duration: 8.3s; animation-delay: -4s; }
.hero-float--4 { top: 21%; right: 5%;  animation-duration: 8.7s; animation-delay: -1s; }
.hero-float--5 { top: 50%; right: 10%; width: 44px; height: 44px; opacity: .85; animation-duration: 7.9s; animation-delay: -3s; }
.hero-float--6 { top: 74%; right: 4%;  width: 58px; height: 58px; animation-duration: 9.5s; animation-delay: -5s; }
.hero-float--7 { top: 6%;  left: 13%;  width: 40px; height: 40px; opacity: .7; animation-duration: 10.2s; animation-delay: -6s; }
.hero-float--8 { top: 8%;  right: 13%; width: 40px; height: 40px; opacity: .7; animation-duration: 9.3s; animation-delay: -7s; }

/* The gutter shrinks with the viewport, so tiles drop out in rings from the inside:
   first the two nearest the headline, then the pair closest to the search and chips,
   then all of them once there is no gutter left at all. */
@media (max-width: 1439px) {
  .hero-float--7, .hero-float--8 { display: none; }
}
@media (max-width: 1365px) {
  .hero-float--2, .hero-float--3, .hero-float--5, .hero-float--6 { display: none; }
}
@media (max-width: 1023px) {
  .hero-float { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-aurora, .hero-float { animation: none; }
}

/* ---- Hero stat pills --------------------------------------------------------------- */
.hero-stats {
  margin: var(--space-5) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.hero-stat strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue-600);
}
.hero-stat .icon { width: 16px; height: 16px; color: var(--blue-500); }

/* Logged-in header on phones: the account area is three full-width buttons plus the
   hamburger, which together overflow a 390px screen. Collapse the labels to icons and
   drop the admin link (it lives one tap away inside the account page). */
/* Tablets have room for the buttons but not for their labels. (The login/register and
   admin links carry a bare text node rather than a span, so they keep their wording.) */
@media (max-width: 1023px) {
  .acct-menu-links .btn { padding-inline: 9px; }
  .acct-menu-links .btn span { display: none; }
  /* The panel is anchored to the Tools trigger, so its 760px width overhangs the right
     edge once the viewport drops under ~1030px. Clamp it to the space actually left. */
  .mega-menu-panel { width: min(760px, calc(100vw - 160px)); }
}
@media (max-width: 767px) {
  .site-header-inner { gap: var(--space-2); }
  .acct-menu-links { gap: 4px; }
  /* A 390px row cannot hold six controls without pushing the hamburger off the edge.
     Admin and logout are one tap away on /account; register is linked from the login
     page, which is the standard mobile pattern and the state most visitors are in. */
  .acct-menu-links .acct-menu-admin,
  .acct-menu-links .acct-logout,
  .acct-menu-links .btn-primary { display: none; }
}

/* ---- Hero cluster: the logo with tool tiles floating around it ---------------------
   Lives in the flow (not the gutters) so it is the one piece of the decoration that is
   visible at every width, including the ~1000px window where the gutter tiles vanish. */
.hero-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-6);
}
.hero-cluster-tile,
.hero-cluster-logo {
  display: grid;
  place-items: center;
  flex: none;
  will-change: transform;
  animation: hero-bob 7s ease-in-out infinite;
}
.hero-cluster-tile {
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 8px 22px rgba(37, 99, 235, .12);
  backdrop-filter: blur(6px);
  color: var(--blue-600);
}
/* Sizes step down outwards so the row reads as depth rather than a toolbar. */
.hero-cluster-tile--md { width: 52px; height: 52px; }
.hero-cluster-tile--md .icon { width: 24px; height: 24px; }
.hero-cluster-tile--sm { width: 44px; height: 44px; opacity: .92; }
.hero-cluster-tile--sm .icon { width: 20px; height: 20px; }
.hero-cluster-tile--xs { width: 36px; height: 36px; opacity: .75; }
.hero-cluster-tile--xs .icon { width: 17px; height: 17px; }

/* The logo mark is blue on transparency, so the tile stays WHITE — on a blue fill the
   mark would disappear. The brand colour goes into the border instead, painted with the
   padding-box/border-box gradient trick so there is no negative z-index to fight. */
.hero-cluster-logo {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--blue-500), #8FBBFF 55%, var(--blue-600)) border-box;
  /* Drop shadow + a wide, faint ring: the halo that makes it read as the centrepiece. */
  box-shadow: 0 16px 36px rgba(37, 99, 235, .30), 0 0 0 10px rgba(37, 99, 235, .05);
}
.hero-cluster-logo img {
  width: 60px;
  height: 60px;
}

/* Wave: each tile lags its neighbour so the row undulates instead of pulsing as one. */
.hero-cluster > :nth-child(1) { animation-delay: 0s;    animation-duration: 7.6s; }
.hero-cluster > :nth-child(2) { animation-delay: -.45s; animation-duration: 7.2s; }
.hero-cluster > :nth-child(3) { animation-delay: -.9s;  animation-duration: 6.8s; }
.hero-cluster > :nth-child(4) { animation-delay: -1.35s; animation-duration: 6.4s; }
.hero-cluster > :nth-child(5) { animation-delay: -1.8s; animation-duration: 6.8s; }
.hero-cluster > :nth-child(6) { animation-delay: -2.25s; animation-duration: 7.2s; }
.hero-cluster > :nth-child(7) { animation-delay: -2.7s; animation-duration: 7.6s; }

@media (max-width: 767px) {
  .hero-cluster { margin-bottom: var(--space-4); }
}
@media (max-width: 479px) {
  .hero-cluster { gap: 8px; }
  .hero-cluster-tile--xs { display: none; }
  .hero-cluster-logo { width: 60px; height: 60px; border-radius: 19px; }
  .hero-cluster-logo img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cluster-tile, .hero-cluster-logo { animation: none; }
}
