/* ==========================================================================
   SKY ROMS — PORTFOLIO DESIGN SYSTEM PORT (SKY BLUE DARK & LIGHT THEMES)
   Covers:
   1. Header chrome + Sticky Backbar alignment + Theme toggle
   2. Sterling Gate Full-Screen Navigation Overlay
   3. Liquid-Glass 5-Layer Button System (.glass-btn)
   4. Floating + Social Launcher (.portfolio-action-menu) + Donate/BackTop coordination
   5. Let's Connect Diagonal Bands Panel (.fcb-section / GradientBlinds)
   6. Illuminated SKY Wordmark Footer (.beam-footer-section)
   7. Interactive Traveling-Border Cards (.card-glass-interactive)
   ========================================================================== */

:root {
  --font-display: 'Anton', 'Space Grotesk', system-ui, sans-serif;
  --font-wordmark: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
  --sky-deep: #0369a1;
  --sky-mid: #0ea5e9;
  --sky-bright: #38bdf8;
  --sky-cyan: #22d3ee;
  --sky-ice: #bae6fd;
  --chrome-glass-bg: rgba(8, 15, 28, 0.76);
  --chrome-glass-bg-hover: rgba(12, 24, 42, 0.9);
  --chrome-glass-border: rgba(56, 189, 248, 0.24);
  --chrome-glass-border-strong: rgba(56, 189, 248, 0.56);
  --wm-base: #1e4b73;
  --wm-beam-edge: #38bdf8;
  --wm-beam-mid: #bae6fd;
  --wm-beam-peak: #f0f9ff;
}

body.light {
  --sky-deep: #075985;
  --sky-mid: #0284c7;
  --sky-bright: #0284c7;
  --sky-cyan: #0891b2;
  --sky-ice: #38bdf8;
  --chrome-glass-bg: rgba(255, 255, 255, 0.84);
  --chrome-glass-bg-hover: rgba(242, 247, 254, 0.96);
  --chrome-glass-border: rgba(2, 132, 199, 0.26);
  --chrome-glass-border-strong: rgba(2, 132, 199, 0.58);
  --wm-base: rgba(7, 89, 133, 0.24);
  --wm-beam-edge: #0284c7;
  --wm-beam-mid: #0ea5e9;
  --wm-beam-peak: #0c4a6e;
}

/* Reset focus outline to cohesive SKY blue glow */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ==========================================================================
   1. TOP HEADER & CHROME ALIGNMENT (320px TO ULTRAWIDE)
   ========================================================================== */

header#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding-left: max(clamp(12px, 3.5vw, 48px), calc((100% - 1440px) / 2));
  padding-right: clamp(12px, 2vw, 24px);
  background: rgba(5, 9, 18, 0.42);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  z-index: 1000;
  transition: background-color 0.28s ease, border-color 0.28s ease, backdrop-filter 0.28s ease;
}

@media (min-width: 1800px) {
  header#header {
    padding-left: max(clamp(16px, 3.5vw, 48px), calc((100% - 1600px) / 2));
    padding-right: clamp(14px, 1.8vw, 28px);
  }
}

body.light header#header {
  background: rgba(241, 246, 252, 0.46);
  border-bottom-color: rgba(2, 132, 199, 0.14);
}

header#header.scrolled {
  background: rgba(5, 9, 18, 0.56);
}

body.light header#header.scrolled {
  background: rgba(241, 246, 252, 0.62);
}

/* Home Hero: hide full header bar & top-left logo until user scrolls fully past #hero; keep top-right controls closer to edge */
header#header.home-hero-header:not(.is-revealed) {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

header#header.home-hero-header .header-actions {
  pointer-events: auto;
}

header#header.home-hero-header:not(.is-revealed) .top-left-logo-link {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

header#header.home-hero-header.is-revealed .top-left-logo-link {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Top-Left Brand Lockup matching portfolio glow treatment */
header#header .brand.top-left-logo-link {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: 14px;
  min-width: 0;
  flex-shrink: 1;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.26s ease;
}

/* Homepage Hero Brand Lockup (placed cleanly above headline instead of TZ Labs eyebrow) */
.hero-brand-lockup {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(10px, 1.8vh, 22px);
}

.hero-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.45)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.52));
}

body.light .hero-brand-logo {
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.24));
}

.hero-brand-name {
  font-family: var(--font-wordmark);
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.hero-brand-name em {
  font-style: normal;
  color: var(--primary);
}

.top-left-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.42)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  transition: filter 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light .top-left-logo-img {
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.24));
}

header#header .brand.top-left-logo-link:hover .top-left-logo-img,
header#header .brand.top-left-logo-link:focus-visible .top-left-logo-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.72)) drop-shadow(0 0 6px rgba(186, 230, 253, 0.85));
}

body.light header#header .brand.top-left-logo-link:hover .top-left-logo-img,
body.light header#header .brand.top-left-logo-link:focus-visible .top-left-logo-img {
  filter: drop-shadow(0 4px 14px rgba(2, 132, 199, 0.38));
}

.brand-wordmark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

header#header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Legacy top nav & mobile menu drawer hidden cleanly (replaced by Menu + / Sterling Gate overlay) */
header#header nav#nav,
.hamburger,
.mobile-menu {
  display: none !important;
}

/* Header Menu + glass trigger */
.blue-glass-btn.floating-menu-btn,
.glass-btn.floating-menu-btn {
  min-width: 118px;
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  gap: 10px;
}

.menu-plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  transform-origin: center center;
}

.menu-plus-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.menu-plus-icon.is-rotated {
  transform: rotate(45deg);
}

/* Theme toggle SVG / glyphs */
.theme-toggle.glass-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

body:not(.light) .theme-toggle svg.sun {
  display: none !important;
}

body.light .theme-toggle svg.moon {
  display: none !important;
}

.theme-toggle:hover {
  transform: translateY(-1.5px);
}

@media (max-width: 420px) {
  header#header {
    padding-inline: 12px;
    gap: 8px;
  }

  header#header .brand.top-left-logo-link {
    gap: 7px;
    padding: 2px 4px;
    margin-left: -4px;
  }

  .top-left-logo-img {
    width: 28px;
    height: 28px;
  }

  .brand-wordmark {
    font-size: 13.5px;
    letter-spacing: -0.02em;
  }

  header#header .header-actions {
    gap: 6px;
  }

  .theme-toggle.glass-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .blue-glass-btn.floating-menu-btn,
  .glass-btn.floating-menu-btn {
    min-width: 88px;
    height: 38px;
    min-height: 38px;
    padding: 0 11px;
    font-size: 0.84rem;
    gap: 6px;
  }
}

/* Sticky detail backbar & All ROMs coordination */
.detail-backbar {
  position: sticky;
  top: 64px;
  z-index: 950;
  margin-top: 64px;
}

.detail-backbar .detail-all-roms.glass-btn {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 13px;
}

@media (max-width: 360px) {
  .detail-backbar-inner {
    width: calc(100% - 24px);
    padding: 6px 0;
  }

  .detail-backbar .detail-all-roms.glass-btn {
    min-height: 36px;
    padding: 5px 12px;
    font-size: 12.5px;
  }
}

