/* ==========================================================================
   Arachne OÜ — brand house site
   All page CSS. No inline styles anywhere in the templates.
   Values are a 1:1 port of the design handoff prototype (>= 900px).
   Font sizes are written in rem against the 16px default root (14px = .875rem
   and so on) so they render at the prototype's pixel values but still follow a
   reader's browser font-size preference.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --parchment: #efe8d8;
  --parchment-dark: #ebe3d0;
  --nav-bg: rgba(239, 232, 216, .92);
  --placeholder-bg: #e6dfcd;

  /* Ink */
  --ink: #211d16;
  --ink-88: rgba(33, 29, 22, .88);
  --ink-85: rgba(33, 29, 22, .85);
  --ink-75: rgba(33, 29, 22, .75);
  --ink-65: rgba(33, 29, 22, .65);
  --ink-60: rgba(33, 29, 22, .6);
  --ink-50: rgba(33, 29, 22, .5);
  --ink-45: rgba(33, 29, 22, .45);
  --ink-35: rgba(33, 29, 22, .35);
  --ink-30: rgba(33, 29, 22, .3);
  --ink-06: rgba(33, 29, 22, .06);

  /* Hairlines */
  --hairline: rgba(33, 29, 22, .25);   /* primary rules */
  --hairline-18: rgba(33, 29, 22, .18); /* section borders */
  --hairline-15: rgba(33, 29, 22, .15); /* cell dividers */

  /* Link brown */
  --brown: #7c4f22;
  --brown-40: rgba(124, 79, 34, .4);
  --brown-12: rgba(124, 79, 34, .12);

  /* Footer */
  --footer-bg: #14110c;
  --footer-rule: #211d16;
  --footer-text: #d9d2c2;
  --footer-80: rgba(217, 210, 194, .8);
  --footer-65: rgba(217, 210, 194, .65);
  --footer-50: rgba(217, 210, 194, .5);
  --footer-15: rgba(217, 210, 194, .15);
  --footer-hover: #fff;
  --footer-strip-from: rgba(20, 17, 12, 0);
  --footer-strip-to: rgba(20, 17, 12, .1);

  /* Type */
  --font-display: 'Caudex', Georgia, serif;
  --font-body: 'Libre Baskerville', Georgia, serif;

  /* Layout */
  --content-width: 1160px;
  --pad-x: 40px;
  --header-pad-top: 56px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

/* scroll-padding-top keeps anchored sections (and keyboard focus targets, which
   scroll-margin alone does not cover) clear of the sticky nav. The prototype's
   52px / 70px section offsets are preserved as the sum of this padding and the
   remaining scroll-margin-top on .workshop, so landing positions at >= 900px
   are unchanged. The mobile values below match the wrapped nav's height. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 52px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
}

a {
  color: var(--brown);
  text-decoration-color: var(--brown-40);
  text-underline-offset: 3px;
  transition: color .25s ease, text-decoration-color .25s ease;
}

a:hover {
  color: var(--ink);
}

img {
  max-width: 100%;
}

/* Focus ring, everywhere. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* The dark footer needs a light ring to stay visible. */
.site-footer :focus-visible {
  outline-color: var(--footer-text);
}

/* <main> is focused programmatically by the skip link; no ring for that. */
main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--parchment);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: .875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 8px;
}

/* --------------------------------------------------------------------------
   3. Header + sticky nav
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--header-pad-top) 24px 0;
}

.site-logo {
  display: block;
  line-height: 0;
}

.site-logo-img {
  width: 300px;
  max-width: 70vw;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-top: 36px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline-15);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: .9375rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* 4vw reaches the prototype's 36px at 900px and is capped there, so the
   >= 900px fidelity target is unaffected; below it the gap shrinks so the
   longer Estonian labels do not wrap the nav onto a second line. */
.nav-links {
  display: flex;
  gap: clamp(20px, 4vw, 36px);
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  border-bottom: 1px solid var(--ink);
  transition: right .35s ease;
}

.nav-links a:hover::after {
  right: 0;
}

.lang {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
  font-size: .8125rem;
}

.lang-sep {
  color: var(--ink-35);
}

