/* Enarra Oy's company site (enarra.fi; docs/architecture/enarra-site.md). Every colour comes from
   tarumo-tokens.css (Pohjoinen puu), light and dark by the device's setting; no colour literals here
   (src/test/enarra-site.test.ts checks). Fonts are self-hosted (SIL OFL, see fonts/). No script at
   all: the phone menu is a native popover, and a browser without the popover API shows the menu as a
   list in the header. */

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-latin-400-normal.woff2?v=3d6a8c01c6') format('woff2');
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-latin-500-normal.woff2?v=490e3a95d2') format('woff2');
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-latin-600-normal.woff2?v=4becdcd6d1') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-latin-400-normal.woff2?v=e66067814f') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-latin-400-italic.woff2?v=fa9b900403') format('woff2');
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.25rem, 1.45rem + 3.2vw, 3.5rem);
  line-height: 1.06;
}
h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem);
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
}
p {
  margin: 0;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
dl,
dd {
  margin: 0;
}

a {
  color: var(--spruce);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--spruce);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--spruce);
  color: var(--onspruce);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 16 px gutters on a phone, wider from a tablet up. */
.wrap {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}
@media (min-width: 720px) {
  .wrap {
    width: min(100% - 64px, 1120px);
  }
}

/* ---------- header and menu ---------- */
/* The same header on every page (stamped by `pnpm enarra-site:sync`). One row; from 900 px the menu
   is in the row, narrower a "Valikko" / "Menu" button opens it as a panel below the header (a native
   popover: Escape and a tap outside close it, no script needed). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  border-radius: 8px;
}
.brand img {
  display: block;
  width: 135px;
  height: 30px;
}

.nav {
  /* Narrow screens: a popover; closed it is not shown (the UA's [popover] rule). */
  color: var(--ink);
}
.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.9688rem;
  font-weight: 500;
  text-decoration: none;
}
.menu a:hover {
  background: var(--chip);
}
/* The current page: underlined, not shown by colour alone. */
.menu a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  color: var(--spruce);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.lang-switch > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 41px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-now {
  background: var(--chip);
  color: var(--ink);
}
.lang-switch a {
  color: var(--spruce);
  text-decoration: none;
}
.lang-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle:hover {
  background: var(--chip);
}
.menu-toggle svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.menu-toggle .icon-close {
  display: none;
}
.site-header:has(.nav:popover-open) .icon-menu {
  display: none;
}
.site-header:has(.nav:popover-open) .icon-close {
  display: block;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
  /* The menu is a popover only on narrow screens: here it is an ordinary part of the row. */
  .nav {
    position: static;
    inset: auto;
    display: block;
    width: auto;
    height: auto;
    margin: 0 8px 0 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .menu {
    display: flex;
    align-items: center;
    gap: 2px;
  }
}
@media (max-width: 899.98px) {
  .nav:popover-open {
    position: fixed;
    inset: 73px 0 auto;
    width: auto;
    max-width: none;
    height: auto;
    max-height: calc(100dvh - 73px);
    margin: 0;
    padding: 8px 16px 24px;
    overflow-y: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 18px 32px color-mix(in srgb, var(--ink) 12%, transparent);
  }
  .menu {
    display: grid;
    gap: 2px;
  }
  .menu a {
    min-height: 52px;
    font-size: 1.125rem;
  }
}
@media (max-width: 379.98px) {
  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* A browser without the popover API: no menu button, the menu is a list in the header. */
@supports not selector(:popover-open) {
  .menu-toggle {
    display: none;
  }
  @media (max-width: 899.98px) {
    .bar {
      flex-wrap: wrap;
      padding-block: 8px;
    }
    .nav {
      display: block;
      order: 3;
      width: 100%;
    }
    .menu {
      display: flex;
      flex-wrap: wrap;
    }
  }
}

/* ---------- shared pieces ---------- */
section {
  padding-block: clamp(56px, 8vw, 96px);
}
.eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}
.section-head {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 46rem;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head .eyebrow {
  margin-bottom: 0;
}
.rule {
  border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary {
  background: var(--spruce);
  color: var(--onspruce);
}
.btn-secondary {
  border: 1.5px solid var(--spruce);
  color: var(--spruce);
}
.btn:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 479.98px) {
  .actions .btn {
    width: 100%;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 28px);
}

/* The marks drawn inline follow the theme (the logo files in assets/ are the brand's own colours). */
.arc {
  fill: none;
  stroke: var(--spruce);
  stroke-width: 7.5;
  stroke-linecap: round;
}
.mark-line {
  fill: none;
  stroke: var(--spruce);
  stroke-width: 6;
  stroke-linejoin: round;
}
.mark-core {
  fill: var(--amber);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(48px, 7vw, 104px) clamp(48px, 7vw, 88px);
}
.hero-grid {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero-copy {
  display: grid;
  gap: 22px;
  max-width: 40rem;
}
.hero-copy .eyebrow {
  margin-bottom: -4px;
}
.hero-copy .actions {
  margin-top: 8px;
}
.emblem {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 0;
}
.disc {
  display: grid;
  place-items: center;
  width: min(100%, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chip);
}
.disc svg {
  width: 58%;
  height: auto;
  /* The arcs open to the right, so the mark sits a little left of the disc's centre. */
  translate: -4% 0;
}
.etym {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}
.etym i {
  color: var(--ink);
  font-family: var(--font-quote);
  font-size: 1.5rem;
  line-height: 1.2;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}
@media (max-width: 899.98px) {
  .disc {
    width: min(100%, 260px);
  }
}

/* A page's own hero (about, products, contact, privacy). */
.page-hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 56px);
}
.page-hero .wrap {
  display: grid;
  gap: 20px;
}
.page-hero h1 {
  max-width: 22ch;
}
.page-hero .lead {
  max-width: 44rem;
}
.page-hero .eyebrow {
  margin-bottom: -6px;
}

/* ---------- facts (Enarra lyhyesti, company details) ---------- */
.facts {
  display: grid;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  gap: 4px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.facts dd {
  font-size: 1.0625rem;
}
@media (min-width: 640px) {
  .facts > div {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
  }
}
.facts-split {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}
@media (min-width: 900px) {
  .facts-split {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

/* ---------- the product (Tarumo) ---------- */
.product {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 28px;
}
.product-intro {
  display: grid;
  gap: 18px;
  align-content: start;
}
.tarumo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--spruce);
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tarumo-lockup svg {
  width: 42px;
  height: 42px;
  flex: none;
}
.product-intro .actions {
  margin-top: 6px;
}
@media (min-width: 960px) {
  .product {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.steps {
  display: grid;
  gap: 2px;
  counter-reset: step;
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
}
.steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 18px 20px;
  background: var(--bg);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--spruce);
  font-weight: 600;
}
.steps h3 {
  font-size: 1.0625rem;
  align-self: center;
}
.steps p {
  color: var(--muted);
  font-size: 0.9688rem;
}

.grid-cards {
  display: grid;
  gap: 16px;
}
.grid-cards .card {
  display: grid;
  gap: 10px;
  align-content: start;
}
.grid-cards .card p {
  color: var(--muted);
}
@media (min-width: 700px) {
  .grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1040px) {
  .grid-cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.card .more {
  margin-top: 6px;
  font-weight: 600;
}
.note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* A fictional example of a published knowledge card (the same as on tarumo.fi), labelled as such. */
.example {
  display: grid;
  gap: 14px;
  align-content: center;
  margin: 0;
}
.bubble-q {
  justify-self: end;
  max-width: 26rem;
  padding: 14px 18px;
  border-radius: 20px 6px 20px 20px;
  background: var(--spruce);
  color: var(--onspruce);
  font-weight: 500;
}
.answer {
  display: grid;
  gap: 10px;
  max-width: 30rem;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 6px 20px 20px 20px;
  background: var(--bg);
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-size: 0.875rem;
  font-weight: 600;
}
.state::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.quote {
  color: var(--ink);
  font-family: var(--font-quote);
  font-size: 1.1875rem;
  line-height: 1.45;
}
.source {
  color: var(--muted);
  font-size: 0.875rem;
}
.caption {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ---------- story and name ---------- */
.story {
  display: grid;
  gap: 20px 56px;
}
.story-text {
  display: grid;
  gap: 16px;
  max-width: 40rem;
}
@media (min-width: 900px) {
  .story {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}
.name-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
.name-grid .disc {
  width: min(100%, 220px);
}
.name-text {
  display: grid;
  gap: 14px;
  max-width: 40rem;
}
.name-text h3 {
  margin-top: 10px;
}
.name-text i {
  font-family: var(--font-quote);
  font-size: 1.125em;
}
@media (min-width: 760px) {
  .name-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 56px;
  }
}

/* ---------- people ---------- */
.people {
  display: grid;
  gap: 16px;
}
.person {
  display: grid;
  gap: 18px;
  align-content: start;
}
.person picture {
  display: block;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 50%;
}
/* The photos are decorative (alt="": the name is the heading next to them); a failed image keeps
   its box and never spills into the text. */
.person img {
  display: block;
  width: 120px;
  height: 120px;
  overflow: hidden;
}
.person-text {
  display: grid;
  gap: 8px;
}
.person-role {
  color: var(--spruce);
  font-weight: 600;
}
.person-text p:not(.person-role) {
  color: var(--muted);
}
@media (min-width: 860px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  gap: 16px;
}
.contact-card {
  display: grid;
  gap: 8px;
  align-content: start;
}
.contact-card .mail {
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.contact-card p:not(.mail) {
  color: var(--muted);
}
@media (min-width: 700px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.founders-contact {
  display: grid;
  gap: 16px;
}
.founder-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.founder-card picture {
  display: block;
  width: 72px;
  min-width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
}
.founder-card img {
  display: block;
  width: 72px;
  min-width: 72px;
  height: 72px;
  overflow: hidden;
}
.founder-card .person-text {
  gap: 2px;
}
.founder-card a {
  overflow-wrap: anywhere;
}
@media (min-width: 860px) {
  .founders-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- call to action band ---------- */
.band {
  display: grid;
  gap: 20px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  background: var(--spruce);
  color: var(--onspruce);
}
.band h2 {
  max-width: 24ch;
}
.band p {
  max-width: 40rem;
  opacity: 0.92;
}
.band a {
  color: inherit;
}
.band .btn-primary {
  background: var(--onspruce);
  color: var(--spruce);
}
.band :focus-visible {
  outline-color: var(--onspruce);
}
/* Dark: a light-green panel would be the brightest thing on the page; a quiet one instead. */
@media (prefers-color-scheme: dark) {
  .band {
    background: var(--chip);
    color: var(--ink);
    border: 1px solid var(--line);
  }
  .band .btn-primary {
    background: var(--spruce);
    color: var(--onspruce);
  }
  .band :focus-visible {
    outline-color: var(--spruce);
  }
}
@media (min-width: 900px) {
  .band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px 48px;
  }
  .band .band-text {
    display: grid;
    gap: 14px;
  }
}
@media (max-width: 899.98px) {
  .band .band-text {
    display: grid;
    gap: 12px;
  }
}

/* ---------- plain text pages (privacy) ---------- */
.prose {
  display: grid;
  gap: 16px;
  max-width: 44rem;
  padding-bottom: clamp(56px, 8vw, 96px);
}
.prose h2 {
  margin-top: 28px;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}
.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 1.25rem;
  list-style: disc;
}
.prose .updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- 404 ---------- */
.notfound {
  display: grid;
  gap: 18px;
  max-width: 44rem;
}
.notfound + .notfound {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ---------- footer ---------- */
.site-footer {
  padding-block: 48px 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
}
.footer-brand img {
  display: block;
  width: 135px;
  height: 30px;
}
.footer-brand p,
.footer-legal {
  color: var(--muted);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  text-decoration-color: var(--line);
}
.footer-col a:hover {
  text-decoration-color: currentColor;
}
.footer-col a[aria-current='page'] {
  color: var(--spruce);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}
.footer-legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

@media print {
  .skip,
  .menu-toggle,
  .nav,
  .lang-switch {
    display: none;
  }
  .site-header {
    position: static;
  }
}
