/* LT Soul by LyonsType, SIL Open Font License 1.1 */
@font-face {
  font-family: "LT Soul";
  src: url(../fonts/lt-soul-regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Montserrat (variable), SIL Open Font License 1.1 */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/montserrat-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/montserrat-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --pitch: #120708;      /* page base: near-black with a red cast */
  --smoke: #230a0d;      /* surfaces */
  --accent: #d2615d;     /* lines, active states, focus: red from the trailer's "Announcement trailer" frame */
  --accent-hover: #e8847f;
  --accent-dim: rgba(210, 97, 93, .4);
  --bone: #ece2d0;       /* primary text */
  --ash: #9a8e82;        /* secondary text */
  --widget-w: 646px;     /* native width of the Steam widget */
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: linear-gradient(#170a0b, #0d0506) fixed, var(--pitch);
  color: var(--bone);
  font-family: "LT Soul", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: #3d1a1c #12080a;
}

::selection { background: var(--accent); color: var(--pitch); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- Background layers ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-video {
  object-fit: cover;
  opacity: .9;
}

.bg-vignette {
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 45%, rgba(0, 0, 0, .65) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 18%, transparent 80%, rgba(0, 0, 0, .35));
}

/* ---------- Page layout ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px 16px 16px;
}

.site-header {
  display: flex;
  justify-content: center;
}

/* Icon on the left, menu on the right, aligned with the content column below */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(var(--widget-w) + 22px), 100%);
}

.page-policy .header-inner { width: min(780px, 100%); }

.brand {
  display: block;
  line-height: 0;
  border-radius: 2px;
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .8));
  transition: filter .2s ease;
}

.brand:hover img { filter: drop-shadow(0 0 10px rgba(210, 97, 93, .7)); }

.site-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 0 20px;
}

/* ---------- Logo ---------- */
.logo {
  margin: 0;
  line-height: 0;
}

.logo img {
  display: block;
  width: min(480px, 84vw);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .85));
  animation: appear 1s ease-out .2s both;
}

/* ---------- Trailer (YouTube loads on click) ---------- */
.trailer {
  width: min(calc(var(--widget-w) + 22px), 100%);
}

.plate-video { padding: 8px; }

.yt,
.yt-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 2px;
  background: #000;
}

.yt {
  position: relative;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.yt img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .25s ease;
}

.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: var(--bone);
  background: rgba(35, 10, 13, .7);
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 30px -6px rgba(210, 97, 93, .7);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.yt-play svg { width: 34px; height: 34px; margin-left: 4px; }

.yt:hover img { filter: brightness(1.12); }
.yt:hover .yt-play {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: var(--accent-hover);
  box-shadow: 0 0 40px -4px rgba(210, 97, 93, .9);
}

.yt-note {
  margin: .7rem 0 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .78rem;
  line-height: 1.5;
  text-align: center;
  color: #cbbab7;   /* lighter than --ash: stays readable over bright video frames */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.yt-note a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}
.yt-note a:hover { color: var(--accent-hover); }

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  gap: 2.25rem;
}

.nav-link {
  position: relative;
  padding: .35rem 0;
  font-size: 1.15rem;
  letter-spacing: .02em;
  color: var(--ash);
  text-decoration: none;
  transition: color .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
}

.nav-link:hover { color: var(--bone); }
.nav-link:hover::after { opacity: .4; }

.nav-link.is-active { color: var(--bone); }
.nav-link.is-active::after {
  opacity: 1;
  box-shadow: 0 0 10px rgba(210, 97, 93, .6);
}

/* ---------- Plate: framed panel with forged corner marks ---------- */
.plate {
  position: relative;
  padding: 10px;
  background: rgba(35, 10, 13, .72);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  box-shadow:
    0 30px 70px -25px rgba(0, 0, 0, .9),
    0 0 60px -20px rgba(210, 97, 93, .25);
  animation: appear 1s ease-out .5s both;
}

.plate::before {
  content: "";
  position: absolute;
  inset: -6px;
  pointer-events: none;
  --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 16px no-repeat;
}

.plate iframe {
  display: block;
  border: 0;
  border-radius: 2px;
}

@keyframes appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Steam widget: shown only where it fits at its native width */
.plate-widget { display: none; }
.plate-widget iframe { width: var(--widget-w); height: 190px; }

/* Privacy policy: fills the space below the header */
.page-policy .site-main {
  justify-content: stretch;
  padding: 24px 0;
}

.plate-policy {
  flex: 1;
  width: min(780px, 100%);
  display: flex;
  background: #1c0d0e;   /* same as the policy page itself, so the frame reads as one surface */
}

.plate-policy iframe {
  flex: 1;
  width: 100%;
  min-height: 60vh;
  background: #1c0d0e;
}

/* ---------- Wishlist button (mobile / narrow screens) ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: min(320px, 100%);
  padding: .85rem 1.4rem;
  font-size: 1.15rem;
  color: var(--bone);
  text-decoration: none;
  background: linear-gradient(180deg, #4c1010, #230a0d);
  border: 1px solid var(--accent);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(236, 226, 208, .08),
    0 12px 32px -12px rgba(210, 97, 93, .55);
  transition: box-shadow .25s ease, border-color .25s ease;
  animation: appear 1s ease-out .5s both;
}

.cta:hover {
  border-color: var(--accent-hover);
  box-shadow:
    inset 0 1px 0 rgba(236, 226, 208, .12),
    0 14px 40px -10px rgba(210, 97, 93, .8);
}

.cta .icon { width: 1.25em; height: 1.25em; }

/* ---------- Footer: studio logos ---------- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

/* Legal line, as at the end of the trailer */
.legal {
  max-width: 760px;
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .66rem;
  line-height: 1.55;
  text-align: center;
  color: #bfaeab;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.studios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Heights are balanced by eye, not equal: Marsec's letters fill its whole height,
   Grindstone's sword takes space above and below the letters */
.studios img {
  display: block;
  width: auto;
  height: 32px;
  opacity: .6;
}

.studios .logo-marsec { height: 25px; }

/* ---------- Breakpoints ---------- */
/* Widget needs 646px + frame + page padding */
@media (min-width: 720px) {
  .plate-widget { display: block; }
  .cta { display: none; }
}

@media (max-height: 900px) and (min-width: 720px) {
  .logo img { width: min(400px, 84vw); }
  .site-main { gap: 22px; padding-top: 16px; }
}

/* Very narrow phones: slightly smaller button text so it stays on one line */
@media (max-width: 340px) {
  .cta { font-size: 1rem; padding: .8rem 1rem; }
}

@media (max-width: 575px) {
  .brand { display: none; }
  .header-inner { justify-content: center; }
}

@media (max-width: 420px) {
  .studios { gap: 14px 26px; }
  .studios img { height: 25px; }
  .studios .logo-marsec { height: 20px; }
  .nav { gap: 1.5rem; }
  .nav-link { font-size: 1.05rem; }
  .page { padding: 18px 16px; }
}

/* ---------- Scrollbar (Chromium / Safari) ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #12080a; }
::-webkit-scrollbar-thumb { background: #3d1a1c; }
::-webkit-scrollbar-thumb:hover { background: #522326; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .plate, .cta, .logo img { animation: none; }
  .nav-link, .nav-link::after, .cta, .yt img, .yt-play, .brand img { transition: none; }
}
