/* ============================================================
   AINode — shop-v3.css
   Role: v3 layout overrides for the shop page.
   Load order: after shop.css, before light-mode.css

   This file provides:
   - Colour tokens for brand banner sections
   - Banner base styles and colour assignments
   - Horizontal scroll track and product grid flex row
   - Product card snap sizing
   - Mission section base styles
   - Light mode overrides for scroll/mission sections
   (Banner sections remain dark in both modes by design.)
   ============================================================ */

/* === Colour Tokens === */
:root {
  --v3-banner-purple: #1a0e2e;
  --v3-banner-navy:   #0a1628;
  --v3-banner-gold:   #241700;
  --v3-mission-bg:    #111827;
  --v3-scroll-bg:     #141c2b;
  --v3-accent-purple: #c4b5fd;
  --v3-accent-navy:   #93c5fd;
  --v3-accent-gold:   #fcd34d;

  /* ── Audit Element Tokens (BUG-004 fix) ─────────────────── */
  /* Dark mode (default) */
  --audit-badge-bg:           rgba(0, 0, 0, 0.75);
  --audit-badge-blur:         8px;
  --audit-badge-radius:       4px;
  --audit-info-border:        rgba(255, 255, 255, 0.18);
  --audit-info-bg:            rgba(255, 255, 255, 0.05);
  --audit-label-color:        rgba(255, 255, 255, 0.65);
  --audit-report-btn-border:  var(--accent, #14b8a6);
  --audit-report-btn-color:   var(--accent, #14b8a6);
  --audit-tooltip-bg:         #1a1a2e;
  --audit-tooltip-border:     rgba(255, 255, 255, 0.22);
  --audit-tooltip-shadow:     0 8px 32px rgba(0, 0, 0, 0.7);
  --audit-tooltip-score:      rgba(255, 255, 255, 0.65);
  --audit-tooltip-summary:    rgba(255, 255, 255, 0.82);
  --audit-card-bg:            #111118;
  --audit-card-border:        rgba(255, 255, 255, 0.12);
  --audit-card-border-hover:  rgba(255, 255, 255, 0.32);
  --audit-score-color:        rgba(255, 255, 255, 0.55);
  /* Tier colours — dark mode */
  --tier-a:          #34d399;
  --tier-b:          #fbbf24;
  --tier-c:          #fb923c;
  --tier-rejected:   #f87171;
  --tier-pending:    rgba(255, 255, 255, 0.55);
  --tier-pending-border: rgba(255, 255, 255, 0.35);
  --tier-exempt:     #3b82f6;
  --tier-preorder:   #a78bfa;
}

/* Light mode audit tokens */
body[data-theme=light] {
  --audit-badge-bg:           rgba(255, 255, 255, 0.92);
  --audit-info-border:        rgba(15, 23, 42, 0.14);
  --audit-info-bg:            rgba(15, 23, 42, 0.03);
  --audit-label-color:        #475569;
  --audit-report-btn-border:  #0f172a;
  --audit-report-btn-color:   #0f172a;
  --audit-tooltip-bg:         #ffffff;
  --audit-tooltip-border:     rgba(0, 0, 0, 0.12);
  --audit-tooltip-shadow:     0 8px 32px rgba(0, 0, 0, 0.12);
  --audit-tooltip-score:      #64748b;
  --audit-tooltip-summary:    #334155;
  --audit-card-bg:            #ffffff;
  --audit-card-border:        rgba(0, 0, 0, 0.10);
  --audit-card-border-hover:  rgba(0, 0, 0, 0.22);
  --audit-score-color:        #64748b;
  /* Tier colours — light mode (darker for contrast on white) */
  --tier-a:          #15803d;
  --tier-b:          #a16207;
  --tier-c:          #c2410c;
  --tier-rejected:   #b91c1c;
  --tier-pending:    #64748b;
  --tier-pending-border: #94a3b8;
  --tier-exempt:     #2563eb;
  --tier-preorder:   #7c3aed;
}

/* Mobile dark mode — boost contrast further */
@media (max-width: 640px) {
  :root {
    --audit-info-border:       rgba(255, 255, 255, 0.25);
    --audit-info-bg:           rgba(255, 255, 255, 0.06);
    --audit-label-color:       rgba(255, 255, 255, 0.72);
    --audit-tooltip-border:    rgba(255, 255, 255, 0.28);
    --audit-card-border:       rgba(255, 255, 255, 0.16);
    --audit-card-border-hover: rgba(255, 255, 255, 0.38);
    --audit-score-color:       rgba(255, 255, 255, 0.62);
  }
}

/* === Banner Base === */
.v3-banner {
  width: 100%;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* First banner needs margin for fixed ticker (32px) + navbar (~80px) */
.v3-banner:first-child,
#hero.v3-banner {
  margin-top: calc(32px + 80px);
}

@media (max-width: 768px) {
  .v3-banner:first-child,
  #hero.v3-banner {
    margin-top: calc(28px + 72px);
  }
}

/* base inner styles merged into the absolute-positioned block below */

.v3-banner__label {
  font-size: 1.2rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
}

/* === Banner Colour Assignments === */
.v3-banner--hero {
  background: var(--v3-banner-purple);
  color: var(--v3-accent-purple);
}

.v3-banner--navy {
  background: var(--v3-banner-navy);
  color: var(--v3-accent-navy);
}

.v3-banner--gold {
  background: var(--v3-banner-gold);
  color: var(--v3-accent-gold);
}

/* Banners stay dark in both modes — intentional brand colour blocks */
/* body[data-theme=light] banner overrides: none by design */

/* === Banner Image Frame (Phase 26) === */

/* Smooth border transition */
.v3-banner {
  transition: box-shadow 0.3s ease;
}

/* CLS-safe aspect-ratio per breakpoint (overrides min-height: 55vh) */
@media (min-width: 1024px) {
  .v3-banner {
    min-height: unset;
    aspect-ratio: 1536 / 640;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .v3-banner {
    min-height: unset;
    aspect-ratio: 1024 / 576;
  }
}

@media (max-width: 599px) {
  .v3-banner {
    min-height: unset;
    aspect-ratio: 800 / 600;
  }
}

/* Picture element — fills section absolutely */
.v3-banner__picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

/* Image inside picture — cover fill */
.v3-banner__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 5px inset coloured border matching section brand colour */
.v3-banner--hero { box-shadow: inset 0 0 0 5px var(--v3-accent-purple); }
.v3-banner--navy { box-shadow: inset 0 0 0 5px var(--v3-accent-navy); }
.v3-banner--gold { box-shadow: inset 0 0 0 5px var(--v3-accent-gold); }

/* Gold banner: nudge image down so model's face sits lower in frame */
.v3-banner--gold .v3-banner__picture img { object-position: center 40%; }

/* Hover glow — border reacts to attention */
.v3-banner--hero:hover {
  box-shadow: inset 0 0 0 5px var(--v3-accent-purple),
              0 0 40px rgba(196, 181, 253, 0.25);
}
.v3-banner--navy:hover {
  box-shadow: inset 0 0 0 5px var(--v3-accent-navy),
              0 0 40px rgba(147, 197, 253, 0.25);
}
.v3-banner--gold:hover {
  box-shadow: inset 0 0 0 5px var(--v3-accent-gold),
              0 0 40px rgba(252, 211, 77, 0.25);
}

/* Lock banner images visible — never hide on any interaction */
.v3-banner .v3-banner__picture,
.v3-banner:hover .v3-banner__picture,
.v3-banner:active .v3-banner__picture,
.v3-banner:focus .v3-banner__picture,
.v3-banner:focus-within .v3-banner__picture {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.v3-banner .v3-banner__img,
.v3-banner:hover .v3-banner__img,
.v3-banner:active .v3-banner__img,
.v3-banner:focus .v3-banner__img,
.v3-banner:focus-within .v3-banner__img {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}


/* Glass/frosted overlay on image area only (not on the border) */
.v3-banner__picture::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  z-index: 1;
  pointer-events: none;
}

/* Light-mode gradient scrim for text readability */
.v3-banner__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

body[data-theme=light] .v3-banner__scrim {
  opacity: 1;
}

/* Light mode: softer scrim — let images show through */
body[data-theme=light] .v3-banner__scrim--left {
  background: linear-gradient(
    to right,
    rgba(10, 5, 30, 0.5) 0%,
    rgba(10, 5, 30, 0.3) 35%,
    rgba(10, 5, 30, 0.1) 55%,
    transparent 70%
  );
}
body[data-theme=light] .v3-banner__scrim--right {
  background: linear-gradient(
    to left,
    rgba(10, 5, 30, 0.5) 0%,
    rgba(10, 5, 30, 0.3) 35%,
    rgba(10, 5, 30, 0.1) 55%,
    transparent 70%
  );
}
body[data-theme=light] .v3-banner__headline,
body[data-theme=light] .v3-banner__sub,
body[data-theme=light] .v3-banner__eyebrow {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.4);
}
body[data-theme=light] .v3-banner__cta {
  text-shadow: none;
}

/* Scrim direction — left means text is on left side */
.v3-banner__scrim--left {
  background: linear-gradient(
    to right,
    rgba(26, 14, 46, 0.75) 0%,
    rgba(26, 14, 46, 0.45) 45%,
    transparent 70%
  );
}

.v3-banner__scrim--right {
  background: linear-gradient(
    to left,
    rgba(26, 14, 46, 0.75) 0%,
    rgba(26, 14, 46, 0.45) 45%,
    transparent 70%
  );
}

/* Navy and gold variant scrim colours */
.v3-banner--navy .v3-banner__scrim--left {
  background: linear-gradient(
    to right,
    rgba(10, 22, 40, 0.75) 0%,
    rgba(10, 22, 40, 0.45) 45%,
    transparent 70%
  );
}

.v3-banner--navy .v3-banner__scrim--right {
  background: linear-gradient(
    to left,
    rgba(10, 22, 40, 0.75) 0%,
    rgba(10, 22, 40, 0.45) 45%,
    transparent 70%
  );
}

.v3-banner--gold .v3-banner__scrim--left {
  background: linear-gradient(
    to right,
    rgba(36, 23, 0, 0.75) 0%,
    rgba(36, 23, 0, 0.45) 45%,
    transparent 70%
  );
}

.v3-banner--gold .v3-banner__scrim--right {
  background: linear-gradient(
    to left,
    rgba(36, 23, 0, 0.75) 0%,
    rgba(36, 23, 0, 0.45) 45%,
    transparent 70%
  );
}

/* Content inner — headline top-left, subtitle bottom-left */
.v3-banner__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  position: absolute;
  inset: 0;
  padding: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 72px);
  z-index: 1;
}

