/* After home-sections.css: the hero cards, the depths carousel, every day, the finale and the coins. */

/* ---------- heroes: a card each ---------- */
.heroes { max-width: 1280px; margin: 0 auto; display: block; min-height: 0; }
.hcards { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 1.4vw, 16px); }
.hcards > li { flex: 0 1 218px; }
.hcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 14px 18px; }
.hcard .hop { all: unset; cursor: pointer; display: grid; place-items: end center; width: 132px; height: 150px; margin: -4px 0 6px; border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, var(--plate, #6e5638) 0 58%, transparent 59%); }
.hcard .hop:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
.hcard .hop img { width: auto; height: auto; max-width: none; zoom: 2.25; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); transform-origin: 50% 100%; }
.hcard .hop.jump img { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hop { 0% { transform: scale(1.08, .9); } 40% { transform: translateY(-34px) scale(.94, 1.08); } 70% { transform: translateY(0) scale(1.1, .9); } 100% { transform: none; } }
.hcard h3 { font-size: 40px; line-height: 1; margin: 0; color: var(--gold-hi); text-shadow: 0 2px 0 #3a1f06; }
.hc-title { font: 20px/1.2 'Gold Below Body', monospace; color: var(--dim); margin: 6px 0 12px; }
.hcard dl { margin: 0 0 14px; display: grid; gap: 4px; text-align: left; font-size: 15px; line-height: 1.4; width: 100%; }
.hcard dt { font: 600 18px/1.2 'Barlow Condensed', sans-serif; color: var(--hi); display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.hcard dt img { width: 14px; height: 14px; image-rendering: pixelated; }
.hcard dd { margin: 0; color: var(--text); }
.hc-unlock { font-size: 14px; line-height: 1.35; color: var(--dim); margin: 0 0 10px; font-style: italic; }
.hcard .tag { margin-top: auto; }
.tag { font: 20px/1 'Gold Below Body', monospace; color: #1d1004; background: var(--gold); padding: 6px 9px 5px; border-radius: 2px; box-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.tag.free { background: #86e05a; } .tag.unlock { background: #58c0ff; } .tag.full { background: var(--gold); }
.hcard[data-plate='green'] { --plate: #274d29; } .hcard[data-plate='blue'] { --plate: #1a3e6a; } .hcard[data-plate='purple'] { --plate: #501f5c; }
.hcard[data-plate='orange'] { --plate: #70411a; } .hcard[data-plate='red'] { --plate: #611828; } .hcard[data-plate='gold'] { --plate: #8a5a12; }
@media (max-width: 600px) {
  .hcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hcard { padding: 10px 8px 12px; }
  .hcard .hop { width: 96px; height: 104px; }
  .hcard .hop img { zoom: 1.5; }
  .hcard h3 { font-size: 20px; }
  .hc-title { font-size: 10px; margin: 4px 0 8px; }
  .hcard dl { font-size: 14px; margin-bottom: 8px; }
  .hcard dd { display: none; }
  .hcard dt { font-size: 16px; margin-top: 2px; }
  .hc-unlock { font-size: 12px; }
}
.hero-note { text-align: center; font-size: 15px; color: var(--dim); margin: 26px auto 0; }

/* 3D, set by js/site/cards.js: a resting card stays flat and crisp. Awake (.t3d) it leans by --rx and --ry and its layers
   stand off it by --pop. The face moves to ::after and a thick slab sits behind it in ::before: Safari won't sort a
   card's own background behind its children by depth, so the z-index gives the same order as the depth. A torch glare
   of strength --glare sits on the face at --gx --gy; repainting it is why it stays off during a phone's scroll. */
.hcards { position: relative; }
.hcard.t3d { background: none; box-shadow: none; transition: none; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(calc(var(--pop) * 14px)); transform-style: preserve-3d; }
.hcard.t3d:hover { z-index: 3; }
.hcard.t3d::before, .hcard.t3d::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.hcard.t3d::before { z-index: -2; transform: translateZ(calc(-2px - var(--pop) * 30px)); background: linear-gradient(180deg, #7a5a2c, #2a1c0e); box-shadow: 0 0 0 2px #120c07, var(--lit-drop); }
.hcard.t3d::after { z-index: -1; transform: translateZ(-1px); box-shadow: var(--lit-edge);
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 226 150 / calc(var(--glare, 0) * .3)), rgb(255 226 150 / calc(var(--glare, 0) * .07)) 38%, transparent 62%), var(--lit-face); }
.hcard.t3d .hop { transform: translateZ(calc(var(--pop) * 20px)); transform-style: preserve-3d; }
.hcard.t3d .hop img { translate: 0 0 calc(var(--pop) * 24px); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)) drop-shadow(0 8px 5px rgba(0, 0, 0, .4)); }
.hcard.t3d h3 { transform: translateZ(calc(var(--pop) * 46px)); }
.hcard.t3d .hc-title { transform: translateZ(calc(var(--pop) * 30px)); }
.hcard.t3d dl, .hcard.t3d .hc-unlock { transform: translateZ(calc(var(--pop) * 12px)); }
.hcard.t3d .tag { transform: translateZ(calc(var(--pop) * 36px)); }

/* ---------- the depths: a card each, swiped sideways ---------- */
.depths { max-width: 1320px; margin: 0 auto; }
.carousel { position: relative; }
.car-track { list-style: none; margin: 0; padding: 6px 4px 26px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 380px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.car-track:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 4px; }
.depth { scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; }
.depth-art { position: relative; aspect-ratio: 216 / 150; display: grid; place-items: end center; image-rendering: pixelated; overflow: hidden;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 8, 6, .75)), var(--bg-img) center 30% / cover no-repeat; box-shadow: inset 0 -2px 0 var(--line); }
.depth-art img { width: auto; height: 84%; image-rendering: pixelated; filter: drop-shadow(0 0 24px var(--glow, rgba(247, 185, 62, .5))) drop-shadow(0 6px 0 rgba(0, 0, 0, .5)); margin-bottom: 4%; }
.depth-art .tag { position: absolute; top: 12px; left: 12px; }
.depth-cellars { --glow: rgba(255, 179, 71, .55); } .depth-reliquary { --glow: rgba(72, 224, 160, .5); } .depth-rime { --glow: rgba(150, 210, 255, .55); }
.depth-hoard { --glow: rgba(255, 90, 42, .55); } .depth-deep { --glow: rgba(234, 106, 240, .5); }
.depth-art.trio { grid-auto-flow: column; gap: 4px; }
.depth-art.trio img { height: 52%; }
.depth-body { padding: 16px 20px 22px; display: grid; gap: 6px; }
.depth-body .eyebrow { margin: 0; font-size: 20px; }
.depth-body h3 { font-size: 40px; line-height: 1.05; margin: 0; color: var(--gold-hi); text-shadow: 0 2px 0 #3a1f06; }
.quote { font: italic 17px/1.45 Barlow, serif; color: var(--hi); border-left: 3px solid var(--gold); padding-left: 12px; margin: 4px 0; }
.depth-body p { margin: 0; font-size: 16px; }
.car-btn { position: absolute; top: 34%; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold);
  box-shadow: inset 0 2px 0 var(--gold-hi), inset 0 -3px 0 #b06a1c, 0 3px 0 #3a1f06, 0 8px 22px rgba(0, 0, 0, .6); display: grid; place-items: center; }
.car-btn::before { content: ''; width: 12px; height: 12px; border-left: 4px solid #2a1404; border-bottom: 4px solid #2a1404; rotate: 45deg; margin-left: 5px; }
.car-btn.next::before { rotate: -135deg; margin: 0 5px 0 0; }
.car-btn.prev { left: -14px; } .car-btn.next { right: -14px; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-btn:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
@media (max-width: 700px) { .car-btn { display: none; } .car-track { grid-auto-columns: 82%; } }
.depths .crowd { padding-top: 40px; }
.depths .crowd-track { margin-left: calc(50% - 50vw); }
.also-note { margin: 12px 0 0; }

/* ---------- every day ---------- */
.daily { max-width: 1240px; margin: 0 auto; }
.daily-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(18px, 3vw, 40px); align-items: center; }
.tilt { margin: 0; padding: 10px; rotate: -3deg; }
.tilt.right { rotate: 3deg; }
.tilt img { display: block; width: 100%; height: auto; border-radius: 2px; image-rendering: pixelated; }
.tilt figcaption { margin-top: 10px; justify-content: center; }
.features { display: grid; gap: 14px; }
.feature { padding: 18px 20px; }
.feature h3 { font: 600 24px/1.15 'Barlow Condensed', sans-serif; color: var(--gold-hi); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.feature h3 img { width: 21px; height: 21px; image-rendering: pixelated; }
.feature p { margin: 0; font-size: 16px; }
@media (max-width: 1000px) { .daily-grid { grid-template-columns: 1fr 1fr; } .features { grid-column: 1 / -1; grid-row: 1; } }
@media (max-width: 600px) { .tilt { padding: 6px; } .tilt figcaption { display: none; } }

/* ---------- the finale: the wyrm speaks, the gold flies ---------- */
.finale { text-align: center; padding-bottom: 90px; }
.finale-inner { max-width: 880px; margin: 0 auto; display: grid; justify-items: center; }
.bubble { position: relative; padding: 18px 26px 14px; margin-bottom: 26px; background: #f3e6c8; border-radius: 6px; rotate: -2deg;
  box-shadow: inset 0 0 0 3px #2a1404, 0 4px 0 #000, 0 18px 50px rgba(0, 0, 0, .55); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -18px; width: 26px; height: 22px; translate: -50% 0; background: #2a1404; clip-path: polygon(0 0, 100% 0, 30% 100%); }
.bubble p { font-size: 40px; line-height: 1.15; color: #2a1404; margin: 0; max-width: none; }
.finale-wyrm { width: min(340px, 70vw); height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 40px rgba(255, 90, 42, .45)) drop-shadow(0 8px 0 rgba(0, 0, 0, .5)); margin-bottom: 8px; }
.finale .play { max-width: 760px; text-align: center; display: grid; justify-items: center; padding: clamp(26px, 5vw, 54px);
  box-shadow: inset 0 0 0 2px var(--gold-dark), inset 0 0 0 4px rgba(0, 0, 0, .4), inset 0 4px 0 4px rgba(255, 216, 115, .15), 0 0 80px rgba(247, 185, 62, .16), 0 24px 60px rgba(0, 0, 0, .6); }
.play p { margin-left: auto; margin-right: auto; }
.play-title { font-size: 40px; }
@media (min-width: 900px) { .play-title { font-size: 60px; } }
.also { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.also .btn { flex-direction: row; gap: 10px; min-height: 48px; }
.also .btn img { width: 21px; height: 21px; image-rendering: pixelated; }

/* coins: the game's own coin, thrown up from a store button */
.coin-fx { position: fixed; z-index: 60; width: 21px; height: 21px; margin: -10px 0 0 -10px; pointer-events: none; image-rendering: pixelated; }
