/* Masterless Shadow website. One dark night page in the game's own palette: Toba night indigo,
   lantern amber, Sumi's teal; the game's own faces: Shippori Mincho B1 for titles, Zen Kaku Gothic New for text. */

@font-face { font-family: "Shippori Mincho B1"; font-weight: 700 800; font-display: swap; src: url(../fonts/shippori-mincho-b1-800.woff2) format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 500; font-display: swap; src: url(../fonts/zen-kaku-gothic-new-500.woff2) format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 700; font-display: swap; src: url(../fonts/zen-kaku-gothic-new-700.woff2) format("woff2"); }

:root {
  --night: #16132a; --night-2: #1e1a33; --night-3: #2a2547;
  --cream: #f3e9d6; --mist: #b9b3cf; --lantern: #e8b04a; --sumi: #5fe3d0; --sumi-deep: #2e7a70;
  --line: rgba(243, 233, 214, .14);
  --f-title: "Shippori Mincho B1", Georgia, "Times New Roman", serif;
  --f-body: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--night); }
body { margin: 0; background: var(--night); color: var(--cream); font: 500 16px/1.6 var(--f-body); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--sumi); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(40px, env(safe-area-inset-left)); padding-right: max(40px, env(safe-area-inset-right)); }

/* ---------- header ---------- */
.nav { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(40px, env(safe-area-inset-right)) 18px max(40px, env(safe-area-inset-left)); }
.nav.solid { position: static; border-bottom: 1px solid var(--line); }
.nav .brand { display: flex; }
.nav .brand img { width: 40px; height: 40px; display: block; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav ul a { color: var(--mist); text-decoration: none; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--cream); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero .bg { position: absolute; inset: 0; z-index: -2; background: url(../img/hero_leaving.jpg) center 30% / cover no-repeat; }
.hero .shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--night) 4%, rgba(22, 19, 42, .85) 32%, rgba(22, 19, 42, 0) 64%); }
.hero .copy { width: 100%; padding: 0 max(40px, env(safe-area-inset-right)) 64px max(40px, env(safe-area-inset-left)); }
.title { font: 700 68px/1.02 var(--f-title); margin: 0; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 24px rgba(10, 8, 24, .7); }
.tag { font-size: 20px; margin: 10px 0 0; max-width: 40ch; text-shadow: 0 1px 12px rgba(10, 8, 24, .8); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; text-align: left;
  min-height: 52px; min-width: 180px; padding: 6px 22px; border-radius: 12px; font-weight: 700; font-size: 15px; line-height: 1.2;
  text-decoration: none; border: 1.5px solid var(--line); background: rgba(22, 19, 42, .6); color: var(--cream);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--sumi); }
.btn.primary { background: var(--sumi-deep); border-color: var(--sumi); color: #fff; }
.btn.primary:hover { background: #358a7f; }
.btn small { display: block; font-weight: 500; font-size: 11px; opacity: .75; }
.btn .ic { width: 24px; height: 24px; flex: none; fill: currentColor; }
.btn span { min-width: 92px; }
.plat .btn span { min-width: 0; }

/* On a wide screen the hero copy is centred like the blocks under it; on a phone it stays left. */
@media (min-width: 641px) {
  .hero .copy { text-align: center; }
  .hero .tag { margin-inline: auto; max-width: none; text-wrap: balance; }
  .hero .cta { justify-content: center; }
}

/* ---------- sections ---------- */
section { padding-block: 72px; }
section.tight { padding-top: 0; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lantern); font-weight: 700; margin: 0 0 10px; }
h2 { font: 700 38px/1.15 var(--f-title); margin: 0 0 18px; text-wrap: balance; }
h3 { font-family: var(--f-title); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.facts div { padding: 22px 20px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts b { display: block; font: 700 40px/1 var(--f-title); color: var(--lantern); font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--mist); }

.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.story > * { min-width: 0; }
.story p { color: var(--mist); margin: 0 0 14px; max-width: 58ch; }
.story p.lead { color: var(--cream); font-size: 18px; }
.rens { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--night-2); }
.rens .art { padding: 18px 10px 0; background: radial-gradient(ellipse 60% 55% at 50% 40%, rgba(232, 176, 74, .22), rgba(232, 176, 74, 0) 70%); }
.rens img { width: 78%; max-width: 340px; display: block; margin: 0 auto; height: auto; }
.rens figcaption { font-size: 12px; color: var(--mist); padding: 8px 12px; }

.shots { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.shot { margin: 0; position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--night-2); }
.shot img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot.big { grid-row: span 2; }
.shot figcaption { position: absolute; left: 10px; bottom: 10px; font-size: 12px; background: rgba(22, 19, 42, .8); padding: 3px 9px; border-radius: 6px; }
.shots-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 48px; }
.feature { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.feature img { width: 56px; height: 56px; border-radius: 50%; background: var(--night-3); box-shadow: 0 0 0 1px var(--line); }
.feature h3 { font-size: 20px; margin: 2px 0 6px; }
.feature p { margin: 0; color: var(--mist); font-size: 15px; max-width: 46ch; }

.band { background: var(--night-2); border-block: 1px solid var(--line); }
.plat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.plat .card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--night); display: flex; flex-direction: column; }
.plat h3 { margin: 0 0 4px; font: 700 17px var(--f-body); }
.plat p { margin: 0 0 16px; color: var(--mist); font-size: 14px; flex: 1; }
.plat .btn { width: 100%; min-height: 48px; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.langs li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 14px; }

