/* Herkkulakko discovery-kutsusivu. Ei ulkoisia resursseja. */

:root {
  --bg: #f4efe6;
  --paper: #fffdf8;
  --ink: #1f1814;
  --muted: #4a3f35;
  --line: #d4c6b3;
  --focus: #3d2f6b;
  --notice-bg: #f6ead4;
  --notice-edge: #7a4a12;
  --cta-bg: #1f1814;
  --cta-fg: #fffdf8;
  --warning-bg: #f8e7d6;
  --warning-edge: #8a3b16;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", ui-serif, serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.125rem);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip:focus,
.skip:focus-visible {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 0.85rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  max-width: calc(100% - 1.5rem);
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-radius: 8px;
  text-decoration: none;
}

.page {
  position: relative;
  width: min(42rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.75rem 0 3.5rem;
}

header,
section,
footer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.2rem;
  margin: 0.85rem 0;
}

header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
}

.merkki {
  width: 3rem;
  height: 3rem;
  display: block;
}

.lede {
  grid-column: 1 / -1;
  margin: 0;
}

h1 {
  font-size: clamp(1.45rem, 1.15rem + 1.6vw, 2rem);
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

h2,
h3 {
  font-size: clamp(1.12rem, 1.05rem + 0.5vw, 1.28rem);
  line-height: 1.3;
  margin: 0 0 0.6rem;
}

h3 {
  font-size: 1.05rem;
}

p,
ul,
ol {
  margin: 0 0 0.85rem;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.35rem;
}

.muted {
  color: var(--muted);
}

a {
  color: var(--focus);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

.cta {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.7rem 1.15rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.cta:hover {
  text-decoration: underline;
  color: var(--cta-fg);
}

.cta-wrap {
  margin: 0.9rem 0 0;
}

.notice,
.warning {
  border-left: 4px solid var(--notice-edge);
  background: var(--notice-bg);
  padding: 0.75rem 0.9rem;
  border-radius: 0 10px 10px 0;
  margin: 0 0 0.9rem;
}

.warning {
  border-left-color: var(--warning-edge);
  background: var(--warning-bg);
  margin: 0.9rem 0;
}

.warning h2 {
  margin-bottom: 0.4rem;
}

footer {
  color: var(--muted);
  font-size: 0.98rem;
}

@media (max-width: 360px) {
  header {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .skip,
  .cta {
    display: none;
  }

  header,
  section,
  footer,
  .notice,
  .warning {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
    background: #fff;
  }
}
