/* The game client's login-page look (FrontEnd/src/app/pages/login/, shared/panel/, shared/texture/,
   styles/controls.scss), restated as plain CSS so the page doesn't depend on the Angular build. Values
   come from FrontEnd/src/styles/tokens.scss (default blue theme); keep them in sync by hand. */
@font-face {
  font-family: "Alegreya Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/landing/fonts/alegreya-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "Alegreya Sans";
  font-weight: 700;
  font-display: swap;
  src: url("/landing/fonts/alegreya-sans-700.woff2") format("woff2");
}

@font-face {
  font-family: "IM Fell English";
  font-weight: 400;
  font-display: swap;
  src: url("/landing/fonts/im-fell-english-400.woff2") format("woff2");
}

@font-face {
  font-family: "IM Fell English SC";
  font-weight: 400;
  font-display: swap;
  src: url("/landing/fonts/im-fell-english-sc-400.woff2") format("woff2");
}

:root {
  --md-color-ink: #2b2118;
  --md-color-ink-muted: #5a4632;
  --md-color-on-header: #ecd9a2;
  --md-color-surface: #f0e3c3;
  --md-color-backdrop: #3e2414;
  --md-color-header-rule: #b8924a;
  --md-color-border: rgba(138, 106, 46, 0.5);
  --md-color-accent-gold: #c9a35a;
  --md-color-danger: #8e2a22;
  --md-color-panel-header-bg: #1f2342;
  --md-color-panel-header-bg-hover: #2a2f58;
  --md-font-body: "Alegreya Sans", "Gill Sans", sans-serif;
  --md-font-display: "IM Fell English SC", Georgia, serif;
  --md-font-flavor: "IM Fell English", Georgia, serif;
  --md-radius-panel: 6px;
  --md-radius-header: 4px;
  --md-shadow-panel: 0 2px 0 #6e5530, 0 14px 28px rgba(5, 6, 18, 0.45);
  --md-motion-fast: 120ms;
  --md-cursor-default: url("/landing/cursors/default.svg") 3 2, default;
  --md-cursor-pointer: url("/landing/cursors/pointer.svg") 11 2, pointer;
  color-scheme: light;
}

html {
  cursor: var(--md-cursor-default);
}

body {
  margin: 0;
  font-family: var(--md-font-body);
  color: var(--md-color-ink);
  background-color: var(--md-color-backdrop);
}

/* Fixed, so the planks stay put while a long changelog scrolls over them. */
.wood-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.landing {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-title {
  margin: 0;
  font-family: var(--md-font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--md-color-on-header);
  text-shadow: 0 2px 0 #140a04, 0 6px 24px rgba(0, 0, 0, 0.6);
}

/* Panel: navy header with a gold rule over a parchment body with paper grain (shared/panel). */
.panel {
  width: 100%;
  max-width: 560px;
  border-radius: var(--md-radius-panel);
  background-color: var(--md-color-surface);
  box-shadow: var(--md-shadow-panel);
  overflow: hidden;
}

.panel[hidden] {
  display: none;
}

.panel-head {
  margin: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 16px;
  background-color: var(--md-color-panel-header-bg);
  border-bottom: 2px solid var(--md-color-header-rule);
  color: var(--md-color-on-header);
  font-family: var(--md-font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.panel-body {
  position: relative;
  padding: 20px;
  box-shadow: inset 0 0 44px rgba(120, 80, 30, 0.35);
}

/* The paper grain, as a tiled image rather than an inline SVG filter like the app's: Chromium only
   partly repainted an inline filtered SVG when landing.js grew the panel after load. */
.panel-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/landing/paper-grain.svg") repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.panel-body-content {
  position: relative;
}

/* Download panel */
.download {
  text-align: center;
}

.intro {
  margin: 0 0 20px;
  font-family: var(--md-font-flavor);
  font-size: 17px;
  line-height: 1.45;
  color: var(--md-color-ink-muted);
}

.status {
  margin: 0;
  font-size: 16px;
  color: var(--md-color-ink-muted);
}

.status.error {
  color: var(--md-color-danger);
  font-weight: 700;
}

/* The app's base button (styles/controls.scss), at the login page's submit-button size. */
.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid var(--md-color-header-rule);
  border-radius: var(--md-radius-header);
  background-color: var(--md-color-panel-header-bg);
  color: var(--md-color-on-header);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: var(--md-cursor-pointer);
  transition:
    background-color var(--md-motion-fast) ease-out,
    transform var(--md-motion-fast) ease-out;
}

.download-button:hover {
  background-color: var(--md-color-panel-header-bg-hover);
}

.download-button:active {
  transform: translateY(1px);
}

.download-button:focus-visible {
  outline: 2px solid var(--md-color-accent-gold);
  outline-offset: 2px;
}

.latest-version {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--md-color-ink-muted);
}

.latest-version strong {
  color: var(--md-color-ink);
}

.divider {
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(90deg, transparent, var(--md-color-border), transparent);
}

.notice {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--md-color-ink-muted);
}

/* Changelog panel */
.releases {
  margin: 0;
  padding: 0;
  list-style: none;
}

.release + .release {
  margin-top: 20px;
}

.release h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--md-color-border);
  font-family: var(--md-font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--md-color-ink);
}

.release time {
  font-family: var(--md-font-body);
  font-size: 14px;
  color: var(--md-color-ink-muted);
}

.release ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.5;
}

/* Each change gets a clear gold diamond bullet with a hanging indent, so new items scan at a glance. */
.release li {
  position: relative;
  padding-left: 24px;
}

.release li + li {
  margin-top: 8px;
}

.release li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--md-color-accent-gold);
  border: 1px solid #8a6a2e;
  transform: rotate(45deg);
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .landing {
    padding: 32px 16px;
    gap: 24px;
  }

  .brand-title {
    font-size: 40px;
  }

  .panel-body {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-button {
    transition: none;
  }
}
