/* Emberline Games — emberlinegames.com */

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14100e;
  --bg-deep: #0d0a09;
  --surface: #1e1815;
  --surface-2: #241d19;
  --line: #3a2e26;
  --gold: #d4b978;
  --gold-dim: #a08a52;
  --ember: #e0663a;
  --cream: #ece4d6;
  --muted: #a3968a;

  --font-display: "Cinzel", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shell: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

img,
svg { display: block; max-width: 100%; }

img { height: auto; }

/* Keep hidden controls out of the layout. */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }

p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }

ul { list-style: none; margin: 0; padding: 0; }

button { font: inherit; color: inherit; }

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

::selection { background: var(--ember); color: #fff; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  translate: -50% -200%;
  z-index: 100;
  padding: 0.7rem 1.2rem;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: translate 0.2s var(--ease);
}

.skip-link:focus-visible { translate: -50% 0; }

/* ---------- shared pieces ---------- */

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  --btn-line: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  min-height: 48px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), translate 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover { translate: 0 -2px; }

.btn--primary {
  --btn-bg: var(--ember);
  --btn-fg: #fff;
  --btn-line: transparent;
  box-shadow: 0 10px 30px -12px rgb(224 102 58 / 0.7);
}

.btn--primary:hover { --btn-bg: #ea7546; }

.btn--ghost {
  --btn-line: #4b3c31;
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  --btn-line: var(--gold);
  --btn-fg: var(--gold);
}

.btn--small {
  padding: 0.55rem 1.1rem;
  min-height: 40px;
  font-size: 0.85rem;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(20 16 14 / 0.75);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 rgb(224 102 58 / 0.6);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgb(224 102 58 / 0.55); }
  70%  { box-shadow: 0 0 0 9px rgb(224 102 58 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(224 102 58 / 0); }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgb(15 12 10 / 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgb(58 46 38 / 0.8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand { margin-right: auto; display: block; }

.brand img {
  height: 30px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.site-nav__list a {
  position: relative;
  color: var(--cream);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-block: 0.4rem;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  scale: 0 1;
  transition: scale 0.25s var(--ease);
}

.site-nav__list a:hover { color: var(--gold); }
.site-nav__list a:hover::after { scale: 1 1; }

.lang {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: clamp(0.5rem, 2vw, 1.25rem);
  border-left: 1px solid var(--line);
}

.lang__btn {
  text-decoration: none;
  padding: 0.3rem 0.45rem;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.lang__btn:hover { color: var(--cream); }
.lang__btn[aria-current="page"] { color: var(--gold); }
.lang__sep { color: var(--line); font-size: 0.8rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.nav-toggle__bars span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--cream);
  transition: translate 0.2s var(--ease), rotate 0.2s var(--ease);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(92svh, 900px);
  margin-top: calc(var(--header-h) * -1);
  padding-block: calc(var(--header-h) + clamp(4rem, 12vh, 8rem)) clamp(4rem, 12vh, 8rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* Scrim weighted to the left, where the copy sits, so the key art stays visible
   on the right. Narrow screens get a vertical scrim instead, because there the
   text spans the full width. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(13 10 9 / 0.5) 0%, rgb(13 10 9 / 0.1) 26%,
      rgb(13 10 9 / 0.45) 76%, var(--bg) 100%),
    linear-gradient(to right, rgb(13 10 9 / 0.94) 0%, rgb(13 10 9 / 0.78) 34%,
      rgb(13 10 9 / 0.3) 68%, rgb(13 10 9 / 0.45) 100%);
}

@media (max-width: 760px) {
  .hero__media::after {
    background: linear-gradient(to bottom, rgb(13 10 9 / 0.7) 0%, rgb(13 10 9 / 0.82) 45%,
      rgb(20 16 14 / 0.9) 80%, var(--bg) 100%);
  }
}

.hero__inner { position: relative; }

.hero__title {
  max-width: 20ch;
  font-size: clamp(2.4rem, 1.7rem + 3.6vw, 4.6rem);
  text-shadow: 0 2px 40px rgb(13 10 9 / 0.6);
}

.hero__body {
  max-width: 56ch;
  margin-top: 1.4rem;
  color: #d6cbbc;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.hero__cue {
  position: absolute;
  bottom: 1.9rem;
  left: 50%;
  translate: -50% 0;
  width: 22px;
  height: 34px;
  border: 1px solid rgb(212 185 120 / 0.45);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 6px;
}

.hero__cue span {
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  animation: cue 2s var(--ease) infinite;
}

@keyframes cue {
  0%, 100% { translate: 0 0; opacity: 1; }
  50%      { translate: 0 11px; opacity: 0.2; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

.section--band {
  background:
    radial-gradient(80% 120% at 50% 0%, rgb(36 29 25 / 0.9) 0%, transparent 70%),
    var(--bg-deep);
  border-block: 1px solid rgb(58 46 38 / 0.55);
}

.section__head { margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }

.section__title { font-size: clamp(1.85rem, 1.4rem + 2vw, 3rem); }

.section__lede {
  max-width: 60ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- game showcase ---------- */

.game {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 940px) {
  .game { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .game__art { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.game__art {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 70px -40px rgb(0 0 0 / 0.9);
}

.game__art img { width: 100%; }

.game__art .badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  backdrop-filter: blur(8px);
}

.game__wordmark {
  width: min(100%, 420px);
  height: auto;
  margin-bottom: 1.5rem;
}

.game__tagline {
  color: var(--cream);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
}

.game__body > p:not(.game__tagline) { color: var(--muted); }

.game__subhead {
  margin: 2.4rem 0 1.1rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.features { display: grid; gap: 0.85rem; }

.features li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--muted);
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ember);
  rotate: 45deg;
  box-shadow: 0 0 12px rgb(224 102 58 / 0.55);
}

.facts {
  margin: 0;
  border-top: 1px solid rgb(58 46 38 / 0.7);
}

.facts__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 32%) 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid rgb(58 46 38 / 0.7);
}

.facts dt {
  color: var(--gold-dim);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.facts dd { margin: 0; color: var(--cream); font-size: 0.95rem; }

.game__cta { margin-top: 2.2rem; }

/* ---------- trailer ---------- */
.video { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #000; aspect-ratio: 16 / 9; }
.video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.trailer__download { margin-top: 1rem; font-size: .9rem; }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.25s var(--ease), translate 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.shot img {
  width: 100%;
  transition: scale 0.5s var(--ease);
}

.shot:hover {
  border-color: var(--gold-dim);
  translate: 0 -3px;
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / 0.95);
}

.shot:hover img { scale: 1.04; }

/* ---------- studio ---------- */

.studio {
  position: relative;
  max-width: 68ch;
  text-align: center;
}

.studio .section__head { margin-bottom: 2rem; }
.studio p { color: var(--muted); }

.studio__mark {
  width: clamp(72px, 9vw, 104px);
  height: auto;
  margin: 0 auto 2rem;
  opacity: 0.5;
}

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  align-content: center;
  min-height: calc(100svh - var(--header-h) - 12rem);
}

.notfound__body { margin-inline: auto; }
.notfound__cta { margin-top: 2.25rem; }

/* ---------- contact ---------- */

.contact {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card__label {
  margin: 0 0 1rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.card--mail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}

.card__mail {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card__mail:hover { color: var(--gold); border-color: var(--gold); }

.copy-status {
  color: var(--gold);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.socials {
  display: grid;
  gap: 0.4rem;
}

.socials a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.socials a:hover { background: rgb(212 185 120 / 0.1); color: var(--gold); }

.socials svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: none;
  opacity: 0.9;
}

/* ---------- footer ---------- */

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.site-footer__mark {
  width: 34px;
  height: auto;
  opacity: 0.75;
}

.site-footer__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.site-footer__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__legal {
  margin: 0;
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- lightbox ---------- */

.lightbox {
  width: min(96vw, 1500px);
  max-width: none;
  max-height: 96svh;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgb(8 6 5 / 0.94);
  backdrop-filter: blur(4px);
}

.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.lightbox__figure img {
  max-height: 82svh;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox__bar button,
.lightbox__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgb(30 24 21 / 0.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cream);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lightbox__bar button:hover,
.lightbox__close:hover { background: var(--surface-2); color: var(--gold); }

.lightbox__bar svg,
.lightbox__close svg { width: 20px; height: 20px; }

.lightbox__close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 2;
}

.lightbox__count {
  min-width: 4.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- mobile nav ---------- */

@media (max-width: 880px) {
  .nav-toggle { display: grid; place-items: center; }

  .site-header { background: rgb(15 12 10 / 0.9); backdrop-filter: blur(14px); }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter);
    background: rgb(15 12 10 / 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s var(--ease), visibility 0.3s var(--ease);
  }

  .site-header.is-open .site-nav {
    max-height: 70svh;
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.5rem;
  }

  .site-nav__list a {
    display: block;
    padding-block: 0.95rem;
    border-bottom: 1px solid rgb(58 46 38 / 0.6);
    font-size: 1rem;
  }

  .site-nav__list a::after { display: none; }

  .lang {
    padding: 1.1rem 0 1.4rem;
    border-left: 0;
  }

  .site-header.is-open .nav-toggle__bars span:first-child {
    translate: 0 3.25px;
    rotate: 45deg;
  }

  .site-header.is-open .nav-toggle__bars span:last-child {
    translate: 0 -3.25px;
    rotate: -45deg;
  }

  .lightbox__close { top: 0.5rem; right: 0.5rem; }
}

@media (max-width: 560px) {
  .facts__row { grid-template-columns: 1fr; gap: 0.15rem; }
  .site-footer__legal { margin-left: 0; }
  .btn { width: 100%; }
  .btn--small, .lightbox__bar button { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .shot:hover { translate: none; }
  .shot:hover img,
}

/* Cinzel uses capital-like glyphs for lowercase letters. Keep the studio name in its authored casing. */
.studio .section__title { font-family: Georgia, "Times New Roman", serif; text-transform: none; font-variant: normal; text-wrap: wrap; overflow-wrap: normal; font-size: clamp(1.85rem, 1.4rem + 1.5vw, 2.75rem); }

.game__name { font-family: var(--font-body); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); font-weight: 600; line-height: 1.35; margin: 0 0 1.5rem; color: var(--cream); }
