/* Ilmarinen: the single stylesheet for ilmarinen.io.
   System fonts only and no external requests, so the privacy policy stays true. */

:root {
  color-scheme: light dark;

  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "DIN Condensed", "Bahnschrift Condensed", Bahnschrift, "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", system-ui, sans-serif;

  /* Steel heat colors, from dull red to white heat. Decorative only. */
  --heat: linear-gradient(90deg, #6e1a0b 0%, #a8270d 15%, #d9380f 33%, #ff6a13 52%, #ff9a2e 68%, #ffc766 84%, #fff1d2 100%);

  /* Light scheme */
  --bg: #ffffff;
  --bg-ash: #f1efec;
  --ink: #262321;
  --ink-muted: #5c5853;
  --rule: #d9d5cf;
  --accent: #b23a0c;
  --accent-hover: #8a2c08;
  --rivet: #e35a12;
  --focus: #b23a0c;

  /* Charcoal bands: header, hero, contact and footer */
  --band: #262321;
  --band-ink: #f4f1ec;
  --band-soft: #d9d2ca;
  --band-muted: #bdb5ac;
  --band-accent: #ffa35c;
  --band-accent-hover: #ffd08f;
  --band-rule: rgba(244, 241, 236, 0.16);
  --band-focus: #ffd08f;
  --ember: #ff8a2a;
  --ember-hover: #ffa552;
  --on-ember: #211e1c;

  --container: 72rem;
  --gutter: clamp(1rem, 0.55rem + 2vw, 2rem);
  --space-section: clamp(4rem, 2.75rem + 5vw, 7.5rem);
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a18;
    --bg-ash: #242120;
    --ink: #eeeae4;
    --ink-muted: #b3aca4;
    --rule: #3b3734;
    --accent: #ff9f5a;
    --accent-hover: #ffc08f;
    --rivet: #ff8a2a;
    --focus: #ffd08f;
    --band: #141311;
  }
}

/* Base */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.95rem + 0.22vw, 1.125rem);
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

::selection {
  background: #ffc766;
  color: #211e1c;
}

svg {
  display: block;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.band {
  --accent: var(--band-accent);
  --accent-hover: var(--band-accent-hover);
  --focus: var(--band-focus);
  background: var(--band);
  color: var(--band-ink);
}

/* Display type: condensed, industrial, sentence case */

.brand,
.hero h1,
.section-title,
.statement,
.sectors,
.step::before,
.legal-intro h1,
.prose h2,
.notfound h1 {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: 0;
}

/* Skip link */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  background: var(--ember);
  color: var(--on-ember);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:hover {
  color: var(--on-ember);
}

.skip-link:focus-visible {
  outline: 3px solid var(--band-ink);
  outline-offset: 2px;
}

/* Header */

.site-header--rule::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--heat);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding-block: 0.9rem 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.25rem;
  color: var(--band-ink);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--band-ink);
}

.brand-mark {
  flex: none;
  width: 2.1rem;
  height: auto;
  color: var(--ember);
}

.brand-name {
  padding-top: 0.14em;
}

.main-nav {
  order: 3;
  flex: 1 0 100%;
}

.nav-list,
.lang-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list {
  gap: 0 1.35rem;
}

.nav-list a {
  display: inline-block;
  padding-block: 0.55rem;
  color: var(--band-ink);
  font-size: 0.97rem;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--band-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.lang-switch {
  order: 2;
  margin-left: auto;
}

.lang-list {
  gap: 0.25rem;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.lang-list a,
.lang-list [aria-current] {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius);
}

.lang-list a {
  color: var(--band-muted);
  text-decoration: none;
}

.lang-list a:hover {
  color: var(--band-ink);
  text-decoration: underline;
}

.lang-list [aria-current] {
  color: var(--band-ink);
  box-shadow: inset 0 0 0 1px var(--band-muted);
}

@media (min-width: 48em) {
  .header-inner {
    flex-wrap: nowrap;
    padding-block: 1.1rem;
  }

  .main-nav {
    order: 2;
    flex: 0 1 auto;
    margin-left: auto;
  }

  .lang-switch {
    order: 3;
    margin-left: 0;
    padding-left: 1.25rem;
    border-left: 1px solid var(--band-rule);
  }
}

/* Hero: the one glowing element */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.25rem, 1rem + 5vw, 5.5rem) clamp(3.5rem, 2rem + 6vw, 7rem);
}

.hero h1 {
  max-width: 11em;
  margin: 0;
  font-size: clamp(2.9rem, 1.6rem + 5.4vw, 5.6rem);
  line-height: 1;
  text-wrap: balance;
}