.lang-btn {
  padding: 4px 6px;
  letter-spacing: .12em;
  color: var(--ink-45);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Image slots and placeholders
   -------------------------------------------------------------------------- */

.slot {
  min-width: 0;
  max-width: 100%;
}

.slot--4x5 { aspect-ratio: 4 / 5; }
.slot--4x3 { aspect-ratio: 4 / 3; }
.slot--3x2 { aspect-ratio: 3 / 2; }
.slot--1x1 { aspect-ratio: 1 / 1; }

.slot > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, var(--ink-06) 0 8px, transparent 8px 16px),
    var(--placeholder-bg);
  border: 1px dashed var(--ink-30);
  color: var(--ink-50);
  font-style: italic;
  font-size: .8125rem;
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */

.hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 80px var(--pad-x) 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}

.hero-col {
  min-width: 0;
}

.hero-media {
  max-height: 560px;
}

/* --------------------------------------------------------------------------
   The two photographs
   The hero and workshop slots share one markup (figure.photo > .photo-print >
   img, + figcaption.photo-caption) and one of three treatments, chosen by
   `photoStyle` in content/site.json and applied as a class:

     photo--instant  an instant print taped to the wall, handwritten caption
     (the site ships with "plate"; the other two stay available)
     photo--plate    a bare catalogue plate: hairline, rule, small-caps caption
     photo--film     a frame of 35 mm film with sprocket holes and edge text

   All three are static: no motion, no filters on the photograph itself.
   -------------------------------------------------------------------------- */

.photo {
  --hang: 0deg;
  position: relative;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  flex-direction: column;
  transform: rotate(var(--hang));
}

/* The print fills whatever the treatment leaves it. */
.photo-print {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #cfc6b3;
}

.photo-print > img,
.photo-print > .ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption {
  flex: none;
  margin: 0;
}

/* ---- instant print ------------------------------------------------------ */

.photo--instant {
  --hang: -2.2deg;
  /* Percentages are of the width on every side, so the frame keeps its
     proportions: thin top and sides, the wide margin at the bottom. */
  padding: 5.5% 5.5% 19%;
  background:
    url(/assets/paper-grain.svg),
    linear-gradient(160deg, #fbf7ee 0%, #f5efe2 55%, #ede5d3 100%);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    0 0 0 1px rgba(33, 29, 22, .07),
    0 1px 2px rgba(33, 29, 22, .10),
    0 12px 20px -10px rgba(33, 29, 22, .30),
    0 34px 56px -28px rgba(33, 29, 22, .42);
}

.photo--instant.photo--right {
  --hang: 1.6deg;
}

/* The tape. */
.photo--instant::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 36%;
  aspect-ratio: 6 / 1;
  transform: translate(-50%, -50%) rotate(-2.5deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 3px, transparent 3px 7px),
    rgba(232, 222, 196, .62);
  box-shadow: 0 1px 2px rgba(33, 29, 22, .18), inset 0 0 0 1px rgba(255, 255, 255, .22);
  clip-path: polygon(0 10%, 1.2% 0, 2.4% 12%, 3.4% 2%, 98% 0, 99.2% 14%, 100% 4%, 100% 90%, 98.8% 100%, 97.6% 88%, 96.6% 98%, 2% 100%, .8% 86%, 0 96%);
  z-index: 2;
  pointer-events: none;
}

.photo--instant.photo--right::before {
  transform: translate(-50%, -50%) rotate(3deg);
  left: 46%;
}

.photo--instant:hover {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    0 0 0 1px rgba(33, 29, 22, .07),
    0 1px 2px rgba(33, 29, 22, .10),
    0 16px 26px -12px rgba(33, 29, 22, .36),
    0 44px 66px -30px rgba(33, 29, 22, .48);
}

.photo--instant .photo-print {
  height: 100%;
}

/* Vignette and gloss over the print; the placeholder gets them too. */
.photo--instant .photo-print::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .06) 26%, rgba(255, 255, 255, 0) 44%),
    radial-gradient(120% 92% at 50% 44%, rgba(0, 0, 0, 0) 56%, rgba(30, 20, 8, .24) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), inset 0 1px 3px rgba(0, 0, 0, .22);
}

