/* Fallen Crowns — shared brand layer for every page of fallencrowns.com.
   The palette is the game's own three lights on night stone: torch, portal, grave-rot. */

@font-face { font-family: "Pirata One"; src: url("../assets/fonts/PirataOne-Regular.woff2") format("woff2"), url("../assets/fonts/PirataOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Texturina"; src: url("../assets/fonts/Texturina-SemiBold.woff2") format("woff2"), url("../assets/fonts/Texturina-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../assets/fonts/AlegreyaSans-Regular.woff2") format("woff2"), url("../assets/fonts/AlegreyaSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../assets/fonts/AlegreyaSans-Medium.woff2") format("woff2"), url("../assets/fonts/AlegreyaSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../assets/fonts/AlegreyaSans-Bold.woff2") format("woff2"), url("../assets/fonts/AlegreyaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* night stone */
  --night: #0a0d1c;
  --night-2: #11162b;
  --stone: #1c2340;
  --stone-2: #2c3558;
  --mortar: #46507a;
  /* ink on night */
  --bone: #efe6cf;
  --ash: #b3b2c2;
  --dust: #7f819b;
  /* the three lights */
  --torch: #f7a63b;
  --ember: #e2571c;
  --portal: #3eb0ff;
  --portal-deep: #1557dc;
  --rot: #a8ec2c;
  --rot-deep: #2d7a12;
  /* heraldry */
  --banner: #96202f;
  --gold: #ecc55f;

  /* rarities, as the game colours them */
  --r-poor: #8c8c87;
  --r-common: #c7c7bf;
  --r-uncommon: #59d959;
  --r-rare: #5294ff;
  --r-epic: #b85cff;
  --r-legendary: #ff9e26;
  --r-unique: #ffe68c;

  --accent: var(--torch);

  --display: "Pirata One", "Texturina", Georgia, serif;
  --serif: "Texturina", Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  /* type scale: minor third on a fluid base */
  --t-0: clamp(1rem, 0.94rem + 0.3vw, 1.19rem);
  --t-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --t-2: clamp(1.5rem, 1.3rem + 1vw, 2.2rem);
  --t-3: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
  --t-4: clamp(3rem, 1.9rem + 5.4vw, 6.6rem);
  --t-5: clamp(3.6rem, 1.6rem + 9.6vw, 10.5rem);

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--stone-2) var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 var(--t-0)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--portal-deep); color: #fff; }
:focus-visible { outline: 2px solid var(--portal); outline-offset: 3px; border-radius: 2px; }

.display { font-family: var(--display); font-weight: 400; line-height: 0.92; letter-spacing: 0.005em; text-wrap: balance; }
.lede { font-size: var(--t-1); line-height: 1.45; max-width: 34em; text-wrap: pretty; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 1000; padding: 0.6rem 1rem;
  background: var(--bone); color: var(--night); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---- Buttons ----
   The Steam button is a forged plate: chamfered corners (the game's low-poly facets), not a pill. */
.btn {
  --plate: var(--bone);
  --ink: var(--night);
  position: relative; display: inline-flex; align-items: center; gap: 0.7em;
  padding: 0.95em 1.5em 0.95em 1.25em;
  font: 700 1.06rem/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--plate); border: 0; cursor: pointer;
  clip-path: polygon(0.7em 0, 100% 0, 100% calc(100% - 0.7em), calc(100% - 0.7em) 100%, 0 100%, 0 0.7em);
  transition: transform 0.25s var(--ease-out), background-color 0.2s, color 0.2s;
}
.btn svg { width: 1.45em; height: 1.45em; flex: none; fill: currentColor; }
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn:active { transform: translateY(0); }
.btn--steam { --plate: var(--bone); }
.btn--portal { --plate: var(--portal); --ink: #04102a; }
.btn--portal:hover { background: #7fcbff; }
.btn--quiet {
  --ink: var(--bone); background: rgb(239 230 207 / 0.08); color: var(--bone);
  box-shadow: inset 0 0 0 1.5px rgb(239 230 207 / 0.45); clip-path: none; border-radius: 1px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.btn--quiet:hover { background: rgb(239 230 207 / 0.16); color: #fff; }
.btn--small { padding: 0.7em 1.05em 0.7em 0.9em; font-size: 0.95rem; }
.btn .btn__sub { font-weight: 500; opacity: 0.72; }

.textlink {
  color: var(--bone); text-decoration: underline; text-decoration-color: rgb(239 230 207 / 0.4);
  text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s, color 0.2s;
}
.textlink:hover { color: #fff; text-decoration-color: currentColor; }

/* ---- Site footer (both versions) ---- */
.foot {
  position: relative; background: #06081300; padding: clamp(3rem, 7vw, 6rem) var(--gutter) 2.5rem;
  background: linear-gradient(#070916, #05060f); border-top: 1px solid rgb(239 230 207 / 0.08);
}
.foot__top { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); align-items: start; max-width: 82rem; margin: 0 auto; }
.foot__logo { width: min(17rem, 60vw); height: auto; margin: -0.8rem 0 1rem -0.6rem; }
.foot__note { color: var(--ash); max-width: 26em; }
.foot h2 { font: 600 0.95rem/1.2 var(--serif); color: var(--dust); margin-bottom: 0.9rem; }
.foot li + li { margin-top: 0.5rem; }
.foot li a { text-decoration: none; color: var(--bone); }
.foot li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.22em; }
.foot__legal {
  max-width: 82rem; margin: clamp(2.5rem, 5vw, 4rem) auto 0; padding-top: 1.75rem; border-top: 1px solid rgb(239 230 207 / 0.08);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; color: var(--dust); font-size: 0.88rem; line-height: 1.45;
}
.foot__marks { display: flex; align-items: center; gap: 1.5rem; }
.foot__marks img { height: 3.4rem; width: auto; }
.foot__marks .mark-unreal { height: 2.6rem; opacity: 0.8; }
.foot__marks .mark-steam { height: 2rem; width: 2rem; fill: var(--ash); }
.foot__legal p { flex: 1 1 28rem; max-width: 60em; }
@media (max-width: 800px) {
  .foot__top { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