/* Headline group (eyebrow + headline) stays at top-left via flex-start */
.v3-banner__eyebrow,
.v3-banner__headline {
  /* top-left — natural flow with flex-start alignment */
}

/* Subtitle + CTA pushed to bottom-left by space-between */
.v3-banner__sub {
  margin-top: auto; /* push sub and CTA to bottom */
}

/* Left/right alignment variants */
.v3-banner__inner--left {
  align-items: flex-start;
  text-align: left;
}

.v3-banner__inner--right {
  align-items: flex-end;
  text-align: right;
}

/* Mobile: left-aligned text, spread top/bottom */
@media (max-width: 768px) {
  .v3-banner .v3-banner__inner,
  .v3-banner .v3-banner__inner--left,
  .v3-banner .v3-banner__inner--right {
    padding: 24px 20px !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100%;
    background:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 35%, transparent 50%),
      linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.15) 40%, transparent 55%);
  }

  /* Banners must be tall enough for text on mobile */
  .v3-banner {
    min-height: 60vh !important;
    aspect-ratio: unset !important;
  }

  .v3-banner__headline {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .v3-banner__sub {
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    max-width: 100%;
    margin-bottom: 16px;
  }

  .v3-banner__eyebrow {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }

  .v3-banner__cta {
    font-size: 0.8rem;
    padding: 10px 20px;
  }

  /* Mission section mobile */
  .v3-mission__headline {
    font-size: clamp(1.3rem, 5vw, 2rem);
  }

  .v3-mission__quote-text {
    font-size: 0.95rem;
  }

  .v3-mission__cta {
    font-size: 1rem;
    padding: 12px 32px;
  }

  .constellation__title {
    font-size: 0.95rem;
  }

  .constellation__role {
    font-size: 0.75rem;
  }

  /* Navy banner (first): ensure proper spacing below ticker+navbar */
  #hero.v3-banner {
    min-height: 50vh !important;
  }

  /* Gold banner: consistent with others now */

  /* Stronger text shadow for mobile readability */
  .v3-banner__headline {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.4);
  }

  .v3-banner__sub {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  }

}

