/* the marketing page at /, in space (other colours come from style.css) */
html { scroll-behavior: smooth; }
html, body.home { height: auto; }
body.home { font-size: 16px; line-height: 1.55; overflow-x: hidden; }
.home a { color: inherit; }
.home h1 { font-size: clamp(42px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -.025em; font-weight: 800; margin: 0 0 18px; }
.home h1 em { font-style: normal; color: var(--accent); }
.home h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -.015em; font-weight: 750; margin: 0 0 10px; }
.home h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 20px; }
.home-section, .home-hero, .home-final, .home-nav { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }

.home-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; }
.home-brand { display: block; line-height: 0; }
.home-brand img { height: 52px; width: auto; }
.home-nav nav { display: flex; align-items: center; gap: 22px; }
.home-nav nav a:not(.home-btn) { color: var(--muted); text-decoration: none; }
.home-nav nav a:not(.home-btn):hover { color: var(--text); }

.home-btn { display: inline-block; background: var(--accent); color: #1a1a1a !important; font-weight: 700; padding: 13px 28px; border-radius: 8px; text-decoration: none; white-space: nowrap; transition: transform .12s, box-shadow .12s; }
.home-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 207, 90, .25); }
.home-btn:focus-visible, .home-link:focus-visible, .home-nav a:focus-visible, .home-map:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-btn.small { padding: 8px 16px; font-size: 14px; }
.home-link { color: var(--text); text-underline-offset: 4px; }

