body.discovery-body {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(9,4,1,.95), rgba(20,8,1,1) 42%, #080301);
}

.discovery-hero {
  position: relative;
  min-height: 620px;
  padding: calc(var(--header-h) + 46px) 24px 44px;
  overflow: hidden;
  border-bottom: 1px solid rgba(200,137,42,.2);
}

.discovery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,3,1,.12), rgba(8,3,1,.84)),
    url("../assets/images/hero/hero_carousel_market_sunrise.png") center / cover no-repeat;
  opacity: .72;
  transform: scale(1.03);
}

.discovery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(8,3,1,.1), rgba(8,3,1,.74) 62%, rgba(8,3,1,.96));
  pointer-events: none;
}

.discovery-hero-inner,
.discovery-shell {
  position: relative;
  z-index: 3;
  max-width: var(--max-w);
  margin: 0 auto;
}

.discovery-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 34px;
  align-items: end;
}

.discovery-hero-copy {
  padding-bottom: 168px;
}

.discovery-kicker,
.discovery-module-kicker {
  display: inline-flex;
  color: var(--amber-light);
  font: 900 11px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.discovery-hero h1 {
  max-width: 860px;
  margin-top: 12px;
  color: #fff5df;
  font: 900 clamp(42px, 7vw, 88px)/.9 var(--font-display);
  text-shadow: 0 8px 28px rgba(0,0,0,.72);
}

.discovery-hero p {
  max-width: 760px;
  margin-top: 18px;
  color: rgba(255,238,206,.78);
  font-size: 16px;
}

.discovery-hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-carousel-stage,
.hero-carousel-slide,
.hero-carousel-slide > img,
.billboard-reveal,
.billboard-reveal img {
  position: absolute;
  inset: 0;
}

.hero-carousel-slide {
  overflow: hidden;
  animation: heroFadeIn 900ms ease both;
  background: #080301;
}

.hero-carousel-slide > img:not(.painter-drone),
.billboard-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-carousel-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,3,1,.84), rgba(7,3,1,.28) 45%, rgba(7,3,1,.72)),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.76));
}

.hero-carousel-caption {
  position: absolute;
  left: max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
  bottom: 108px;
  z-index: 3;
  max-width: min(680px, calc(100vw - 48px));
  color: #fff4dd;
  text-shadow: 0 12px 32px rgba(0,0,0,.82);
}

.hero-carousel-caption span {
  display: inline-flex;
  margin-bottom: 8px;
  color: #ffc760;
  font: 900 11px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-carousel-caption strong {
  display: block;
  font: 900 clamp(30px, 5vw, 62px)/.92 var(--font-display);
}

.hero-carousel-caption p {
  max-width: 580px;
  margin-top: 10px;
  color: rgba(255,239,212,.78);
  font-size: 14px;
}

.hero-carousel-caption--ad {
  bottom: 92px;
}

.hero-carousel-thumbs {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 118px));
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255,214,142,.34);
  border-radius: 10px;
  background: rgba(4,2,1,.58);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.hero-carousel-thumbs button {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255,214,142,.52);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: rgba(0,0,0,.62);
  cursor: pointer;
}

.hero-carousel-thumbs button.is-active {
  border-color: #ffc760;
  box-shadow: 0 0 0 2px rgba(255,199,96,.38), 0 10px 28px rgba(0,0,0,.52);
}

.hero-carousel-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
}

.hero-carousel-thumbs span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.3);
  font: 900 46px/.8 var(--font-display);
  background: rgba(0,0,0,.18);
}

.is-drone-paint .billboard-reveal {
  clip-path: inset(0 100% 0 0);
  animation: billboardPaintReveal 7.8s cubic-bezier(.2,.72,.2,1) forwards;
}

.discovery-hero-ad-image-only .discovery-hero-copy {
  visibility: hidden;
  pointer-events: none;
}

.hero-carousel-slide.is-ad.is-linked {
  cursor: pointer;
}