/* Text elements — always white on banners (both modes) */
.v3-banner__inner {
  color: #fff;
}

.v3-banner__eyebrow {
  font-family: 'SF Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}

.v3-banner__headline {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.v3-banner__sub {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 24px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  max-width: 36ch;
}

/* CTA button (Banners 2 & 3) */
.v3-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: inherit;
}

.v3-banner__cta:hover {
  transform: translateY(-2px);
}

.v3-banner--hero .v3-banner__cta:hover {
  box-shadow: 0 8px 24px rgba(196, 181, 253, 0.3);
}

.v3-banner--navy .v3-banner__cta:hover {
  box-shadow: 0 8px 24px rgba(147, 197, 253, 0.3);
}

.v3-banner--gold .v3-banner__cta:hover {
  box-shadow: 0 8px 24px rgba(252, 211, 77, 0.3);
}

/* === Mission Section — warm amber/gold in BOTH modes === */
.v3-mission {
  background: linear-gradient(135deg, #1a1206 0%, #2d1f0a 50%, #1a1206 100%) !important;
  padding: 12px 0;
}

body[data-theme=light] .v3-mission {
  background: linear-gradient(135deg, #fdf6e9 0%, #f5e6c8 50%, #fdf6e9 100%) !important;
}

/* === Scroll Section Background === */
.v3-scroll-section {
  background: var(--v3-scroll-bg);
  padding: var(--spacing-md, 16px) 0 var(--spacing-lg, 32px);
}

/* Light mode override */
body[data-theme=light] .v3-scroll-section {
  background: #f4f4f7;
}

/* === Scroll Track === */
.v3-scroll-track-wrap {
  position: relative;
}

.v3-scroll-track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 16px;
  padding-left: var(--spacing-lg, 24px);
  padding-right: var(--spacing-lg, 24px);
}

.v3-scroll-track::-webkit-scrollbar {
  display: none;
}

/* Edge fade — right side indicates more content */
.v3-scroll-track-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 64px;
  background: linear-gradient(to left, var(--v3-scroll-bg), transparent);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s;
}

/* Hide right fade when scrolled to end */
.v3-scroll-track-wrap.scroll-end::after {
  opacity: 0;
}

/* Edge fade — left side when scrolled right */
.v3-scroll-track-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 64px;
  background: linear-gradient(to right, var(--v3-scroll-bg), transparent);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
}