/* Handwritten caption in the bottom margin. */
.photo--instant .photo-caption {
  position: absolute;
  left: 6.5%;
  right: 6.5%;
  bottom: 0;
  padding: 0 .35em 6.5%;
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.1;
  color: rgba(33, 29, 22, .84);
  transform: rotate(-1.2deg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo--instant.photo--right .photo-caption {
  transform: rotate(.8deg);
  text-align: right;
}

/* ---- catalogue plate ---------------------------------------------------- */

.photo--plate .photo-print {
  border: 1px solid var(--ink-30);
}

.photo--plate .photo-caption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo--plate.photo--right .photo-caption {
  text-align: right;
}

/* ---- film strip --------------------------------------------------------- */

.photo--film {
  padding: 40px 12px;
  background:
    repeating-linear-gradient(90deg, #e9e2d2 0 12px, transparent 12px 22px) 10px 7px / calc(100% - 20px) 9px no-repeat,
    repeating-linear-gradient(90deg, #e9e2d2 0 12px, transparent 12px 22px) 10px calc(100% - 7px) / calc(100% - 20px) 9px no-repeat,
    #15120e;
  border-radius: 3px;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6);
  color: #e0902e;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.photo--film .photo-print {
  height: 100%;
  box-shadow: 0 0 0 1px #000;
}

.photo--film .photo-print > img {
  filter: contrast(1.08) saturate(.92);
}

/* Edge markings: the frame number and stock name along the top rebate … */
.photo--film::before {
  content: attr(data-edge);
  position: absolute;
  top: 20px;
  left: 14px;
  right: 14px;
  line-height: 1;
}

/* … and the caption along the bottom one. */
.photo--film .photo-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 20px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo--film .photo-caption::before {
  content: attr(data-frame);
  float: left;
}

.hero-title {
  margin: 0;
  max-width: 15ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  line-height: 1.1;
  text-wrap: pretty;
}

.hero-body {
  margin: 36px 0 0;
  max-width: 58ch;
  font-size: 1.09375rem;
  line-height: 1.75;
  color: var(--ink-88);
  text-wrap: pretty;
}

.hero-inquiry {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  max-width: 58ch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  font-size: 1.0625rem;
}

.hero-inquiry-label {
  color: var(--ink-65);
}

.hero-inquiry-link {
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   6. Numbers
   -------------------------------------------------------------------------- */

.stats-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--pad-x) 88px;
}

/* Four explicit columns: with auto-fit the cells wrapped between 601px and
   879px while the divider rules (which depend on the column count) did not
   follow, leaving an orphan left border and misaligned rows. The wrap is now
   declared per breakpoint instead. */
.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

/* Source order is dt (label) then dd (value) for valid <dl> markup;
   column-reverse puts the value on top, as in the design. justify-content is
   flex-end because in column-reverse the main-end edge is the top: it keeps
   the four values on one line when a label wraps in the tallest cell. */
.stat {
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 28px 24px;
  border-left: 1px solid var(--hairline-15);
}

.stat:first-child {
  border-left: 0;
}

.stat:last-child {
  padding-right: 0;
}

/* The numbers are set in the text face at full weight, not the headline
   face: they read as figures in a book rather than as a fifth heading. */
.stat-value {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1;
}

.stat-value.is-placeholder {
  color: var(--ink-30);
}

.stat-label {
  margin: 8px 0 0;
  font-size: .875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-60);
  /* Estonian labels are single unbreakable compounds wider than the cell
     on the narrowest phones. */
  overflow-wrap: break-word;
}

/* Unfilled placeholder marker, shared with the brand launch line. */
.todo {
  color: var(--brown);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   7. Press band
   -------------------------------------------------------------------------- */

.press {
  background: var(--parchment-dark);
  border-top: 1px solid var(--hairline-18);
  border-bottom: 1px solid var(--hairline-18);
}

.press-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 36px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.press-label {
  font-style: italic;
  font-size: 1.125rem;
  color: var(--ink-60);
}

.press-logos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 67px;
  opacity: .92;
}

.press-logo {
  display: block;
  width: auto;
  max-width: 100%;
}

.press-logo--republique { height: 41px; }
.press-logo--etsona { height: 36px; }
.press-logo--headphonelist { height: 22px; }
.press-logo--levelaudio { height: 26px; }

/* Rating line under the press logos: "4.9 ★★★★★ 820 verified reviews …" */
.press-reviews {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 14px;
  font-size: 1.125rem;
  color: var(--ink-65);
}

.press-rating {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}

.press-stars {
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--brown);
}

.press-count {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   8. Workshop
   -------------------------------------------------------------------------- */

.workshop {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 100px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px;
  align-items: center;
  scroll-margin-top: 18px; /* + html scroll-padding-top 52px = prototype's 70px */
}

.workshop-col {
  min-width: 0;
}

.workshop-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.15;
}

.workshop-body {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-88);
  text-wrap: pretty;
}

