/* =========================================================
   تعريب أوموري — main.css
   Design tokens derived from the game's actual UI:
   - pure black #000 canvas (in-game window background)
   - white rounded-outline boxes (dialog/menus, 3px border)
   - emotion colors: ANGRY #ff003c, SAD #1f6dff, HAPPY #ffd11f
   - OMORI_GAME2.ttf — the localization's real Arabic font
   - the mod's real RTL hand cursor (cursor_menu.png)

   Typography rule: OMORI GAME carries the whole site — headings,
   buttons, credits and long-form reading text alike.
   Never letter-space Arabic: it breaks cursive joining.
   ========================================================= */

:root {
  --black: #000;
  --white: #fff;
  --dim: rgba(255, 255, 255, .55);      /* body-dim text — 6.2:1 on black */
  --faint: rgba(255, 255, 255, .3);     /* hairlines and decorative edges only */
  --line: rgba(255, 255, 255, .8);

  --angry: #ff003c;
  --sad: #1f6dff;
  --happy: #ffd11f;
  --omori: #a020f0; /* the 100% purple from the game's completion screen */

  --border: 3px;
  --radius: 12px;
  --radius-lg: 20px;

  --font: "OMORI GAME", "OMORI_GAME2", "Segoe UI", Tahoma, sans-serif;
  --font-body: "OMORI GAME", "OMORI_GAME2", "Segoe UI", Tahoma, sans-serif;

  --max-w: 1080px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 64px;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

@font-face {
  font-family: "OMORI GAME";
  src: url("../assets/fonts/OMORI_GAME2.ttf") format("truetype");
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.95;
  overflow-x: hidden;
}

/* one typeface everywhere: the game's own font carries the whole site,
   Arabic and Latin alike */
:is(body, h1, h2, h3, h4, .hero__kicker, .btn, .nav a, .stat__num, .about__lead, .cr-teams,
    .creds__names, .thanks__title, .thanks__you, .dl__title, .dl__badge,
    .faq__item summary, .lang-switch, .lightbox__cap, .video-cover__label,
    .community__link, .steam-cta__btn, .brand__name, .lightbox__counter) {
  font-family: var(--font);
}

.faq__item p, .about__note, .thanks__note, .cred-alias, .dl__reqs li, .dl__steps li,
.dl__meta, .dl__note, .dl__verify p, .download-note,
.site-footer p, .section--download .download-note, .feat__note {
  font-family: var(--font);
}

/* LTR runs inside Arabic text: isolated, never letter-spaced in Arabic contexts */
.latin {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font);
  letter-spacing: .2px;
}

::selection { background: var(--happy); color: var(--black); }

body.is-locked { overflow: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  /* fixed + logical offset: hidden off the inline-start edge without ever
     widening the document (a physical right:-9999px leaks scroll in LTR) */
  position: fixed;
  inset-inline-start: -9999px;
  top: 8px;
  background: var(--white);
  color: var(--black);
  padding: 8px 18px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { inset-inline-start: 8px; }

/* the game's real hand cursor on anything clickable */
a, button, summary,
.btn, .video-cover, .shot__open {
  cursor: url("../assets/img/cursor_menu.png") 6 7, pointer;
}
/* the header strip keeps the normal mouse arrow */
.site-header a,
.site-header button {
  cursor: default;
}

/* ---------- star layers (title-screen night sky) ---------- */

/* stars live inside the hero only — the title-screen moment */
.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.stars__layer {
  position: absolute;
  inset: -80px;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 68%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 58% 14%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 47%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 74%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 24% 88%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 37%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 29%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 57%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 65% 90%, rgba(255,255,255,.8) 50%, transparent 51%);
  background-size: 640px 640px;
  animation: twinkle 4.2s ease-in-out infinite alternate;
}
.stars__layer[data-depth="0.65"] {
  background-size: 440px 440px;
  animation-delay: -2.1s;
  opacity: .7;
}
@keyframes twinkle {
  from { opacity: .45; }
  to   { opacity: 1; }
}

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