/* ==========================================================================
   2. STERLING GATE OVERLAY MENU (GREEN DARK & LIGHT)
   ========================================================================== */

.sterling-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background-color: rgba(4, 12, 10, 0.84);
  background-image:
    radial-gradient(circle at 50% 18%, rgba(14, 165, 233, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 82% 82%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) max(16px, clamp(16px, 4vw, 48px)) max(20px, env(safe-area-inset-bottom, 20px));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sterling-gate-overlay[hidden] {
  display: none !important;
}

.sterling-gate-overlay.is-open {
  opacity: 1;
}

body.light .sterling-gate-overlay {
  background-color: rgba(235, 245, 241, 0.92);
  background-image:
    radial-gradient(circle at 50% 18%, rgba(2, 132, 199, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
}

.sterling-gate-container {
  width: 100%;
  max-width: 1040px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: auto;
  box-sizing: border-box;
  gap: clamp(10px, 1.5vh, 18px);
}

.sterling-gate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: clamp(10px, 1.4vh, 16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  width: 100%;
  flex-shrink: 0;
  min-width: 0;
}

body.light .sterling-gate-header {
  border-bottom-color: rgba(2, 132, 199, 0.16);
}

.sterling-brand-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.sterling-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.45));
}

body.light .sterling-logo-img {
  filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.25));
}

.sterling-brand-text-col {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.sterling-brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.sterling-brand-role {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text2);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.sterling-close-wrap {
  flex: 0 0 auto;
}

.sterling-close-wrap .glass-btn {
  min-height: 44px;
  font-size: 0.98rem;
}

.sterling-nav-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 11px);
  margin: 0;
  width: 100%;
  flex: 1 1 auto;
  justify-content: center;
}

.sterling-nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(9px, 1.35vh, 15px) clamp(14px, 2.2vw, 26px);
  border-radius: 14px;
  background: rgba(7, 18, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.14);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, opacity 0.3s ease;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

body.light .sterling-nav-row {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(2, 132, 199, 0.22);
  box-shadow: 0 4px 16px rgba(7, 28, 56, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.sterling-nav-row.is-active {
  border-color: var(--chrome-glass-border-strong);
  background: rgba(12, 34, 27, 0.82);
}

body.light .sterling-nav-row.is-active {
  background: rgba(226, 240, 253, 0.96);
}

.sterling-row-num {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  width: 28px;
  flex-shrink: 0;
}

.sterling-row-label-wrap {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.sterling-row-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.3vh, 2.05rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text);
  transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
  min-width: 0;
}

.sterling-row-tagline {
  font-size: clamp(0.84rem, 1.3vh, 0.96rem);
  color: var(--text2);
  font-weight: 500;
  letter-spacing: 0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sterling-row-arrow {
  font-size: 1.35rem;
  color: var(--text2);
  opacity: 0.65;
  transition: transform 0.22s ease, color 0.22s ease, opacity 0.22s ease;
  justify-self: end;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .sterling-nav-row:hover {
    background: rgba(12, 34, 27, 0.88);
    border-color: rgba(56, 189, 248, 0.68);
    box-shadow:
      0 8px 28px rgba(0, 0, 0, 0.55),
      0 0 22px rgba(14, 165, 233, 0.3),
      inset 0 1px 2px rgba(255, 255, 255, 0.28);
    transform: translateX(6px);
  }

  body.light .sterling-nav-row:hover {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.65);
    box-shadow:
      0 10px 28px rgba(7, 28, 56, 0.14),
      0 0 18px rgba(2, 132, 199, 0.18);
  }

  .sterling-nav-row:hover .sterling-row-title {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.48);
  }

  body.light .sterling-nav-row:hover .sterling-row-title {
    text-shadow: none;
  }

  .sterling-nav-row:hover .sterling-row-arrow {
    color: var(--primary);
    opacity: 1;
    transform: translateX(6px);
  }
}

.sterling-nav-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-color: var(--chrome-glass-border-strong);
}

.sterling-nav-row:active {
  transform: scale(0.99) translateX(3px);
}

.sterling-gate-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(10px, 1.4vh, 16px);
  border-top: 1px solid rgba(56, 189, 248, 0.14);
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  flex-shrink: 0;
}

body.light .sterling-gate-footer {
  border-top-color: rgba(2, 132, 199, 0.16);
}

.sterling-footer-col {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sterling-footer-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text2);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.sterling-social-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .sterling-gate-overlay {
    padding: max(12px, env(safe-area-inset-top, 12px)) 14px max(16px, env(safe-area-inset-bottom, 16px));
  }

  .sterling-brand-role {
    display: none;
  }

  .sterling-brand-name {
    font-size: 1.05rem;
  }

  .sterling-logo-img {
    width: 32px;
    height: 32px;
  }

  .sterling-nav-rows {
    gap: 6px;
  }

  .sterling-nav-row {
    grid-template-columns: 24px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
  }

  .sterling-row-num {
    font-size: 0.82rem;
    width: 24px;
  }

  .sterling-row-tagline {
    display: none;
  }

  .sterling-row-title {
    font-size: clamp(1.15rem, 4.4vw, 1.45rem);
  }

  .sterling-gate-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .sterling-footer-col {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .sterling-footer-btn-wrap .glass-btn {
    width: 100%;
    justify-content: center;
  }

  .sterling-social-pills-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .sterling-social-pills-row .glass-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Scrollable gracefully on short landscape screens */
@media (max-height: 580px) {
  .sterling-gate-overlay {
    align-items: flex-start;
  }

  .sterling-gate-container {
    height: auto;
    max-height: none;
    padding-block: 8px 20px;
  }

  .sterling-row-tagline {
    display: none;
  }
}

/* ==========================================================================
   3. GREEN LIQUID-GLASS 5-LAYER BUTTON SYSTEM (.glass-btn / .blue-glass-btn)
   ========================================================================== */

.glass-btn,
.blue-glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.015em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  outline: none;
  color: #f0f9ff;
  background: var(--chrome-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--chrome-glass-border);
  border-radius: 9999px;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.56),
    0 4px 18px rgba(0, 0, 0, 0.42);
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 240ms ease,
    box-shadow 240ms ease,
    background-color 240ms ease,
    color 200ms ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
}

body.light .glass-btn,
body.light .blue-glass-btn {
  color: var(--text);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.92),
    inset 0 -1px 2px rgba(7, 32, 66, 0.08),
    0 4px 14px rgba(7, 28, 56, 0.1);
}

/* Sizes */
.glass-btn.btn-sm,
.blue-glass-btn.btn-sm {
  padding: 8px 16px;
  min-height: 38px;
  font-size: 0.84rem;
}

.glass-btn.btn-md,
.blue-glass-btn.btn-md {
  padding: 11px 22px;
  min-height: 46px;
  font-size: 0.94rem;
}

.glass-btn.btn-lg,
.blue-glass-btn.btn-lg {
  padding: 14px 28px;
  min-height: 52px;
  font-size: 1rem;
}