.home-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-block: 48px 72px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.lead { font-size: 19px; color: #c8ccd6; margin: 0 0 26px; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fineprint { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.hero-scene { min-width: 0; }
.scene-box { aspect-ratio: 14 / 9; display: flex; align-items: center; justify-content: center; }
.scene-box canvas { display: block; border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 1px var(--line); }

.home-section { padding-block: 56px; }
.section-lead { color: #c8ccd6; max-width: 640px; margin: 0 0 28px; }

.how { border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 44px; line-height: 1; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
.steps b { font-size: 18px; }
.steps p { color: #c8ccd6; margin: 6px 0 0; }

.tower-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tower-card { background: var(--panel); border-radius: 10px; padding: 16px; border-top: 3px solid var(--tower); display: flex; flex-direction: column; gap: 8px; }
.tower-card h3 { margin: 0; }
.tower-card .role { color: #c8ccd6; font-size: 14px; margin: 0; }
.tower-card .ability-name { margin: auto 0 0; padding-top: 8px; font-size: 13px; color: var(--muted); }
.tower-card .ability-name b { display: block; color: var(--tower); font-size: 15px; }

.matchup-scroll { overflow-x: auto; border-radius: 10px; }
.matchups { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--panel); }
.matchups th, .matchups td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.matchups tr:last-child th, .matchups tr:last-child td { border-bottom: 0; }
.matchups thead th { color: var(--text); font-weight: 600; }
.matchups thead canvas { display: block; width: 32px; height: 32px; margin: 0 auto 4px; }
.matchups tbody th { text-align: left; color: var(--text); font-weight: 650; white-space: nowrap; }
.matchups .dot { display: inline-block; vertical-align: -2px; margin-right: 8px; }
.matchups td { color: var(--muted); }
.matchups td.strong { color: var(--ok); font-weight: 700; background: rgba(90, 212, 138, .1); }
.matchups td.weak { color: #ff8d8d; font-weight: 700; background: rgba(232, 90, 90, .1); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.grow-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; color: #c8ccd6; }
.grow-list b { display: block; color: var(--text); }
.daily-panel { background: var(--panel); border-radius: 12px; padding: 26px; border: 1px solid #5a4d25; }
.daily-panel h3 { font-size: 26px; font-weight: 750; margin: 0 0 6px; }
.daily-panel p { margin: 0 0 14px; color: #c8ccd6; }
.daily-panel .eyebrow { color: var(--accent); margin-bottom: 8px; }
.daily-panel .fineprint { margin: 14px 0 0; color: var(--muted); }
.daily-board { margin: 0 0 18px; padding: 0 0 0 22px; }
.daily-board:empty { display: none; }
.daily-board li span { float: right; color: var(--muted); }

.home-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.home-map { background: var(--panel); border-radius: 10px; padding: 10px; text-decoration: none; display: block; transition: transform .12s; }
.home-map:hover { transform: translateY(-2px); }
.home-map canvas { display: block; width: 100%; border-radius: 6px; margin-bottom: 10px; }
.home-map b { display: block; }
.home-map span { color: var(--muted); font-size: 14px; }

.home-final { text-align: center; padding-block: 72px 96px; }
.home-final h2 { margin-bottom: 22px; }

@media (max-width: 960px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 24px 48px; }
  .tower-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 640px) {
  .home-section, .home-hero, .home-final, .home-nav { padding-inline: 16px; }
  .home-section { padding-block: 40px; }
  .home-nav nav a:not(.home-btn) { display: none; }
  .home-brand { font-size: 15px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tower-cards { grid-template-columns: minmax(0, 1fr); }
  .lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-btn, .home-map { transition: none; }
}

/* ---------------------------------------------------------------- loot: gear and the shop */
.loot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.loot-panel { background: var(--panel); border-radius: 12px; padding: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.loot-panel h3 { margin: 0 0 8px; }
.loot-panel > p:not(.eyebrow):not(.fineprint) { color: var(--muted); margin: 0 0 18px; }
.loot-panel .eyebrow { margin-bottom: 8px; }
.loot-panel .fineprint { margin-top: auto; padding-top: 16px; }
.gear-kinds, .rarity-strip, .shop-cards { list-style: none; margin: 0; padding: 0; }
.gear-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.gear-kinds li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); text-align: center; }
.gear-kinds svg { color: var(--gear); filter: drop-shadow(0 0 8px var(--gear)); margin-bottom: 4px; }
.gear-kinds span { color: var(--muted); font-size: 13px; }
.rarity-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rarity-strip li { padding: 8px 6px; border-radius: 8px; border-top: 3px solid var(--r); background: rgba(0, 0, 0, .22); text-align: center; font-size: 13px; }
.rarity-strip b { display: block; color: var(--r); }
.rarity-strip span { color: var(--muted); }
.shop-cards { display: grid; gap: 8px; }
.shop-cards li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.shop-cards .shop-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .06); }
.shop-cards b { display: block; }
.shop-cards small { color: var(--muted); font-size: 13px; }
.shop-cards .price { color: var(--accent); font-weight: 700; white-space: nowrap; }

@media (max-width: 960px) {
  .loot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .loot-panel { padding: 18px; }
  .rarity-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- universe theme */
body.home { --panel: rgba(16, 19, 44, .78); --line: rgba(150, 170, 255, .2); --ice: #8fe9ff; background: #05060f; }
.home main, .home-nav { position: relative; z-index: 1; }

.home-nav { max-width: none; background: rgba(5, 6, 15, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-inline: max(24px, calc((100vw - 1112px) / 2)); position: sticky; top: 0; z-index: 5; }

.hero-wrap, .final-wrap { position: relative; overflow: hidden; }
.space-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 72%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 72%, transparent); }
.home-hero, .home-final { position: relative; }
.home-hero { padding-block: 64px 96px; }
.hero-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 6, 15, .72), rgba(5, 6, 15, .12) 62%); }
.home-hero { z-index: 1; }
.home-final { z-index: 1; padding-block: 130px; text-shadow: 0 2px 18px rgba(0, 0, 0, .9); }
.final-wrap::after { content: ''; position: absolute; inset: 0; background: rgba(5, 6, 15, .28); pointer-events: none; }

.home .eyebrow { color: var(--ice); }
.home h1 { text-shadow: 0 2px 30px rgba(10, 10, 40, .8); }
.home h1 em { text-shadow: 0 0 34px rgba(255, 207, 90, .5); }
.lead, .steps p, .section-lead, .grow-list { color: #d6dbe8; }
.fineprint { color: #aeb5c6; }
.home-nav nav a:not(.home-btn) { color: #c3c9d8; }
.home-btn { box-shadow: 0 0 26px rgba(255, 207, 90, .32); }
.how { border-top: 0; }
.scene-box canvas { box-shadow: 0 0 60px rgba(90, 120, 255, .35), 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px var(--line); }

.tower-card, .daily-panel, .home-map, .matchups { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tower-card, .home-map { border: 1px solid var(--line); }
.tower-card { border-top: 3px solid var(--tower); box-shadow: 0 -8px 26px -18px var(--tower); }
.home-map:hover { box-shadow: 0 0 26px rgba(120, 150, 255, .3); }
.matchup-scroll { border: 1px solid var(--line); }
.tower-card .ability-name { color: #b3bacb; }
.daily-panel { border-color: rgba(255, 207, 90, .4); box-shadow: 0 0 40px rgba(255, 207, 90, .08); }
.matchups td { color: #aeb5c6; }
.matchups td.strong { background: rgba(90, 212, 138, .16); }
.matchups td.weak { background: rgba(232, 90, 90, .16); }

.bg-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.path-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.bg-cards figure, .path-cards figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.bg-cards canvas, .path-cards canvas { display: block; width: 100%; border-radius: 6px; }
.bg-cards figcaption, .path-cards figcaption { padding: 7px 4px 2px; font-size: 14px; font-weight: 600; text-align: center; }
.path-cards figcaption { font-size: 13px; }
.home h3.paths-title { margin: 26px 0 12px; font-size: 18px; }

@media (max-width: 960px) {
  .home-hero { padding-block: 32px 64px; }
  .hero-wrap::after { background: rgba(5, 6, 15, .42); }
  .bg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .path-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-nav { padding-inline: 16px; }
  .bg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-final { padding-block: 90px; }
}

/* the darkening over the art fades out with it, so no line shows where a section ends */
.hero-wrap::after, .final-wrap::after { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 72%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 72%, transparent); }
/* a calmer sky, and a soft dark edge so stars never fight with small text */
.home-section > h2, .section-lead, .steps, .grow-list, .paths-title { text-shadow: 0 1px 7px #05060f, 0 0 3px #05060f; }

/* phones: the logo, music button and Play now all fit on one line */
@media (max-width: 640px) {
  .home-nav { gap: 6px; }
  .home-nav nav { gap: 6px; }
  .home-brand img { height: 38px; }
  .home-nav .music-toggle { font-size: 12px; padding: 5px 7px; }
  .home-nav .home-btn.small { padding: 6px 10px; font-size: 13px; }
}