.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--faint);
}
.site-header__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
}
.brand__name { font-size: 21px; }

/* header brand lockup: [OMORI logo] × [eternal-dream logo] */
.brand__collab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand__title-logo {
  height: 26px;
  width: auto;
  opacity: .95;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .25));
}
.brand .team-brand__logo { height: 24px; }
.brand__x {
  color: var(--omori);
  margin: 0 6px;
  font-size: .8em;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--faint);
  border-radius: 10px;
  padding: 3px 12px;
  font-size: 15px;
  color: var(--dim);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.lang-switch:hover { border-color: var(--white); color: var(--white); }

.nav {
  display: flex;
  gap: clamp(12px, 2.4vw, 30px);
  /* centered between the brand and the language switch */
  margin-inline: auto;
}
.nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 17px;
  padding: 4px 2px;
  border-bottom: var(--border) solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--white); }
.nav a.is-active,
.nav a[aria-current="true"] {
  color: var(--white);
  border-bottom-color: var(--happy);
}

.menu-toggle {
  display: none;
  background: none;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  flex-direction: column;
  gap: 5px;
  /* the bars stay centred, so the X animation still lines up */
  align-items: center;
  justify-content: center;
}
.menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform .2s, opacity .2s;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* reading progress — sits on the header's bottom edge */
.progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  background: var(--omori); /* progress in OMORI purple, like the completion screen */
  transform: scaleX(0);
}
[dir="rtl"] .progress__bar { transform-origin: right; }
[dir="ltr"] .progress__bar { transform-origin: left; }

/* ---------- layout ---------- */

main { position: relative; z-index: 1; }

.section {
  padding: clamp(56px, 9vw, 110px) 0;
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.section--alt {
  background: rgba(255, 255, 255, .03);
  border-block: 1px solid var(--faint);
}

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section-title {
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: normal;
  margin: 0 0 34px;
}
/* the game underlines key words with a hand-drawn white stroke —
   the stroke sits under the title, growing from the reading start */
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: var(--border);
  background: var(--white);
  border-radius: 2px;
  margin-top: 14px;
}
[dir="rtl"] .section-title::after { transform-origin: right; }
[dir="ltr"] .section-title::after { transform-origin: left; }

/* ---------- buttons — the game's white rounded outline box ---------- */

.btn {
  display: inline-block;
  padding: 14px 38px;
  border: var(--border) solid var(--white);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: var(--font);
  font-size: 20px;
  text-decoration: none;
  text-align: center;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(0); }
.btn--ghost { border-color: var(--faint); color: var(--dim); }
.btn--ghost:hover {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--happy);
  outline-offset: 3px;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px var(--gutter) 60px;
}
.hero__content { position: relative; z-index: 1; max-width: 820px; }

.hero__kicker {
  color: var(--dim);
  font-size: clamp(15px, 2vw, 19px);
  margin: 0 0 10px;
}

.hero__title {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: normal;
  margin: 0;
  line-height: 1.25;
  animation: hero-in 1s ease-out both;
}
/* Arabic: colour only. Letter-spacing would tear the cursive apart. */
.hero__omori { color: var(--omori); }

.hero__sub {
  color: var(--dim);
  font-size: clamp(17px, 2.3vw, 21px);
  margin: 14px 0 40px;
}

.hero__actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 34px auto 0;
  border: 2px solid var(--faint);
  border-radius: 50%;
  transition: border-color .2s;
}
.hero__scroll:hover { border-color: var(--white); }
.hero__scroll-arrow {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  rotate: 45deg;
  translate: 0 -3px;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { translate: 0 -3px; }
  50%      { translate: 0 2px; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- about / stats ---------- */

.about__lead {
  font-size: clamp(20px, 2.4vw, 24px);
  max-width: 70ch;
  margin: 0 0 44px;
  line-height: 1.9;
}
.about__lead strong { color: var(--omori); font-weight: normal; }

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 0;
  margin: 0 0 34px;
}
.stat {
  border: var(--border) solid var(--faint);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  text-align: center;
  transition: border-color .2s;
}
.stat:hover { border-color: var(--white); }
.stat__num {
  display: block;
  font-size: clamp(30px, 4.4vw, 46px);
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--dim); font-size: 16.5px; font-family: var(--font-body); }