.painter-drone {
  position: absolute;
  z-index: 4;
  width: clamp(19px, 2.64vw, 42px) !important;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.55));
  animation: painterDroneSweep 7.8s cubic-bezier(.22,.72,.22,1) forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes billboardPaintReveal {
  0% { clip-path: inset(0 100% 0 0); }
  18% { clip-path: inset(0 82% 0 0); }
  36% { clip-path: inset(0 64% 0 0); }
  54% { clip-path: inset(0 42% 0 0); }
  72% { clip-path: inset(0 20% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

@keyframes painterDroneSweep {
  0% { left: 18%; top: 23%; transform: translate(-50%, -50%) rotate(-4deg); }
  16% { left: 30%; top: 54%; transform: translate(-50%, -50%) rotate(3deg); }
  32% { left: 43%; top: 28%; transform: translate(-50%, -50%) rotate(-3deg); }
  48% { left: 56%; top: 58%; transform: translate(-50%, -50%) rotate(3deg); }
  64% { left: 69%; top: 31%; transform: translate(-50%, -50%) rotate(-2deg); }
  82% { left: 82%; top: 56%; transform: translate(-50%, -50%) rotate(2deg); }
  100% { left: 92%; top: 24%; transform: translate(-50%, -50%) rotate(0deg); opacity: .92; }
}

.discovery-persona-panel {
  border: 1px solid rgba(226,168,60,.3);
  border-radius: 8px;
  align-self: end;
  justify-self: end;
  width: min(280px, 100%);
  padding: 10px;
  background: rgba(9,4,1,.68);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.discovery-persona-panel[hidden] {
  display: none !important;
}

.discovery-persona-panel h2 {
  color: #fff0d0;
  font: 900 13px var(--font-ui);
  margin-bottom: 7px;
}

.persona-buttons {
  display: grid;
  gap: 6px;
}

.persona-buttons button {
  min-height: 30px;
  border: 1px solid rgba(226,168,60,.3);
  border-radius: 6px;
  background: rgba(0,0,0,.34);
  color: rgba(255,238,206,.78);
  font: 800 10px var(--font-ui);
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
}

.persona-buttons button.is-active,
.persona-buttons button:hover {
  border-color: rgba(255,196,82,.78);
  color: #180901;
  background: linear-gradient(180deg, #edc05d, #bc7a1f);
}

.discovery-shell {
  padding: 28px 24px 80px;
}

.discovery-trigger-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 28px;
  border: 1px solid rgba(226,168,60,.28);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 42%),
    rgba(9,4,1,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.discovery-trigger-current span {
  display: block;
  color: var(--amber-light);
  font: 900 10px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.discovery-trigger-current strong {
  display: block;
  margin-top: 4px;
  color: #fff4dc;
  font: 900 24px/1 var(--font-ui);
}

.discovery-trigger-current p {
  max-width: 760px;
  margin-top: 7px;
  color: rgba(255,232,190,.68);
  font-size: 13px;
}

.discovery-source-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid rgba(226,168,60,.28);
  border-radius: 999px;
  padding: 5px;
  background: rgba(0,0,0,.32);
}

.discovery-source-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: rgba(255,232,190,.76);
  font: 900 11px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
}

.discovery-source-switch button.is-active {
  color: #160800;
  background: linear-gradient(180deg, #f0c15a, #b8771e);
}

.discovery-source-switch em {
  padding: 0 10px 0 4px;
  color: rgba(255,224,170,.72);
  font: 800 11px var(--font-ui);
  font-style: normal;
}

.discovery-trigger-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.discovery-trigger-links a {
  border: 1px solid rgba(226,168,60,.3);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(0,0,0,.28);
  color: #ffe0a0;
  font: 900 11px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.discovery-trigger-links a:hover {
  color: #120700;
  background: linear-gradient(180deg, #efbe57, #b97620);
}

.discovery-module {
  margin: 0 0 28px;
}

.discovery-module-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}

.discovery-module-head h2 {
  margin-top: 4px;
  color: #fff2d9;
  font: 900 28px/1 var(--font-ui);
}

.discovery-module-head p {
  max-width: 760px;
  color: rgba(255,232,190,.66);
  font-size: 13px;
}

.discovery-module-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.discovery-module-controls span {
  border: 1px solid rgba(226,168,60,.24);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(255,224,170,.68);
  background: rgba(0,0,0,.28);
  font: 800 10px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.discovery-grid {
  display: grid;
  gap: 0;
  border: 1px solid rgba(226,168,60,.26);
  background: rgba(226,168,60,.12);
  overflow: hidden;
}

.discovery-module--square .discovery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.discovery-module--portrait .discovery-grid {
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  overflow-x: auto;
}

.discovery-module--landscape .discovery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discovery-tile {
  position: relative;
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.05);
  background: var(--tile-color, #c8892a);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  animation: discoveryIn 560ms cubic-bezier(.22,.9,.28,1) both;
  animation-delay: var(--tile-delay, 0ms);
}

.discovery-tile.is-missing-link {
  border: 4px solid #e34435;
}

.discovery-tile.is-sponsored-ad {
  border: 3px solid rgba(255,199,96,.72);
}

.missing-link-note {
  border: 1px solid rgba(227, 68, 53, .7);
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffd9d3;
  background: rgba(92, 11, 8, .72);
  font: 900 11px var(--font-ui);
}

.discovery-module--square .discovery-tile {
  aspect-ratio: 1 / 1;
}

.discovery-module--portrait .discovery-tile {
  aspect-ratio: 3 / 4;
}

.discovery-module--landscape .discovery-tile {
  aspect-ratio: 16 / 9;
}

.discovery-tile.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.discovery-tile-media,
.discovery-tile-media img,
.discovery-tile-shade {
  position: absolute;
  inset: 0;
}

.discovery-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  animation: mediaCycle 7s infinite;
}

.discovery-tile-media img:first-child {
  opacity: 1;
}

.discovery-tile-shade {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.76)),
    radial-gradient(circle at 20% 15%, rgba(255,205,111,.18), transparent 38%);
}

.discovery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.discovery-overlay--glass-grid .discovery-tile::after,
.discovery-overlay--glass-grid.discovery-ad-slot::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255,255,255,.12), transparent 45%);
  background-size: 90px 90px, 90px 90px, 100% 100%;
  opacity: .3;
}

.discovery-overlay--plastic-sheen .discovery-tile::after,
.discovery-overlay--plastic-sheen.discovery-ad-slot::after {
  background: linear-gradient(115deg, transparent 10%, rgba(255,255,255,.18) 34%, transparent 56%);
  opacity: .45;
}

.discovery-overlay--horizontal-scan .discovery-tile::after,
.discovery-overlay--horizontal-scan.discovery-ad-slot::after {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 1px, transparent 1px 7px);
  opacity: .18;
}

