/*
 * The launch page. The game's own tokens (apps/web/src/shell/shell.css) and its
 * rarity colours (apps/web/src/art/portrait.css), copied rather than imported:
 * this folder is outside the workspace and ships as plain files.
 */

:root {
  --ink: #1b1714;
  --ink-soft: #5c534c;
  --paper: #f5f1ea;
  --paper-raised: #fffdf9;
  --edge: #ddd3c6;
  --accent: #7a4a2b;
  --focus: #1d5c8a;
  --gold: #8a6a10;
  /* The share card's inks: text that sits on the art itself. */
  --on-art: #f7eedd;
  --on-art-soft: #efe3cc;
  --target: 44px;
  --gap: 0.75rem;
  --serif: Georgia, 'Iowan Old Style', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece5dc;
    --ink-soft: #a99e93;
    --paper: #17130f;
    --paper-raised: #221c17;
    --edge: #3a312a;
    --accent: #d99a6b;
    --focus: #6fb3e0;
    --gold: #d9b45e;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
.wordmark,
.foot__call {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.75rem);
}

h2 {
  margin: 0 0 var(--gap);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h3 {
  margin: 2.5rem 0 var(--gap);
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.lede {
  max-width: 44rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---- The button ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  background: #c8962a;
  color: #1b1714;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.button:hover {
  background: #d9a93d;
}

.button--quiet {
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--on-art);
  border: 1px solid color-mix(in srgb, var(--on-art) 60%, transparent);
  font-size: 1rem;
}

.button--quiet:hover {
  background: color-mix(in srgb, var(--on-art) 14%, transparent);
}

/* ---- The hero: words on the Long Winter ---- */

.hero {
  display: flex;
  flex-direction: column;
  min-height: min(92vh, 46rem);
  padding: 1rem 1.25rem 3rem;
  color: var(--on-art);
  /* The scrim first: the sky is dark already, the snow is not. */
  background:
    linear-gradient(
      180deg,
      rgb(22 13 6 / 0.55) 0%,
      rgb(22 13 6 / 0.5) 45%,
      rgb(22 13 6 / 0.84) 100%
    ),
    url('img/hero-long-winter.webp') center 60% / cover no-repeat,
    #17130f;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 68rem);
  margin-inline: auto;
}

.wordmark {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
}

/* The page for an address that is not there: the hero, and nothing under it. */
.hero--lost {
  min-height: 100vh;
}

.hero__words {
  width: min(100%, 68rem);
  margin: auto auto 0;
  padding-top: 4rem;
  text-shadow: 0 1px 12px rgb(22 13 6 / 0.7);
}

.hero__words h1 {
  max-width: 18ch;
}

.hero__pitch {
  max-width: 36rem;
  margin: 1.25rem 0 1.75rem;
  font-size: 1.2rem;
  color: var(--on-art-soft);
}

.hero .button {
  text-shadow: none;
}

.hero__note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--on-art-soft);
}

/* ---- Bands ---- */

.band {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.band--raised {
  background: var(--paper-raised);
  border-block: 1px solid var(--edge);
}

.band--echo {
  color: var(--on-art);
  background:
    linear-gradient(
      90deg,
      rgb(22 13 6 / 0.88) 0%,
      rgb(22 13 6 / 0.72) 55%,
      rgb(22 13 6 / 0.5) 100%
    ),
    url('img/wall-backdrop.webp') center / cover no-repeat,
    #221c17;
}

.band--echo .lede {
  color: var(--on-art-soft);
}

.band--echo .points strong {
  color: #d9b45e;
}

.wrap--pair {
  display: grid;
  gap: 3rem;
}

@media (min-width: 52rem) {
  .wrap--pair {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Figures and points ---- */

.figures {
  display: grid;
  gap: var(--gap);
  margin-top: 2rem;
}

.figures li {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink-soft);
}

.figures strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--accent);
}

@media (min-width: 40rem) {
  .figures {
    grid-template-columns: repeat(3, 1fr);
  }
}

.points {
  display: grid;
  gap: 0.6rem;
  max-width: 44rem;
  margin: 1.5rem 0;
}

.points li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--edge);
}

.points strong {
  color: var(--accent);
}

/* ---- Portraits: the game's layers, stacked the way the game stacks them ---- */

.portraits {
  display: grid;
  /* Five people: three and two on a phone, one row from a tablet up. */
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 36rem) {
  .portraits {
    grid-template-columns: repeat(5, 1fr);
  }
}

.portraits p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/*
 * A person on a plate of their tier's colour, under a row of pips that counts
 * it: one for Common, one more for each tier above. The tier is a colour and a
 * count, not a frame — the game's own rule since 2026-11-28, and these are its
 * numbers from apps/web/src/art/portrait.css. Never by colour alone: the pips
 * say the tier to somebody who cannot tell the colours apart.
 */
.portrait {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--edge);
  container-type: inline-size;
  --rarity: var(--edge);
}

.portrait[data-rarity='common'] {
  --rarity: #8a8378;
}

.portrait[data-rarity='uncommon'] {
  --rarity: #5c8746;
}

.portrait[data-rarity='rare'] {
  --rarity: #3c6c98;
}

.portrait[data-rarity='epic'] {
  --rarity: #6b4a96;
}

.portrait[data-rarity='legendary'] {
  --rarity: #c8962a;
}