.about__note { color: var(--dim); max-width: 62ch; font-size: 18px; }

.about__sub {
  font-weight: normal;
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 54px 0 24px;
  color: var(--white);
}

/* ---------- illustrated feature blocks ---------- */

.feats {
  display: grid;
  gap: 26px;
}
/* every showcase card gets a quiet outline and a soft purple halo so the blocks
   read apart on the black page */
.feat {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 26px;
  align-items: start;
  border: 1px solid var(--faint);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: 0 0 0 1px rgba(160, 32, 240, .10), 0 22px 62px -38px rgba(160, 32, 240, .60);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.feat:hover {
  border-color: rgba(160, 32, 240, .55);
  box-shadow: 0 0 0 1px rgba(160, 32, 240, .26), 0 24px 74px -32px rgba(160, 32, 240, .85);
}
/* every other block flips sides so the page has a rhythm — the screenshots keep
   the wider column on both sides, so the flip mirrors the block instead of
   shrinking the pictures */
.feat--rev { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.feat--rev .feat__text { order: 2; }
/* a block with no screenshots */
.feat--text { grid-template-columns: 1fr; }

.feat__title {
  margin: 0 0 12px;
  font-weight: normal;
  font-size: 24px;
  color: var(--omori);
}
.feat__text p {
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 18px;
}
.feat__text p:last-child { margin-bottom: 0; }
.feat__note {
  border-inline-start: 3px solid var(--happy);
  padding-inline-start: 14px;
  font-size: 16.5px;
}

/* a group of screenshots inside a feature block: two per row is the most we show */
.plate {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* a lone screenshot takes the whole row instead of leaving half of it empty, but
   it keeps a comfortable size instead of stretching across the plate */
.plate > .shot:only-child {
  grid-column: 1 / -1;
  width: min(100%, 420px);
  justify-self: center;
}
/* the font close-ups are very wide, very short strips: across the whole column
   they read as banners, so they are capped and centred instead */
.plate--wide {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
.plate--wide .shot { width: min(100%, 420px); }

.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  /* screenshots ease in as they scroll into view. The hidden state is applied by
     the script itself (.is-pending), so if scripting is off the pictures simply
     show — nothing can ever get stuck invisible. */
  transition: opacity .55s ease, transform .55s ease;
}
.shot.is-pending { opacity: 0; transform: translateY(12px); }
.shot img {
  display: block;
  width: 100%;
  height: auto;
}


/* ---------- download ---------- */

.section--download .download-note {
  color: var(--dim);
  margin: -18px 0 38px;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.dl {
  border: var(--border) solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  background: rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
}
.dl--soon { border-style: dashed; }
.dl__title {
  margin: 0 0 16px;
  font-weight: normal;
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dl__badge {
  font-size: 14px;
  border: 2px solid var(--happy);
  color: var(--happy);
  border-radius: 999px;
  padding: 1px 12px;
}
.dl__badge--soon { border-color: var(--dim); color: var(--dim); }
.dl__reqs {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 17px;
}
.dl__reqs li::before {
  content: "•";
  color: var(--happy);
  margin-inline-end: 8px;
}
.dl__steps {
  margin: 0 0 26px;
  padding-inline-start: 22px;
  color: var(--dim);
  font-size: 17px;
}
.dl__steps li { margin-bottom: 8px; }
.dl__steps li::marker { color: var(--happy); }
.dl__btn { margin-top: auto; }
.dl__steps-hint { color: var(--dim); font-size: 15.5px; margin: 0 0 18px; }

.dl__meta {
  color: var(--dim);
  font-size: 16.5px;
  margin: 0 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--faint);
}
.dl__note {
  color: var(--dim);
  font-size: 16.5px;
  margin: 0 0 18px;
  border-inline-start: 3px solid var(--faint);
  padding-inline-start: 14px;
}
.dl__verify { margin: 0 0 18px; }
.dl__verify summary {
  color: var(--dim);
  font-size: 16px;
  font-family: var(--font);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl__verify summary::-webkit-details-marker { display: none; }
.dl__verify summary::before {
  content: "+";
  color: var(--happy);
  font-size: 19px;
}
.dl__verify[open] summary::before { content: "−"; }
.dl__verify p { color: var(--dim); font-size: 15.5px; margin: 10px 0 0; }
.dl__hash {
  font-size: 12.5px;
  word-break: break-all;
  color: var(--dim);
  background: rgba(255, 255, 255, .05);
  border-radius: 8px;
  padding: 8px 10px;
}

.dl-msg {
  margin: 26px 0 0;
  padding: 14px 20px;
  border: var(--border) dashed var(--happy);
  border-radius: var(--radius);
  color: var(--happy);
}
.dl-msg[hidden] { display: none; }

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

.video-frame {
  position: relative;
  max-width: 880px;
  margin: 0 auto 44px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--black);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, .55);
  color: var(--white);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: background .2s;
}
.video-cover:hover { background: rgba(0, 0, 0, .35); }
.video-cover[hidden] { display: none; }

/* the play glyph is an inline SVG, so it never mirrors in RTL */
.video-cover__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 3px solid var(--white);
  border-radius: 50%;
  padding-inline-start: 5px;
}
.video-cover__icon svg { display: block; }
.video-cover__label { font-size: 19px; }

/* pause/play control shown while the video runs */
.video-ctrl {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  width: 46px;
  height: 46px;
  border: 2px solid var(--white);
  border-radius: 12px;
  background: rgba(0, 0, 0, .6);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background .15s;
}
.video-ctrl:hover { background: rgba(0, 0, 0, .85); }
.video-ctrl[hidden] { display: none; }
.video-ctrl__icon { display: grid; place-items: center; }

/* ---------- gallery: screenshot grid ---------- */

/* the same grid serves both the gallery and the feature plates —
   two images per row is the maximum we show */
.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.plates .shot { display: flex; flex-direction: column; }
.shot--grid[hidden] { display: none; }

.shot__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
}
.shot__open img { transition: transform .35s ease; }
.shot__open:hover img { transform: scale(1.04); }

/* ---------- FAQ (native details, no JS needed) ---------- */

.faq { max-width: 800px; }
.faq__item {
  border: var(--border) solid var(--faint);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .35);
  margin-bottom: 12px;
  transition: border-color .2s;
}
.faq__item:hover { border-color: var(--line); }
.faq__item[open] { border-color: var(--white); }
.faq__item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px;
  font-size: 20px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  color: var(--happy);
  font-size: 24px;
  line-height: 1;
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--dim);
  font-size: 18px;
}

