/* Landing page layout only. Every frame, button, field and colour comes from
   launcher.css - this file must never restate the chrome, or the site and the
   game will drift apart. It adds the arrangements a launcher never needed:
   a wide shell, a news list, a feature grid and numbered steps. */

.home-overlay {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* The launcher shell is a 660px login column; a landing page needs room. */
#launcher-shell.home-shell {
  width: min(1100px, calc(100% - 26px));
  padding: 22px 0 40px;
}

.home-brand {
  margin: 0 auto 14px;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
  font: 13px var(--ui-font);
}

.home-nav a {
  color: var(--ui-parchment);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.home-nav a:hover { color: var(--ui-gold-bright); }
.home-nav-account { color: var(--ui-gold-bright); font-weight: bold; }

/* --------------------------------------------------------------------- hero */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.home-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 6px;
  color: var(--ui-body-ink);
}

.home-intro h1 {
  margin: 0 0 12px;
  color: var(--ui-gold-bright);
  font: bold clamp(1.5rem, 3.6vw, 2.3rem)/1.15 var(--ui-font);
  text-shadow: 0 2px 3px rgba(20, 12, 40, 0.7);
}

.home-lede {
  margin: 0;
  max-width: 48ch;
  font: 14px/1.65 var(--ui-font);
}

/* .launcher-auth centres itself in a 400px column; inside the hero grid it is
   already in its own column and must fill it. */
.home-auth {
  width: 100%;
  margin: 0;
}

.home-form-title {
  margin: 0;
  color: var(--ui-gold-bright);
  font: bold 15px var(--ui-font);
}

.home-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ui-body-ink);
  font: 12px var(--ui-font);
  text-decoration: underline;
  cursor: pointer;
}

.home-link:hover { color: var(--ui-gold-bright); }

.home-account-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.home-account-head strong { color: var(--ui-gold-bright); font-size: 17px; }

.home-pill {
  padding: 1px 8px;
  border: 1px solid var(--ui-btn-edge);
  border-radius: 999px;
  background: rgba(240, 208, 116, 0.25);
  color: var(--ui-title-dark);
  font-size: 11px;
}

.home-characters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.home-characters .home-character {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid var(--ui-purple-edge);
  border-radius: 5px;
  background: rgba(45, 32, 82, 0.28);
  color: var(--ui-body-ink);
  font-size: 12px;
}

.home-clan-mark {
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid var(--ui-purple-edge);
  border-radius: 5px;
  background: rgba(45, 32, 82, 0.2);
  color: var(--ui-body-ink);
  font-size: 12px;
}

.home-clan-mark small { display: block; margin-top: 2px; }
.home-clan-mark p { margin: 5px 0; }
.home-clan-mark form { display: flex; flex-direction: column; gap: 7px; }
.home-clan-mark input { max-width: 100%; }

.home-account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.home-account-actions .launcher-button {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.home-settings {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dotted rgba(184, 139, 76, 0.4);
}

.home-settings summary {
  color: var(--ui-body-ink);
  font-size: 12px;
  cursor: pointer;
}

.home-settings .launcher-form { margin-top: 12px; }

/* ----------------------------------------------------------------- sections */

.home-section {
  margin-bottom: 16px;
  padding: 4px 6px 10px;
  color: var(--ui-body-ink);
}

.home-section-title {
  margin: 0 0 14px;
  color: var(--ui-gold-bright);
  font: bold clamp(1.15rem, 2.4vw, 1.6rem) var(--ui-font);
  text-shadow: 0 2px 3px rgba(20, 12, 40, 0.7);
}

.home-news { display: grid; gap: 10px; }

.home-post {
  padding: 12px 14px;
  border: 1px solid var(--ui-purple-edge);
  border-radius: 7px;
  background: rgba(45, 32, 82, 0.3);
}

.home-post h3 {
  margin: 0 0 2px;
  color: var(--ui-gold-bright);
  font: bold 16px var(--ui-font);
}

.home-post-date { color: var(--ui-purple); font-size: 11px; }

.home-post-body { margin-top: 9px; font: 13px/1.6 var(--ui-font); color: var(--ui-body-ink); }
.home-post-body > :first-child { margin-top: 0; }
.home-post-body > :last-child { margin-bottom: 0; }
.home-post-body h1,
.home-post-body h2,
.home-post-body h3 { color: var(--ui-gold-bright); font-size: 1.08em; margin: 0.7em 0 0.3em; }
.home-post-body a { color: var(--ui-gold); }
.home-post-body ul, .home-post-body ol { padding-left: 1.3em; }
.home-post-body img { max-width: 100%; height: auto; }
.home-post-body code {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.home-post-body pre { overflow-x: auto; padding: 9px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); }
.home-post-body blockquote {
  margin: 0 0 0.8em;
  padding-left: 11px;
  border-left: 3px solid var(--ui-purple-mid);
  color: var(--ui-purple);
}
.home-post-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.home-post-body th, .home-post-body td { padding: 4px 9px; border: 1px solid var(--ui-purple-edge); }

.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.home-feature {
  padding: 12px 14px;
  border: 1px solid var(--ui-purple-edge);
  border-radius: 7px;
  background: rgba(45, 32, 82, 0.3);
}

.home-feature h3 {
  margin: 0 0 6px;
  color: var(--ui-gold-bright);
  font: bold 14px var(--ui-font);
}

.home-feature p { margin: 0; font: 12px/1.6 var(--ui-font); }

.home-note { margin: 14px 0 0; font-size: 12px; }
.home-note a { color: var(--ui-gold); }

.home-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.home-steps li {
  position: relative;
  padding: 12px 14px 12px 46px;
  border: 1px solid var(--ui-purple-edge);
  border-radius: 7px;
  background: rgba(45, 32, 82, 0.3);
  counter-increment: step;
}

.home-steps li::before {
  content: counter(step);
  position: absolute;
  top: 12px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f2d989, #d2ab55);
  color: var(--ui-btn-ink);
  font: bold 12px var(--ui-font);
}

.home-steps h3 { margin: 0 0 4px; color: var(--ui-gold-bright); font: bold 13px var(--ui-font); }
.home-steps p { margin: 0; font: 12px/1.6 var(--ui-font); }

.home-footer {
  margin-top: 4px;
  color: var(--ui-parchment);
  font: 11px/1.6 var(--ui-font);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.home-footer p { margin: 0 0 3px; }
.home-footer p + p { opacity: 0.75; }

@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-auth { max-width: 400px; margin: 0 auto; }
}

/* ---------------------------------------------------------------- auth tabs */

/* launcher.css sizes these for the 660px launcher column: `box-sizing:
   border-box` with a 28px min-height and 14px top/bottom border-image leaves
   zero content height, so in the narrower landing card the labels were clipped.
   The border has to stay - it is the 9-slice button sprite - so the box grows
   instead. */
.home-auth .launcher-tabs button {
  min-height: 40px;
  border-width: 11px 14px;
  padding: 3px 6px;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

/* The selected tab reads green rather than gold. The sprite is kept and
   hue-rotated, so it stays the same pixel frame as every other button instead
   of becoming a flat rectangle in the middle of the game's chrome. */
.home-auth .launcher-tabs button.active {
  filter: hue-rotate(72deg) saturate(1.15) brightness(1.02);
}
