/* Emberfall front page. The look is the game's own (ART.md "Ashen"): a cold blue night, bone-white type, and fire as the only warmth.
   The fonts and the painted button are the client's (godot/resources/fonts, godot/resources/ui/buttons/cta_*). */

@font-face { font-family: "Cinzel"; src: url("/site/fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("/site/fonts/selawik.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("/site/fonts/selawik_bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #0b0d14;
  --slate: #141826;
  --moon: #8fa3c8;
  --moon-hi: #c5d2ea;
  --bone: #ece3d0;
  --ember: #ff7a2a;
  --ember-hi: #ffb060;
  --glow: #ffd9a0;
  --line: rgba(143, 163, 200, 0.18);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --text: "Selawik", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --page: min(1240px, 100% - 2 * var(--gutter));
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--moon-hi); font: 400 1.0625rem/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img, video, canvas { display: block; max-width: 100%; }
a { color: var(--glow); text-decoration-color: rgba(255, 176, 96, 0.45); text-underline-offset: 0.2em; }
a:hover { color: #fff; text-decoration-color: var(--ember-hi); }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
code { font: 0.9em ui-monospace, Menlo, Consolas, monospace; color: var(--bone); }
b { color: var(--bone); font-weight: 700; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--night); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* the bar: clear over the painting, night once the page has moved */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 60px; padding: 0 var(--gutter); border-bottom: 1px solid transparent; transition: background-color 0.25s, border-color 0.25s; }
.top.is-set { background: rgba(11, 13, 20, 0.9); border-bottom-color: var(--line); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.05rem/1 var(--display); letter-spacing: 0.14em; color: var(--bone); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.top-nav { display: flex; gap: 26px; margin-right: auto; }
.top-nav a, .top-play { font-size: 0.95rem; color: var(--moon-hi); text-decoration: none; }
.top-nav a:hover, .top-play:hover { color: #fff; }
.top-act { display: flex; align-items: center; gap: 22px; }
.top-get { font: 600 0.9rem/1 var(--display); letter-spacing: 0.08em; color: #fff3da; background: rgba(40, 20, 8, 0.7); padding: 10px 16px; border: 1px solid var(--ember-hi); text-decoration: none; box-shadow: 0 0 18px rgba(255, 122, 42, 0.22); transition: background-color 0.15s, box-shadow 0.15s; }
.top-get:hover { color: #fff; background: rgba(90, 40, 10, 0.85); box-shadow: 0 0 26px rgba(255, 122, 42, 0.5); }

/* the opening: the painted vale, the logo, the way in */
.hero { position: relative; min-height: min(100svh, 1000px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 62% 40%; }
.hero-art::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(11, 13, 20, 0.74) 0%, rgba(11, 13, 20, 0.4) 36%, rgba(11, 13, 20, 0) 64%),
  linear-gradient(0deg, var(--night) 0%, rgba(11, 13, 20, 0.7) 16%, rgba(11, 13, 20, 0) 46%),
  linear-gradient(180deg, rgba(11, 13, 20, 0.6) 0%, rgba(11, 13, 20, 0) 18%); }
.hero-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
.hero-in { position: relative; z-index: 2; width: var(--page); margin: 0 auto; padding: 120px 0 clamp(48px, 9vh, 96px); }
.hero-logo { width: clamp(280px, 56vw, 760px); margin-left: -0.6%; }
.hero-logo img { width: 100%; height: auto; filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.7)); animation: kindle 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
/* the one moment of the page: the logo starts as cold iron and takes fire */
@keyframes kindle {
  from { filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.7)) brightness(0.32) saturate(0.15); }
  to { filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.7)) brightness(1) saturate(1); }
}
.hero-pitch { margin-top: clamp(18px, 3vh, 30px); font: 500 clamp(1.5rem, 1rem + 2vw, 2.6rem)/1.15 var(--display); letter-spacing: 0.02em; color: var(--bone); text-wrap: balance; }
.hero-lede { margin-top: 14px; max-width: 54ch; font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem); color: var(--moon-hi); text-shadow: 0 1px 12px rgba(11, 13, 20, 0.9); }