/* ---------- credits — mirrors the game's own credits screen ---------- */

.cr-teams {
  text-align: center;
  font-size: clamp(19px, 3vw, 25px);
  color: var(--omori);
  margin: 0 0 40px;
}

/* a team name with its logo inline */
.team-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  vertical-align: middle;
}
.team-brand__logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .25));
}
/* smaller variant for the hero kicker line */
.team-brand__logo--sm {
  height: 22px;
  vertical-align: -6px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .2));
}
/* OneLoader / Steam links inside requirement and step lists */
.dl-link {
  color: var(--happy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dl-link:hover { color: #fff; }

/* roles as groups: free-flowing columns, no enclosing box — each role is
   a dim label over its names, separated by purple • dots like the game's
   credits roll */
.creds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px 34px;
}
.creds__group {
  border-top: 1px solid var(--faint);
  padding-top: 12px;
  transition: border-color .2s;
}
.creds__group:hover { border-color: var(--dim); }
.creds .creds__role { /* beats the :is() heading-font rule (0,1,1) */
  margin: 0 0 4px;
  font-weight: normal;
  font-size: 18px;
  color: var(--line);
  font-family: var(--font-body);
}
.creds__names {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.9;
}
/* names keep together on one line — "بلاك (أونكس)" never splits across lines */
.creds__names li { display: inline; white-space: nowrap; }
.creds__names li + li::before {
  content: "•";
  color: var(--omori);
  margin: 0 10px;
  font-size: .8em;
  vertical-align: 2px;
}
.cred-alias { color: var(--dim); font-size: .88em; }

/* special thanks — a flowing roll call separated by •, long notes stay
   readable inline in small body type */
.thanks { margin: 34px 0 0; text-align: center; }
.thanks__title {
  margin: 0 0 10px;
  font-weight: normal;
  font-size: 19px;
  color: var(--dim);
}
.thanks__list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 72ch;
  font-size: 20px;   /* same tier as the credit names above */
  line-height: 2.1;
}
.thanks__list li { display: inline; }
/* a Latin name such as "sumairi (PEPO)" stays whole — the note beside it still wraps */
.thanks__list li > .latin { white-space: nowrap; }
/* "thanks:" reads as a label on its own line, never as one of the names —
   two classes so it beats the `.thanks__list li { display: inline }` above */
.thanks__list .thanks__lead {
  display: block;
  margin-top: 12px;
  color: var(--dim);
  font-size: .85em;
}
/* no • touches the label, on either side of it */
.thanks__list .thanks__lead::before,
.thanks__list .thanks__lead + li::before { content: none; }
.thanks__list li + li::before {
  content: "•";
  color: var(--omori);
  margin: 0 9px;
  font-size: .75em;
  vertical-align: 2px;
}
.thanks__note {
  color: var(--dim);
  font-size: 15.5px;
}
.thanks__you { margin: 18px 0 0; font-size: 24px; color: var(--omori); }

/* ---------- community links (under "special thanks") ---------- */

.community {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}
.community__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 2px solid var(--faint);
  border-radius: var(--radius);
  color: var(--dim);
  text-decoration: none;
  font-size: 15.5px;
  transition: border-color .2s, color .2s, transform .2s;
}
.community__link:hover {
  border-color: var(--omori);
  color: var(--white);
  transform: translateY(-2px);
}
.community__link img {
  height: 24px;
  width: auto;
  display: block;
}
.community__link img[src*="etrdream"] { height: 26px; }

