/* Little Logistics site. Colors mirror game/view/ui_style.gd; the chunky lipped buttons mirror GameButton. */
@font-face {
  font-family: "Baloo 2";
  src: url("/fonts/Baloo2.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #1f2147;
  --bg-low: #21485a;
  --panel: #2c2f62;
  --panel-lip: #1c1e45;
  --card: #343877;
  --line: #4c519a;
  --cream: #fff6e6;
  --muted: #bdb8e8;
  --faint: #8783bf;
  --ink: #171a3d;
  --sun: #ffc23d;
  --sun-lip: #dc9426;
  --coral: #ff7a6b;
  --coral-lip: #d9524a;
  --sage: #5fcf96;
  --blue: #22a8ff;
  --yard: #f6ecd8;
  --radius: 26px;
  --ease: cubic-bezier(.2, .9, .3, 1.2);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 640px at 85% -10%, rgba(255, 194, 61, .16), transparent 60%),
    radial-gradient(900px 620px at -10% 35%, rgba(255, 122, 107, .14), transparent 60%),
    radial-gradient(1000px 700px at 110% 85%, rgba(34, 168, 255, .12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #1a1c3d 100%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sun); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 12px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 14px; border-radius: 12px; z-index: 50; font-weight: 800; }
.skip:focus { left: 8px; }

h1, h2, h3 { line-height: 1.05; margin: 0 0 .45em; text-wrap: balance; font-weight: 800; }
h1 { font-size: clamp(2.7rem, 7.4vw, 5.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4.8vw, 3.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

main, .top, .foot { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Crates drifting in the night sky. */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.sky img {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); opacity: .16;
  animation: drift var(--d) ease-in-out var(--delay) infinite alternate;
}
@keyframes drift {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(31, 33, 71, .94) 60%, rgba(31, 33, 71, 0));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-size: 1.35rem; font-weight: 800; }
.brand img { border-radius: 12px; box-shadow: 0 3px 0 var(--panel-lip); }
.brand b { color: var(--sun); }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { color: var(--muted); font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 12px; }
.top nav a:hover { color: var(--cream); background: rgba(255, 255, 255, .06); }
.top nav .lang { color: var(--cream); border: 2px solid var(--line); }

.kicker { color: var(--sun); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; margin-bottom: .6em; }
.lead { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 40ch; }
.note { color: var(--faint); font-size: .95rem; margin-top: 14px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 6vw, 80px) 0 clamp(40px, 7vw, 96px);
}
.hero h1 span { color: var(--sun); }
.hero-art { position: relative; justify-self: center; width: min(340px, 78vw); }
.hero-art .phone { transform: rotate(3deg); }
.mascot {
  position: absolute; width: 46%; left: -26%; bottom: -6%;
  filter: drop-shadow(0 14px 18px rgba(8, 8, 30, .5));
  animation: bob 4.5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }

.phone {
  margin: 0; padding: 10px; border-radius: 36px;
  background: linear-gradient(160deg, #3b3f86, #23255a);
  border: 3px solid var(--ink);
  box-shadow: 0 8px 0 var(--panel-lip), 0 24px 50px rgba(5, 5, 25, .55);
}
.phone img { border-radius: 26px; width: 100%; }

/* Store badges, shaped like the game's chunky buttons */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 20px 8px 16px;
  border-radius: 18px; border: 3px solid var(--ink); background: var(--panel); color: var(--cream);
  box-shadow: 0 5px 0 var(--panel-lip);
}
.store svg { width: 28px; height: 28px; flex: none; }
.store > span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 800; font-size: 1.2rem; }
.store small { font-weight: 700; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
a.store { text-decoration: none; transition: transform .08s, box-shadow .08s; }
a.store:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--panel-lip); }
.store[aria-disabled="true"] { opacity: .85; }

/* Sections */
.band { padding: clamp(48px, 8vw, 104px) 0 0; }
.card {
  background: linear-gradient(180deg, var(--card), var(--panel));
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--panel-lip);
  padding: 22px;
}
.card p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps .card { position: relative; padding-top: 28px; }
.steps img { width: 78px; margin-bottom: 14px; filter: drop-shadow(0 6px 6px rgba(8, 8, 30, .4)); }
.num {
  position: absolute; top: -16px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem;
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--sun-lip);
}
.tip {
  margin-top: 24px; padding: 18px 22px; border-radius: 20px; max-width: 70ch;
  background: rgba(255, 194, 61, .1); border: 2px dashed rgba(255, 194, 61, .45); color: var(--cream);
}