.glass-btn.btn-icon-only,
.blue-glass-btn.btn-icon-only {
  padding: 0;
  width: 48px;
  height: 48px;
  min-height: 48px;
  min-width: 48px;
  border-radius: 50%;
}

.glass-btn.btn-icon-only.btn-sm,
.blue-glass-btn.btn-icon-only.btn-sm {
  width: 40px;
  height: 40px;
  min-height: 40px;
  min-width: 40px;
}

/* Layer 1: Perimeter Green Traveling Rim */
.glass-btn .btn-border-glow,
.blue-glass-btn .btn-border-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.75px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
  overflow: hidden;
}

.glass-btn .btn-border-glow::before,
.blue-glass-btn .btn-border-glow::before {
  content: '';
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #0369a1 0%,
    #0ea5e9 20%,
    #38bdf8 40%,
    #22d3ee 58%,
    #bae6fd 76%,
    #38bdf8 90%,
    #0369a1 100%
  );
  animation: none;
}

@keyframes btnBorderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Layer 2: Soft Edge-to-Edge Upper Specular Highlight (owns no separate radius; follows parent silhouette) */
.glass-btn .liquid-glass-reflection,
.blue-glass-btn .liquid-glass-reflection {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.24) 0px,
    rgba(255, 255, 255, 0.08) 7px,
    rgba(255, 255, 255, 0.015) 14px,
    rgba(255, 255, 255, 0) 20px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 1;
}

body.light .glass-btn.btn-secondary .liquid-glass-reflection,
body.light .glass-btn.btn-ghost .liquid-glass-reflection {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.86) 0px,
    rgba(255, 255, 255, 0.3) 7px,
    rgba(255, 255, 255, 0.04) 14px,
    rgba(255, 255, 255, 0) 20px
  );
}

/* Layer 3: Soft Edge-to-Edge Inner Rim & Subtle Inset Depth (no mid-button cutline) */
.glass-btn .liquid-glass-rim,
.blue-glass-btn .liquid-glass-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    0deg,
    rgba(56, 189, 248, 0.12) 0px,
    rgba(56, 189, 248, 0.03) 6px,
    rgba(0, 0, 0, 0) 15px
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(56, 189, 248, 0.14),
    inset 0 0 12px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}

body.light .glass-btn.btn-secondary .liquid-glass-rim,
body.light .glass-btn.btn-ghost .liquid-glass-rim {
  background: linear-gradient(
    0deg,
    rgba(2, 132, 199, 0.1) 0px,
    rgba(2, 132, 199, 0.025) 6px,
    rgba(0, 0, 0, 0) 15px
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(2, 132, 199, 0.14),
    inset 0 0 8px rgba(7, 30, 62, 0.06);
}

body.light .glass-btn.btn-primary .liquid-glass-rim {
  background: linear-gradient(
    0deg,
    rgba(186, 230, 253, 0.16) 0px,
    rgba(186, 230, 253, 0.04) 6px,
    rgba(0, 0, 0, 0) 15px
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(186, 230, 253, 0.18),
    inset 0 0 12px rgba(7, 24, 52, 0.24);
}

/* Layer 4: Interior SKY Blue Gradient Wash */
.glass-btn .btn-interior-wash,
.blue-glass-btn .btn-interior-wash {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgba(3, 105, 161, 0.5) 0%,
    rgba(14, 165, 233, 0.42) 40%,
    rgba(34, 211, 238, 0.34) 72%,
    rgba(186, 230, 253, 0.26) 100%
  );
  background-size: 200% 200%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Layer 5: Foreground Content */
.glass-btn .btn-content,
.blue-glass-btn .btn-content {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.glass-btn.btn-icon-only .btn-content,
.blue-glass-btn.btn-icon-only .btn-content {
  width: 100%;
  height: 100%;
}

.glass-btn.btn-icon-only svg,
.blue-glass-btn.btn-icon-only svg {
  display: block;
  flex-shrink: 0;
}

.glass-btn .btn-icon,
.glass-btn .btn-icon-trailing,
.blue-glass-btn .btn-icon,
.blue-glass-btn .btn-icon-trailing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 220ms ease;
  flex-shrink: 0;
}

.glass-btn .btn-icon svg,
.glass-btn .btn-icon-trailing svg,
.blue-glass-btn .btn-icon svg,
.blue-glass-btn .btn-icon-trailing svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.glass-btn.btn-sm .btn-icon svg,
.glass-btn.btn-sm .btn-icon-trailing svg {
  width: 15px;
  height: 15px;
}

.floating-menu-btn .btn-icon-trailing svg {
  width: 18px;
  height: 18px;
}

.glass-btn.btn-primary .btn-icon,
.glass-btn.btn-primary .btn-icon-trailing {
  color: #bae6fd;
}

/* Stronger Primary SKY Blue Variant */
.glass-btn.btn-primary,
.blue-glass-btn.btn-primary {
  background: linear-gradient(135deg, rgba(7, 89, 133, 0.92), rgba(8, 47, 73, 0.94));
  color: #f0f9ff;
  border: 1px solid rgba(56, 189, 248, 0.52);
  font-weight: 700;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.42),
    inset 0 -1px 2px rgba(0, 0, 0, 0.58),
    0 6px 24px rgba(14, 165, 233, 0.28);
}

.glass-btn.btn-primary .btn-interior-wash,
.blue-glass-btn.btn-primary .btn-interior-wash {
  opacity: 0.42;
}

body.light .glass-btn.btn-primary,
body.light .blue-glass-btn.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.7);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.44),
    inset 0 -1px 2px rgba(7, 28, 56, 0.45),
    0 6px 22px rgba(2, 132, 199, 0.28);
}

/* Quieter Secondary Glass Variant */
.glass-btn.btn-secondary,
.glass-btn.btn-ghost,
.blue-glass-btn.btn-secondary {
  background: var(--chrome-glass-bg);
  border-color: var(--chrome-glass-border);
}

