/* ============================================================
   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;
}

/* === 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 — spread headline top, subtitle bottom */
.v3-banner__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: absolute;
  inset: 0;
  padding: var(--spacing-xxl, 80px) var(--spacing-lg, 24px);
  z-index: 1;
}

/* Headline group (eyebrow + headline) stays at top via natural flow */
.v3-banner__eyebrow,
.v3-banner__headline {
  /* top group — no special positioning needed, flex start */
}

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

/* Legacy left/right classes — keep centred now */
.v3-banner__inner--left,
.v3-banner__inner--right {
  align-items: center;
  text-align: center;
  padding-left: var(--spacing-lg, 24px);
  padding-right: var(--spacing-lg, 24px);
}

/* Mobile: centred 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 16px !important;
    align-items: center !important;
    text-align: center !important;
    align-self: flex-end;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    padding-top: 32px;
  }

  /* 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: 300px;
  height: 300px;
  margin: 12px auto 8px;
}

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

.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.1);
  border: 1px solid rgba(212, 168, 83, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  z-index: 3;
  text-decoration: none;
}
.constellation__node svg { width: 16px; height: 16px; }

/* Position nodes around the orbit */
.constellation__node--yt { top: 8%;  left: 50%; transform: translateX(-50%); }
.constellation__node--fb { top: 25%; right: 2%; }
.constellation__node--tt { top: 65%; right: 2%; }
.constellation__node--li { top: 25%; left: 2%; }
.constellation__node--pi { top: 65%; left: 2%; }
.constellation__node--ig { bottom: 8%; left: 50%; transform: translateX(-50%); }

/* 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--li:hover { background: #0a66c2; color: #fff; box-shadow: 0 4px 16px rgba(10, 102, 194, 0.3); }
.constellation__node--pi:hover { background: #e60023; color: #fff; box-shadow: 0 4px 16px rgba(230, 0, 35, 0.3); }
.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:hover { transform: scale(1.2); }
.constellation__node--yt:hover,
.constellation__node--ig:hover { transform: translateX(-50%) scale(1.2); }

/* Floating animation */
@keyframes constellation-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.constellation__node { animation: constellation-float 3s ease-in-out infinite; }
.constellation__node--fb { animation-delay: 0.5s; }
.constellation__node--tt { animation-delay: 1s; }
.constellation__node--li { animation-delay: 1.5s; }
.constellation__node--pi { animation-delay: 2s; }
.constellation__node--ig { animation-delay: 2.5s; }

/* Pause on hover */
.constellation:hover .constellation__node { animation-play-state: paused; }

/* 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: 240px; height: 240px; }
  .constellation__orbit--1 { width: 170px; height: 170px; }
  .constellation__orbit--2 { width: 230px; height: 230px; }
  .constellation__avatar { width: 110px; height: 110px; }
  .constellation__node { width: 30px; height: 30px; }
  .constellation__node svg { width: 13px; height: 13px; }
}

/* === 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 — 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: 4px 8px;
  border: 2px solid;
  background: #0d0d0d;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 0;
  margin: 0;
  display: block;
  max-width: none;
  min-width: 0;
  height: auto;
  width: auto;
  overflow: visible;
  opacity: 1;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.45);
}

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

/* Tier A — green */
.v3-scroll-section .tier-badge-overlay--a {
  color: #22c55e;
  border-color: #22c55e;
}

/* Tier B — yellow */
.v3-scroll-section .tier-badge-overlay--b {
  color: #ffbe0b;
  border-color: #ffbe0b;
}

/* Tier C — orange */
.v3-scroll-section .tier-badge-overlay--c {
  color: #f97316;
  border-color: #f97316;
}

/* Rejected — red */
.v3-scroll-section .tier-badge-overlay--rejected {
  color: #f33;
  border-color: #f33;
}

/* Pending */
.v3-scroll-section .tier-badge-overlay--pending {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.45);
  background: #0d0d0d;
}

/* Light mode */
body[data-theme=light] .v3-scroll-section .tier-badge-overlay {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--a {
  color: #15803d;
  border-color: #15803d;
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--b {
  color: #a16207;
  border-color: #a16207;
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--c {
  color: #c2410c;
  border-color: #c2410c;
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--rejected {
  color: #b91c1c;
  border-color: #b91c1c;
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--pending {
  color: #64748b;
  border-color: #94a3b8;
}

/* Pre-order badge — purple accent */
.v3-scroll-section .tier-badge-overlay--preorder {
  color: #8b5cf6;
  border-color: #8b5cf6;
}

body[data-theme=light] .v3-scroll-section .tier-badge-overlay--preorder {
  color: #7c3aed;
  border-color: #7c3aed;
}

/* ============================================================
   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: 240px; height: 240px; }
  .constellation__orbit--2 { width: 330px; height: 330px; }
  .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;
  }
}
