/* Duskfall Studios LLC — duskfallstudio.org
   Palette sampled from the studio mark. */

:root {
  --night:  #0A0918;
  --indigo: #1E1D7B;
  --lilac:  #A78BFA;
  --amber:  #FBBF24;
  --ridge:  #111827;
  --bone:   #F0EEE6;
  --muted:  #8E8AA8;
  --line:   #241F45;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --shell: 76rem;

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- Top bar ---------- */

.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.5rem 0 0; flex-wrap: wrap;
}
.topbar__logo { display: inline-flex; line-height: 0; }
.topbar__logo img { height: 42px; width: auto; }

.nav { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav a:hover { color: var(--bone); border-bottom-color: var(--amber); }
.nav a[aria-current="page"] { color: var(--amber); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(2.5rem, 8vh, 4.5rem) 0 0;
  overflow: hidden;          /* keeps the sun and its glow from spilling past the ridge */
  isolation: isolate;        /* own stacking context so .below always paints above */
}

.sky {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(72% 46% at 50% 80%, rgba(251,191,36,0.16) 0%, transparent 62%),
    radial-gradient(110% 64% at 50% 84%, rgba(167,139,250,0.20) 0%, transparent 66%),
    linear-gradient(to bottom, #0A0918 0%, #14123A 44%, #241F5E 72%, #3A2E72 100%);
}

/* scattered stars — pure CSS, no images */
.stars {
  position: absolute; inset: 0 0 40%; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 27% 12%, #E9E4FF, transparent),
    radial-gradient(1.8px 1.8px at 41% 31%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 58% 16%, #D9CFFF, transparent),
    radial-gradient(1.5px 1.5px at 71% 27%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 86% 14%, #E9E4FF, transparent),
    radial-gradient(1.4px 1.4px at 93% 34%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 19% 41%, #D9CFFF, transparent),
    radial-gradient(1.3px 1.3px at 64% 44%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 35% 52%, #E9E4FF, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.9; } }

.hero__inner { position: relative; z-index: 2; }

.sun {
  position: absolute; left: 50%; bottom: -2.5rem;
  width: clamp(150px, 25vw, 240px); aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, #FDE08A 0%, var(--amber) 52%, #E39A12 100%);
  box-shadow: 0 0 90px 26px rgba(251,191,36,0.30);
  z-index: 1;
  animation: settle 1.9s cubic-bezier(0.22,0.68,0.24,1) both;
}
@keyframes settle {
  from { transform: translateX(-50%) translateY(46px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.ridge { position: relative; z-index: 2; display: block; width: 100%; height: auto; margin-top: -1px; }

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--lilac); margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.4rem); font-weight: 800; line-height: 1.06;
  letter-spacing: -0.03em; margin: 0 0 1.15rem; max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--amber); }

.hero .lede {
  font-size: clamp(1.02rem, 2.1vw, 1.18rem); color: #CFCADF;
  max-width: 34rem; margin: 0 0 2rem;
}

/* ---------- Buttons ---------- */

.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.76rem;
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 0.8rem 1.5rem; border-radius: 2px; text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn--solid { background: var(--amber); color: #1A1405; font-weight: 700; }
.btn--solid:hover { background: #FFD152; transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--bone); }
.btn--ghost:hover { border-color: var(--lilac); transform: translateY(-2px); }

/* ---------- Sections ---------- */

.below { background: var(--ridge); position: relative; z-index: 2; }
.section { padding: clamp(3.5rem, 9vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid rgba(255,255,255,0.05); }

h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.9rem;
}
h3 { font-size: 1rem; font-weight: 700; margin: 1.9rem 0 0.5rem; }

p { margin: 0 0 1.15rem; max-width: var(--measure); }
.sub { color: #B3AEC6; }
.dim { color: #A7A2BE; }

ul { padding-left: 1.15rem; margin: 0 0 1.15rem; max-width: var(--measure); }
li { margin-bottom: 0.42rem; }
li::marker { color: var(--lilac); }

a { color: var(--bone); text-decoration-color: rgba(167,139,250,0.55); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--amber); }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.stamp { font-family: var(--mono); font-size: 0.76rem; color: #A7A2BE; }

/* ---------- Game cards ---------- */

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; margin-top: 2.25rem; }

.game {
  position: relative;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(30,29,123,0.28) 0%, rgba(255,255,255,0.02) 60%);
  padding: 1.6rem 1.6rem 1.7rem;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.game:hover { transform: translateY(-3px); border-color: rgba(167,139,250,0.5); }
.game p { max-width: none; }

.game__tag {
  display: inline-block; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 2px; margin-bottom: 1rem; align-self: flex-start;
}
.game__tag--live { background: rgba(251,191,36,0.16); color: var(--amber); border: 1px solid rgba(251,191,36,0.35); }
.game__tag--wip  { background: rgba(167,139,250,0.13); color: var(--lilac); border: 1px solid rgba(167,139,250,0.3); }
.game__tag--next { background: rgba(255,255,255,0.05); color: #A7A2BE; border: 1px solid rgba(255,255,255,0.12); }

.game h3 { font-size: 1.28rem; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 0.15rem; }
.game__sub { font-family: var(--mono); font-size: 0.72rem; color: #A7A2BE; letter-spacing: 0.04em; margin: 0 0 0.85rem; }
.game__body { color: #B3AEC6; font-size: 0.95rem; margin-bottom: 1.2rem; }
.game__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 1rem; }
.game__links a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--bone);
  border-bottom: 1px solid rgba(167,139,250,0.5); padding-bottom: 2px;
}
.game__links a:hover { border-bottom-color: var(--amber); color: var(--amber); }

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

.card {
  border: 1px solid rgba(255,255,255,0.09); border-radius: 3px;
  background: rgba(255,255,255,0.022); padding: 1.4rem 1.55rem;
  margin: 1.6rem 0; max-width: var(--measure);
}
.card p:last-child { margin-bottom: 0; }

.kv { font-family: var(--mono); font-size: 0.87rem; line-height: 2.05; }
.kv .k { color: #A7A2BE; display: inline-block; min-width: 5.6rem; }

/* ---------- Interior page header ---------- */

.pagehead {
  position: relative;
  padding: clamp(2.5rem,7vh,4rem) 0 clamp(2rem,5vh,3rem);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(80% 100% at 50% 0%, rgba(167,139,250,0.10) 0%, transparent 70%), var(--night);
}
.pagehead h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.4rem); font-weight: 800;
  letter-spacing: -0.022em; line-height: 1.14; margin: 0;
}

/* ---------- Footer ---------- */

footer { background: var(--night); border-top: 1px solid var(--line); padding: 2.75rem 0 3.25rem; }
.foot { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.foot__logo img { height: 36px; width: auto; opacity: 0.92; }
.colophon { font-family: var(--mono); font-size: 0.73rem; line-height: 1.95; color: #A7A2BE; margin: 1rem 0 0; }

@media (max-width: 34rem) {
  .topbar { justify-content: center; }
  .nav { gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
}

@media (pointer: coarse) {
  .nav a { padding: 0.7rem 0.25rem; display: inline-block; line-height: 1.6; }
  .foot .nav a { padding: 0.55rem 0.25rem; }
  .kv a, .sub a, li a, .game__links a { padding: 0.2rem 0; display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--amber); color: #1A1405; font-family: var(--mono);
  font-size: 0.78rem; padding: 0.7rem 1.1rem; text-decoration: none; font-weight: 700;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Store badges ---------- */

.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.4rem; }
.stores img { height: 44px; width: auto; }

/* Placeholder until the official Apple / Google badge art is dropped in */
.store-soon {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: #A7A2BE;
  border: 1px dashed rgba(255,255,255,0.18); border-radius: 3px;
  padding: 0.7rem 1.1rem;
}
.store-soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lilac); }

/* ---------- News ---------- */

.posts { margin-top: 2.25rem; border-top: 1px solid rgba(255,255,255,0.08); }

.post {
  display: block; text-decoration: none; color: inherit;
  padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: padding-left 0.18s ease;
}
.post:hover { padding-left: 0.6rem; }
.post:hover .post__title { color: var(--amber); }

.post__meta {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #A7A2BE; margin-bottom: 0.5rem;
  display: flex; gap: 0.9rem; flex-wrap: wrap;
}
.post__meta .tag { color: var(--lilac); }
.post__title {
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 0.4rem; line-height: 1.3; transition: color 0.18s ease;
}
.post__excerpt { color: #B3AEC6; font-size: 0.95rem; margin: 0; max-width: var(--measure); }

.empty {
  border: 1px dashed rgba(255,255,255,0.14); border-radius: 4px;
  padding: 2.25rem 1.75rem; text-align: center; color: #A7A2BE; margin-top: 2rem;
}
.empty p { max-width: none; margin: 0; }

/* ================= Announcement strip + sticky bar ================= */

.announce {
  position: relative; z-index: 60;
  background: linear-gradient(90deg, rgba(30,29,123,0.55) 0%, rgba(167,139,250,0.16) 50%, rgba(30,29,123,0.55) 100%);
  border-bottom: 1px solid rgba(167,139,250,0.22);
}
.announce a {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  flex-wrap: wrap; text-decoration: none; color: var(--bone);
  padding: 0.6rem var(--gutter); font-size: 0.84rem; line-height: 1.4;
}
.announce a:hover .announce__cta { color: var(--amber); }
.announce strong { font-weight: 700; }
.announce__tag {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #1A1405; background: var(--amber);
  padding: 0.15rem 0.45rem; border-radius: 2px; font-weight: 700;
}
.announce__sep { color: var(--muted); }
.announce__cta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--lilac); transition: color 0.18s ease; white-space: nowrap;
}

.bar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
.bar.is-stuck {
  background: rgba(10,9,24,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; padding-top: 0.85rem; padding-bottom: 0.85rem; flex-wrap: wrap;
}
.bar__logo { display: inline-flex; line-height: 0; flex-shrink: 0; }
.bar__logo img { height: 38px; width: auto; }
.bar__right { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

.bar__cta {
  font-family: var(--mono); font-size: 0.71rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; font-weight: 700;
  color: #1A1405; background: var(--amber);
  padding: 0.6rem 1.05rem; border-radius: 3px; white-space: nowrap;
  transition: background 0.16s ease, transform 0.16s ease;
}
.bar__cta:hover { background: #FFD152; transform: translateY(-1px); }

/* hero no longer holds the header, so pull its top padding in */
.hero { padding-top: clamp(1rem, 4vh, 2.5rem); }


@media (max-width: 46rem) {
  .announce a { font-size: 0.78rem; gap: 0.5rem; }
  .announce__desc { display: none; }
}
@media (max-width: 34rem) {
  /* let logo + CTA share the top row, nav drops below full-width */
  .bar__right { display: contents; }
  .bar__logo { order: 1; }
  .bar__cta { order: 2; }
  .bar nav { order: 3; width: 100%; }
  .bar__inner { gap: 0.5rem; padding-top: 0.7rem; padding-bottom: 0.55rem; }
  .bar__logo img { height: 32px; }
  .bar .nav { gap: 1.15rem; justify-content: flex-start; }
}

/* ================= Full-bleed feature band ================= */

.feature {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.feature__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 82% 40%, rgba(167,139,250,0.20) 0%, transparent 62%),
    radial-gradient(50% 70% at 18% 70%, rgba(251,191,36,0.10) 0%, transparent 60%),
    linear-gradient(150deg, #14123A 0%, #1B1746 45%, #0F0D26 100%);
}
.feature__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 31% 62%, #E9E4FF, transparent),
    radial-gradient(1.7px 1.7px at 47% 24%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 66% 71%, #D9CFFF, transparent),
    radial-gradient(1.4px 1.4px at 88% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 8% 82%, #E9E4FF, transparent);
  opacity: 0.6;
}

.feature__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}

.feature h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.028em; margin-bottom: 0.85rem;
}
.feature__lede { color: #CFCADF; font-size: 1.05rem; margin-bottom: 1.9rem; }

.feature__list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 1.1rem 1.6rem; margin: 0 0 2rem; padding: 0; list-style: none; max-width: none;
}
.feature__list li { margin: 0; max-width: none; }
.feature__list dt {
  font-weight: 700; font-size: 0.92rem; margin-bottom: 0.15rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.feature__list dt::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber); flex-shrink: 0;
}
.feature__list dd { margin: 0; color: #A9A4C0; font-size: 0.87rem; line-height: 1.55; }

.feature__art { display: block; width: 100%; height: auto; }

@media (max-width: 52rem) {
  .feature__inner { grid-template-columns: 1fr; }
  .feature__art { max-width: 22rem; margin: 0 auto; }
}

/* ghost buttons need a lighter edge on the feature band's brighter backdrop */
.feature .btn--ghost { border-color: rgba(167,139,250,0.42); }
.feature .btn--ghost:hover { border-color: var(--lilac); }
.feature .stores { margin-top: 1.1rem; }

/* anchor targets must clear the sticky bar */
[id] { scroll-margin-top: 6.5rem; }

/* with fewer cards, stop them stretching across the wider shell */
.games {
  grid-template-columns: repeat(auto-fit, minmax(17rem, 24rem));
  justify-content: start;
}

/* ================= Expanded footer ================= */

footer { padding: clamp(2.75rem,6vw,3.75rem) 0 2rem; }

.foot {
  display: grid;
  grid-template-columns: minmax(14rem, 1.1fr) 2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.75rem 2rem;
}
.foot__col ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.foot__col li { margin-bottom: 0.5rem; }
.foot__h {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--lilac);
  margin: 0 0 0.9rem; font-weight: 500;
}
.foot__col a {
  font-size: 0.87rem; color: #B3AEC6; text-decoration: none;
  transition: color 0.16s ease;
}
.foot__col a:hover { color: var(--bone); text-decoration: underline; text-underline-offset: 0.2em; }
.foot__col a[rel~="external"]::after { content: " \2197"; color: var(--muted); font-size: 0.85em; }

.foot__bottom {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  justify-content: space-between; align-items: center;
  margin-top: clamp(2.25rem,5vw,3rem); padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.foot__bottom p {
  margin: 0; max-width: none;
  font-family: var(--mono); font-size: 0.71rem; color: #A7A2BE; letter-spacing: 0.02em;
}

@media (max-width: 44rem) {
  .foot { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .foot__col a { display: inline-block; padding: 0.2rem 0; }
}

/* footer logo link was collapsing below its image */
.foot__logo { display: inline-block; line-height: 0; }
.foot__logo img { display: block; }