.workshop-est {
  margin: 32px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hairline);
  font-style: italic;
  font-size: .9375rem;
  letter-spacing: .06em;
  color: var(--ink-60);
}

/* --------------------------------------------------------------------------
   9. Brands
   -------------------------------------------------------------------------- */

/* Nav clearance: html { scroll-padding-top } (prototype's 52px). */
.brands {
  background: var(--parchment-dark);
  border-top: 1px solid var(--hairline-18);
}

.brands-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 96px var(--pad-x) 110px;
}

/* 7.5vw passes 48px at 640px, so the prototype value holds at >= 900px while
   the longer Estonian heading still fits the gutters on small phones. */
.brands-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7.5vw, 3rem);
  text-align: center;
  overflow-wrap: break-word;
}

.brands-sub {
  margin: 20px auto 0;
  max-width: 52ch;
  text-align: center;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-75);
}

.brand-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 36px;
}

.brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand-head {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 44px;
  height: 44px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--hairline);
}

/* The 44px mark box is too small for the placeholder caption. */
.mark .ph span {
  display: none;
}

.brand-heading {
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 1.1;
}

/* A wide wordmark standing in for the brand name: same height as the h3 line box. */
.brand-wordmark {
  display: block;
  height: 30px;
  width: auto;
  max-width: 100%;
}

/* Mark + wordmark lockups are two lines tall, so they get more height. */
.brand-wordmark--lockup {
  height: 54px;
  margin: -4px 0 2px;
}

.brand-role {
  margin: 2px 0 0;
  font-style: italic;
  font-size: .9375rem;
  color: var(--ink-60);
}

.brand-body {
  margin: 16px 0 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--ink-85);
  text-wrap: pretty;
}

.brand-trade {
  margin: 14px 0 0;
  font-size: .90625rem;
  letter-spacing: .04em;
  color: var(--ink-60);
}

.trade-label {
  color: var(--ink);
}

.brand-link {
  margin: auto 0 0;
  padding-top: 24px;
  font-size: 1rem;
}

.brand-link--launch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
}

/* Underline grows left to right on hover. */
.brand-link a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size .35s ease, color .25s ease;
}

.brand-link a:hover {
  background-size: 100% 1px;
}

.brand-launch {
  font-style: italic;
  font-size: .90625rem;
  color: var(--ink-60);
  white-space: nowrap;
}

/* .todo alone loses to .brand-launch on source order (same specificity);
   the unfilled launch line must show in link-brown like the other markers. */
.brand-launch.todo {
  color: var(--brown);
}

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */

/* Nav clearance: html { scroll-padding-top } (prototype's 52px). */
.contact {
  border-top: 1px solid var(--hairline-18);
}

.contact-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 96px var(--pad-x) 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 48px;
  align-items: end;
}

.contact-col {
  min-width: 0;
}

.contact-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
}

.contact-body {
  margin: 20px 0 0;
  max-width: 48ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-85);
  text-wrap: pretty;
}

.contact-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 36px;
  border-left: 1px solid var(--hairline);
  font-size: 1.25rem;
  font-style: normal; /* <address> defaults to italic */
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.875rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-phone {
  color: var(--ink);
  text-decoration: none;
  /* keep the phone number from breaking across lines mid-digit-group */
  white-space: nowrap;
}

.contact-address {
  font-size: 1.0625rem;
  color: var(--ink-65);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.footer-strip {
  height: 28px;
  background: linear-gradient(180deg, var(--footer-strip-from), var(--footer-strip-to));
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 2px solid var(--footer-rule);
}

.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--footer-hover);
}

.footer-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px var(--pad-x) 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col {
  min-width: 0;
}

/* Wordmark, legal name and tagline share one measure, so the column reads as
   one block: the wordmark's left edge sits on the text's left edge (the image
   is trimmed to its ink) and the tagline wraps at the wordmark's right edge. */
.footer-col--brand {
  --footer-brand-width: 197px;
}

.footer-logo {
  display: block;
  width: var(--footer-brand-width);
  max-width: 100%;
  height: auto;
}

/* The legal name sits under the wordmark as a quiet line, not a second title. */
.footer-name {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--footer-65);
}

.footer-tagline {
  margin: 8px 0 0;
  max-width: var(--footer-brand-width, 30ch);
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--footer-65);
  text-wrap: pretty;
}

.footer-label {
  margin: 0 0 16px;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--footer-50);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .9375rem;
}