.v3-scroll-track-wrap.scroll-start-offset::before {
  opacity: 1;
}

/* Light mode edge fades */
body[data-theme=light] .v3-scroll-track-wrap::after {
  background: linear-gradient(to left, #f4f4f7, transparent);
}

body[data-theme=light] .v3-scroll-track-wrap::before {
  background: linear-gradient(to right, #f4f4f7, transparent);
}

/* Scroll arrow indicators — edge-aligned animated chevrons */
@keyframes v3-nudge-left {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-5px); }
}
@keyframes v3-nudge-right {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(5px); }
}

.v3-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px;
  height: 80px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, color 0.2s;
  opacity: 0.8;
  padding: 0;
}

.v3-scroll-arrow svg {
  width: 24px;
  height: 24px;
}

.v3-scroll-arrow--left {
  left: 0;
  animation: v3-nudge-left 2s ease-in-out infinite;
}

.v3-scroll-arrow--right {
  right: 0;
  animation: v3-nudge-right 2s ease-in-out infinite;
}

.v3-scroll-arrow:hover {
  color: rgba(255, 255, 255, 0.9);
  animation-play-state: paused;
}

/* Hide arrows at scroll boundaries */
.v3-scroll-track-wrap:not(.scroll-start-offset) .v3-scroll-arrow--left {
  opacity: 0 !important;
  pointer-events: none;
}

.v3-scroll-track-wrap.scroll-end .v3-scroll-arrow--right {
  opacity: 0 !important;
  pointer-events: none;
}

/* Audit library scroll — same arrow style */
.audit-library__scroll-wrap {
  position: relative;
}

/* Light mode arrows */
body[data-theme=light] .v3-scroll-arrow {
  color: rgba(0, 0, 0, 0.35);
}

body[data-theme=light] .v3-scroll-arrow:hover {
  color: rgba(0, 0, 0, 0.7);
}

/* Hide arrows on touch devices — swipe is natural */
@media (hover: none) {
  .v3-scroll-arrow {
    display: none;
  }
}

/* === Product Grid — Flex Row === */
.v3-scroll-section .shop-product-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px;
  min-width: max-content;
  padding: 8px 4px 16px;
  min-height: auto;
}

/* Override shop.css #shopGrid min-height for horizontal scroll */
.v3-scroll-section #shopGrid {
  min-height: auto;
}

/* === Product Card Snap + Sizing === */
.v3-scroll-section .shop-product-card {
  scroll-snap-align: center;
  flex: 0 0 300px;
  max-width: 300px;
}

/* === Mission Section — Content Styles === */
.v3-mission__inner {
  text-align: center;
  padding: 8px var(--spacing-lg, 24px);
  max-width: 800px;
  margin: 0 auto;
}



.v3-mission__headline {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm, 12px);
  color: #D4A853;
  -webkit-text-fill-color: #D4A853;
}

.v3-mission__quote {
  margin: 0 auto var(--spacing-sm, 12px);
  max-width: 600px;
  border: none;
  padding: 0;
}

.v3-mission__avatar-wrap {
  margin-bottom: var(--spacing-sm, 12px);
}

.v3-mission__avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #D4A853;
}

.v3-mission__quote-text {
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: var(--spacing-xs, 8px);
}

.v3-mission__attribution {
  font-size: 0.85rem;
  color: rgba(212, 168, 83, 0.7);
  font-style: normal;
  display: block;
  margin-bottom: 12px;
}