/* Interactive States */
@media (hover: hover) and (pointer: fine) {
  .glass-btn:hover:not(:disabled):not([aria-disabled="true"]),
  .blue-glass-btn:hover:not(:disabled):not([aria-disabled="true"]) {
    background-color: var(--chrome-glass-bg-hover);
    border-color: var(--chrome-glass-border-strong);
    box-shadow:
      0 6px 26px rgba(14, 165, 233, 0.28),
      0 0 16px rgba(56, 189, 248, 0.22),
      inset 0 1px 1.5px rgba(255, 255, 255, 0.48);
    transform: translateY(-1.5px);
  }

  body.light .glass-btn:hover:not(:disabled):not([aria-disabled="true"]),
  body.light .blue-glass-btn:hover:not(:disabled):not([aria-disabled="true"]) {
    box-shadow:
      0 8px 24px rgba(2, 132, 199, 0.2),
      0 0 12px rgba(14, 165, 233, 0.16),
      inset 0 1px 1.5px rgba(255, 255, 255, 0.85);
  }

  .glass-btn.btn-primary:hover:not(:disabled):not([aria-disabled="true"]),
  .blue-glass-btn.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) {
    opacity: 1;
    box-shadow:
      0 8px 30px rgba(14, 165, 233, 0.42),
      0 0 20px rgba(56, 189, 248, 0.28),
      inset 0 1px 1.5px rgba(255, 255, 255, 0.55);
  }

  .glass-btn:hover:not(:disabled) .btn-border-glow,
  .blue-glass-btn:hover:not(:disabled) .btn-border-glow {
    opacity: 1;
  }

  .glass-btn:hover:not(:disabled) .btn-border-glow::before,
  .blue-glass-btn:hover:not(:disabled) .btn-border-glow::before {
    animation: btnBorderSpin 2.6s linear infinite;
  }

  .glass-btn:hover:not(:disabled) .btn-interior-wash,
  .blue-glass-btn:hover:not(:disabled) .btn-interior-wash {
    opacity: 1;
    animation: interiorWashGlow 3s ease-in-out infinite alternate;
  }

  body.light .glass-btn.btn-secondary:hover:not(:disabled) .btn-interior-wash,
  body.light .glass-btn.btn-ghost:hover:not(:disabled) .btn-interior-wash {
    opacity: 0.18;
  }

  .glass-btn:hover .btn-icon-trailing,
  .blue-glass-btn:hover .btn-icon-trailing {
    transform: translate(2px, -1.5px);
  }
}

@keyframes interiorWashGlow {
  0% { opacity: 0.45; background-position: 0% 50%; }
  100% { opacity: 0.9; background-position: 100% 50%; }
}

.glass-btn:focus-visible,
.blue-glass-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-color: var(--chrome-glass-border-strong);
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.25),
    0 6px 22px rgba(14, 165, 233, 0.34);
}

body.light .glass-btn:focus-visible,
body.light .blue-glass-btn:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(2, 132, 199, 0.22),
    0 6px 20px rgba(2, 132, 199, 0.24);
}

.glass-btn:focus-visible .btn-border-glow,
.blue-glass-btn:focus-visible .btn-border-glow {
  opacity: 1;
}

.glass-btn:focus-visible .btn-border-glow::before,
.blue-glass-btn:focus-visible .btn-border-glow::before {
  animation: btnBorderSpin 2.6s linear infinite;
}

/* Active Press */
.glass-btn:active:not(:disabled):not([aria-disabled="true"]),
.blue-glass-btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(0.975);
  box-shadow:
    0 2px 12px rgba(14, 165, 233, 0.32),
    inset 0 2px 4px rgba(0, 0, 0, 0.35);
  transition-duration: 90ms;
}

.glass-btn:active .btn-border-glow,
.blue-glass-btn:active .btn-border-glow {
  opacity: 1;
  filter: brightness(1.25);
}

/* Selected / Active toggle state (Filters & View toggles) */
.glass-btn.active,
.glass-btn[aria-selected="true"],
.glass-btn[aria-pressed="true"] {
  border-color: var(--chrome-glass-border-strong);
  color: var(--primary);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.38),
    0 0 16px rgba(56, 189, 248, 0.22);
}

.glass-btn.active .btn-border-glow,
.glass-btn[aria-selected="true"] .btn-border-glow,
.glass-btn[aria-pressed="true"] .btn-border-glow {
  opacity: 0.92;
}

.glass-btn.active .btn-interior-wash,
.glass-btn[aria-selected="true"] .btn-interior-wash,
.glass-btn[aria-pressed="true"] .btn-interior-wash {
  opacity: 0.32;
}

body.light .glass-btn.active,
body.light .glass-btn[aria-selected="true"],
body.light .glass-btn[aria-pressed="true"] {
  background: rgba(220, 238, 254, 0.96);
  color: #0c4a6e;
}

body.light .glass-btn.active .btn-interior-wash,
body.light .glass-btn[aria-selected="true"] .btn-interior-wash,
body.light .glass-btn[aria-pressed="true"] .btn-interior-wash {
  opacity: 0.14;
}

/* Disabled state */
.glass-btn:disabled,
.glass-btn[aria-disabled="true"],
.blue-glass-btn:disabled,
.blue-glass-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* Multiline Download & Mirror buttons: Label & Helper Note strictly separated onto own lines */
.dl-btn.glass-btn,
.tg-btn.glass-btn {
  border-radius: 14px;
  padding: 12px 16px;
  justify-content: flex-start;
  width: 100%;
}

.dl-btn.glass-btn .btn-content,
.tg-btn.glass-btn .btn-content {
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  white-space: normal;
  text-align: left;
  gap: 11px;
}

.dl-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.dl-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dl-note {
  display: block;
  font-size: 11px;
  line-height: 1.38;
  opacity: 0.82;
  margin-top: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
}

.tg-btn.glass-btn {
  padding: 11px 15px;
  margin-top: 9px;
  min-height: 44px;
  font-size: 13px;
}

/* Filter tabs, view toggles & ROM card CTAs */
.ftab.glass-btn {
  padding: 7px 14px;
  min-height: 36px;
  font-size: 12px;
}

.vbtn.glass-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
}

.card-dl-btn.glass-btn {
  padding: 7px 14px;
  min-height: 32px;
  font-size: 12px;
}

/* Homepage Find your ROM category pills: proportional larger scale */
.ai-section .ai-opt.glass-btn {
  padding: clamp(13px, 1.3vw, 17px) clamp(26px, 2.5vw, 36px);
  min-height: clamp(48px, 4.2vw, 56px);
  font-size: clamp(15px, 1.25vw, 18px);
}

@media (max-width: 480px) {
  .ai-section .ai-opt.glass-btn {
    padding: 11px 20px;
    min-height: 44px;
    font-size: 14.5px;
  }
}

/* YouTube hero click-to-play pill upgraded to full 5-layer liquid-glass button */
.play-video-pill.glass-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(8, 15, 28, 0.84);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.56),
    0 6px 22px rgba(0, 0, 0, 0.54);
}

body.light .play-video-pill.glass-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(2, 132, 199, 0.32);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.94),
    inset 0 -1px 2px rgba(7, 32, 66, 0.1),
    0 6px 22px rgba(0, 0, 0, 0.34);
}

.play-video-pill.glass-btn .btn-content {
  gap: 7px;
  white-space: nowrap;
}