.footer-list a {
  overflow-wrap: anywhere;
}

/* keep the phone number from breaking across lines mid-digit-group */
.footer-list a[href^="tel:"] {
  white-space: nowrap;
  overflow-wrap: normal;
}

.footer-address {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--footer-80);
}

.footer-legal-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.footer-legal {
  border-top: 1px solid var(--footer-15);
  padding: 22px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: .84375rem;
  color: var(--footer-50);
}

.footer-legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-legal-meta > span {
  white-space: nowrap;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.footer-legal-links a {
  color: var(--footer-65);
}

/* --------------------------------------------------------------------------
   12. Legal pages and 404
   -------------------------------------------------------------------------- */

.legal,
.notfound {
  max-width: 72ch;
  margin: 0 auto;
  padding: 80px var(--pad-x) 96px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-88);
}

.legal-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.125rem, 4.6vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  text-wrap: pretty;
  /* Estonian titles are single unbreakable compounds ("Kasutustingimused")
     that are wider than the content box on the narrowest phones. */
  overflow-wrap: break-word;
}

.legal-updated {
  margin: 18px 0 0;
  font-size: .9375rem;
  color: var(--ink-60);
}

.legal h2 {
  margin: 56px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.legal h3 {
  margin: 36px 0 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: break-word;
}

.legal p,
.legal ul,
.legal ol {
  margin: 18px 0 0;
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin-top: 8px;
}

.legal li::marker {
  color: var(--ink-60);
}

.legal a {
  overflow-wrap: anywhere;
}

.legal address {
  margin: 18px 0 0;
  font-style: italic;
  color: var(--ink-85);
}

/* Label/value pairs (imprint company data). */
.legal dl {
  margin: 18px 0 0;
}

.legal dt {
  margin-top: 18px;
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.legal dd {
  margin: 4px 0 0;
}

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  padding: .1em .35em;
  background: var(--ink-06);
  border-radius: 2px;
  overflow-wrap: anywhere;
}

/* Bracketed facts the client still has to supply. Deliberately conspicuous,
   but on-palette — the browser default for <mark> is off-palette yellow. */
.legal mark.placeholder {
  background: var(--brown-12);
  color: var(--brown);
  /* no horizontal padding: the highlight must hug the text so a following
     comma or full stop does not read as a stray space. */
  padding: .1em 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.legal hr {
  margin: 48px 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.legal table {
  margin: 24px 0 0;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.6;
}

.legal th,
.legal td {
  padding: 12px 14px 12px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline-15);
  overflow-wrap: anywhere;
}

.legal th {
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-60);
  border-bottom-color: var(--hairline);
}

.legal td:last-child,
.legal th:last-child {
  padding-right: 0;
}

.notfound-body {
  margin: 20px 0 0;
  max-width: 48ch;
  text-wrap: pretty;
}

.notfound-back {
  margin: 32px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Below the >= 900px fidelity target the four number cells no longer fit on
   one row, so the 2x2 layout and its dividers start here rather than at 600px
   (899.98px keeps 900px itself on the four-column prototype layout). */
@media (max-width: 899.98px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    border-left: 0;
  }

  .stat:nth-child(odd) {
    padding-left: 0;
  }

  .stat:nth-child(even) {
    padding-right: 0;
    border-left: 1px solid var(--hairline-15);
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--hairline-15);
  }
}

@media (max-width: 600px) {
  :root {
    --pad-x: 24px;
    --header-pad-top: 40px;
  }

  /* The nav links wrap to two lines at this width, so anchors need more
     clearance than the prototype's desktop offset. */
  html {
    scroll-padding-top: 96px;
  }

  /* Art direction: the hero photo is dropped on small screens. */
  .hero-media {
    display: none;
  }

  .nav-links {
    gap: 20px;
    font-size: .8125rem;
  }

  /* 2x2 grid and its dividers come from the <= 899.98px block above. */
  .stat {
    padding: 28px 20px;
  }

  .press-logos {
    gap: 16px 32px;
  }

  .brand-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-card {
    padding-left: 0;
    padding-top: 28px;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The nav links wrap to three lines on the narrowest phones. */
@media (max-width: 358px) {
  html {
    scroll-padding-top: 132px;
  }
}

/* --------------------------------------------------------------------------
   14. Motion and print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* !important is required here: it must beat every component transition. */
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-nav,
  .skip-link {
    display: none;
  }
}
