/* House of Embers: the front pages (home, wiki index, Start, Updates, Vote). Tokens and components are site.css's; this adds only what these pages need. */

/* an icon slot with no art drawn is an empty square: leave it out on these pages */
.ic-off { display: none; }

/* ---- the homepage hero: the aerial of Cherry Haven under a dark overlay, the logo, one line of pitch, the one yellow call to action ---- */
.fr-hero { --hero-pos: center 40%; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 64vh; margin: calc(-48px - var(--header)) calc(50% - var(--vw, 100vw) / 2) 0; padding: calc(var(--header) + 24px) var(--gutter) 64px; overflow: hidden; background: var(--bg); }
/* the media layer: today the aerial picture. A later 3D orbit of Cherry Haven goes into .fr-hero-media (a canvas beside the picture, which stays as its
   poster and fallback) and the hero takes the class fr-hero--orbit, which stops the drift. --hero-pos is the crop. */
.fr-hero-media { position: absolute; inset: 0; z-index: -3; transform-origin: 50% 40%; }
.fr-hero-media picture, .fr-hero-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fr-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos); }
.fr-hero--photo .fr-hero-media { animation: fr-drift 40s ease-in-out infinite alternate; }
.fr-hero--orbit .fr-hero-media { animation: none; }
.fr-hero.fr-paused .fr-hero-media { animation-play-state: paused; }
@keyframes fr-drift { from { transform: scale(1.04); } to { transform: scale(1.10); } }
/* the overlay, in two layers over the picture. ::before frames it: a shade at the top so the nav reads over bright sky, and a fade at the bottom into the
   page ground. ::after is the text scrim: --scrim is the ground colour at 92%, held behind the genre line, the logo, the hook, the address and the version
   line, and feathered out sideways so the islands show either side. Each text line is measured on the rendered pixels (4.5:1 or better on any part of the
   photo, with the drift at either end). */
.fr-hero { --scrim: var(--bg, #0D0A08); --sc: rgba(13,10,8,.92); --sc-1: rgba(13,10,8,.78); --sc-2: rgba(13,10,8,.54); --sc-3: rgba(13,10,8,.28); --sc-4: rgba(13,10,8,.08); --sc-0: rgba(13,10,8,0); }
.fr-hero::before { content: ""; position: absolute; inset: 0 0 -2px 0; z-index: -2;
  background: linear-gradient(180deg, rgba(13,10,8,.7) 0, rgba(13,10,8,.3) 120px, transparent 240px),
  linear-gradient(180deg, transparent 0%, transparent 58%, rgba(13,10,8,.6) 80%, var(--bg) 100%); }
.fr-hero--photo::after { content: ""; position: absolute; inset: 0 0 -2px 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 52% 58% at 50% 62%, var(--sc) 0, var(--sc-1) 34%, var(--sc-2) 56%, var(--sc-3) 74%, var(--sc-4) 88%, var(--sc-0) 100%); }
@media (min-width: 761px) and (max-width: 1100px) {
  .fr-hero--photo::after { background: radial-gradient(ellipse 68% 60% at 50% 62%, var(--sc) 0, var(--sc-1) 34%, var(--sc-2) 56%, var(--sc-3) 74%, var(--sc-4) 88%, var(--sc-0) 100%); }
}
.fr-hero-plain::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: -1; background: linear-gradient(to bottom, rgba(13,10,8,0), var(--bg)); }
.fr-hero-plain { background: radial-gradient(ellipse 70% 60% at 50% 38%, rgba(255,106,26,.22), rgba(255,106,26,0) 70%), var(--bg); }
.fr-hero-in { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; text-align: center; }
/* the logo's shadow sits on the heading so it covers the picture and the flame canvas alike */
.fr-hero .fr-h1 .wm-logo { filter: none; }
.fr-h1 { position: relative; margin: 0 0 10px; font-family: var(--sans); font-weight: 400; line-height: 1; font-size: 0; filter: drop-shadow(0 8px 30px rgba(0,0,0,.55)); }
/* flame.js lays this canvas over the logo, fades it in over 300 ms, then hides the picture under it (the picture stays in the DOM) */
.fr-flame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.fr-flame.on { opacity: 1; }
.fr-h1.flaming .wm-logo { visibility: hidden; }
/* above the fold is the logo plus one typeface (Geist): no eyebrow, no Tektur, no mono. The logo is the display type here. */
.fr-pitch { margin: 0 0 var(--sp-5); max-width: 30ch; font: 500 19px/1.4 var(--sans); letter-spacing: normal; color: var(--text); text-wrap: balance; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
@media (min-width: 761px) { .fr-pitch { font-size: 22px; max-width: 34ch; } }
/* the address pill: Geist 600, the one primary button of the screen on its right */
.fr-cta { display: inline-flex; align-items: center; margin: 0 0 var(--sp-3); padding: 4px 4px 4px var(--sp-5); gap: var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--pill);
  background: rgba(13,10,8,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); max-width: 100%; }
