/* SKO-676 landing v3 — shared by the fi/sv/en landing documents. */

/* SKO-676 landing v3 — one screen, the live map, and nothing to click but
   two links. Chrome recedes so the terrain is the page: no panels, no
   cards, no filled buttons. Colours stay the in-app forest palette. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ground:        #0d180f;
  --ink:           #f3efe4;
  --ink-soft:      #c0ccb8;
  --ink-faint:     #8b9a84;
  --amber:         #f2b544;
  --moss:          #90cf7d;
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --edge:          clamp(20px, 4.2vw, 56px);
  --font-body:     system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data:     ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--ground);
  color: var(--ink);
  line-height: 1.55;
  /* One screen, so nothing scrolls at normal heights — .screen is exactly the
     viewport. Below its min-height (landscape phones, split screen, large
     text) the body must scroll, or the headline and the only call to action
     would be clipped with no way to reach them. */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; -webkit-tap-highlight-color: transparent; }

a:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 4px;
}

/* ---------------------------------------------------------- the screen */

.screen {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
}

#demo-map,
.maplibregl-map,
.maplibregl-canvas-container,
.maplibregl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Terrain still shows through; the gradients only buy back legibility
   under the type and dissolve the frame edges into the page. */
.screen::before,
.screen::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}

.screen::before {
  top: 0;
  height: 20%;
  background: linear-gradient(180deg, rgba(13, 24, 15, 0.72), rgba(13, 24, 15, 0));
}

.screen::after {
  bottom: 0;
  height: 72%;
  background: linear-gradient(0deg, rgba(13, 24, 15, 0.94) 6%, rgba(13, 24, 15, 0.72) 34%, rgba(13, 24, 15, 0) 100%);
}

#demo-map { z-index: 0; opacity: 0; transition: opacity 700ms var(--ease); }
.screen.is-ready #demo-map { opacity: 1; }

/* Fallback ground for reduced motion / no WebGL: a quiet forest wash so the
   type still sits on something rather than on flat black. */
.screen.is-static {
  background:
    radial-gradient(120% 80% at 72% 8%, rgba(144, 207, 125, 0.10), transparent 62%),
    radial-gradient(90% 60% at 12% 92%, rgba(242, 181, 68, 0.08), transparent 60%),
    var(--ground);
}

/* ------------------------------------------------------------ top line */

.topline {
  position: absolute;
  z-index: 6;
  top: max(var(--edge), env(safe-area-inset-top));
  left: var(--edge);
  right: var(--edge);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark img { width: 30px; height: 30px; }
/* The domain is one flex item, not two: with `luontoretki` and `.fi` as
   separate children the 11px icon gap would land between them. The negative
   margin then closes the trailing space the letter-spacing adds. */
.wordmark b { font-weight: inherit; }
.wordmark em { margin-left: -0.13em; font-style: normal; color: var(--moss); }

.topline-right {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-mark { color: var(--amber); }

.demo-mark i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: breathe 2400ms var(--ease) infinite;
}

@keyframes breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* --------------------------------------------------- scene caption side */

/* The scene commentary shares the bottom band with the headline: left is
   what the product is, right is what the map is doing right now. Both sit
   in the same darkened air, so both stay readable over any terrain. */
.caption {
  position: absolute;
  z-index: 5;
  right: var(--edge);
  bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 34px);
  width: min(340px, 38vw);
  text-align: right;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.caption.is-changing { opacity: 0; transform: translateY(6px); }

.caption-kicker {
  margin-bottom: 10px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
}

.caption-line {
  font-size: clamp(14px, 1.25vw, 16px);
  color: var(--ink-soft);
  text-shadow: 0 1px 14px rgba(13, 24, 15, 0.9);
}

.legend {
  display: none;
  margin-top: 18px;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.legend.is-visible { display: flex; }

.demo-legend-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.demo-legend-row canvas,
.demo-legend-chip {
  width: 26px;
  height: 14px;
  border-radius: 2px;
}

.demo-legend-row b { font-weight: 500; }

.stats {
  margin-top: 16px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--moss);
  opacity: 0;
  transition: opacity 260ms var(--ease);
}

.stats.is-visible { opacity: 1; }

/* --------------------------------------------------------- the message */

.message {
  position: absolute;
  z-index: 6;
  left: var(--edge);
  right: var(--edge);
  bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 34px);
  max-width: min(52ch, 46vw);
}