/* ---------- text pages ---------- */
.page { padding-block: 56px 80px; }
.page h1 { font: 700 44px/1.1 var(--f-title); margin: 0 0 8px; text-wrap: balance; }
.page .updated { color: var(--mist); font-size: 14px; margin: 0 0 36px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 24px; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--mist); }
.prose strong { color: var(--cream); }
.prose ul { padding-left: 1.2em; }
.prose code { font-size: .92em; background: var(--night-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--cream); overflow-wrap: anywhere; }
.mail { display: inline-block; font: 700 22px var(--f-body); color: var(--sumi); text-decoration: none; border-bottom: 1px solid currentColor; margin: 4px 0 8px; overflow-wrap: anywhere; }
dl.sheet { display: grid; grid-template-columns: 180px 1fr; gap: 10px 24px; margin: 0; }
dl.sheet dt { color: var(--mist); font-size: 14px; }
dl.sheet dd { margin: 0; }
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.downloads a { display: block; text-decoration: none; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--night-2); }
.downloads a:hover { box-shadow: 0 0 0 1px var(--sumi); }
.downloads img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.downloads span { display: block; padding: 8px 12px; font-size: 13px; color: var(--mist); }
.downloads .logo img { object-fit: contain; padding: 18px; background: var(--night); }

.lost { min-height: 72vh; display: grid; place-items: center; text-align: center; padding-block: 48px; position: relative; isolation: isolate; overflow: hidden; }
.lost::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .28;
  background: url(../img/hero_leaving.jpg) center / cover; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
.lost .code { font: 700 120px/1 var(--f-title); color: var(--lantern); margin: 0; }
.lost h1 { font: 700 32px/1.2 var(--f-title); margin: 8px 0 10px; }
.lost p { color: var(--mist); margin: 0 auto 26px; max-width: 40ch; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 28px 34px; font-size: 14px; color: var(--mist); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; color: var(--cream); }
footer a:hover { color: var(--sumi); }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 28px; }
  .plat { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .nav { padding: 14px max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left)); }
  .nav ul { gap: 16px; font-size: 13px; }
  .nav ul .wide { display: none; }
  .hero { display: block; min-height: 0; }
  .hero .bg { position: relative; inset: auto; z-index: 0; width: 100%; aspect-ratio: 4 / 5;
    background-image: url(../img/hero_leaving_phone.jpg); background-position: 44% 20%; }
  .hero .bg::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--night) 0%, rgba(22, 19, 42, .88) 26%, rgba(22, 19, 42, 0) 58%),
                linear-gradient(180deg, rgba(22, 19, 42, .7) 0%, rgba(22, 19, 42, 0) 20%); }
  .hero .shade { display: none; }
  .hero .copy { position: relative; z-index: 1; margin-top: -150px; padding: 0 max(18px, env(safe-area-inset-right)) 36px max(18px, env(safe-area-inset-left)); }
  .title { font-size: 44px; }
  .tag { font-size: 17px; }
  .cta .btn { width: 100%; }
  .cta .btn.primary { order: -1; }
  section { padding-block: 48px; }
  h2 { font-size: 28px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts b { font-size: 32px; }
  .shots { grid-template-columns: 1fr; }
  .shot.big { grid-row: auto; }
  .shots-row { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 26px; }
  .page h1 { font-size: 34px; }
  dl.sheet { grid-template-columns: 1fr; gap: 2px; }
  dl.sheet dd { margin-bottom: 12px; }
  .downloads { grid-template-columns: 1fr; }
  .lost .code { font-size: 88px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