.fr-addr { display: block; padding: 0; font: 600 18px/1 var(--sans); letter-spacing: normal; color: var(--text); user-select: all; white-space: nowrap; }
.fr-copy { height: 44px; font: 600 15px/1 var(--sans); color: #1A0D05; background: var(--ember); border: 0; border-radius: var(--pill); padding: 0 20px; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease); }
.fr-copy:hover { background: var(--ember-hover); box-shadow: 0 8px 24px rgba(255,106,26,.28); }
.fr-copy.done { background: var(--xp); }
/* the one quiet line under the address: dot, state, the Java versions that can join */
.fr-hero .fr-status { margin: var(--sp-3) 0 0; font-size: 14px; color: var(--text); text-shadow: 0 1px 8px rgba(0,0,0,.7); justify-content: center; flex-wrap: wrap; }
.fr-hero .sep { color: var(--text-2); }
/* over the hero the header is transparent: a soft shadow keeps the nav readable until it turns to glass */
.has-hero .hd:not(.scrolled) :is(.nav a, .sb, .addr-t) { text-shadow: 0 1px 8px rgba(0,0,0,.6); }

/* the header's address chip stays out of the way while the hero shows the address (home.js adds cta-away once it has scrolled under the header) */
/* visibility:hidden keeps its Copy button out of the Tab order and the accessibility tree while it is collapsed; the delay lets it fade out first */
html.js body:has(.fr-hero) .hd .addr { max-width: 0; opacity: 0; border-width: 0; pointer-events: none; visibility: hidden; transition: max-width .25s var(--ease), opacity .2s var(--ease), border-color var(--t-fast) var(--ease), visibility 0s linear .25s; }
html.js.cta-away body:has(.fr-hero) .hd .addr { max-width: 360px; opacity: 1; border-width: 1px; pointer-events: auto; visibility: visible; transition-delay: 0s; }
html.js body:has(.fr-hero) .hd .addr { padding-left: 0; padding-right: 0; column-gap: 0; }
html.js.cta-away body:has(.fr-hero) .hd .addr { padding: 0 6px 0 16px; column-gap: var(--sp-2); }

/* status: a dot and words, in the hero's quiet line and inside Start's server-list card */
.fr-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 14px var(--sans); color: var(--text); max-width: none; }
.fr-status b { font-weight: 600; }
.fr-live { display: contents; }   /* the words site.js refreshes from /api/status: their parts stay flex items, spaced as before */
.fr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.fr-dot-on { background: var(--xp); box-shadow: 0 0 0 3px rgba(134,239,172,.16); }
.sep { color: var(--text-3); }

/* ---- how it works: four numbered steps across the full width, then the one primary button ---- */
.fr-steps { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.fr-st { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; gap: 0 var(--sp-3); margin: 0; max-width: none;
  padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.fr-st:hover, .fr-st:focus-within { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255,255,255,.04); }
.fr-st-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--ember); color: var(--ember); font: 600 20px/1 var(--display); letter-spacing: .015em; font-synthesis: none; font-variant-numeric: tabular-nums; } /* the bounties page's step circle (.step-n), same size and look */
.fr-st > .ic { justify-self: end; }
.fr-st-t { grid-column: 1 / -1; margin: var(--sp-4) 0 var(--sp-1); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: .015em; }
.fr-st-t a { color: var(--text); }
.fr-st-t a::after { content: ""; position: absolute; inset: 0; }
.fr-st-l { grid-column: 1 / -1; margin: 0; max-width: none; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.fr-go { margin: var(--sp-5) 0 0; max-width: none; }
.fr-more { margin: var(--sp-1) 0 0; font-size: 14px; color: var(--text-3); }

/* ---- the trades: one compact card each, alike, a band of the trade's colour on top ---- */
/* four trades across, two by two below 1000, one under 480; with farming off (two trades) they stay two across: never a lone card in a row */
.fr-trades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-5); }
.fr-trades--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fr-trade { --c: var(--text-2); display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface) 70%); box-shadow: inset 0 3px 0 var(--c);
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.fr-trade:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift), inset 0 3px 0 var(--c); }
.fr-trade--mining { --c: var(--trade-mining); }
.fr-trade--fishing { --c: var(--trade-fishing); }
.fr-trade--farming { --c: var(--trade-farming); }
.fr-trade--gathering { --c: var(--trade-gathering); }
.fr-trade-h { display: flex; align-items: center; gap: var(--sp-3); margin-top: 3px; }
.fr-trade-t { font: 600 20px/1.2 var(--display); letter-spacing: .015em; font-synthesis: none; color: var(--text); }
.fr-trade-l { font-size: 15px; line-height: 1.5; color: var(--text-2); }