.play-video-pill.glass-btn .btn-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .review-play:hover .play-video-pill.glass-btn,
  .review-play:focus-visible .play-video-pill.glass-btn {
    background: var(--chrome-glass-bg-hover);
    border-color: var(--chrome-glass-border-strong);
    box-shadow:
      0 6px 26px rgba(14, 165, 233, 0.28),
      0 0 16px rgba(56, 189, 248, 0.22),
      inset 0 1px 1.5px rgba(255, 255, 255, 0.48);
    transform: translateY(-1.5px);
  }

  body.light .review-play:hover .play-video-pill.glass-btn,
  body.light .review-play:focus-visible .play-video-pill.glass-btn {
    box-shadow:
      0 8px 24px rgba(2, 132, 199, 0.24),
      0 0 14px rgba(14, 165, 233, 0.18),
      inset 0 1px 1.5px rgba(255, 255, 255, 0.92);
  }

  .review-play:hover .play-video-pill.glass-btn .btn-border-glow,
  .review-play:focus-visible .play-video-pill.glass-btn .btn-border-glow {
    opacity: 1;
  }

  .review-play:hover .play-video-pill.glass-btn .btn-border-glow::before,
  .review-play:focus-visible .play-video-pill.glass-btn .btn-border-glow::before {
    animation: btnBorderSpin 2.6s linear infinite;
  }

  .review-play:hover .play-video-pill.glass-btn .btn-interior-wash,
  .review-play:focus-visible .play-video-pill.glass-btn .btn-interior-wash {
    opacity: 1;
    animation: interiorWashGlow 3s ease-in-out infinite alternate;
  }

  body.light .review-play:hover .play-video-pill.glass-btn .btn-interior-wash,
  body.light .review-play:focus-visible .play-video-pill.glass-btn .btn-interior-wash {
    opacity: 0.18;
  }
}

.review-play:focus-visible .play-video-pill.glass-btn {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.review-play:active .play-video-pill.glass-btn {
  transform: scale(0.975);
  transition-duration: 90ms;
}

@media (max-width: 480px) {
  .play-video-pill.glass-btn {
    right: 10px;
    bottom: 10px;
    min-height: 34px;
    padding: 6px 13px;
    font-size: 0.78rem;
  }

  .play-video-pill.glass-btn .btn-icon svg {
    width: 13px;
    height: 13px;
  }
}

/* Wrap cleanly for normal prose CTA links */
.glass-btn.btn-wrap,
.hero-cta .glass-btn,
.contact-links .glass-btn {
  white-space: normal;
}

.hero-cta .glass-btn .btn-content,
.contact-links .glass-btn .btn-content {
  white-space: normal;
  text-align: center;
}

@media (max-width: 480px) {
  .glass-btn .btn-content,
  .blue-glass-btn .btn-content {
    white-space: normal;
    text-align: center;
  }

  .dl-btn.glass-btn .btn-content,
  .tg-btn.glass-btn .btn-content {
    text-align: left;
  }
}

/* ==========================================================================
   4. FLOATING + SOCIAL LAUNCHER & COORDINATED FIXED CONTROLS
   ========================================================================== */

.portfolio-action-menu {
  display: block;
  flex: none;
  position: fixed;
  z-index: 955;
  right: max(20px, env(safe-area-inset-right, 20px));
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  pointer-events: none;
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-action-menu.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.portfolio-action-menu[hidden],
.portfolio-action-menu.is-menu-suppressed {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(14px) scale(0.9);
}

.portfolio-action-toggle.glass-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.4),
    0 8px 28px rgba(0, 0, 0, 0.52),
    0 0 18px rgba(56, 189, 248, 0.22);
}

.portfolio-action-toggle svg {
  width: 22px;
  height: 22px;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-action-menu.is-open .portfolio-action-toggle svg {
  transform: rotate(45deg);
}

.portfolio-action-links {
  position: absolute;
  bottom: 66px;
  right: 5px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.portfolio-action-links[hidden] {
  display: none !important;
}

.portfolio-action-links > .glass-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  animation: actionMenuEnter 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--action-order, 0) * 55ms);
}

.portfolio-action-links > .glass-btn svg {
  width: 19px;
  height: 19px;
}

@keyframes actionMenuEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.76);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Coordinated Donate FAB on bottom-left so it never overlaps + stack on bottom-right */
.fab-donate.glass-btn {
  position: fixed;
  left: max(18px, env(safe-area-inset-left, 18px));
  right: auto;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  z-index: 950;
  min-height: 44px;
  padding: 9px 16px;
  border-color: rgba(255, 107, 71, 0.45);
  background: rgba(34, 14, 12, 0.86);
  color: #fff2ef;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.34),
    0 8px 24px rgba(255, 107, 71, 0.28);
}

body.light .fab-donate.glass-btn {
  background: linear-gradient(135deg, #c03a20, #a32c15);
  color: #ffffff;
  border-color: rgba(192, 58, 32, 0.7);
}

/* Coordinated floating Back to top sits left of the bottom-right + launcher with identical circular diameter & baseline */
.back-top.glass-btn {
  position: fixed;
  right: calc(max(20px, env(safe-area-inset-right, 20px)) + 64px);
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  z-index: 950;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  opacity: 0;
  pointer-events: none;
  border-radius: 50%;
}

.back-top.glass-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 480px) {
  .portfolio-action-menu {
    right: max(12px, env(safe-area-inset-right, 12px));
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
  }

  .portfolio-action-toggle.glass-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .portfolio-action-links {
    bottom: 58px;
    right: 2px;
    gap: 8px;
  }

  .portfolio-action-links > .glass-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .fab-donate.glass-btn {
    left: max(12px, env(safe-area-inset-left, 12px));
    right: auto;
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
    padding: 8px 13px;
    min-height: 42px;
    font-size: 12.5px;
  }

  .back-top.glass-btn {
    right: calc(max(12px, env(safe-area-inset-right, 12px)) + 58px);
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .back-top svg,
  .portfolio-action-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* Landscape short-viewport adjustment so social stack stays inside viewport */
@media (max-height: 500px) {
  .portfolio-action-links {
    flex-direction: row-reverse;
    bottom: 2px;
    right: 60px;
  }
  .back-top.glass-btn {
    bottom: calc(max(14px, env(safe-area-inset-bottom, 14px)) + 58px);
    right: max(12px, env(safe-area-inset-right, 12px));
  }
}

/* ==========================================================================
   5. LET'S CONNECT BANNER (FINAL CTA BANNER - GREEN DIAGONAL BANDS)
   ========================================================================== */

.gradient-blinds-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gradient-blinds-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.fcb-section {
  position: relative;
  z-index: 5;
  background: transparent;
  padding: clamp(2rem, 4.5vw, 4rem) max(clamp(16px, 4vw, 48px), calc((100% - 1440px) / 2));
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1800px) {
  .fcb-section {
    padding-inline: max(clamp(16px, 4vw, 48px), calc((100% - 1600px) / 2));
  }
}

/* When embedded inside contact.html .prose-page, match column cleanly */
.prose-page .fcb-section {
  padding: 0 0 28px;
}

.fcb-banner {
  --cta-pad-y: clamp(2rem, 4.2vh, 3.6rem);
  --cta-pad-x: clamp(1.4rem, 3.8vw, 3.6rem);
  --cta-gap: clamp(0.6rem, 1.6vh, 1rem);
  --cta-eyebrow: clamp(0.72rem, 1vw, 0.82rem);
  --cta-heading: clamp(1.75rem, 3.6vw, 3rem);
  --cta-body: clamp(0.95rem, 1.2vw, 1.08rem);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  width: 100%;
  margin-inline: auto;
  min-height: 360px;
  padding: var(--cta-pad-y) var(--cta-pad-x);
  border-radius: clamp(18px, 2.2vw, 26px);
  background: #040d0a;
  border: 1px solid rgba(56, 189, 248, 0.36);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 24px 64px -16px rgba(0, 0, 0, 0.85),
    0 0 36px rgba(14, 165, 233, 0.22);
  box-sizing: border-box;
}

body.light .fcb-banner {
  background: #e2f2eb;
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 20px 54px -16px rgba(7, 30, 62, 0.18),
    0 0 28px rgba(2, 132, 199, 0.12);
}

.fcb-blinds {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  border-radius: inherit;
  overflow: hidden;
}

.fcb-blindsCanvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* CSS Diagonal Illuminated Green Glass Bands (Immediate SSR paint + fallback) */
.gradient-blinds-container.is-fallback {
  background:
    radial-gradient(ellipse at 68% 45%, rgba(56, 189, 248, 0.22), rgba(4, 10, 22, 0.92) 76%),
    repeating-linear-gradient(
      -25deg,
      #040c09 0px,
      #040c09 18px,
      #075985 19px,
      #0284c7 34px,
      #38bdf8 36px,
      #040c09 38px
    );
}

body.light .gradient-blinds-container.is-fallback {
  background:
    radial-gradient(ellipse at 68% 45%, rgba(255, 255, 255, 0.55), rgba(214, 234, 253, 0.86) 78%),
    repeating-linear-gradient(
      -25deg,
      #e6f5ee 0px,
      #e6f5ee 18px,
      #c7e2fc 19px,
      #93c5fd 34px,
      #60a5fa 36px,
      #e6f5ee 38px
    );
}

.fcb-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    circle at 25% 50%,
    rgba(4, 10, 22, 0.62) 0%,
    rgba(4, 10, 22, 0.26) 55%,
    rgba(4, 10, 22, 0.08) 85%
  );
}

