/* kaavadata.fi. Tokens from the Kaavadata brand v0.2 (kaava-decoder, brand/kaavadata.css): light only, no gradients,
   thin borders, plenty of whitespace, Source Sans 3 throughout. The plan and its data carry the visual richness.
   Three type levels: the headline (h1), the secondary style (.secondary), the body (with .muted for captions). */

:root {
  /* Brand */
  --kd-forest: #183f35;
  --kd-moss:   #8fa37b;
  --kd-blue:   #5d91ad;
  --kd-sky:    #a9c7d8;
  --kd-clay:   #d86f3f;
  --kd-sand:   #f3eee4;

  /* UI neutrals */
  --kd-bg:     #f8f8f5;
  --kd-panel:  #ffffff;
  --kd-text:   #202b27;
  --kd-muted:  #68736e;
  --kd-border: #d8ded9;

  /* Shape */
  --kd-radius-sm: 6px;
  --kd-radius:    10px;
  --kd-radius-lg: 14px;

  /* Typography */
  --kd-font: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Page */
  --page: 1120px;
  --gutter: 24px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--kd-bg);
  color: var(--kd-text);
  font-family: var(--kd-font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure {
  margin: 0;
}

/* 1. the headline */
h1 {
  max-width: 15em;
  color: var(--kd-forest);
  font-size: clamp(36px, 5.2vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* 2. the secondary style: emphasis, the section heading, the wordmark */
.secondary {
  color: var(--kd-forest);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* 3. the body; captions in the muted colour */
.muted {
  color: var(--kd-muted);
}

a {
  color: var(--kd-forest);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--kd-blue);
}

a:focus-visible {
  outline: 2px solid var(--kd-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.nowrap {
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark svg {
  flex: none;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--kd-border);
  border-radius: var(--kd-radius);
  background: var(--kd-panel);
  color: var(--kd-text);
  text-decoration: none;
}

.button:hover {
  background: var(--kd-sand);
}

/* Hero */

.hero {
  padding-top: 72px;
  padding-bottom: 40px;
}

.hero p {
  max-width: 40em;
}

.hero h1 + p {
  margin-top: 28px;
}

.hero p + p {
  margin-top: 12px;
}

.hero p.secondary {
  margin-top: 28px;
}

/* Screenshot */

.shot a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--kd-border);
  border-radius: var(--kd-radius-lg);
  background: var(--kd-panel);
  box-shadow: 0 1px 2px rgb(24 63 53 / 0.04), 0 24px 48px -28px rgb(24 63 53 / 0.28);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  max-width: 44em;
  margin-top: 14px;
}

/* Ryhti */

.ryhti {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 12px 48px;
  margin-top: 88px;
  padding: 32px 0;
  border-top: 1px solid var(--kd-border);
  border-bottom: 1px solid var(--kd-border);
}

/* Footer */

.site-footer {
  padding: 32px 0 64px;
}

/* Phone */

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 17px;
  }

  .secondary {
    font-size: 20px;
  }

  .site-header .wrap {
    min-height: 64px;
  }

  .wordmark svg {
    width: 24px;
    height: 24px;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .hero h1 + p {
    margin-top: 20px;
  }

  .hero p.secondary {
    margin-top: 24px;
  }

  .ryhti {
    grid-template-columns: 1fr;
    margin-top: 56px;
    padding: 24px 0;
  }

  .site-footer {
    padding: 24px 0 48px;
  }
}