.discovery-overlay--scan-lines-rotated .discovery-tile::after,
.discovery-overlay--scan-lines-rotated.discovery-ad-slot::after {
  background: repeating-linear-gradient(32deg, rgba(255,255,255,.13) 0 1px, transparent 1px 9px);
  opacity: .2;
}

.discovery-tile-top,
.discovery-tile-body {
  position: relative;
  z-index: 4;
}

.discovery-tile-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
}

.discovery-tile-top span,
.discovery-tile-top em {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(0,0,0,.52);
  color: #ffd993;
  font: 900 10px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.discovery-tile-top em {
  color: #120700;
  background: #e7ac42;
  font-style: normal;
}

.discovery-tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  transform: translateY(calc(100% - 76px));
  transition: transform 260ms ease;
}

.discovery-tile:hover .discovery-tile-body,
.discovery-tile.is-active .discovery-tile-body,
.discovery-tile.is-featured .discovery-tile-body {
  transform: translateY(0);
}

.discovery-tile-body small {
  color: #ffd88d;
  font: 900 10px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.discovery-tile-body h3 {
  margin: 4px 0 6px;
  color: #fff8e8;
  font: 900 clamp(18px, 2vw, 28px)/.95 var(--font-ui);
  text-shadow: 0 2px 14px rgba(0,0,0,.85);
}

.discovery-tile-body p {
  color: rgba(255,239,212,.78);
  font-size: 12px;
  line-height: 1.35;
}

.discovery-tile-meta,
.discovery-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.discovery-tile-meta span {
  color: rgba(255,221,165,.76);
  font: 800 11px var(--font-ui);
}

.discovery-tile-actions a {
  border: 1px solid rgba(255,210,129,.34);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0,0,0,.34);
  color: #ffe3a7;
  font: 900 10px var(--font-ui);
  text-transform: uppercase;
}