body.light .fcb-scrim {
  background: radial-gradient(
    circle at 25% 50%,
    rgba(244, 251, 248, 0.82) 0%,
    rgba(244, 251, 248, 0.45) 55%,
    rgba(244, 251, 248, 0.14) 85%
  );
}

.fcb-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: var(--cta-gap);
  pointer-events: none;
}

.fcb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--mono);
  font-size: var(--cta-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.fcb-eyebrowRule {
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 999px;
}

.fcb-heading {
  margin: 0;
  font-family: var(--font);
  font-size: var(--cta-heading);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82);
}

body.light .fcb-heading {
  color: #051c15;
  text-shadow: none;
}

.fcb-body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--cta-body);
  line-height: 1.58;
  color: #d2e7df;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  max-width: 640px;
}

body.light .fcb-body {
  color: #1e3a5f;
  text-shadow: none;
}

.fcb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 0.75rem;
  pointer-events: auto;
  width: 100%;
}

.fcb-socials-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 768px) {
  .fcb-banner {
    min-height: auto;
    padding: 2rem 1.35rem;
    border-radius: 18px;
  }

  .fcb-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .fcb-actions .fcb-email-btn {
    width: 100%;
    padding: 12px 14px;
    justify-content: flex-start;
  }

  .fcb-actions .fcb-email-btn .btn-content {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .fcb-actions .fcb-email-btn .btn-label {
    min-width: 0;
    font-size: clamp(0.76rem, 3.2vw, 0.88rem);
    line-height: 1.35;
    word-break: break-all;
    text-align: left;
  }

  .fcb-socials-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .fcb-socials-row .glass-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.84rem;
    padding: 10px 12px;
  }
}

@media (max-width: 360px) {
  .fcb-socials-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   6. SKY ILLUMINATED WORDMARK FOOTER (GREEN DARK & LIGHT)
   ========================================================================== */

.beam-footer-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 56px max(clamp(16px, 4vw, 48px), calc((100% - 1440px) / 2)) max(92px, calc(env(safe-area-inset-bottom, 0px) + 84px));
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(5, 9, 18, 0.5) 0%,
    rgba(6, 11, 22, 0.92) 72px,
    #040812 100%
  );
  border-top: 1px solid var(--border);
  overflow: hidden;
}

@media (min-width: 1800px) {
  .beam-footer-section {
    padding-inline: max(clamp(16px, 4vw, 48px), calc((100% - 1600px) / 2));
  }
}

body.light .beam-footer-section {
  background: linear-gradient(
    180deg,
    rgba(241, 246, 252, 0.6) 0%,
    rgba(225, 236, 250, 0.94) 72px,
    #dce8f8 100%
  );
}

.beam-footer-light-shaft {
  position: absolute;
  top: -20%;
  right: 12%;
  width: 55vw;
  height: 125%;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.16) 0%,
    rgba(14, 165, 233, 0.08) 42%,
    transparent 75%
  );
  filter: blur(80px);
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: 1;
}

body.light .beam-footer-light-shaft {
  background: linear-gradient(
    135deg,
    rgba(2, 132, 199, 0.12) 0%,
    rgba(14, 165, 233, 0.06) 42%,
    transparent 75%
  );
}

.beam-footer-radial-glow {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 92vw;
  height: 50vh;
  background: radial-gradient(
    ellipse at center,
    rgba(7, 89, 133, 0.28) 0%,
    rgba(14, 165, 233, 0.12) 45%,
    transparent 75%
  );
  filter: blur(90px);
  pointer-events: none;
  z-index: 1;
}

body.light .beam-footer-radial-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(2, 132, 199, 0.1) 0%,
    rgba(56, 189, 248, 0.06) 45%,
    transparent 75%
  );
}

.beam-footer-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.beam-footer-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr 1fr 1.15fr;
  gap: clamp(24px, 3.8vw, 56px);
}

.beam-footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.beam-footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.beam-footer-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.48));
}

body.light .beam-footer-logo-img {
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.24));
}

.beam-footer-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.beam-footer-brand-name em {
  color: var(--primary);
  font-style: normal;
}

.beam-footer-bio {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text2);
  margin: 0;
}

.beam-footer-social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2px;
}

.beam-footer-social-btn.glass-btn {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  border-radius: 14px;
}

.beam-footer-social-btn svg {
  width: 19px;
  height: 19px;
}

.beam-footer-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.beam-footer-col-title {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--primary);
  text-transform: uppercase;
  margin: 0;
}

.beam-footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.beam-footer-link {
  font-size: 0.95rem;
  color: var(--text2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 2px 0;
}

.beam-footer-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.beam-footer-link:hover,
.beam-footer-link:focus-visible {
  color: var(--primary);
  transform: translateX(4px);
}

.beam-footer-giant-wordmark-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  user-select: none;
  pointer-events: none;
  padding: 4px 0 0;
}

.footer-name-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.sky-wordmark-base {
  fill: var(--wm-base);
}

.beam-footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text2);
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .beam-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .beam-footer-brand-col {
    max-width: none;
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .beam-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .beam-footer-brand-col {
    grid-column: 1 / -1;
  }

  .beam-footer-column:last-child {
    grid-column: 1 / -1;
  }

  .beam-footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-name-beam {
    display: none;
  }
}