/* CTA — large, prominent, unmissable */
.v3-mission__cta {
  font-size: 1.15rem;
  padding: 16px 48px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.v3-mission__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

/* Light mode: warm cream bg — dark text */
body[data-theme=light] .v3-mission__headline {
  color: #2d1f0a;
  -webkit-text-fill-color: #2d1f0a;
}
body[data-theme=light] .v3-mission__quote-text {
  color: #3d2b10;
}
body[data-theme=light] .v3-mission__attribution {
  color: rgba(45, 31, 10, 0.65);
}
body[data-theme=light] .constellation__title {
  color: #2d1f0a;
}
body[data-theme=light] .constellation__role {
  color: rgba(45, 31, 10, 0.65);
}
body[data-theme=light] .constellation__orbit {
  border-color: rgba(45, 31, 10, 0.12);
}
body[data-theme=light] .constellation__avatar {
  border-color: #b8922e;
}
body[data-theme=light] .constellation__node {
  background: rgba(45, 31, 10, 0.06);
  border-color: rgba(45, 31, 10, 0.15);
  color: #3d2b10;
}
body[data-theme=light] .v3-mission__avatar-img {
  border-color: #b8922e;
}

/* === Constellation Avatar === */
.constellation {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 12px auto 8px;
}

.constellation__orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 83, 0.12);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.constellation__orbit--1 { width: 240px; height: 240px; }
.constellation__orbit--2 { width: 340px; height: 340px; }

.constellation__avatar {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #D4A853;
  background: rgba(212, 168, 83, 0.15);
  z-index: 2;
}
.constellation__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.constellation__node {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  z-index: 3;
  text-decoration: none;
  will-change: transform;
  top: 0; left: 0;
  /* JS controls position via transform — no CSS animation */
}
.constellation__node svg { width: 16px; height: 16px; }