/* downloads: the first of a row is the painted button, the others are plain links beside it */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: clamp(24px, 4vh, 38px); }
.dl { text-decoration: none; }
.dl small { font-size: 0.86rem; font-weight: 400; }
.dl.is-main { order: -1; display: grid; place-content: center; justify-items: center; gap: 3px; width: min(100%, 372px); aspect-ratio: 1000 / 169; background: url("/site/img/cta.webp") center / 100% 100% no-repeat; color: var(--glow); text-align: center; transition: filter 0.15s; }
.dl.is-main b { font: 700 clamp(1rem, 0.9rem + 0.4vw, 1.18rem)/1.1 var(--display); letter-spacing: 0.06em; color: #fff3da; text-shadow: 0 0 14px rgba(255, 122, 42, 0.65); }
.dl.is-main small { color: #e6c79a; line-height: 1.1; }
.dl.is-main:hover, .dl.is-main:focus-visible { background-image: url("/site/img/cta-hover.webp"); filter: brightness(1.12); }
.dl.is-main:active { filter: brightness(0.92); }
.dl:not(.is-main) { color: var(--glow); text-decoration: underline; text-decoration-color: rgba(255, 176, 96, 0.45); text-underline-offset: 0.2em; }
.dl:not(.is-main) b { font-weight: 400; color: inherit; }
.dl:not(.is-main) small { color: var(--moon); margin-left: 0.45em; }
.cta-note { margin-top: 14px; max-width: 54ch; color: var(--bone); }
.cta-more { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 16px; font-size: 1rem; }
.cta-more a { color: var(--moon-hi); text-decoration-color: rgba(143, 163, 200, 0.5); }
.cta-more a:hover { color: #fff; }

/* the sections: a heading on the left edge, hairlines between, no plates */
.band { width: var(--page); margin: 0 auto; padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
#trailer { border-top: 0; padding-top: clamp(40px, 6vw, 72px); }
.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; gap: 12px 40px; margin-bottom: clamp(24px, 4vw, 44px); }
.band-head h2 { font: 500 clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem)/1.05 var(--display); letter-spacing: 0.01em; color: var(--bone); text-wrap: balance; }
.band-head h2:only-child { grid-column: 1 / -1; }
.band-head p { max-width: 52ch; padding-bottom: 0.35em; color: var(--moon); }
h3 { font: 600 1.35rem/1.15 var(--display); letter-spacing: 0.03em; color: var(--bone); }

/* the trailer */
.film { position: relative; aspect-ratio: 16 / 9; background: #05060a; outline: 1px solid var(--line); }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; background: linear-gradient(0deg, rgba(11, 13, 20, 0.55), rgba(11, 13, 20, 0.1)); cursor: pointer; }
.film-play[hidden] { display: none; }
.film-play span { display: inline-flex; align-items: center; gap: 14px; padding: 14px 26px 14px 20px; font: 600 1.05rem/1 var(--display); letter-spacing: 0.08em; color: #fff3da; background: rgba(11, 13, 20, 0.72); border: 1px solid var(--ember-hi); box-shadow: 0 0 34px rgba(255, 122, 42, 0.35); transition: background-color 0.15s, box-shadow 0.15s; }
.film-play span::before { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--ember-hi); }
.film-play:hover span, .film-play:focus-visible span { background: rgba(60, 26, 6, 0.85); box-shadow: 0 0 46px rgba(255, 122, 42, 0.6); }

/* the roster: the chosen hero stays in view while the wall scrolls */
.roles { display: flex; flex-wrap: wrap; gap: 4px 30px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.role { padding: 10px 0 12px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; font: 500 1rem/1 var(--display); letter-spacing: 0.06em; color: var(--moon); cursor: pointer; }
.role i { margin-left: 7px; font: 400 0.8rem/1 var(--text); font-style: normal; color: rgba(143, 163, 200, 0.7); }
.role:hover { color: var(--bone); }
.role[aria-pressed="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.roster { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.who { position: sticky; top: 84px; }
.who-face { width: min(100%, 50vh * 0.75); height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--slate); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.who-text { padding-top: 20px; }
.who-role { font-size: 0.92rem; color: var(--ember-hi); }
.who h3 { margin-top: 2px; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 600; }
.who-title { font: 500 1.02rem/1.3 var(--display); letter-spacing: 0.05em; color: var(--moon); }
.who-lore { margin-top: 14px; color: var(--moon-hi); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.wall li[hidden] { display: none; }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--slate); cursor: pointer; overflow: hidden; }
.tile img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; filter: brightness(0.7) saturate(0.85); transition: filter 0.15s, transform 0.25s; }
.tile span { position: absolute; inset: auto 0 0 0; padding: 22px 6px 7px; font: 600 0.82rem/1.1 var(--display); letter-spacing: 0.04em; color: var(--bone); text-align: center; background: linear-gradient(0deg, rgba(11, 13, 20, 0.92), rgba(11, 13, 20, 0)); }
.tile:hover img, .tile:focus-visible img { filter: none; transform: scale(1.04); }
.tile[aria-pressed="true"] { outline: 2px solid var(--ember); outline-offset: -2px; }
.tile[aria-pressed="true"] img { filter: none; }
.tile[aria-pressed="true"] span { color: var(--glow); }
.tile.no-face img { object-fit: contain; padding: 22%; opacity: 0.5; }

/* the battlefields: the first is the main one, and larger */
.fields { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.field img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--slate); }
.field:first-child img { aspect-ratio: 16 / 8.2; }
.field-text { padding-top: 16px; max-width: 46ch; }
.field-text p { margin-top: 6px; color: var(--moon-hi); }

/* how it plays: rows on hairlines, the way the client's Settings page is set */
.facts > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6px 40px; padding: 20px 0; border-top: 1px solid var(--line); }
.facts dt { font: 600 1.2rem/1.25 var(--display); letter-spacing: 0.03em; color: var(--bone); }
.facts dd { max-width: 58ch; color: var(--moon-hi); }

/* the downloads */
.band-get { padding-bottom: clamp(64px, 10vw, 128px); }
.get-sub { margin-bottom: 28px; color: var(--moon-hi); }
.gets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.get-os { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.get-os.is-mine { border-top-color: var(--ember); }
.get-os p { font-size: 0.98rem; color: var(--moon-hi); }
.get-os .dl.is-main { order: 0; width: min(100%, 300px); }
.get-os .get-alt { color: var(--moon); }
.get-web .plain { display: grid; align-content: center; min-height: 51px; font: 600 1.1rem/1.1 var(--display); letter-spacing: 0.05em; }
.get-sums { margin-top: 30px; font-size: 0.95rem; }
.get-sums a { color: var(--moon); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; width: var(--page); margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 0.95rem; }
.foot nav a { color: var(--moon); }
.foot nav a:hover { color: #fff; }

@media (max-width: 900px) {
  .top-nav { display: none; }
  .top-act { margin-left: auto; }
  .band-head, .facts > div { grid-template-columns: 1fr; }
  .roster { grid-template-columns: 1fr; }
  .who { position: static; display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 18px; align-items: start; }
  .who-text { padding-top: 0; }
  .who-lore { grid-column: 1 / -1; }
  .wall { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .fields, .gets { grid-template-columns: 1fr; }
  .field:first-child img { aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .top-play { display: none; }
  .hero-art img { object-position: 76% 30%; }
  .hero-art::after { background:
    linear-gradient(0deg, var(--night) 0%, rgba(11, 13, 20, 0.84) 40%, rgba(11, 13, 20, 0.1) 74%),
    linear-gradient(180deg, rgba(11, 13, 20, 0.6) 0%, rgba(11, 13, 20, 0) 18%); }
  .who { grid-template-columns: 1fr; }
  .who-face { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-logo img { animation: none; }
  .tile img, .top, .dl.is-main, .film-play span { transition: none; }
  .tile:hover img, .tile:focus-visible img { transform: none; }
}
