/* The website's pages written by tools/site-pages.mjs, on top of site.css: the home page's FAQ and
   language picker, the heroes' pages and the News page. Works from 360px wide.
   The pages link this file by its version: after a change, run node tools/site-pages.mjs and
   node tools/game-guide.mjs. */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The roster's link to the hero's own page, and to every hero. */
.hero-more { align-self: flex-start; font-weight: 700; font-size: 16px; }
.hero-more::after { content: ' ›'; }
.roster-all { margin: 0; }

/* The FAQ: one open-and-close card per question. */
.faq { background: var(--night); }
.faq .wrap { display: flex; flex-direction: column; gap: 40px; max-width: 860px; }
.faq h2 { font-size: 44px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  border-radius: 18px; border: 1px solid var(--line); background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: border-color 0.15s, box-shadow 0.2s;
}
.faq-item[open] { border-color: rgba(242, 177, 52, 0.6); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none; border-radius: 18px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--chip) center / 14px no-repeat;
  background-image: linear-gradient(var(--gold-light), var(--gold-light)), linear-gradient(var(--gold-light), var(--gold-light));
  background-size: 14px 2px, 2px 14px; transition: transform 0.2s ease-out;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover h3 { color: var(--gold-light); }
.faq-item h3 { margin: 0; font-size: 19px; font-weight: 700; color: #fff; transition: color 0.15s; }
.faq-item p { margin: 0; padding: 0 22px 20px; font-size: 17px; line-height: 1.6; color: var(--soft); animation: faq-open 0.25s ease-out; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* The language picker at the foot of every page. */
.site-languages { padding: 48px 16px; background: var(--deep); border-top: 1px solid var(--line); }
.site-languages .eyebrow { margin-bottom: 20px; text-align: center; }
.site-language-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-language-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; text-decoration: none;
  border: 2px solid var(--line); background: var(--panel); color: var(--soft); font-weight: 700; font-size: 15px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.site-language-list a:hover { border-color: var(--lilac); color: #fff; }
.site-language-list a[aria-current="page"] { border-color: var(--gold); color: #fff; background: var(--chip); }

/* The banner of the heroes' list and the News page. */
.page-banner { background: var(--night) url('/app/art/scenes/heroes_hall.webp') center 35% / cover no-repeat; }
.news-banner { background-image: url('/app/art/banners/grand_rush.webp'); }
.page-banner { background-image: url('/app/art/site/heroes_hall_1920.webp'); background-image: image-set(url('/app/art/site/heroes_hall_1920.webp') 1x, url('/app/art/site/heroes_hall_3840.webp') 2x); }
.news-banner { background-image: url('/app/art/site/grand_rush_1600.webp'); }
@media (max-width: 600px) {
  .heroes-banner { background-image: url('/app/art/site/heroes_hall_phone.webp'); }
}
.page-banner-scrim { padding: 56px 16px 72px; background: linear-gradient(180deg, rgba(20, 12, 43, 0.45) 0%, rgba(20, 12, 43, 0.8) 65%, var(--night) 100%); }
.page-banner-body { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.page-banner-body h1 { font-size: 52px; line-height: 1.05; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6); overflow-wrap: break-word; hyphens: auto; }
.page-banner-body .lead { max-width: 620px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--lilac); }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--gold-light); }
.crumbs [aria-current] { color: var(--gold-light); }

/* A grid of hero cards. */
.hero-grid-section { padding-top: 24px; background: var(--night); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.hero-grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.hero-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; color: var(--text);
  border-radius: 20px; border: 2px solid var(--line); background: var(--panel);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); transition: transform 0.18s ease-out, border-color 0.18s, box-shadow 0.18s;
}
.hero-card:hover, .hero-card:focus-visible { color: var(--text); border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(242, 177, 52, 0.25); }
.hero-card-art { display: block; aspect-ratio: 1; background: radial-gradient(ellipse at 50% 80%, rgba(185, 166, 255, 0.28), transparent 65%), #26194d; }
.hero-card[data-tier="mythic"] .hero-card-art { background: radial-gradient(ellipse at 50% 80%, rgba(255, 143, 163, 0.35), transparent 65%), #2c1a4d; }
.hero-card[data-tier="legendary"] .hero-card-art { background: radial-gradient(ellipse at 50% 80%, rgba(255, 214, 107, 0.32), transparent 65%), #2a1d47; }
.hero-card-art img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; transition: transform 0.25s ease-out; }
.hero-card:hover .hero-card-art img { transform: scale(1.05); }
.hero-card-name { padding: 12px 14px 4px; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 17px; line-height: 1.2; color: #fff; overflow-wrap: break-word; }
.hero-card-chips { padding: 0 14px 14px; font-size: 13px; color: var(--lilac); }
.hero-grid.small .hero-card-name { font-size: 15px; }
.rarity[data-tier="mythic"] { color: #ff8fa3; }
.rarity[data-tier="legendary"] { color: var(--gold-light); }
.rarity[data-tier="epic"] { color: #c9a6ff; }

/* A hero's page: the faction's land behind the hero, the words beside them. */
.hero-banner { background: var(--night) center / cover no-repeat; }
.hero-banner.faction-league { background-image: url('/app/art/backdrops/battle_ruins_wide.webp'); }
.hero-banner.faction-wilderkin { background-image: url('/app/art/backdrops/camp_autumn_wide.webp'); }
.hero-banner.faction-abyssal { background-image: url('/app/art/backdrops/camp_moonpool_wide.webp'); }
.hero-banner.faction-celestial { background-image: url('/app/art/backdrops/camp_starlight_cove_wide.webp'); }
/* Their 4K re-renders (client/public/art/site/): 1920 px wide, 3840 on sharp desktop screens; phones keep 1920. */
.hero-banner.faction-league { background-image: url('/app/art/site/battle_ruins_1920.webp'); background-image: image-set(url('/app/art/site/battle_ruins_1920.webp') 1x, url('/app/art/site/battle_ruins_3840.webp') 2x); }
.hero-banner.faction-wilderkin { background-image: url('/app/art/site/camp_autumn_1920.webp'); background-image: image-set(url('/app/art/site/camp_autumn_1920.webp') 1x, url('/app/art/site/camp_autumn_3840.webp') 2x); }
.hero-banner.faction-abyssal { background-image: url('/app/art/site/camp_moonpool_1920.webp'); background-image: image-set(url('/app/art/site/camp_moonpool_1920.webp') 1x, url('/app/art/site/camp_moonpool_3840.webp') 2x); }
.hero-banner.faction-celestial { background-image: url('/app/art/site/starlight_cove_1920.webp'); background-image: image-set(url('/app/art/site/starlight_cove_1920.webp') 1x, url('/app/art/site/starlight_cove_3840.webp') 2x); }
@media (max-width: 600px) {
  .hero-banner.faction-league { background-image: url('/app/art/site/battle_ruins_phone.webp'); }
  .hero-banner.faction-wilderkin { background-image: url('/app/art/site/camp_autumn_phone.webp'); }
  .hero-banner.faction-abyssal { background-image: url('/app/art/site/camp_moonpool_phone.webp'); }
  .hero-banner.faction-celestial { background-image: url('/app/art/site/starlight_cove_phone.webp'); }
}
.hero-banner-scrim { padding: 40px 16px 0; background: linear-gradient(90deg, rgba(20, 12, 43, 0.96) 0%, rgba(20, 12, 43, 0.82) 50%, rgba(20, 12, 43, 0.25) 100%); }
.hero-banner-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero-banner-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 600px; padding-bottom: 56px; }
.hero-banner-text h1 { font-size: 54px; line-height: 1.05; overflow-wrap: break-word; hyphens: auto; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6); }
.hero-banner-art { width: 400px; max-width: 42%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)); animation: hero-rise 0.5s ease-out; }
.ult-box {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; border-radius: 16px;
  border: 2px solid rgba(242, 177, 52, 0.55); background: linear-gradient(180deg, rgba(37, 24, 82, 0.95), rgba(27, 18, 56, 0.95));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.ult-label { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light); }
.ult-box strong { font-family: 'Cinzel', Georgia, serif; font-size: 22px; color: #fff; }

.hero-about { background: var(--deep); }
.hero-about-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.hero-about-text { display: flex; flex-direction: column; gap: 18px; }
.hero-about h2 { font-size: 34px; line-height: 1.15; overflow-wrap: break-word; }
.unlock-box { padding: 20px 22px; border-radius: 18px; border: 2px solid rgba(255, 143, 163, 0.5); background: rgba(44, 26, 77, 0.9); }
.unlock-box h3 { margin: 0 0 6px; font-size: 18px; color: #ff8fa3; }
.unlock-box p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--soft); }
.hero-tips-wrap { display: flex; flex-direction: column; gap: 18px; }
.hero-tips { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: tip; }
.hero-tips li {
  position: relative; padding: 16px 20px 16px 66px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  font-size: 17px; line-height: 1.55; color: var(--soft); counter-increment: tip;
}
.hero-tips li::before {
  content: counter(tip); position: absolute; left: 16px; top: 14px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #ffe08f; background: var(--gold);
  color: #2a1600; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 17px; box-shadow: 0 0 0 4px rgba(242, 177, 52, 0.2);
}
.hero-others { padding-top: 64px; padding-bottom: 64px; background: var(--night); }
.hero-others .eyebrow { margin-bottom: 20px; text-align: center; }

/* The News page: one card per day, newest first. */
.news-list-section { padding-top: 24px; background: var(--night); }
.news-wrap { max-width: 860px; display: flex; flex-direction: column; gap: 18px; }
.news-day { padding: 26px 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.news-day h2 { margin: 0 0 4px; font-family: 'Cinzel', Georgia, serif; font-size: 24px; color: #fff; }
.news-day time { font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-light); }
.news-day h3 { margin: 18px 0 6px; font-size: 18px; color: #fff; }
.news-day ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.news-day li { font-size: 16px; line-height: 1.55; color: var(--soft); }
.news-older { margin: 8px 0 0; text-align: center; color: var(--lilac); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .hero-card, .hero-card:hover, .hero-card-art img, .hero-card:hover .hero-card-art img, .faq-item summary::after { transition: none; transform: none; }
  .faq-item[open] summary::after { transform: rotate(45deg); }
  .hero-banner-art, .faq-item p { animation: none; }
}

@media (max-width: 900px) {
  .hero-about-wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-banner-body { flex-direction: column-reverse; align-items: center; }
  .hero-banner-art { width: 260px; max-width: 70%; max-height: 45vh; object-fit: contain; }
  .hero-banner-text { align-items: center; text-align: center; padding-bottom: 48px; }
  .hero-banner-scrim { background: linear-gradient(180deg, rgba(20, 12, 43, 0.4) 0%, rgba(20, 12, 43, 0.92) 45%, var(--night) 100%); }
}

@media (max-width: 600px) {
  .faq h2, .page-banner-body h1 { font-size: 32px; }
  .faq-item summary { padding: 16px 18px; }
  .faq-item h3 { font-size: 17px; }
  .faq-item p { padding: 0 18px 18px; font-size: 16px; }
  .hero-banner-text h1 { font-size: 34px; }
  .hero-about h2 { font-size: 26px; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card-name { font-size: 15px; padding: 10px 12px 2px; }
  .hero-card-chips { padding: 0 12px 12px; }
  .hero-tips li { padding: 14px 16px 14px 60px; font-size: 16px; }
  .news-day { padding: 20px; }
}

/* The genre pages and the gift codes page: a banner of their own art, three cards, the questions and
   links to the rest of the site. */
.landing-banner .page-banner-scrim { padding-bottom: 56px; }
.landing-banner .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.landing-banner .banner-stores { margin-top: 4px; }
.landing-strategy { background-image: url('/app/art/site/camp_moonpool_1920.webp'); background-image: image-set(url('/app/art/site/camp_moonpool_1920.webp') 1x, url('/app/art/site/camp_moonpool_3840.webp') 2x); }
.landing-base { background-image: url('/app/art/site/camp_autumn_1920.webp'); background-image: image-set(url('/app/art/site/camp_autumn_1920.webp') 1x, url('/app/art/site/camp_autumn_3840.webp') 2x); }
.landing-heroes { background-image: url('/app/art/site/heroes_hall_1920.webp'); background-image: image-set(url('/app/art/site/heroes_hall_1920.webp') 1x, url('/app/art/site/heroes_hall_3840.webp') 2x); }
.landing-kingdom { background-image: url('/app/art/site/battle_ruins_1920.webp'); background-image: image-set(url('/app/art/site/battle_ruins_1920.webp') 1x, url('/app/art/site/battle_ruins_3840.webp') 2x); }
.landing-codes { background-image: url('/app/art/site/wonders_call_1920.webp'); background-image: image-set(url('/app/art/site/wonders_call_1920.webp') 1x, url('/app/art/site/wonders_call_3840.webp') 2x); }
@media (max-width: 600px) {
  .landing-strategy { background-image: url('/app/art/site/camp_moonpool_phone.webp'); }
  .landing-base { background-image: url('/app/art/site/camp_autumn_phone.webp'); }
  .landing-heroes { background-image: url('/app/art/site/heroes_hall_phone.webp'); }
  .landing-kingdom { background-image: url('/app/art/site/battle_ruins_phone.webp'); }
  .landing-codes { background-image: url('/app/art/site/wonders_call_phone.webp'); }
}
.landing-cards { padding-top: 56px; }
.landing-cards .card { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s; }
.landing-cards .card:hover { transform: translateY(-4px); border-color: rgba(242, 177, 52, 0.55); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4); }
.landing-faq { padding-top: 24px; }

.landing-more { padding: 48px 16px; background: var(--night); border-top: 1px solid var(--line); }
.landing-more .eyebrow { margin-bottom: 20px; text-align: center; }
.landing-more-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.landing-more-list a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 14px; text-decoration: none;
  border: 2px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--deep)); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: border-color 0.15s, transform 0.15s;
}
.landing-more-list a::after { content: ' ›'; margin-left: 6px; color: var(--gold-light); }
.landing-more-list a:hover { border-color: var(--gold); transform: translateY(-2px); }