/* ---------- Steam CTA (under the download cards) ---------- */

.steam-cta {
  text-align: center;
  margin: 36px 0 0;
  color: var(--dim);
  font-size: 17px;
}
.steam-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: 12px;
  padding: 10px 22px;
  border: 2px solid var(--faint);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.steam-cta__btn:hover {
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, .08);
}
.steam-cta__btn img { display: block; }

/* inline steam link on the OMORI word in requirements */
.steam-link {
  color: var(--happy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 209, 31, .4);
}
.steam-link:hover { color: var(--white); text-decoration-color: currentColor; }

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

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--faint);
  /* the last line clears the floating "back to top" button */
  padding: 38px var(--gutter) 76px;
  text-align: center;
  color: var(--dim);
  font-size: 16.5px;
}
.site-footer p { margin: 8px 0; }
/* the footer wordmark is shown exactly as it is — no glow, no rays */
.site-footer__markwrap {
  display: inline-block;
  line-height: 0;
  margin-bottom: 16px;
}
.site-footer__mark {
  display: block;
  width: clamp(170px, 20vw, 230px);
  height: auto;
  opacity: .9;
}
.site-footer__small { font-size: 15.5px; }
.site-footer__line + .site-footer__line::before {
  content: " · ";
  color: var(--faint);
}
.site-footer__langs {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 18px;
  font-size: 15.5px;
}
.site-footer__langs a { color: var(--dim); text-decoration: none; }
.site-footer__langs a:hover,
.site-footer__langs a[aria-current="true"] { color: var(--white); }

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  inset-inline-start: 22px;
  bottom: 22px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 2px solid var(--white);
  border-radius: 14px;
  background: rgba(0, 0, 0, .75);
  color: var(--white);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: background .18s, transform .18s;
}
.to-top:hover { background: var(--white); color: var(--black); transform: translateY(-2px); }
.to-top[hidden] { display: none; }