/* Lit rather than flat: brighter behind the head and deep at the edges. */
.portrait__plate {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 34%,
    color-mix(in srgb, var(--rarity) 78%, white) 0%,
    var(--rarity) 46%,
    color-mix(in srgb, var(--rarity) 42%, black) 100%
  );
  box-shadow: inset 0 0 0 max(1.5px, 2cqw) color-mix(in srgb, var(--rarity) 70%, white);
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.portrait__pips {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  justify-content: center;
  /* Fixed first, for a browser without container units; then by the portrait. */
  --pip: 6px;
  --pip: clamp(4.5px, 8.5cqw, 12px);
  gap: calc(var(--pip) * 0.4);
  padding-block: calc(var(--pip) * 0.45) calc(var(--pip) * 0.6);
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0));
}

.portrait__pips i {
  inline-size: var(--pip);
  block-size: var(--pip);
  transform: rotate(45deg);
  background: #fff6e6;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.55);
}

.rarity {
  font-weight: 600;
}

.rarity[data-rarity='common'] {
  color: #8a8378;
}

.rarity[data-rarity='uncommon'] {
  color: #5c8746;
}

.rarity[data-rarity='rare'] {
  color: #3c6c98;
}

.rarity[data-rarity='epic'] {
  color: #6b4a96;
}

.rarity[data-rarity='legendary'] {
  color: #c8962a;
}

@media (prefers-color-scheme: dark) {
  .rarity[data-rarity='common'] {
    color: #b3aca1;
  }

  .rarity[data-rarity='uncommon'] {
    color: #8fbf76;
  }

  .rarity[data-rarity='rare'] {
    color: #7fb0dc;
  }

  .rarity[data-rarity='epic'] {
    color: #b497dd;
  }
}

/* ---- Terrain, threats, buildings, events ---- */

.tiles {
  display: grid;
  /* Twelve terrains: three rows of four, or two of six. Never eleven and one. */
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 0.5rem;
  max-width: 44rem;
  margin: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

@media (min-width: 40rem) {
  .tiles {
    grid-template-columns: repeat(6, 1fr);
  }
}

.tiles img {
  width: 5rem;
  margin: 0 auto 0.25rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: center;
  color: var(--ink-soft);
}

.cards li {
  padding: 0.75rem;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--paper);
}

.band:not(.band--raised) .cards li {
  background: var(--paper-raised);
}

.cards img {
  width: min(100%, 9rem);
  margin: 0 auto 0.4rem;
}

.cards--three {
  max-width: 34rem;
}

/* Eight buildings: never more than four to a row, so they make whole rows. */
.cards--four {
  max-width: 46rem;
}

/* Six events: one, three or six to a row, so every row is whole. */
.scenes {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (min-width: 40rem) {
  .scenes {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 72rem) {
  .scenes {
    grid-template-columns: repeat(6, 1fr);
  }
}

.scenes img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 0.4rem;
  border-radius: 6px;
}

/* ---- The roadmap: one card an age, in the order they are played ---- */

.seasons {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 40rem) {
  .seasons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .seasons {
    grid-template-columns: repeat(3, 1fr);
  }
}

.season {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--edge);
  border-top: 3px solid var(--edge);
  border-radius: 6px;
  background: var(--paper-raised);
}

/* The one being built. Said in words on the card as well as by the colour. */
.season--now {
  border-top-color: var(--gold);
}

.season__number {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.season--now .season__number::after {
  content: ' · in the making';
  color: var(--ink-soft);
}

.season h3 {
  margin: 0;
  font-size: 1.3rem;
}

.season__span {
  margin: 0.15rem 0 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.season dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.9rem;
  margin: 0;
  font-size: 0.95rem;
}

.season dt {
  color: var(--ink-soft);
  white-space: nowrap;
}

.season dd {
  margin: 0;
}

/* ---- The links in the bar ---- */

.bar__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bar__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--on-art);
  text-underline-offset: 0.25em;
}

/* ---- The foot ---- */

.foot {
  padding: 4rem 0 3rem;
  text-align: center;
  background: #17130f;
  color: var(--on-art);
}

.foot__call {
  margin-bottom: 1.5rem;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.foot__small {
  max-width: 36rem;
  margin: 1.5rem auto 0;
  font-size: 0.9rem;
  color: #a99e93;
}

.foot__small + .foot__small {
  margin-top: 0.5rem;
}

/* ---- The community — HUM-169 ---- */

/* The icon is drawn in the page (no outside images, by the policy in
 * _headers); it takes the colour of the words beside it. */
.social__icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.bar__link--social {
  gap: 0.4rem;
}

.community {
  text-align: center;
}

.community .lede {
  margin-inline: auto;
}

.community__mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  color: var(--accent);
}

/* Discord's own blue, darkened until white words on it read at 4.5:1. */
.button--discord {
  gap: 0.55rem;
  margin-top: 0.5rem;
  background: #4752c4;
  color: #fff;
}

.button--discord:hover {
  background: #3c45a5;
}

.community__note {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.social__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: var(--target);
  padding: 0 0.9rem;
  border: 1px solid color-mix(in srgb, var(--on-art) 45%, transparent);
  border-radius: 999px;
  color: var(--on-art);
  text-decoration: none;
}

.social__link:hover {
  background: color-mix(in srgb, var(--on-art) 12%, transparent);
}