.discovery-ad-slot {
  position: relative;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 34px;
  border: 1px solid rgba(226,168,60,.26);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(14,6,1,.88), rgba(76,35,8,.7)),
    url("../assets/images/tiles/legacy/advertising/generic_advertising5.jpg") center / cover;
  overflow: hidden;
}

.discovery-ad-slot > * {
  position: relative;
  z-index: 2;
}

.discovery-ad-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.22));
}

.discovery-ad-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.discovery-ad-slot span {
  display: block;
  color: var(--amber-light);
  font: 900 10px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.discovery-ad-slot strong {
  display: block;
  margin-top: 4px;
  color: #fff4dd;
  font: 900 24px/1 var(--font-ui);
}

.discovery-ad-slot button,
.discovery-ad-button {
  border: 1px solid rgba(255,218,149,.42);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(0,0,0,.35);
  color: #ffe2a5;
  font: 900 11px var(--font-ui);
  text-transform: uppercase;
  cursor: pointer;
}

@keyframes discoveryIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mediaCycle {
  0%, 45% { opacity: 1; transform: scale(1.05); }
  50%, 95% { opacity: 0; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1.05); }
}

.discovery-animation--slide-left .discovery-tile {
  animation-name: discoverySlideLeft;
}

.discovery-animation--drift .discovery-tile {
  animation-name: discoveryDrift;
}

@keyframes discoverySlideLeft {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes discoveryDrift {
  from { opacity: 0; transform: translate(16px, 12px) rotate(.4deg); }
  to { opacity: 1; transform: translate(0, 0) rotate(0); }
}

@media (max-width: 980px) {
  .discovery-hero-inner,
  .discovery-module-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .discovery-module--square .discovery-grid,
  .discovery-module--landscape .discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .discovery-tile.is-featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .discovery-hero {
    padding-left: 16px;
    padding-right: 16px;
  }
  .discovery-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .discovery-module--square .discovery-grid,
  .discovery-module--landscape .discovery-grid {
    grid-template-columns: 1fr;
  }
  .discovery-tile.is-featured {
    grid-column: span 1;
    grid-row: span 1;
  }
  .discovery-ad-slot {
    flex-direction: column;
    align-items: flex-start;
  }
  .discovery-trigger-panel {
    grid-template-columns: 1fr;
  }
  .discovery-trigger-links {
    justify-content: flex-start;
  }
  .discovery-hero {
    min-height: 560px;
  }
  .discovery-hero-copy {
    padding-bottom: 118px;
  }
  .hero-carousel-caption {
    bottom: 92px;
  }
  .hero-carousel-thumbs {
    grid-template-columns: repeat(5, 58px);
    gap: 6px;
  }
  .hero-carousel-thumbs span {
    font-size: 28px;
  }
}

/* ── Tile click-to-hero interaction ─────────────────────────────────────── */

/* Tap-hint badge: hidden by default, shown on active tile */
.discovery-tile-tap-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,199,96,.18);
  border: 1px solid rgba(255,199,96,.48);
  color: #ffd88d;
  font: 700 10px/1 var(--font-ui);
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 6;
}

.discovery-tile.is-active .discovery-tile-tap-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Active tile gets a gold outline to signal "slide is showing" */
.discovery-tile.is-active {
  outline: 2px solid rgba(255,199,96,.72);
  outline-offset: 2px;
}

/* Linked hero slide — cursor signals it's clickable */
.hero-carousel-slide.is-linked {
  cursor: pointer;
}

/* Hero title as link */
.hero-title-link {
  color: inherit;
  text-decoration: none;
}
.hero-title-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255,199,96,.72);
}