.heat-bar {
  height: 0.6rem;
  margin: clamp(1.75rem, 1rem + 2.6vw, 3rem) calc(50% - 50vw) clamp(1.75rem, 1rem + 2.6vw, 3rem) 0;
  border-radius: 0.3rem 0 0 0.3rem;
  background: var(--heat);
  box-shadow: 0 0 1.1rem rgba(255, 106, 19, 0.5), 0 0 3.5rem rgba(255, 106, 19, 0.28);
}

.hero-body {
  display: grid;
  gap: 1.75rem;
}

.hero-lead {
  max-width: 40rem;
  margin: 0;
  color: var(--band-soft);
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.55;
}

.hero-action {
  margin: 0;
}

@media (min-width: 60em) {
  .hero-body {
    grid-template-columns: minmax(0, 40rem) auto;
    justify-content: space-between;
    align-items: end;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  background: var(--ember);
  color: var(--on-ember);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover {
  background: var(--ember-hover);
  color: var(--on-ember);
}

.btn:active {
  transform: translateY(1px);
}

/* Sections */

.section {
  padding-block: var(--space-section);
}

.section--ash {
  background: var(--bg-ash);
}

.section-title {
  margin: 0 0 clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem);
  line-height: 1;
  text-wrap: balance;
}

/* Services: four parts riveted to one beam, resting on the support slab */

.parts {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.part {
  position: relative;
  padding: 0.25rem 0 2.25rem 1.75rem;
  border-left: 2px solid var(--rule);
}

.part::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rivet);
  box-shadow: 0 0 0 4px var(--bg);
}

.part h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.part p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-muted);
}

.part--base {
  margin-top: 0.5rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-left: 0;
  border-radius: var(--radius);
  background: var(--bg-ash);
}

.part--base::before {
  content: none;
}

@media (min-width: 56em) {
  .parts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .part {
    padding: 2rem 2rem 0 0;
    border-top: 2px solid var(--rule);
    border-left: 0;
  }

  .part::before {
    top: -7px;
    left: 0;
  }

  .part--base {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.75rem 2.5rem;
    margin-top: 3.5rem;
    padding: 2.5rem;
    border-top: 0;
  }

  .part--base h3 {
    margin: 0;
  }
}

/* How we work: a real sequence, so it is numbered */

.statement {
  max-width: 26ch;
  margin: 0 0 clamp(2.5rem, 2rem + 2vw, 4rem);
  font-size: clamp(1.8rem, 1.2rem + 2.3vw, 3rem);
  line-height: 1.08;
  text-wrap: balance;
}

.steps {
  display: grid;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-content: start;
  column-gap: 1rem;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: 3.25rem;
  line-height: 0.9;
}

.step h3 {
  margin: 0.15rem 0 0.4rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.step p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-muted);
}

.callout {
  max-width: 52ch;
  margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  font-size: 1.1rem;
  font-weight: 600;
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem clamp(2rem, 4vw, 4.5rem);
  }
}

/* Who it's for and About */

.split {
  display: grid;
  gap: 1.25rem 3rem;
}

.split .section-title {
  margin-bottom: 1rem;
}

.intro {
  max-width: 30ch;
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.15rem;
}

.sectors {
  margin: 0 0 2rem;
  padding: 0;
  font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.5rem);
  line-height: 1.1;
  list-style: none;
}

.sectors li {
  padding-block: 0.6rem 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.sectors li:first-child {
  border-top: 1px solid var(--rule);
}

.split-text {
  max-width: 58ch;
  margin: 0;
}

.about-text {
  max-width: 46ch;
  margin: 0;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}

@media (min-width: 56em) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* Contact */

.contact {
  padding-block: var(--space-section);
}

.contact-grid {
  display: grid;
  gap: 2rem 4rem;
}

.contact .section-title {
  margin-bottom: 1.25rem;
}

.contact-lead {
  max-width: 34ch;
  margin: 0;
  color: var(--band-soft);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.5;
}

.contact-list {
  margin: 0 0 2rem;
}

.contact-list div {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--band-rule);
}

.contact-list div:first-child {
  border-top: 1px solid var(--band-rule);
}

.contact-list dt {
  color: var(--band-muted);
  font-size: 0.9rem;
}

.contact-list dd {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-list a {
  color: var(--band-ink);
}

.contact-list a:hover {
  color: var(--band-accent);
}

@media (min-width: 56em) {
  .contact-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }
}

/* Footer: the same legal block on every page */