@media (max-width: 1000px) {
  .fr-steps, .fr-trades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .fr-hero { min-height: 52vh; padding-bottom: 56px; }
  /* the text fills the width: the scrim spans it, and the top shade runs a little lower under the genre line */
  .fr-hero--photo::after { background: radial-gradient(ellipse 120% 56% at 50% 60%, var(--sc) 0, var(--sc-1) 40%, var(--sc-2) 62%, var(--sc-3) 80%, var(--sc-0) 100%); }
  .fr-hero::before { background: linear-gradient(180deg, rgba(13,10,8,.75) 0, rgba(13,10,8,.4) 130px, transparent 280px), linear-gradient(180deg, transparent 0%, transparent 58%, rgba(13,10,8,.6) 80%, var(--bg) 100%); }
}
@media (max-width: 560px) {
  /* the address never wraps: the pill becomes a column, the address above a full-width Copy button */
  .fr-cta { flex-direction: column; width: min(100%, 360px); padding: var(--sp-4); gap: var(--sp-3); border-radius: var(--radius); }
  .fr-addr { padding: 0; font-size: clamp(14px, 4.6vw, 18px); text-align: center; }
  .fr-copy { padding: 0 18px; width: 100%; border-radius: var(--radius-sm); }
  .fr-steps, .fr-trades { grid-template-columns: minmax(0, 1fr); }
  .fr-st { gap: 2px 14px; padding: 14px 16px; align-items: start; }
  .fr-st-n { grid-row: 1 / 3; }
  .fr-st > .ic { display: none; }
  .fr-st-t { grid-column: 2; grid-row: 1; margin: 2px 0 0; }
  .fr-st-l { grid-column: 2; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .fr-hero--photo .fr-hero-media { animation: none; transform: scale(1.04); }
  .fr-flame { display: none; }
  .fr-h1.flaming .wm-logo { visibility: visible; }
  .fr-copy { transition: none; }
}

/* ---- the bold pass (28 Nov 2026): the steps and the trades stand on the ground, a strip between two hairlines with a rule between its cells,
   as the stat figures do. No boxes, no lift. A step's number is a plain numeral in ember; a trade shows its colour as the rule over its cell. */
.fr-steps, .fr-trades { --pad: 24px; gap: 0; margin: var(--sp-4) 0 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.fr-st, .fr-st:hover, .fr-st:focus-within, .fr-trade, .fr-trade:hover { background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; }
.fr-st, .fr-trade { padding: var(--sp-5) var(--pad); border-left: 1px solid var(--border); }
.fr-st:hover, .fr-trade:hover { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); border-left: 1px solid var(--border); }
.fr-st-n { width: auto; height: auto; border: 0; border-radius: 0; background: none; font: 800 28px/1 var(--display); color: var(--ember); }
.fr-st-t { margin-top: var(--sp-3); font-size: 18px; }
.fr-st:hover .fr-st-t a, .fr-trade:hover .fr-trade-t { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.fr-go { margin-top: var(--sp-4); }
.fr-trade { box-shadow: inset 0 2px 0 var(--c); gap: var(--sp-2); }
.fr-trade:hover { box-shadow: inset 0 2px 0 var(--c); }
.fr-trade-h { margin-top: 0; }
@media (min-width: 1001px) {
  .fr-steps > :nth-child(4n + 1), .fr-trades > :nth-child(4n + 1) { padding-left: 0; border-left: 0; }
  .fr-trades--2 > :nth-child(2n + 1) { padding-left: 0; border-left: 0; }
}
@media (min-width: 561px) and (max-width: 1000px) {
  .fr-steps > :nth-child(2n + 1), .fr-trades > :nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .fr-steps > :nth-child(n + 3), .fr-trades > :nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .fr-st, .fr-trade { padding: var(--sp-4) 0; border-left: 0; }
  .fr-st:hover, .fr-trade:hover { border-left: 0; }
  .fr-steps > * + *, .fr-trades > * + * { border-top: 1px solid var(--border); }
  .fr-st-n { font-size: 24px; align-self: start; padding-top: 2px; min-width: 20px; }
  .fr-st { gap: 2px 14px; }
}
/* a link out of a band: words and an arrow, where a ghost button stood */
.hm-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 15px/1.3 var(--sans); color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong);
  text-underline-offset: 5px; text-decoration-thickness: 1px; }
.hm-go::after { content: "\2192"; color: var(--ember); transition: transform var(--t-mid) var(--ease); }
.hm-go:hover { text-decoration-color: var(--ember); }
.hm-go:hover::after { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .hm-go::after { transition: none; } .hm-go:hover::after { transform: none; } }