.message h1 {
  font-size: clamp(38px, 6.2vw, 88px);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.message h1 span { display: block; white-space: nowrap; }
.message h1 span + span { color: var(--ink-soft); }

.lede {
  max-width: 30em;
  margin-top: clamp(16px, 1.8vw, 24px);
  font-size: clamp(15px, 1.35vw, 18px);
  color: var(--ink-soft);
  text-shadow: 0 1px 16px rgba(13, 24, 15, 0.85);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: clamp(20px, 2.4vw, 30px);
}

/* Links, not buttons: a hairline that lights up on hover, nothing filled. */
.links a {
  position: relative;
  padding-bottom: 6px;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.34;
  transition: opacity 220ms var(--ease);
}

.links a:hover::after { opacity: 1; }
.links a.is-primary { color: var(--amber); }

/* ------------------------------------------------------------- baseline */

.baseline {
  position: absolute;
  z-index: 6;
  left: var(--edge);
  right: var(--edge);
  bottom: max(calc(var(--edge) - 20px), env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.baseline nav { display: flex; gap: 18px; }
.sources-short { display: none; }
.baseline a { text-decoration: none; }
.baseline a:hover { color: var(--ink-soft); }

/* --------------------------------------------------------- map markers */

.demo-service {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(13, 24, 15, 0.95), 0 0 2px rgba(13, 24, 15, 0.95);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  pointer-events: none;
}

.demo-service.is-in { opacity: 1; transform: translateY(0); }
.demo-service i { font-style: normal; font-size: 15px; }

/* -------------------------------------------------------------- notice */

/* The food-safety notice is a full-screen interstitial, shown once per
   device before the map opens. Kept from the previous landing: same storage
   keys, same handoff, restyled to this page's language. */
.notice {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  align-content: center;
  padding: var(--edge);
  background: rgba(8, 14, 9, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms var(--ease), visibility 260ms var(--ease);
  overflow-y: auto;
}

.notice.visible { opacity: 1; visibility: visible; }

.notice-inner { max-width: 46em; margin: 0 auto; }

.notice h2 {
  margin-bottom: 22px;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.notice p { margin-bottom: 14px; color: var(--ink-soft); max-width: 44em; }
.notice p.warn { color: var(--amber); }
.notice p.small { font-family: var(--font-data); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase; }

.notice button {
  margin-top: 18px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--amber);
  font: inherit;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  cursor: pointer;
}

/* -------------------------------------------------------------- mobile */

@media (max-width: 860px) {
  /* Too narrow for two bottom columns: the commentary moves up under the
     wordmark and the headline keeps the bottom band to itself. */
  .caption {
    top: calc(max(var(--edge), env(safe-area-inset-top)) + 46px);
    bottom: auto;
    right: var(--edge);
    left: var(--edge);
    width: auto;
    text-align: left;
  }

  .legend { align-items: flex-start; }
  .message { max-width: none; }
  .topline-right .telemetry { display: none; }
}

@media (max-width: 600px) {
  .screen::after { height: 82%; }
  .message h1 { font-size: clamp(34px, 10vw, 52px); }
  .baseline { font-size: 8.5px; gap: 6px 14px; }
  .baseline nav { gap: 14px; }
  /* One line of provenance is all a phone has room for; the full list
     stays one tap away on the Tietolähteet page. */
  .sources-full { display: none; }
  .sources-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-mark i { animation: none; opacity: 1; }
  .caption, .stats, .demo-service, .links a::after { transition: none; }
}
/* ------------------------------------------------------------- languages */

.langs { display: flex; align-items: center; gap: 12px; }

.langs a {
  display: inline-flex;
  opacity: 0.55;
  transition: opacity 220ms var(--ease);
}

.langs a:hover { opacity: 1; }
.langs a[aria-current="true"] { opacity: 1; }

.langs svg {
  display: block;
  width: 20px;
  height: 13px;
  border-radius: 1px;
}