.site-footer {
  padding-block: 2.5rem 3rem;
  color: var(--band-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer--joined {
  padding-top: 0;
}

.site-footer--joined .footer-inner {
  padding-top: 2.5rem;
  border-top: 1px solid var(--band-rule);
}

.site-footer p {
  margin: 0 0 0.6rem;
}

.footer-legal {
  color: var(--band-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.footer-legal a {
  color: inherit;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 1.1rem 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--band-ink);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--band-accent);
}

.footer-tm {
  font-size: 0.85rem;
}

/* Legal pages */

.legal {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--space-section);
}

.legal-grid {
  display: grid;
  gap: 2.5rem;
}

.legal-intro {
  max-width: 72ch;
}

.legal-intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 1.7rem + 3.2vw, 4.2rem);
  line-height: 1;
  text-wrap: balance;
}

.doc-meta {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
}

.legal-intro p,
.legal-intro ul {
  margin: 0 0 1rem;
}

.legal-intro ul {
  padding-left: 1.25rem;
}

.toc {
  font-size: 0.95rem;
}

.toc h2 {
  margin: 0 0 0.6rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding-block: 0.3rem;
  color: var(--ink);
  line-height: 1.35;
  text-decoration: none;
}

.toc-list--numbered a {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
}

.toc-num {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.2rem);
  line-height: 1.1;
  text-wrap: balance;
  scroll-margin-top: 1.5rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h2:target {
  color: var(--accent);
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.3;
  scroll-margin-top: 1.5rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose li > ul {
  margin: 0.45rem 0 0;
}

.prose li::marker,
.legal-intro li::marker {
  color: var(--accent);
}

.table-wrap {
  margin: 1.5rem 0 2rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  border-bottom: 2px solid var(--ink);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.prose tbody th {
  font-weight: 650;
}

@media (min-width: 64em) {
  .legal-grid {
    grid-template-columns: 15rem minmax(0, 72ch);
    column-gap: clamp(3rem, 5vw, 5rem);
    justify-content: start;
  }

  .legal-intro {
    grid-column: 2;
    grid-row: 1;
  }

  /* The side padding keeps focus rings inside the scroll box, so they are not clipped. */
  .toc {
    position: sticky;
    top: 1.5rem;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    max-height: calc(100vh - 3rem);
    margin-inline: -0.5rem;
    padding: 0 0.5rem 0.5rem;
    overflow-y: auto;
  }

  .prose {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Narrow screens: each table row becomes a labelled block */

@media screen and (max-width: 40em) {
  .prose table,
  .prose tbody,
  .prose tr,
  .prose th,
  .prose td {
    display: block;
  }

  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .prose tr {
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
  }

  .prose tbody tr:first-child {
    border-top: 2px solid var(--ink);
  }

  .prose tbody th,
  .prose td {
    padding: 0;
    border: 0;
  }

  .prose tbody th {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
  }

  .prose td + td {
    margin-top: 0.65rem;
  }

  .prose td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
  }
}

/* 404 */

.notfound {
  padding-block: var(--space-section);
}

.notfound h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 1.7rem + 3.2vw, 4.2rem);
  line-height: 1;
}

.notfound p {
  max-width: 52ch;
}

.notfound-alt {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.notfound-alt h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

/* Windows high contrast */

@media (forced-colors: active) {
  .heat-bar,
  .site-header--rule::after {
    forced-color-adjust: none;
  }

  .btn {
    border: 2px solid ButtonText;
  }
}

/* Print: plain black on white, legal text first */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  :root {
    color-scheme: light;
    --bg: #fff;
    --bg-ash: #fff;
    --ink: #000;
    --ink-muted: #333;
    --rule: #999;
    --accent: #000;
    --accent-hover: #000;
    --band: #fff;
    --band-ink: #000;
    --band-soft: #222;
    --band-muted: #333;
    --band-accent: #000;
    --band-rule: #999;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .skip-link,
  .main-nav,
  .lang-switch,
  .toc,
  .heat-bar,
  .site-header--rule::after,
  .hero-action,
  .contact .btn {
    display: none !important;
  }

  .band {
    background: #fff;
    color: #000;
  }

  .site-header {
    border-bottom: 1px solid #000;
  }

  .brand-mark {
    color: #000;
  }

  a {
    color: #000;
  }

  .section,
  .contact,
  .legal,
  .notfound {
    padding-block: 1.5rem;
  }

  .legal-grid {
    display: block;
  }

  .prose,
  .legal-intro {
    max-width: none;
  }

  .prose {
    margin-top: 2rem;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }

  .prose h2,
  .prose h3 {
    break-after: avoid;
  }

  .prose tr,
  .prose li {
    break-inside: avoid;
  }

  .site-footer {
    padding-top: 1rem;
    border-top: 1px solid #000;
    break-inside: avoid;
  }
}
