/* Lumis — the page is a cross-section of the planet: sky, surface, layers, core.
   Flat colors with hard steps, like the game's stepped lighting. No soft gradients. */

:root {
  --night: #0b1026;
  --ink: #120f2a;
  --cream: #fff3e0;
  --muted: #c9c2e6;
  --sand: #f1e2c2;
  --sand-ink: #241b3a;
  --sand-muted: #5b4d6b;
  --orange: #ff8a3d;
  --orange-deep: #c4561c;
  --green: #6fdc8c;
  --grass: #3b8a55;
  --violet: #a78bfa;
  --violet-deep: #7b5cc4;
  --air: #6cc8ff;
  --graphite: #2a2d3a;
  --ground: #16303a;
  --deep: #0f0b20;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --chamfer: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--cream);
  background: var(--night);
}

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1;
}

h3 { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.15; }

.lead {
  margin: 0 0 28px;
  max-width: 56ch;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted);
}

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

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: var(--night);
  border-bottom: 3px solid #050817;
}

.brand {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--orange);
  text-decoration: none;
}

.nav { display: flex; gap: 20px; margin-left: auto; }

.nav a {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover { color: var(--cream); }

.lang { display: flex; gap: 2px; }

.lang button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 6px 7px 3px;
  cursor: pointer;
}

.lang button:hover { color: var(--cream); }

.lang button[aria-pressed="true"] { color: var(--cream); border-bottom-color: var(--orange); }

@media (max-width: 560px) {
  body[data-page="index"] .nav { display: none; }
  .lang { margin-left: auto; }
  body[data-page="devlog"] .nav a { font-size: 0.85rem; }
  body[data-page="devlog"] .lang { margin-left: 0; }
}

main { flex: 1; width: 100%; }

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

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: min(230px, 100%);
  padding: 14px 26px 17px;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  clip-path: var(--chamfer);
  transition: transform 0.1s;
}

.btn small {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.8;
}

.btn-primary {
  background: var(--orange);
  color: #2a1204;
  box-shadow: inset 0 -5px 0 var(--orange-deep);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 var(--orange-deep); }

.btn-secondary {
  background: var(--graphite);
  color: var(--cream);
  box-shadow: inset 0 -5px 0 #191b24;
}