/* ==========================================================================
   7. INTERACTIVE TRAVELING-BORDER CARDS (.card-glass-interactive - GREEN)
   Zero spinning keyframes at rest; runs strictly on hover/focus interaction.
   ========================================================================== */

/* Prevent parent containers from slicing card lift/glow */
.rom-grid,
.home-reviews,
.gallery-grid,
.compare-grid,
.guides-grid,
.spec-section .container,
.sb-block .rel-videos-grid,
.featured-section .container {
  overflow: visible;
}

/* Homepage Scroll-to-Explore pill matching secondary glass buttons + page-top state transitions */
.scroll-hint.glass-btn {
  position: absolute;
  bottom: clamp(16px, 2.6vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 9px 20px;
  min-height: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.24s ease,
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s,
    box-shadow 0.24s ease;
}

.scroll-hint.glass-btn .btn-content {
  gap: 10px;
}

.scroll-hint.glass-btn .scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: scrollBounceDot 1.5s ease-in-out infinite;
}

.scroll-hint.glass-btn:hover:not(.is-hidden) {
  transform: translateX(-50%) translateY(-2px);
}

.scroll-hint.glass-btn:active:not(.is-hidden) {
  transform: translateX(-50%) translateY(0) scale(0.985);
}

.scroll-hint.glass-btn:focus-visible:not(.is-hidden) {
  transform: translateX(-50%) translateY(-2px);
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
}

.scroll-hint.glass-btn.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition:
    opacity 0.24s ease,
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.24s;
}

@media (max-width: 768px) {
  .scroll-hint.glass-btn {
    bottom: calc(max(14px, env(safe-area-inset-bottom, 14px)) + 56px);
    padding: 8px 18px;
    min-height: 38px;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint.glass-btn,
  .scroll-hint.glass-btn.is-hidden {
    transition: none !important;
  }
  .scroll-hint.glass-btn:hover:not(.is-hidden),
  .scroll-hint.glass-btn:focus-visible:not(.is-hidden) {
    transform: translateX(-50%) !important;
  }
  .scroll-hint.glass-btn .scroll-dot {
    animation: none !important;
  }
}

.card-glass-interactive {
  position: relative;
  background-color: rgba(7, 16, 13, 0.92);
  border: 0 !important;
  padding: 1.5px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 1px rgba(56, 189, 248, 0.16);
  transition:
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
  z-index: 1;
}

body.light .card-glass-interactive {
  background-color: #dbeafe;
  box-shadow: 0 8px 24px rgba(7, 28, 56, 0.08), 0 0 1px rgba(2, 132, 199, 0.22);
}

/* Re-apply explicit inner padding & corners for cards that pad at root level */
.compare-card.card-glass-interactive {
  padding: 24px 26px 26px;
}

.guide-card.card-glass-interactive {
  padding: 22px 24px;
}

.featured-rom.card-glass-interactive {
  padding: clamp(22px, 3.2vw, 38px);
}

.tzlabs-card.card-glass-interactive {
  padding: clamp(26px, 3.2vw, 38px) clamp(24px, 3.8vw, 44px);
  border-radius: var(--radius2);
}

.tzlabs-card.card-glass-interactive::after {
  background: linear-gradient(120deg, rgba(7, 89, 133, 0.42) 0%, rgba(2, 132, 199, 0.22) 55%, rgba(3, 105, 161, 0.34) 100%), var(--surface);
  border-radius: calc(var(--radius2) - 1.5px);
}

body.light .tzlabs-card.card-glass-interactive::after {
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.14) 0%, rgba(2, 132, 199, 0.1) 60%, rgba(14, 165, 233, 0.08) 100%), var(--surface);
}

@media (max-width: 768px) {
  .tzlabs-card.card-glass-interactive {
    padding: 24px 20px;
  }
}

.featured-rom.card-glass-interactive::after {
  background: radial-gradient(ellipse 68% 82% at 78% 50%, rgba(124, 58, 237, 0.14), rgba(59, 130, 246, 0.07) 52%, transparent 80%), var(--surface);
}

body.light .featured-rom.card-glass-interactive::after {
  background: radial-gradient(ellipse 68% 82% at 78% 50%, rgba(124, 58, 237, 0.09), rgba(59, 130, 246, 0.05) 52%, transparent 80%), var(--surface);
}

.antutu-block.card-glass-interactive {
  padding: clamp(20px, 2.8vw, 34px) clamp(20px, 3.2vw, 40px);
  border-radius: 18px;
}

.antutu-block.card-glass-interactive::after {
  background: radial-gradient(ellipse 68% 72% at 50% 48%, rgba(56, 189, 248, 0.09), transparent 72%), var(--surface);
}

body.light .antutu-block.card-glass-interactive::after {
  background: radial-gradient(ellipse 68% 72% at 50% 48%, rgba(2, 132, 199, 0.07), transparent 72%), var(--surface);
}

/* Square rotating rim oversized via width so wide 6.5:1 .antutu-block covers all 4 edges at every angle */
.antutu-block.card-glass-interactive::before {
  inset: auto;
  width: 150%;
  height: auto;
  aspect-ratio: 1 / 1;
  left: -25%;
  top: 50%;
  translate: 0 -50%;
}

.home-review.card-glass-interactive {
  padding: 1.5px;
  border-radius: 16px;
}

.home-review.card-glass-interactive .thumb-fb-wrap {
  padding-block: 0;
  font-weight: inherit;
}

.home-review.card-glass-interactive > span:not(.thumb-fb-wrap) {
  display: block;
  padding: 10px 12px 12px;
  font-weight: 700;
}

.thumb-fb-wrap.yt-thumb-fallback {
  background: linear-gradient(145deg, #08111e 0%, #0c2238 100%);
}

body.light .thumb-fb-wrap.yt-thumb-fallback {
  background: linear-gradient(145deg, #e8f2fc 0%, #d4e6fa 100%);
}

@media (hover: none) {
  .card-glass-interactive:hover {
    transform: none !important;
  }
}

.rom-card:hover .card-dl-btn .btn-border-glow {
  opacity: 1;
}

.gallery-card.card-glass-interactive {
  border-radius: 18px;
}

.rom-card.card-glass-interactive {
  border-radius: 18px;
}

.sb-block .rel-video-card.card-glass-interactive,
.sb-block .rel-item.card-glass-interactive,
.rom-rec-bottom .rel-video-card.card-glass-interactive,
.rom-rec-bottom .rel-item.card-glass-interactive {
  padding: 1.5px;
  border-radius: 12px;
}

.rg-item.card-glass-interactive {
  padding: 12px 14px;
  border-radius: 12px;
}

/* Keep full 16:9 thumbnail uncropped inside 1.5px traveling border */
.rom-card.card-glass-interactive .card-img-wrap {
  border-radius: 16.5px 16.5px 0 0;
}

.home-review-card.card-glass-interactive .home-review-media {
  border-radius: 16.5px 16.5px 0 0;
}

.sb-block .rel-video-card.card-glass-interactive .rel-video-thumb-wrap,
.rom-rec-bottom .rel-video-card.card-glass-interactive .rel-video-thumb-wrap,
.sb-block .rel-item.card-glass-interactive .rel-img-wrap,
.rom-rec-bottom .rel-item.card-glass-interactive .rel-img-wrap {
  border-radius: 10.5px 10.5px 0 0;
}

.gallery-card.card-glass-interactive .thumb-fb-wrap,
.home-review.card-glass-interactive .thumb-fb-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070a0f;
}

.gallery-card.card-glass-interactive .thumb-fb-wrap {
  height: 100%;
  border-radius: 16.5px;
}

.home-review.card-glass-interactive .thumb-fb-wrap {
  border-radius: 14.5px 14.5px 0 0;
}

.gallery-card.card-glass-interactive .thumb-fb-wrap img,
.home-review.card-glass-interactive .thumb-fb-wrap img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  border-radius: 0;
  opacity: 1;
}

