/* Errandwood website. One page, no build step.
   The palette is the game's own (scripts/ui_palette.gd): ink on parchment in a
   wooden frame, with the panels drawn from the same Kenney textures. */

:root {
  --parchment: #fff0d5;
  --frame: #784d2e;
  --ink: #3d2a1e;
  --ink-dim: #755c48;
  --accent: #b06113;     /* burnt amber, the system's voice in game */
  --speaker: #2e6094;    /* deep blue, the player */
  --sky: #a9cbee;
  --meadow: #7c9655;
  --page: #f3ead8;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 1120px;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(var(--sky), var(--page) 70vh) no-repeat, var(--page);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--speaker); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--accent); font-weight: 650; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }

kbd, code, pre {
  font-family: Menlo, Monaco, "SF Mono", Consolas, monospace;
  font-size: 0.88em;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  margin: 0 0.1em;
  text-align: center;
  background: #fff8ea;
  border: 1px solid var(--frame);
  border-bottom-width: 2px;
  border-radius: 4px;
}

/* -- the game's panels, 9-sliced from its own texture ------------------- */

.panel {
  background: var(--parchment);
  border: 14px solid transparent;
  border-image: url("ui/panel_brown.png") 12 fill / 14px round;
  padding: clamp(14px, 2.5vw, 26px);
  image-rendering: auto;
}

.button {
  display: inline-block;
  padding: 0.55em 1.3em;
  border: 10px solid transparent;
  border-image: url("ui/button_brown.png") 8 fill / 10px stretch;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.12s;
}
.button:hover { filter: brightness(1.06) sepia(0.15); }
/* itch.io's own red, by way of the game's red button. */
.button.itch {
  border-image-source: url("ui/button_red.png");
  color: #fff4e6;
  text-shadow: 0 1px 0 rgba(90, 30, 20, 0.5);
}
.button:active { filter: brightness(0.9); }

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

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.hero-text {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: var(--measure);
  padding: 0 var(--gutter) clamp(28px, 6vh, 64px);
}

.hero-text > * { max-width: 40rem; }

.wordmark {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.3em 1.6em 0.45em;
  background: url("ui/banner_hanging.png") center / 100% 100% no-repeat;
  color: var(--parchment);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(90, 30, 20, 0.6);
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 750;
  color: #fffaf0;
  text-shadow: 0 2px 18px rgba(30, 40, 20, 0.55), 0 1px 2px rgba(30, 40, 20, 0.6);
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: #fffaf0;
  text-shadow: 0 1px 10px rgba(30, 40, 20, 0.7), 0 1px 2px rgba(30, 40, 20, 0.6);
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; }
.actions .link { color: #fffaf0; font-weight: 600; text-shadow: 0 1px 6px rgba(30, 40, 20, 0.8); }

/* -- sections ------------------------------------------------------------------ */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) var(--gutter);
  display: grid;
  /* minmax(0, ...) so a long line in a <pre> scrolls inside its box instead
     of widening the grid, and with it every section, past a phone's width. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 7vw, 88px);
}

.feature {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}
.feature.reverse { grid-template-columns: 1fr 1.55fr; }
.feature.reverse .shot { order: 2; }

.shot { margin: 0; }
.shot img {
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(120, 77, 46, 0.4), 0 12px 32px rgba(61, 42, 30, 0.22);
}

.copy { position: relative; }

.modes { margin: 0; }
.modes dt { font-weight: 650; color: var(--ink); margin-top: 0.6em; }
.modes dd { margin: 0; color: var(--ink-dim); }

.why h2 { text-align: center; }
.why .intro {
  max-width: 44rem;
  margin: 0 auto 0.4rem;
  text-align: center;
  font-size: 1.08rem;
}

/* One card holding the whole summary as a bulleted list. */
.features { max-width: 46rem; justify-self: center; width: 100%; }
.features h2 { text-align: left; }
.features ul { margin: 0; padding-left: 1.2em; }
.features li { margin-bottom: 0.7em; color: var(--ink-dim); }
.features li:last-child { margin-bottom: 0; }
.features li strong { color: var(--ink); }
.soon {
  white-space: nowrap;
  margin-right: 0.2em;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--parchment);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

.download .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.platforms { margin: 0; }
.platforms dt { font-weight: 650; margin-top: 0.8em; }
.platforms dd { margin: 0.2em 0 0; }
.platforms pre { margin: 0.5em 0 0; }
.cards {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 24px);
}
.cards p { margin: 0; color: var(--ink-dim); }

.download { max-width: 46rem; justify-self: center; width: 100%; }
.download ul { padding-left: 1.2em; }
.download li { margin-bottom: 0.4em; }
.download h3 { margin-top: 1.2em; }
.download pre {
  overflow-x: auto;
  padding: 0.8em 1em;
  background: #f7e6c6;
  border-radius: 4px;
  border: 1px solid rgba(120, 77, 46, 0.35);
}

.controls { max-width: 46rem; justify-self: center; width: 100%; }
.controls dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5em 1.4em;
  margin: 0;
}
.controls dt { white-space: nowrap; }
.controls dd { margin: 0; color: var(--ink-dim); }

footer {
  padding: 28px var(--gutter) 40px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-dim);
  background: linear-gradient(transparent, rgba(124, 150, 85, 0.25));
}

/* -- narrow screens ------------------------------------------------------------- */

@media (max-width: 820px) {
  .feature, .feature.reverse { grid-template-columns: minmax(0, 1fr); }
  .feature.reverse .shot { order: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: min(88vh, 760px); }
  .controls dl { grid-template-columns: 1fr; gap: 0.1em; }
  .controls dd { margin-bottom: 0.6em; }
}