/* Hover: brand colours */
.constellation__node--yt:hover { background: #ff0000; color: #fff; box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3); }
.constellation__node--fb:hover { background: #1877f2; color: #fff; box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3); }
.constellation__node--tt:hover { background: #000; color: #25f4ee; box-shadow: 0 4px 16px rgba(37, 244, 238, 0.3); }
.constellation__node--tw:hover { background: #000; color: #fff; box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2); }
.constellation__node--ig:hover { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; box-shadow: 0 4px 16px rgba(225, 48, 108, 0.3); }
.constellation__node--twitch:hover { background: #9146ff; color: #fff; box-shadow: 0 4px 16px rgba(145, 70, 255, 0.3); }
.constellation__node--discord:hover { background: #5865f2; color: #fff; box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3); }
.constellation__node--email:hover { background: #D4A853; color: #0d0d0d; box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3); }

.constellation__node:hover { z-index: 10; }

/* Title & role below constellation */
.constellation__title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #D4A853;
  margin: 0 0 2px;
}
.constellation__role {
  font-size: 0.82rem;
  color: rgba(212, 168, 83, 0.7);
  margin: 0 0 12px;
}

/* Mobile: smaller constellation */
@media (max-width: 480px) {
  .constellation { width: 300px; height: 300px; }
  .constellation__orbit--1 { width: 190px; height: 190px; }
  .constellation__orbit--2 { width: 270px; height: 270px; }
  .constellation__avatar { width: 100px; height: 100px; }
  .constellation__node { width: 28px; height: 28px; }
  .constellation__node svg { width: 12px; height: 12px; }
}

/* === Product Card v3 Refresh === */
.v3-scroll-section .shop-product-card {
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.v3-scroll-section .shop-product-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

/* Light mode card */
body[data-theme=light] .v3-scroll-section .shop-product-card {
  border-color: rgba(139, 92, 246, 0.1);
}

body[data-theme=light] .v3-scroll-section .shop-product-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

/* === Audit Library — centred header + card text === */
.audit-library__header {
  text-align: center;
}

.audit-library__intro {
  margin-left: auto;
  margin-right: auto;
}

.audit-library-card__body {
  text-align: center;
}

/* === Audit Library — tier badge overlay on image === */
.audit-library-card__image-wrap {
  position: relative;
}

.audit-library-card__image-wrap .tier-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 2px solid;
  border-radius: var(--audit-badge-radius);
  background: var(--audit-badge-bg);
  backdrop-filter: blur(var(--audit-badge-blur));
  -webkit-backdrop-filter: blur(var(--audit-badge-blur));
  line-height: 1.3;
  white-space: nowrap;
}

.audit-library-card__image-wrap .tier-badge-overlay--a {
  color: var(--tier-a); border-color: var(--tier-a);
}
.audit-library-card__image-wrap .tier-badge-overlay--b {
  color: var(--tier-b); border-color: var(--tier-b);
}
.audit-library-card__image-wrap .tier-badge-overlay--c {
  color: var(--tier-c); border-color: var(--tier-c);
}
.audit-library-card__image-wrap .tier-badge-overlay--rejected {
  color: var(--tier-rejected); border-color: var(--tier-rejected);
}
.audit-library-card__image-wrap .tier-badge-overlay--exempt {
  color: var(--tier-exempt); border-color: var(--tier-exempt);
}
.audit-library-card__image-wrap .tier-badge-overlay--pending {
  color: var(--tier-pending); border-color: var(--tier-pending-border);
}

/* === Audit Library — light mode section overrides === */
body[data-theme=light] .audit-library {
  border-top-color: rgba(0, 0, 0, 0.12);
}
body[data-theme=light] .audit-library__intro {
  color: #475569;
}

/* === Audit Library — force horizontal scroll (override shop.css) === */
.audit-library__track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 24px;
  padding: 8px 24px 16px;
}

.audit-library__track::-webkit-scrollbar {
  display: none;
}

.audit-library-card {
  scroll-snap-align: center;
  flex: 0 0 260px !important;
  max-width: 260px !important;
  min-width: 260px;
}

/* === Mobile — Product cards narrower for better scroll === */
@media (max-width: 640px) {
  .v3-scroll-section .shop-product-card {
    flex: 0 0 260px;
    max-width: 260px;
  }

  .v3-scroll-section .shop-product-grid {
    gap: 16px;
  }

  .audit-library-card {
    flex: 0 0 220px !important;
    max-width: 220px !important;
    min-width: 220px;
  }
}

/* === Extra-small screens (≤ 400px) === */
@media (max-width: 400px) {
  .v3-banner__headline {
    font-size: 1.3rem;
  }

  .v3-banner__sub {
    font-size: 0.78rem;
  }

  .v3-banner__cta {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .v3-mission__headline {
    font-size: 1.2rem;
  }
}

/* === Audit Overlay — Close Button Fix (light mode + mobile) === */

/* Light mode: clean round close button — dark colour, no border */
body[data-theme="light"] .audit-overlay-close {
  background: rgba(30, 27, 75, 0.12) !important;
  color: #1e1b4b !important;
  border: none !important;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}

body[data-theme="light"] .audit-overlay-close:hover {
  background: rgba(30, 27, 75, 0.2) !important;
  color: #1e1b4b !important;
}

/* Dark mode: also make it round for consistency */
.audit-overlay-close {
  border-radius: 50% !important;
}

/* Mobile: audit overlay iframe sizing — prevent "too big" content */
@media (max-width: 768px) {
  .audit-overlay {
    padding: 48px 0 0;
  }

  .audit-overlay iframe {
    width: 100% !important;
    height: calc(100vh - 48px) !important;
    max-width: none !important;
  }

  .audit-overlay-close {
    top: 6px !important;
    right: 6px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 20px !important;
    z-index: 2002;
  }
}

/* === Tier Badge Overlay — Robust Styles (higher specificity) === */

/* Ensure image-wrap is positioned for absolute badge */
.v3-scroll-section .shop-product-card__image-wrap {
  position: relative;
}

/* Badge base — scoped to scroll section for specificity */
.v3-scroll-section .tier-badge-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 2px solid;
  border-radius: var(--audit-badge-radius);
  background: var(--audit-badge-bg);
  backdrop-filter: blur(var(--audit-badge-blur));
  -webkit-backdrop-filter: blur(var(--audit-badge-blur));
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
  line-height: 1.3;
  white-space: nowrap;
  margin: 0;
  display: block;
  max-width: none;
  min-width: 0;
  height: auto;
  width: auto;
  overflow: visible;
  opacity: 1;
  color: var(--tier-pending);
  border-color: var(--tier-pending-border);
}

.v3-scroll-section .tier-badge-overlay:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* Tier colours — all driven by tokens */
.v3-scroll-section .tier-badge-overlay--a {
  color: var(--tier-a);
  border-color: var(--tier-a);
}

.v3-scroll-section .tier-badge-overlay--b {
  color: var(--tier-b);
  border-color: var(--tier-b);
}

.v3-scroll-section .tier-badge-overlay--c {
  color: var(--tier-c);
  border-color: var(--tier-c);
}

.v3-scroll-section .tier-badge-overlay--rejected {
  color: var(--tier-rejected);
  border-color: var(--tier-rejected);
}

.v3-scroll-section .tier-badge-overlay--pending {
  color: var(--tier-pending);
  border-color: var(--tier-pending-border);
}

.v3-scroll-section .tier-badge-overlay--exempt {
  color: var(--tier-exempt);
  border-color: var(--tier-exempt);
}

.v3-scroll-section .tier-badge-overlay--preorder {
  color: var(--tier-preorder);
  border-color: var(--tier-preorder);
}

/* ============================================================
   Mission Section — Desktop 3-column layout
   Mobile: stacked (current default)
   Desktop: headline left | constellation center | info right
   ============================================================ */
@media (min-width: 1024px) {
  .v3-mission {
    padding: 48px 0;
  }

  .v3-mission__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 40px;
    align-items: center;
    max-width: 1200px;
    text-align: left;
  }

  /* Left column: headline */
  .v3-mission__headline {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    margin-bottom: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    align-self: center;
  }

  /* Center column: constellation avatar */
  .constellation {
    grid-column: 2;
    grid-row: 1;
    width: 340px;
    height: 340px;
    margin: 0;
  }

  .constellation__orbit--1 { width: 280px; height: 280px; }
  .constellation__orbit--2 { width: 400px; height: 400px; }
  .constellation__avatar { width: 160px; height: 160px; }
  .constellation__node { width: 38px; height: 38px; }
  .constellation__node svg { width: 17px; height: 17px; }

  /* Right column: name + role + quote wrapper */
  .v3-mission__info {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
    align-self: center;
  }

  .v3-mission__info .constellation__title {
    font-size: 1.15rem;
    margin-bottom: 2px;
  }

  .v3-mission__info .constellation__role {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .v3-mission__info .v3-mission__quote {
    margin: 0;
    text-align: left;
  }

  /* CTA: spans full width, centered below */
  .v3-mission__cta {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin-top: 24px;
  }
}

/* === Fix: Banner images must never disappear on tap/click (light mode) === */
body[data-theme=light] .v3-banner__picture,
body[data-theme=light] .v3-banner__picture img,
body[data-theme=light] .v3-banner__img,
body[data-theme=light] .v3-banner__picture source {
  transition: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

body[data-theme=light] .v3-banner__picture::after {
  transition: none !important;
}

/* Remove backdrop-filter on mobile — causes rendering glitches on iOS tap */
@media (max-width: 768px) {
  .v3-banner__picture::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ============================================================
   BUG-004 Fix: Audit element visibility — all screen sizes,
   all themes. Uses CSS custom properties from :root tokens.
   Single source of truth, no !important needed.
   ============================================================ */

/* --- Modal audit info section (all sizes) --- */
.shop-modal__audit-info {
  border: 2px solid var(--audit-info-border);
  background: var(--audit-info-bg);
  border-radius: 12px;
  padding: 16px;
}

.shop-modal__audit-label {
  color: var(--audit-label-color);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.shop-modal__report-btn {
  border: 2px solid var(--audit-report-btn-border);
  color: var(--audit-report-btn-color);
  border-radius: 8px;
  min-height: 44px;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.shop-modal__report-btn:hover {
  transform: translateY(-1px);
}

.shop-modal__report-btn:active {
  transform: translateY(0);
}

/* --- Tier tooltip (all sizes) --- */
.tier-tooltip {
  background: var(--audit-tooltip-bg);
  border: 2px solid var(--audit-tooltip-border);
  box-shadow: var(--audit-tooltip-shadow);
  border-radius: 12px;
  padding: 14px 16px;
}

.tier-tooltip__tier--a     { color: var(--tier-a); }
.tier-tooltip__tier--b     { color: var(--tier-b); }
.tier-tooltip__tier--c     { color: var(--tier-c); }
.tier-tooltip__tier--rejected { color: var(--tier-rejected); }

.tier-tooltip__score {
  color: var(--audit-tooltip-score);
}

.tier-tooltip__summary {
  color: var(--audit-tooltip-summary);
  line-height: 1.5;
}

/* --- Audit viewer carousel — mobile --- */
@media (max-width: 640px) {
  .shop-modal__audit-info {
    padding: 16px;
  }

  .shop-modal__audit-verdict {
    font-size: 15px;
  }

  .shop-modal__report-btn {
    font-size: 12px;
    padding: 12px 16px;
  }

  .audit-slide__card {
    border-color: var(--audit-card-border);
  }

  .audit-viewer__topbar {
    padding: 12px 12px;
  }

  .audit-viewer__back {
    min-width: auto;
    padding: 10px 12px;
    font-size: 11px;
  }
}

/* === Tomas Profile Section — Larger & Animated === */
.tomas-profile {
  max-width: 520px !important;
  padding: 24px !important;
  border-radius: 16px;
  transition: border-color 0.3s ease;
}

.tomas-profile:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme=light] .tomas-profile:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.tomas-profile-photo {
  width: 120px !important;
  height: 120px !important;
  border-width: 3px !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.tomas-profile:hover .tomas-profile-photo {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.2);
}

body[data-theme=light] .tomas-profile:hover .tomas-profile-photo {
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.15);
}

.tomas-profile-name {
  font-size: 18px !important;
}

.tomas-profile-title {
  font-size: 12px !important;
}

@keyframes tomas-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(20, 184, 166, 0.15); }
}

.tomas-profile-photo {
  animation: tomas-glow 4s ease-in-out infinite;
}

/* Pause glow animation on hover — direct interaction takes over */
.tomas-profile:hover .tomas-profile-photo {
  animation-play-state: paused;
}

/* Mobile: slightly smaller but still bigger than before */
@media (max-width: 640px) {
  .tomas-profile-photo {
    width: 100px !important;
    height: 100px !important;
  }
  .tomas-profile {
    max-width: 100% !important;
  }
}

/* === Modal close button — clean round design for both modes === */
.shop-modal__close {
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 22px !important;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s !important;
}

.shop-modal__close:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  transform: scale(1.08);
}

body[data-theme=light] .shop-modal__close {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: rgba(0, 0, 0, 0.5) !important;
}

body[data-theme=light] .shop-modal__close:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(0, 0, 0, 0.3) !important;
  color: rgba(0, 0, 0, 0.8) !important;
}

/* === Modal option buttons — dark mode contrast fix === */
.shop-modal__option-label {
  color: rgba(255, 255, 255, 0.5) !important;
}
.shop-modal__option-btn {
  color: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: transparent;
}
.shop-modal__option-btn:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
.shop-modal__option-btn.active {
  background: #fff !important;
  color: #0d0d0d !important;
  border-color: #fff !important;
}

/* Light mode — restore original colours */
body[data-theme=light] .shop-modal__option-label {
  color: rgba(0, 0, 0, 0.5) !important;
}
body[data-theme=light] .shop-modal__option-btn {
  color: #333 !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}
body[data-theme=light] .shop-modal__option-btn:hover {
  color: #111 !important;
  border-color: rgba(0, 0, 0, 0.5) !important;
}
body[data-theme=light] .shop-modal__option-btn.active {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}

/* ============================================================
   Colt theme: audit element token overrides
   Colt remaps --accent and backgrounds, so audit tokens need
   to inherit colt's palette for seamless integration.
   ============================================================ */

/* --- Colt dark mode: remap audit tokens to colt palette --- */
body[data-version=colt] {
  --audit-tooltip-bg:      var(--colt-bg-elevated, #1c232f);
  --audit-card-bg:         var(--colt-bg-card, #161b26);
  --audit-badge-bg:        rgba(0, 0, 0, 0.7);
  --audit-report-btn-border: var(--colt-accent, #c87941);
  --audit-report-btn-color:  var(--colt-accent, #c87941);
}

/* --- Colt dark mode: mobile sticky price row bg match --- */
@media (max-width: 640px) {
  body[data-version=colt] .shop-modal .shop-modal__price-row {
    background: var(--colt-bg-elevated, #1c232f);
  }
}

/* --- Colt light mode: remap audit tokens --- */
body[data-version=colt][data-theme=light] {
  --audit-report-btn-border: var(--colt-accent-dark, #a86532);
  --audit-report-btn-color:  var(--colt-accent-dark, #a86532);
}

/* --- Colt light mode: mobile price row --- */
@media (max-width: 640px) {
  body[data-version=colt][data-theme=light] .shop-modal .shop-modal__price-row {
    background: #fff;
  }
}

/* --- Audit library cards: colt-aware backgrounds --- */
body[data-version=colt] .audit-library-card {
  background: var(--colt-bg-card, #161b26);
  border-color: var(--audit-card-border);
}

body[data-version=colt] .audit-library-card:hover {
  border-color: var(--audit-card-border-hover);
}

body[data-version=colt] .audit-library-card__score {
  color: var(--audit-score-color);
}

body[data-version=colt][data-theme=light] .audit-library-card {
  background: #fff;
  border-color: var(--audit-card-border);
}

body[data-version=colt][data-theme=light] .audit-library-card__name {
  color: #0f172a;
}

body[data-version=colt][data-theme=light] .audit-library-card__score {
  color: var(--audit-score-color);
}

/* --- Audit viewer overlay: colt-aware card backgrounds --- */
body[data-version=colt] .audit-slide__card {
  background: var(--colt-bg-elevated, #1c232f);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-version=colt] .audit-slide__score-card {
  background: var(--colt-bg-elevated, #1c232f);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-version=colt] .audit-slide__net-stat {
  background: var(--colt-bg-card, #161b26);
}

body[data-version=colt] .audit-slide__dim-bar-bg,
body[data-version=colt] .audit-slide__ux-bar-bg,
body[data-version=colt] .audit-slide__domain-bar {
  background: var(--colt-bg-card, #161b26);
}

body[data-version=colt][data-theme=light] .audit-slide__card,
body[data-version=colt][data-theme=light] .audit-slide__score-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

body[data-version=colt][data-theme=light] .audit-slide__net-stat {
  background: #f1f5f9;
}

body[data-version=colt][data-theme=light] .audit-slide__dim-bar-bg,
body[data-version=colt][data-theme=light] .audit-slide__ux-bar-bg,
body[data-version=colt][data-theme=light] .audit-slide__domain-bar {
  background: #f1f5f9;
}

/* CLS prevention — min-height for JS-populated sections */
#shopGrid {
  min-height: 320px;
}
@media (max-width: 640px) {
  #shopGrid {
    min-height: 280px;
  }
}

#productsGrid {
  min-height: 320px;
}
@media (max-width: 640px) {
  #productsGrid {
    min-height: 280px;
  }
}

#reviewsGrid {
  min-height: 300px;
}
@media (max-width: 640px) {
  #reviewsGrid {
    min-height: 260px;
  }
}