.thumb-fb-wrap.yt-thumb-fallback::after {
  content: attr(data-fb-title);
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-weight: 700;
  font-size: clamp(12px, 1.4vw, 16px);
  line-height: 1.3;
  color: var(--text);
}

/* SKY-Blue-Spectrum Traveling Rim (Idle: static opacity, NO spinning GPU churn) */
.card-glass-interactive::before {
  content: '';
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 45deg,
    #0369a1 0deg,
    #0ea5e9 60deg,
    #22d3ee 120deg,
    #bae6fd 180deg,
    #38bdf8 240deg,
    #38bdf8 300deg,
    #0369a1 360deg
  );
  opacity: 0.36;
  transition: opacity 0.34s ease, filter 0.34s ease;
  pointer-events: none;
  z-index: -2;
  animation: none;
}

body.light .card-glass-interactive::before {
  opacity: 0.45;
  background: conic-gradient(
    from 45deg,
    #0c4a6e 0deg,
    #0284c7 60deg,
    #0ea5e9 120deg,
    #7dd3fc 180deg,
    #0891b2 240deg,
    #0284c7 300deg,
    #0c4a6e 360deg
  );
}

/* Override older .featured-rom::before / .card-img-wrap shimmer conflicts cleanly */
.featured-rom.card-glass-interactive::before {
  inset: -150%;
  width: auto;
  height: auto;
}

/* Inner Face Layer leaving crisp 1.5px glowing SKY blue border */
.card-glass-interactive::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  border-radius: calc(18px - 1.5px);
  background-color: var(--surface);
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14);
}

.sb-block .rel-video-card.card-glass-interactive::after,
.sb-block .rel-item.card-glass-interactive::after,
.rom-rec-bottom .rel-video-card.card-glass-interactive::after,
.rom-rec-bottom .rel-item.card-glass-interactive::after,
.rg-item.card-glass-interactive::after {
  border-radius: 10.5px;
}

body.light .card-glass-interactive::after {
  background-color: var(--surface);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

@keyframes cardBorderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover interaction only on hover-capable pointer devices */
@media (hover: hover) and (pointer: fine) {
  .card-glass-interactive:hover {
    transform: translateY(-5px) scale(1.016);
    box-shadow:
      0 22px 46px rgba(0, 0, 0, 0.8),
      0 0 30px rgba(14, 165, 233, 0.36),
      0 0 10px rgba(56, 189, 248, 0.24);
    z-index: 10;
  }

  body.light .card-glass-interactive:hover {
    box-shadow:
      0 20px 40px rgba(7, 30, 62, 0.16),
      0 0 24px rgba(2, 132, 199, 0.22);
  }

  .card-glass-interactive:hover::before {
    opacity: 0.96;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
    animation: cardBorderSpin 4.5s linear infinite;
  }

  /* Keep gallery / home-review images stable inside lifted card */
  .gallery-card.card-glass-interactive:hover img {
    transform: none;
  }
}

/* Keyboard focus treatment */
.card-glass-interactive:focus-visible,
.card-glass-interactive:focus-within {
  transform: translateY(-4px) scale(1.014);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.72),
    0 0 26px rgba(56, 189, 248, 0.32);
  z-index: 10;
}

body.light .card-glass-interactive:focus-visible,
body.light .card-glass-interactive:focus-within {
  box-shadow:
    0 16px 36px rgba(7, 30, 62, 0.15),
    0 0 22px rgba(2, 132, 199, 0.24);
}

.card-glass-interactive:focus-visible::before,
.card-glass-interactive:focus-within::before {
  opacity: 0.96;
  animation: cardBorderSpin 4.5s linear infinite;
}

/* Tactile tap feedback for touch & mouse press */
.card-glass-interactive:active {
  transform: scale(0.985);
  transition-duration: 90ms;
}

.card-glass-interactive:active::before {
  opacity: 0.96;
}

/* Gallery overlay always visible enough on touch or hover without losing focus clarity */
.gallery-card.card-glass-interactive .gallery-overlay {
  border-radius: 16.5px;
  z-index: 3;
}

.gallery-card.card-glass-interactive:focus-visible .gallery-overlay {
  opacity: 1;
}

/* Respect Reduced Motion: static highlighted border, no lift or spin */
@media (prefers-reduced-motion: reduce) {
  .card-glass-interactive,
  .card-glass-interactive:hover,
  .card-glass-interactive:focus-visible,
  .card-glass-interactive:focus-within,
  .card-glass-interactive:active {
    transform: none !important;
  }

  .card-glass-interactive::before,
  .card-glass-interactive:hover::before,
  .card-glass-interactive:focus-visible::before,
  .card-glass-interactive:focus-within::before {
    animation: none !important;
  }

  .card-glass-interactive:hover::before,
  .card-glass-interactive:focus-visible::before,
  .card-glass-interactive:focus-within::before {
    opacity: 0.96 !important;
  }

  .glass-btn .btn-border-glow::before,
  .glass-btn .btn-interior-wash,
  .blue-glass-btn .btn-border-glow::before,
  .blue-glass-btn .btn-interior-wash,
  .review-play:hover .play-video-pill.glass-btn .btn-border-glow::before,
  .review-play:hover .play-video-pill.glass-btn .btn-interior-wash,
  .portfolio-action-links > .glass-btn {
    animation: none !important;
  }

  .review-play:hover .play-video-pill.glass-btn,
  .review-play:focus-visible .play-video-pill.glass-btn,
  .review-play:active .play-video-pill.glass-btn {
    transform: none !important;
  }

  .sterling-nav-row:hover {
    transform: none !important;
  }
}

/* Catalog list view coordination with 1.5px frame */
@media (max-width: 560px) {
  .rom-grid.list-view .rom-card.card-glass-interactive {
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    align-items: center;
  }

  .rom-grid.list-view .rom-card.card-glass-interactive .card-img-wrap {
    border-radius: 16px 0 0 16px;
  }
}

@media (min-width: 561px) {
  .rom-grid.list-view .rom-card.card-glass-interactive .card-img-wrap {
    border-radius: 16px 0 0 16px;
  }
}

.cbadge.recovery{background:rgba(255,169,77,0.92);color:#1f1100;}
.cbadge.reviewed{background:rgba(244,63,94,0.88);color:#fff;}