/* ---------- game-feel animations (all subtle, all optional) ---------- */

/* hero title: a slow blink like the title screen's OMORI */
@keyframes omori-blink {
  0%, 88%, 100% { opacity: 1; }
  90%, 94% { opacity: .35; }
}
.hero__title { animation: hero-in 1s ease-out both, omori-blink 7s ease-in-out 2.5s infinite; }

/* the primary download button breathes very slightly */
@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 18px 2px rgba(255, 255, 255, .18); }
}
.btn--primary { animation: btn-breathe 3.2s ease-in-out infinite; }
.btn--primary:hover { animation: none; }

/* section titles: the white stroke slides in */
section .section-title::after { animation: stroke-in .8s ease both; }
@keyframes stroke-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* screenshots breathe a little on hover */
.shot { transition: border-color .2s, box-shadow .25s ease; }
.shot:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .94);
  display: none;
  padding: clamp(52px, 8vh, 80px) clamp(16px, 6vw, 96px);
}
.lightbox.is-open { display: grid; place-items: center; }
.lightbox__frame {
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  max-height: 100%;
}
.lightbox__img {
  max-width: min(1200px, 92vw);
  max-height: 72vh;
  width: auto;
  height: auto;
  border: var(--border) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--black);
}
.lightbox__cap {
  color: var(--white);
  font-size: 19px;
  text-align: center;
  margin: 0;
}
.lightbox__counter {
  position: fixed;
  bottom: 18px;
  inset-inline: 0;
  margin: 0;
  text-align: center;
  color: var(--dim);
  font-size: 15px;
}
.lightbox__close,
.lightbox__nav {
  position: fixed;
  border: 2px solid var(--white);
  border-radius: 14px;
  background: rgba(0, 0, 0, .6);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .16); }
.lightbox__close {
  top: 16px;
  inset-inline-start: 16px;
  width: 46px;
  height: 46px;
}
.lightbox__nav {
  top: 50%;
  translate: 0 -50%;
  width: 52px;
  height: 52px;
}
.lightbox__nav--prev { inset-inline-start: 14px; }
.lightbox__nav--next { inset-inline-end: 14px; }
.lightbox__nav[hidden] { display: none; }
/* in RTL the arrows flip so "previous" still points towards the reading start */
[dir="rtl"] .lightbox__nav svg { transform: scaleX(-1); }
.lightbox__close svg { display: block; }

/* ---------- reveal on scroll (only when JS is available) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat { grid-template-columns: 1fr; }
  .feat--rev .feat__text { order: 0; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0; left: 0;
    flex-direction: column;
    gap: 0;
    background: #000;
    border-bottom: 1px solid var(--faint);
    padding: 8px var(--gutter) 16px;
    display: none;
    margin-inline: 0;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 12px 4px;
    border-bottom: none;
    font-size: 19px;
  }
  /* phones: both header controls get a comfortable 44px touch target */
  .menu-toggle { display: flex; min-width: 44px; min-height: 44px; }
  .lang-switch { position: relative; z-index: 60; min-height: 44px; }

  .download-grid { grid-template-columns: 1fr; }

  .creds { grid-template-columns: 1fr; }
  .thanks__list { font-size: 18px; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero__actions .btn { width: 100%; }
  .plates { grid-template-columns: 1fr; }
  .plate { grid-template-columns: 1fr; }
  .brand__name { display: none; }
  .feat { padding: 18px 16px; }
  .lightbox { padding: 56px 12px; }
  .lightbox__nav { width: 44px; height: 44px; }
  .to-top { inset-inline-start: 14px; bottom: 14px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars__layer { animation: none; opacity: .6; }
  .hero__title, .btn--primary, .hero__scroll-arrow { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .shot.is-pending { opacity: 1; transform: none; transition: none; }
  .btn:hover, .stat:hover, .community__link:hover, .to-top:hover { transform: none; }
  .shot__open:hover img { transform: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