.btn-secondary:not(.is-disabled):hover { background: #363a4a; }

.btn.is-disabled { cursor: default; color: #9a97ad; }

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

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  /* stepped sky */
  background: linear-gradient(180deg,
    #0b1026 0 26%, #14173a 26% 40%, #221d4f 40% 52%,
    #3a2762 52% 62%, #5c3270 62% 70%, #8a3f72 70% 77%, #b8546f 77% 83%, #e0735f 83% 100%);
}

.hero-scene { position: absolute; inset: 0; }

.scene,
.hero-scene .media {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.hero-scene .media { object-fit: cover; opacity: 0.6; }
.hero.has-media .scene { display: none; }

.beacon { animation: blink 2.2s steps(2, jump-none) infinite; }
.beacon-glow { animation: pulse 2.2s ease-in-out infinite; transform-origin: 1080px 580px; }

@keyframes blink { 50% { opacity: 0.3; } }
@keyframes pulse { 50% { transform: scale(1.6); opacity: 0.08; } }

.hero-copy {
  position: relative;
  width: 100%;
  padding: clamp(48px, 10vh, 110px) 20px 260px;
}

.logo {
  margin: 0;
  font-size: clamp(5rem, 19vw, 10rem);
  line-height: 0.9;
  color: var(--cream);
  text-shadow: 0 0.05em 0 var(--orange), 0 0.1em 0 var(--orange-deep), 0 0.16em 0 #1a1240;
}

.pitch {
  margin: 28px auto 0;
  max-width: 30ch;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.platforms {
  margin: 22px 0 0;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
}

.platforms i { font-style: normal; color: var(--orange); margin: 0 6px; }

/* ---------- Ground: what is Lumis ---------- */

.ground {
  background: var(--ground);
  padding: 40px 0 100px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.facts { list-style: none; padding: 0; margin: 0; }

.facts li {
  padding: 10px 0 10px 26px;
  border-top: 2px dashed rgba(255, 243, 224, 0.18);
  position: relative;
  font-weight: 700;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 10px;
  height: 10px;
  background: var(--green);
  transform: rotate(45deg);
}

.clips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 18px;
}

.clips .shot:nth-child(even) { margin-top: 28px; }

@media (max-width: 480px) {
  .clips { grid-template-columns: 1fr; }
  .clips .shot:nth-child(even) { margin-top: 0; }
}

.shot { margin: 0; }

.shot-art {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  overflow: hidden;
  border: 3px solid var(--night);
  box-shadow: 6px 6px 0 var(--night);
}

/* Real screenshots and clips sit on top of the placeholder art */
.shot-art .media {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot.has-media figcaption small { display: none; }

.shot figcaption {
  display: flex;
  flex-direction: column;
  padding: 12px 2px 0;
  font-family: var(--display);
  font-size: 1.15rem;
}

.shot figcaption small {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

/* Placeholder art in hard-stepped bands, until real captures arrive */
.art-dig     { background: linear-gradient(180deg, #5c3270 0 30%, #8a3f72 30% 48%, #b8546f 48% 58%, #5a3d26 58% 74%, #3b2a1c 74%); }
.art-dig::after { content: ""; position: absolute; left: 38%; top: 56%; width: 24%; height: 44%; background: #1a1210; clip-path: polygon(10% 0, 90% 0, 70% 100%, 30% 100%); }
.art-plug    { background: linear-gradient(180deg, #1d2a3a 0 55%, #2a2d3a 55% 70%, #1d2a3a 70%); }
.art-plug::after { content: ""; position: absolute; left: 54%; top: 49%; width: 16%; aspect-ratio: 1; background: var(--orange); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.art-holo    { background: radial-gradient(circle at 50% 30%, var(--air) 0 6%, transparent 6.5%), radial-gradient(circle at 30% 68%, var(--violet) 0 6%, transparent 6.5%), radial-gradient(circle at 70% 68%, var(--green) 0 6%, transparent 6.5%), linear-gradient(180deg, #0f1a33 0 60%, #13203d 60%); }
.art-curve   { background: radial-gradient(ellipse 150% 90% at 50% 150%, #2e6b5e 0 56%, #4fae78 56% 60%, #6cc8ff 60% 61.5%, transparent 62%), linear-gradient(180deg, #0b1026 0 40%, #14173a 40% 65%, #221d4f 65%); }
.art-sunset  { background: radial-gradient(circle at 68% 64%, #ffd18a 0 8%, transparent 8.5%), linear-gradient(180deg, #221d4f 0 30%, #5c3270 30% 46%, #b8546f 46% 60%, #e0735f 60% 72%, #2e6b5e 72% 84%, #1d3a40 84%); }
.art-cave    { background: radial-gradient(circle at 25% 78%, var(--green) 0 4%, transparent 4.5%), radial-gradient(circle at 72% 84%, var(--air) 0 3%, transparent 3.5%), linear-gradient(180deg, #090c12 0 20%, #142428 20% 80%, #1e2c2c 80%); }
.art-crystal { background: linear-gradient(180deg, #120a24 0 50%, #1d0f3a 50%); }
.art-crystal::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #c4aaff 0 50%, #7b5cc4 50%); clip-path: polygon(30% 100%, 45% 10%, 58% 100%, 62% 100%, 72% 40%, 80% 100%); }
.art-night   { background: radial-gradient(circle at 80% 26%, var(--cream) 0 6%, transparent 6.5%), linear-gradient(180deg, #050816 0 70%, #1b3446 70%); }
.art-storm   { background: linear-gradient(180deg, #8a5a3a 0 22%, #a8704a 22% 46%, #c48a5a 46% 68%, #5a3c2a 68%); }

/* ---------- Jagged edges between bands ---------- */

.edge {
  position: absolute;
  left: 0;
  width: 100%;
  height: 48px;
  display: block;
}

.edge-top { top: -47px; }

/* ---------- Sand: why Lumis ---------- */

.sand {
  position: relative;
  padding: 72px 0 110px;
  background: var(--sand);
  color: var(--sand-ink);
}

.sand .edge { fill: var(--sand); }

.hooks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px 48px;
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  counter-reset: hook;
}

.hooks li {
  position: relative;
  padding-top: 18px;
  border-top: 4px solid var(--sand-ink);
  counter-increment: hook;
}

.hooks li::after {
  content: "0" counter(hook);
  position: absolute;
  top: 14px;
  right: 0;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--orange-deep);
}

.hooks p { margin: 0; line-height: 1.6; color: var(--sand-muted); }

.icon {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--sand-ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- The descent ---------- */

.layer { position: relative; padding: 72px 0 120px; }

.layer > .wrap { position: relative; z-index: 1; }

.stratum { max-width: 520px; }

.stratum p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.65;
  font-weight: 700;
}

.depth {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px 5px;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--night);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.layer-surface {
  padding-bottom: 150px;
  background: linear-gradient(180deg,
    #221d4f 0 22%, #3a2762 22% 40%, #5c3270 40% 56%, #8a3f72 56% 70%, #b8546f 70% 82%, #e0735f 82% 100%);
}

.layer-surface .edge { fill: #221d4f; }
.layer-surface .depth { background: var(--orange); }

.grass {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 40px;
  fill: var(--grass);
}

.layer-one {
  padding-bottom: 160px;
  overflow: hidden;
  background: linear-gradient(180deg,
    var(--grass) 0 12px, #5a3d26 12px 70px, #3b2a1c 70px 34%, #2a2320 34% 62%, #1d2422 62% 82%, #142428 82%);
}

.layer-one .depth { background: var(--green); }
.layer-one .stratum { padding-top: 40px; }

.ores {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fungi {
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  pointer-events: none;
}

.fungi i {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 26px;
  background: var(--green);
  clip-path: polygon(50% 0, 100% 40%, 70% 40%, 70% 100%, 30% 100%, 30% 40%, 0 40%);
  filter: drop-shadow(0 0 10px rgba(111, 220, 140, 0.9));
  animation: glow 4s steps(3, jump-none) infinite;
}

.fungi i:nth-child(1) { left: 6%;  height: 20px; }
.fungi i:nth-child(2) { left: 9%;  height: 32px; animation-delay: -1s; background: var(--air); }
.fungi i:nth-child(3) { left: 34%; animation-delay: -2s; }
.fungi i:nth-child(4) { left: 58%; height: 18px; animation-delay: -0.5s; }
.fungi i:nth-child(5) { left: 61%; height: 34px; animation-delay: -3s; background: var(--air); }
.fungi i:nth-child(6) { left: 82%; animation-delay: -1.5s; }
.fungi i:nth-child(7) { left: 92%; height: 22px; animation-delay: -2.5s; }

@keyframes glow { 50% { opacity: 0.5; } }

.shell {
  padding: 26px 0;
  background: repeating-linear-gradient(135deg, var(--graphite) 0 16px, #20222c 16px 32px);
  border-block: 4px solid #3a3e4f;
  font-weight: 800;
  text-align: center;
}

.shell p { margin-block: 0; }

.layer-two {
  padding-bottom: 200px;
  overflow: hidden;
  background: linear-gradient(180deg, #1d0f3a 0 40%, #170c30 40% 75%, #120a26 75%);
}

.layer-two .depth { background: var(--violet); }

.crystals {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
}

/* ---------- Deep: plan, gallery, devlog ---------- */

.deep { background: var(--deep); padding: 80px 0; }

.deep + .deep { padding-top: 20px; }

.plan-board {
  padding: 36px clamp(20px, 4vw, 44px);
  background: #17122e;
  border-left: 6px solid var(--orange);
}

.plan {
  columns: 2 300px;
  column-gap: 40px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan li {
  break-inside: avoid;
  position: relative;
  padding: 10px 0 10px 30px;
  line-height: 1.5;
  font-weight: 700;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--orange);
}

.note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 2px dashed rgba(255, 243, 224, 0.18);
  color: var(--muted);
  line-height: 1.6;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
  margin-top: 28px;
}

.gallery .shot:first-child { grid-column: span 2; grid-row: span 2; }
.gallery .shot:first-child .shot-art { aspect-ratio: auto; height: calc(100% - 30px); min-height: 220px; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .shot:first-child { grid-row: auto; }
  .gallery .shot:first-child .shot-art { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
}

.log { list-style: none; padding: 0; margin: 0; }

.log a {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 2px dashed rgba(255, 243, 224, 0.18);
  text-decoration: none;
}

.log li:last-child a { border-bottom: 2px dashed rgba(255, 243, 224, 0.18); }

.log a:hover b { color: var(--orange); }

.log time { font-family: var(--display); font-size: 1.15rem; color: var(--orange); }

.log b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.log a > span > span { color: var(--muted); line-height: 1.55; }

.more { margin: 32px 0 0; }

/* ---------- Core: about ---------- */

.core {
  padding: 90px 0;
  background: linear-gradient(180deg, var(--deep) 0 30%, #1c0e1c 30% 60%, #2a1218 60%);
}

.about {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
  .core-planet { width: 140px; }
}

.core-planet {
  width: 200px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    #ffd18a 0 22%, var(--orange) 22% 42%, var(--orange-deep) 42% 62%, #5a2a1c 62% 82%, #2a1218 82%);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 0;
}

.text-link { font-weight: 800; color: var(--orange); }

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

.footer {
  text-align: center;
  padding: 28px 16px 36px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  background: #120a10;
}

.footer p { margin: 4px 0; }

.footer a:hover { color: var(--orange); }

.copy { opacity: 0.7; }

/* ---------- Devlog page ---------- */

.devlog {
  padding: 60px 0 90px;
  background: var(--deep);
}

.devlog .wrap { max-width: 780px; }

.devlog-head h1 {
  margin: 0 0 14px;
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 1;
}

.kicker {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--orange);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 56px;
  border-top: 4px solid var(--orange);
}

.stats li {
  display: flex;
  flex-direction: column;
  padding: 14px 4px;
  border-bottom: 2px dashed rgba(255, 243, 224, 0.18);
}

.stats b { font-family: var(--display); font-weight: 400; font-size: 2rem; }
.stats span { font-size: 0.9rem; font-weight: 700; color: var(--muted); }

.entry {
  position: relative;
  padding: 0 0 40px 30px;
  border-left: 4px solid var(--graphite);
}

.entry::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--orange);
  transform: rotate(45deg);
}

.entry time {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  color: var(--orange);
}

.entry h2 { font-size: 1.9rem; margin-bottom: 10px; }

.entry p { margin: 0; line-height: 1.75; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beacon, .beacon-glow, .fungi i { animation: none; }
}