.codes-how { padding: 64px 16px 8px; background: var(--night); }
.codes-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; }
.codes-steps { display: flex; flex-direction: column; gap: 20px; }
.codes-steps h2 { margin: 0; font-size: 36px; }
.codes-note { margin: 0; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--deep); color: var(--soft); font-size: 16px; line-height: 1.55; }
.codes-art { display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 50% 45%, rgba(242, 177, 52, 0.28), transparent 65%), var(--deep); }
.codes-art img { width: 220px; height: auto; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); animation: codes-bob 3.6s ease-in-out infinite; }
@keyframes codes-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.codes-where { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.codes-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px; }
.codes-card h2 { margin: 0; font-size: 28px; }
.codes-card p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); }

@media (max-width: 900px) {
  .codes-wrap { grid-template-columns: 1fr; gap: 28px; }
  .codes-art { order: -1; padding: 20px; }
  .codes-art img { width: 150px; }
}
@media (max-width: 600px) {
  .landing-cards { padding-top: 36px; }
  .codes-how { padding-top: 40px; }
  .codes-steps h2 { font-size: 28px; }
  .codes-card { padding: 24px 20px; }
  .codes-card h2 { font-size: 24px; }
  .landing-more-list a { min-height: 44px; padding: 0 16px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-cards .card, .landing-cards .card:hover, .landing-more-list a, .landing-more-list a:hover { transition: none; transform: none; }
  .codes-art img { animation: none; }
}