.districts { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.districts li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px;
  background: var(--yard); color: var(--ink); font-weight: 800; border: 3px solid var(--ink); box-shadow: 0 4px 0 #d9c19b;
}
.districts span { background: var(--ink); color: var(--sun); border-radius: 999px; padding: 0 8px; font-size: .85rem; }
.mechanics { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mechanics .card { display: flex; gap: 16px; align-items: center; }
.mechanics img { width: 56px; flex: none; filter: drop-shadow(0 5px 5px rgba(8, 8, 30, .4)); }
.mechanics h3 { margin-bottom: .2em; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(240px, 62vw); gap: 18px;
  overflow-x: auto; padding: 18px 4px 22px; margin-top: 10px; scroll-snap-type: x mandatory;
}
.shots .phone { scroll-snap-align: start; padding: 7px; border-radius: 28px; }
.shots .phone img { border-radius: 21px; }

.extras { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px;
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--sun-lip);
}
.extras li:nth-child(2) .icon { background: var(--blue); box-shadow: 0 4px 0 #1478c4; }
.extras li:nth-child(3) .icon { background: var(--coral); box-shadow: 0 4px 0 var(--coral-lip); }
.extras li:nth-child(4) .icon { background: var(--sage); box-shadow: 0 4px 0 #33a571; }
.icon svg { width: 28px; height: 28px; }

.cta {
  margin-top: clamp(56px, 9vw, 112px); padding: clamp(32px, 6vw, 64px) 24px; text-align: center;
  border-radius: 36px; border: 3px solid var(--ink);
  background: linear-gradient(160deg, var(--sun), #ffa53d);
  color: var(--ink); box-shadow: 0 8px 0 var(--sun-lip);
  display: grid; justify-items: center;
}
.cta img { width: 80px; margin-bottom: 8px; }
.cta p { font-size: 1.2rem; font-weight: 600; }
.cta .store { background: var(--ink); border-color: var(--ink); box-shadow: 0 5px 0 #0b0c22; }

.foot { padding: 72px 0 48px; color: var(--muted); display: grid; gap: 18px; justify-items: center; text-align: center; }
.foot-brand { display: flex; gap: 12px; align-items: center; text-align: left; }
.foot-brand img { border-radius: 12px; }
.foot-brand strong { display: block; color: var(--cream); font-size: 1.25rem; }
.foot nav { display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap; }
.foot a { color: var(--muted); font-weight: 700; text-decoration: none; }
.foot a:hover { color: var(--cream); text-decoration: underline; }
.foot p { margin: 0; font-size: .92rem; }

/* Documents */
.doc { max-width: 760px; padding: 40px 0 0; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.doc h2 { margin-top: 1.6em; font-size: 1.5rem; }
.doc h3 { margin-top: 1.3em; font-size: 1.2rem; }
.doc p, .doc li { color: var(--muted); }
.doc .updated { color: var(--faint); }
.lost { display: grid; justify-items: center; text-align: center; padding: 40px 0; }
.lost img { width: 90px; margin-bottom: 12px; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 18px; font-weight: 800; text-decoration: none;
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--sun-lip);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { width: min(300px, 70vw); margin-top: 12px; }
  .mascot { left: auto; right: -18%; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky img, .mascot { animation: none; }
}
