/* Myulk presentation site. Colours from the Swedish farmland the game is
   about: meadow, spruce, falu red, rapeseed, grass and ploughed soil. */
:root {
  --page: #E4E9D8;      /* pale meadow */
  --panel: #EEF2E4;
  --ink: #1E2B1F;       /* spruce */
  --ink-soft: #46553F;
  --falu: #9B3A2C;      /* falu red */
  --falu-ink: #FFFFFF;
  --rape: #E3BE3F;
  --rape-dark: #C9A126;
  --grass: #6F8A43;
  --grass-dark: #5E7838;
  --meadow: #8FA45A;
  --pasture: #A9B86E;
  --soil: #7A5636;
  --soil-dark: #654529;
  --road: #D8CBA4;
  --roof: #3C3A36;
  --house: #E9E2CF;
  --tree: #3F5A2C;
  --rule: #C3CCB0;
  --measure: 36rem;
  --display: "Young Serif", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #172118;
    --panel: #1D2A1E;
    --ink: #E1E7D3;
    --ink-soft: #AEBA9E;
    --falu: #C8604D;
    --falu-ink: #FFF7F2;
    --rule: #33432F;
    --road: #A99C78;
    --house: #CFC7B2;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

/* one language at a time */
html[data-lang="sv"] [lang="en"],
html[data-lang="en"] [lang="sv"] { display: none !important; }

a { color: var(--falu); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--rape); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--panel); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; margin-bottom: 0.35rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }

/* ---- top bar ---- */
.top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.brand { font-family: var(--display); font-size: 1.5rem; color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.top nav a:hover { color: var(--falu); }
.lang {
  font: 600 0.9rem var(--body);
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}
.lang:hover { border-color: var(--falu); color: var(--falu); }

/* ---- hero: the title beside the open landscape ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 2rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.hero h1 {
  font-size: clamp(4.5rem, 13vw, 9.5rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
}
.subtitle {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  color: var(--ink-soft);
  margin: 0.6rem 0 1.75rem;
}
.lead { font-size: 1.2rem; max-width: 30rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.button {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  background: var(--falu);
  color: var(--falu-ink);
  padding: 0.75rem 1.3rem;
  border-radius: 6px;
}
.button:hover { filter: brightness(1.08); }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.button.quiet:hover { color: var(--falu); box-shadow: inset 0 0 0 1.5px var(--falu); }

.land { margin: 0; }
.land svg { display: block; width: 100%; height: auto; overflow: visible; }
.fields path { stroke: var(--page); stroke-width: 5; stroke-linejoin: round; }
.road { stroke: var(--road); stroke-width: 9; stroke-linecap: round; }
.trees circle { fill: var(--tree); }

/* the one moment of motion: the fields are laid out one after another */
@media (prefers-reduced-motion: no-preference) {
  .fields path {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: field 700ms cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: calc(var(--i) * 90ms);
  }
  .road, .trees, .farm { opacity: 0; animation: appear 600ms ease-out 900ms forwards; }
}
@keyframes field { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes appear { to { opacity: 1; } }

/* ---- content bands: heading on the left, text on the right ---- */
.band {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 2fr);
  gap: 1.5rem 3rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  border-top: 1.5px solid var(--rule);
}
.col-head .note { margin-top: 1rem; }
.note { color: var(--ink-soft); font-size: 0.97rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 15rem));
  gap: 1rem 2rem;
  margin: 2rem 0 0;
  max-width: var(--measure);
}
.facts div { border-left: 3px solid var(--rape); padding-left: 0.8rem; }
.facts dt { color: var(--ink-soft); font-size: 0.9rem; }
.facts dd { margin: 0.1rem 0 0; font-weight: 600; }

.features { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.features li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.features li:last-child { border-bottom: 0; }
.features strong { font-weight: 600; }

/* ---- screenshots ---- */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1.5px solid var(--rule);
  background: #000;
}
.shots figcaption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink-soft); }

/* ---- the recompilation as a road from the CD to the game ---- */
.pipeline { list-style: none; margin: 2rem 0; padding: 0; max-width: var(--measure); }
.pipeline li { position: relative; padding: 0 0 1.4rem 2.4rem; }
.pipeline li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--page);
  box-shadow: inset 0 0 0 3px var(--grass);
}
.pipeline li::after {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 1.4rem;
  bottom: 0.1rem;
  width: 3px;
  background: var(--road);
}
.pipeline li:last-child { padding-bottom: 0; }
.pipeline li:last-child::after { display: none; }
.pipeline li:last-child::before { background: var(--falu); box-shadow: none; }
.pipeline .step { display: block; font-weight: 600; }
.pipeline .detail { display: block; color: var(--ink-soft); font-size: 0.95rem; }

.steps { list-style: none; counter-reset: step; margin: 0 0 2rem; padding: 0; max-width: var(--measure); }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--falu-ink);
  background: var(--falu);
  border-radius: 50%;
}
.steps p { margin: 0; }

/* ---- footer ---- */
.foot {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1.5px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1rem; }
  .land { order: -1; max-width: 32rem; }
  .band { grid-template-columns: 1fr; padding: 2.75rem 1.5rem; }
  .shots { grid-template-columns: 1fr; max-width: 34rem; }
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 0.75rem 1rem; padding: 1rem; }
  .top nav { order: 3; width: 100%; margin-left: 0; gap: 1rem; }
  .lang { margin-left: auto; }
  .hero, .band, .shots, .foot { padding-left: 1rem; padding-right: 1rem; }
}
