/* Printmaker3D, built on the Printmaker3D design system (Blueprint theme).
   The idea is a drawing sheet: a white page, fine ruled lines, small exact annotations, one ink for emphasis.
   Tokens come first and match the design system one to one; every rule below reads from them. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("assets/fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/dm-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --bg: #ffffff; /* the page; most of every page stays this colour */
  --surface: #f3f6fb; /* quiet tint: photo tiles, panels, the drop area */
  --surface-strong: #e6ecf5; /* hover on a tint; the language toggle's track */
  --line: #d6deea; /* hairlines; decoration only */
  --field: #7a879d; /* outlines of controls: at least 3.3:1 on the page and on a tint */
  --text: #0d1b33;
  --muted: #51607a;
  --accent: #1650e0; /* the one emphasis colour */
  --accent-hover: #0f3db3;
  --accent-soft: #e6eeff; /* tint behind a picked chip, a notice, the closing band */
  --on-accent: #ffffff;
  --alert: #b3261e;
  --focus: var(--accent);

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-144: 144px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --font-sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Fluid steps between two tokens. */
:root {
  --gutter: clamp(20px, 5vw, var(--space-64));
  --col-gap: clamp(20px, 2.6vw, var(--space-32)); /* between columns */
  --row-gap: clamp(var(--space-32), 4vw, var(--space-48)); /* between rows of items */
  --section: clamp(72px, 10vw, var(--space-144)); /* between sections */
  --header: 72px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* or a display rule on the element would un-hide it */

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + var(--space-24)); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, fieldset, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; }

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

/* display, heading, title: weight 500 with tight tracking, never bold */
h1, h2 { font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; }
h3, .title { font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; } /* .title: the same style on an h2, where an h3 would skip a level */
.subheading { font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; }
p { text-wrap: pretty; }

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

.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: 10px 16px; border-radius: var(--radius-md); background: var(--accent); color: var(--on-accent); }
.skip:focus { left: 8px; color: var(--on-accent); }

/* ---------- Annotation: the drawing sheet's small print ---------- */

/* Mono is for marks and measurements only: an index, a column head, a unit, a file name. Never a sentence. */
.note { color: var(--muted); font: 500 0.75rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.tag { display: inline-block; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font: 500 0.75rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.data { font: 400 0.9375rem/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Layout: content sits on the page; space alone does the grouping, with no divider lines ---------- */

.wrap { max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
main { display: grid; gap: var(--section); padding-block: clamp(40px, 6vw, 88px) var(--section); }
main > *, .stack > * { min-width: 0; }
site-header, site-footer, client-logos, process-steps, quote-cta { display: block; }

.stack { display: grid; gap: clamp(var(--space-48), 6vw, 80px); } /* parts of one section: closer than two sections */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--row-gap) var(--col-gap); }
.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }

/* Facts: three short claims, each on its own tinted tile, led by an icon in a solid accent square.
   Icon above the words, so the three line up however their titles wrap; on a phone the icon moves beside them. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.fact { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-24); padding: var(--space-24) var(--space-24) 28px; border-radius: var(--radius-lg); background: var(--surface); }
.fact .title { max-width: 9em; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; } /* 9em: every title, English or Swedish, breaks into two even lines */
.fact-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.fact-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Item: one point in a row of points, with no box or line around it. */
.item h3 + p, .item .title + p { margin-top: var(--space-8); color: var(--muted); font-size: 1rem; line-height: 1.5; }
.item h2 + * { margin-top: var(--space-12); }

/* Panel: the one container, a tint without a border, for a part the visitor works in. */
.panel { padding: clamp(var(--space-24), 3.4vw, var(--space-48)); border-radius: var(--radius-lg); background: var(--surface); }

.head { display: grid; gap: 14px; align-content: start; max-width: 40rem; margin-bottom: clamp(var(--space-32), 4vw, 56px); }
.head p { color: var(--muted); }
.page-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--space-32) var(--col-gap); padding-top: clamp(0px, 2vw, var(--space-24)); }
.page-head-text { display: grid; gap: var(--space-24); }
.page-head p, .lead { max-width: 34em; color: var(--muted); font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; }

/* Split: a heading in the left third, its content in the right two thirds. The heading stays in view beside a long list. */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-32) var(--col-gap); }
.split > .head { align-self: start; position: sticky; top: calc(var(--header) + var(--space-32)); margin-bottom: 0; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); } /* each one a fact tile, see Facts */

/* ---------- Photos ---------- */

/* A photo is a rounded tint tile. Multiply lets a white studio background take the tint,
   so cut-outs and room shots sit alike. The caption goes underneath, never on the photo. */
.photo { display: grid; grid-template-rows: auto auto; gap: var(--space-12); align-content: start; }
.photo-frame { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); background: var(--surface); }
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.photo figcaption { color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.photo-fill { grid-template-rows: 1fr auto; }
.photo-fill .photo-frame { aspect-ratio: auto; min-height: 320px; }

/* ---------- Blocks: prints seen from the side ---------- */

/* Decoration only: always aria-hidden, never with text on it.
   Each block is a print, accent or ink: stacked extrusion layers seen from the side. --w sets a block's share of its row; the gutter is space-16. */
:root {
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M19 24h10M24 19v10' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); /* one registration cross, for the upload drop area */
  --bead: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='8'%3E%3Crect width='100%25' height='7' rx='3.5'/%3E%3C/svg%3E"); /* one layer: a bead with round ends, space-8 tall with its groove */
}
.blocks { display: flex; gap: var(--space-16); height: 72px; }
.blocks-cluster { display: grid; gap: var(--space-16); }
.block { position: relative; flex: var(--w, 1) 1 0; min-width: 0; overflow: hidden; border-radius: var(--radius-lg); }
.block-accent { --fill: var(--accent); --groove: var(--accent-hover); }
.block-ink { --fill: var(--text); --groove: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.block-accent, .block-ink { background: var(--fill); } /* a flat block where masks are not supported */
@supports ((mask-repeat: space) or (-webkit-mask-repeat: space)) {
  /* Print: the groove colour shows between the beads; at their round ends the page shows, so the sides are scalloped. */
  .block-accent, .block-ink { background: linear-gradient(var(--groove), var(--groove)) top center / calc(100% - 8px) calc(100% - 1px) no-repeat; }
  .block-accent::before, .block-ink::before { content: ""; position: absolute; inset: 0; background: var(--fill); -webkit-mask: var(--bead) top / 100% 8px no-repeat space; mask: var(--bead) top / 100% 8px no-repeat space; pointer-events: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--field);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: 600 1.0625rem/1.1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--on-accent); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 1rem; white-space: nowrap; }
.btn[disabled] { border-color: var(--line); background: var(--surface); color: var(--muted); cursor: progress; }
.cta { display: flex; flex-wrap: wrap; gap: var(--space-12); }

/* A link that leads on: a small chevron drawn in CSS, as neither font carries an arrow. */
.more-link { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-weight: 600; }
.more-link::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid; border-right: 1.5px solid; transform: rotate(45deg); }

/* ---------- Header and footer ---------- */

site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top { display: flex; align-items: center; gap: var(--space-24); min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.015em; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: auto; height: 32px; } /* the mark is drawn in dark grey, so it sits on the page as it is */
.top nav { display: flex; gap: 28px; margin-left: auto; font-size: 1rem; }
.top nav a { padding-block: 6px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current] { border-bottom-color: var(--accent); color: var(--text); }
.lang { display: flex; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-strong); }
.lang button { padding: 6px 10px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--muted); font: 500 0.75rem/1.2 var(--font-mono); letter-spacing: 0.06em; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 0 0 1px var(--field); color: var(--text); }

.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-32) 40px; padding-block: var(--space-64); color: var(--muted); font-size: 1rem; }
.foot p { margin-top: var(--space-12); }
.foot nav { display: grid; gap: 6px; justify-items: start; }
.foot a:not(.brand) { color: var(--muted); text-decoration: none; }
.foot a:not(.brand):hover { color: var(--text); }
.foot address a[href] { text-decoration: underline; }

/* ---------- Home: hero ---------- */

.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--space-32) clamp(var(--space-32), 5vw, 80px); }
.hero-text { display: grid; gap: 28px; justify-items: start; }

/* ---------- Hero animation: a file uploaded, processed, printed and shipped ----------
   Four quick scenes of 3 seconds on a 12-second loop, drawn straight on the page. --s is a scene's turn;
   everything in a scene runs on the same loop (plus its own --d), so its keyframes live in 0-25% of the loop.
   Without motion it rests on the finished print. */
.hero-anim { align-self: stretch; min-height: 360px; contain: size; } /* as tall as the hero text: contain keeps the drawing from setting its own height */
.hero-anim svg { display: block; width: 100%; height: 100%; }
.ha-scene { opacity: 0; }
.ha-print { opacity: 1; }
.ha-nozzle { transform: translateY(-64px); }
.ha-ink { fill: var(--text); }
.ha-accent { fill: var(--accent); }
/* Three tints of the accent, lightest to darkest, so shapes read without outlines. */
.ha-soft { fill: var(--accent-soft); }
.ha-light { fill: color-mix(in srgb, var(--accent) 20%, var(--bg)); }
.ha-mid { fill: color-mix(in srgb, var(--accent) 38%, var(--bg)); }
.ha-faint { fill: none; stroke: var(--field); stroke-width: 3; stroke-linecap: round; }
.ha-label { fill: var(--on-accent); font: 500 13px var(--font-mono); letter-spacing: 0.06em; text-anchor: middle; }
.ha-slice { fill: none; stroke: var(--bg); stroke-width: 2; } /* white layer lines on the tinted sides */
.ha-scan { stroke: var(--accent); stroke-width: 2; }
.ha-tick { fill: none; stroke: var(--on-accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ha-tape { stroke: var(--accent); stroke-width: 10; }

@media (prefers-reduced-motion: no-preference) {
  /* A negative delay starts every scene already part-way round the loop, so the later ones begin hidden, not on their first frame. */
  .ha-scene, .ha-scene * { animation: 12s calc(var(--s) * 3s + var(--d, 0s) - 12s) infinite; }
  .ha-scene { animation-name: ha-scene; }
  .ha-file { animation-name: ha-file; animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  .ha-bar { animation-name: ha-bar; transform-box: fill-box; transform-origin: left; }
  .ha-scan { animation-name: ha-scan; }
  .ha-slice { animation-name: ha-in; }
  .ha-pop { animation-name: ha-pop; animation-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1); transform-box: fill-box; transform-origin: center; }
  .ha-layer { animation-name: ha-layer; animation-timing-function: linear; transform-box: fill-box; transform-origin: left; }
  .ha-layer.ha-rtl { transform-origin: right; }
  .ha-nozzle { animation-name: ha-nozzle; animation-timing-function: linear; }
  .ha-nozzle-x { animation-name: ha-nozzle-x; animation-timing-function: linear; }
  .ha-parcel { animation-name: ha-parcel; transform-box: fill-box; transform-origin: center; }
  .ha-part { animation-name: ha-part; animation-timing-function: ease-in; }
  .ha-flap-l { animation-name: ha-flap-l; transform-box: fill-box; transform-origin: 0% 50%; }
  .ha-flap-r { animation-name: ha-flap-r; transform-box: fill-box; transform-origin: 100% 50%; }
  .ha-tape { animation-name: ha-tape; }
  .ha-speed { animation-name: ha-speed; }
}
@keyframes ha-scene { 0% { opacity: 0; } 2%, 23% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes ha-file { 0% { transform: translateY(-110px); opacity: 0; } 7%, 100% { transform: none; opacity: 1; } }
@keyframes ha-bar { 0%, 7% { transform: scaleX(0); } 20%, 100% { transform: scaleX(1); } }
@keyframes ha-scan { 0% { transform: translateY(0); opacity: 0; } 2% { opacity: 1; } 16% { transform: translateY(185px); opacity: 1; } 18%, 100% { transform: translateY(185px); opacity: 0; } }
/* Each slice line and layer shows from its own --d until after its scene has faded,
   and is hidden again before its scene comes round, so nothing flashes at the start of a loop. */
@keyframes ha-in { 0% { opacity: 0; } 2%, 20% { opacity: 1; } 22%, 100% { opacity: 0; } }
@keyframes ha-pop { 0%, 16% { transform: scale(0); } 19%, 100% { transform: scale(1); } }
/* Printing: layer k starts at 0.15s + 0.4s * k and draws out in 0.36s (3% of the loop), alternating direction.
   The head sweeps across with it, then steps up 16px in the gap before the next layer. */
@keyframes ha-layer { 0% { transform: scaleX(0); } 3%, 30% { transform: none; } 31%, 100% { transform: scaleX(0); } }
@keyframes ha-nozzle-x { 0%, 1.25% { transform: translateX(-55px); } 4.25%, 4.58% { transform: translateX(55px); } 7.58%, 7.92% { transform: translateX(-55px); } 10.92%, 11.25% { transform: translateX(55px); } 14.25% { transform: translateX(-55px); } 16%, 100% { transform: none; } }
@keyframes ha-nozzle { 0%, 4.4% { transform: none; } 4.5%, 7.75% { transform: translateY(-16px); } 7.85%, 11.1% { transform: translateY(-32px); } 11.2%, 14.4% { transform: translateY(-48px); } 14.5%, 100% { transform: translateY(-64px); } }
/* Shipping: the open box pops in, the print drops in, the flaps fold shut, the tape goes on, and it zips off to the right. */
@keyframes ha-parcel {
  0% { transform: scale(0.6); opacity: 0; animation-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1); }
  4%, 13% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(0.6, 0, 0.9, 0.4); }
  17%, 100% { transform: translateX(320px); opacity: 0; }
}
@keyframes ha-part { 0%, 4% { transform: translateY(-100px); opacity: 0; } 4.5% { opacity: 1; } 7.5%, 100% { transform: none; opacity: 1; } }
@keyframes ha-flap-l { 0%, 8% { transform: rotate(-120deg); } 10.5%, 100% { transform: none; } }
@keyframes ha-flap-r { 0%, 8.5% { transform: rotate(120deg); } 11%, 100% { transform: none; } }
@keyframes ha-tape { 0%, 11% { opacity: 0; } 12%, 100% { opacity: 1; } }
@keyframes ha-speed { 0%, 12% { opacity: 0; } 13%, 16% { opacity: 1; } 17%, 100% { opacity: 0; } }


/* ---------- Client logos: a centred heading over one full-width moving row ---------- */

.logos { display: grid; gap: var(--space-24); }
.logos h2 { text-align: center; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee ul { display: flex; flex: none; align-items: center; gap: clamp(40px, 6vw, 76px); padding-right: clamp(40px, 6vw, 76px); }
.marquee img { max-width: none; filter: invert(1); opacity: 0.55; } /* the silhouettes are white: inverted, every mark reads as the same grey */
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Home: one tile per material, and one that leads to the guide ---------- */

.tile { display: grid; gap: 14px; align-content: start; grid-column: span 3; color: var(--text); text-decoration: none; }
.tile .photo-frame { aspect-ratio: 1; transition: background-color 0.15s; } /* the photos are square: no crop */
.tile:hover { color: var(--text); }
.tile:hover .photo-frame { background: var(--surface-strong); }
.tile strong { display: block; font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; transition: color 0.15s; }
.tile:hover strong { color: var(--accent); }
.tile small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
/* The eighth tile is a button into the guide: the same square as the photos, but solid accent like the primary
   button, with its words inside and an arrow in a white circle that moves on hover. */
.tile-guide-box { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; padding: var(--space-24); border-radius: var(--radius-lg); background: var(--accent); color: var(--on-accent); transition: background-color 0.15s; }
.tile-guide:hover .tile-guide-box { background: var(--accent-hover); }
.tile-guide strong, .tile-guide:hover strong { color: var(--on-accent); font-size: 1.5rem; line-height: 1.2; }
.tile-guide small { margin-top: 6px; color: color-mix(in srgb, var(--on-accent) 82%, transparent); font-size: 1rem; }
.tile-guide-arrow { position: absolute; top: var(--space-24); right: var(--space-24); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--on-accent); color: var(--accent); transition: transform 0.15s; }
.tile-guide-arrow::after { content: ""; width: 10px; height: 10px; margin-left: -4px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg); }
.tile-guide:hover .tile-guide-arrow { transform: translateX(4px); }

/* ---------- Flow: How it works as a flowchart ----------
   Four fact tiles joined by arrows. A dot runs along each arrow and the step it reaches lights up,
   one step every 2 seconds on an 8-second loop. --i on each step sets its turn. */

.flow { --flow-gap: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--flow-gap); }
.flow .fact { position: relative; }
.flow .fact-icon { animation: flow-step 8s calc(var(--i) * 2s) infinite backwards; }
/* The arrow fills the gap before a step, level with the icons' centres (tile padding + half an icon). */
.flow-arrow { position: absolute; top: 49px; right: 100%; width: var(--flow-gap); height: 2px; background: var(--field); }
.flow-arrow::after { content: ""; position: absolute; right: 1px; top: -4px; width: 10px; height: 10px; border-top: 2px solid var(--field); border-right: 2px solid var(--field); transform: rotate(45deg); }
.flow-arrow::before { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; animation: flow-dot-x 8s calc((var(--i) - 1) * 2s) infinite backwards; }

@keyframes flow-step {
  0%, 28%, 100% { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 0 transparent; }
  3%, 22% { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
}
/* The dot leaves halfway through the previous step's turn and arrives just before this step lights up. */
@keyframes flow-dot-x {
  0%, 12% { left: 0; opacity: 0; }
  13% { left: 0; opacity: 1; }
  23% { left: calc(100% - 8px); opacity: 1; }
  25%, 100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes flow-dot-y {
  0%, 12% { top: 0; opacity: 0; }
  13% { top: 0; opacity: 1; }
  23% { top: calc(100% - 8px); opacity: 1; }
  25%, 100% { top: calc(100% - 8px); opacity: 0; }
}

/* ---------- Closing band: a tinted block with the words, and two blocks beside it ---------- */

.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-16); }
.cta-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px 40px; padding: clamp(var(--space-32), 5vw, 72px); border-radius: var(--radius-lg); background: var(--accent-soft); }
.cta-main p { margin-top: var(--space-12); color: var(--muted); font-size: 1.1875rem; }
.cta-band .blocks { width: clamp(160px, 20vw, 256px); height: auto; }

/* ---------- Services and About ---------- */

.ticks li { position: relative; padding: 8px 0 8px 26px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: calc(8px + 0.8em - 5px); width: 11px; height: 11px; background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat; } /* a cross, like the ones on the blocks */
.prose { display: grid; gap: var(--space-16); max-width: 36em; color: var(--muted); }
.details { display: grid; gap: var(--space-4); color: var(--muted); }
.item .details { margin-top: var(--space-12); }
.about-text { display: grid; gap: var(--space-32); align-content: center; }

/* ---------- Material guide ---------- */

.question { border: 0; }
.question + .question { margin-top: var(--space-32); }
.question legend { padding: 0; margin-bottom: 14px; font-size: 1.125rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--field); border-radius: var(--radius-pill); background: var(--bg); font-size: 1rem; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.chip:hover span { border-color: var(--text); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); font-weight: 600; }
/* A tick, so the choice never relies on colour alone. */
.chip input:checked + span::before { content: ""; width: 11px; height: 6px; margin-top: -3px; border-left: 2px solid; border-bottom: 2px solid; transform: rotate(-45deg); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.unsure { margin-top: var(--space-32); color: var(--muted); font-size: 1rem; }

.result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38%); gap: var(--space-24) var(--space-32); align-content: start; }
.result .tag { margin-bottom: 14px; }
.result h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.result h2:focus { outline: none; }
.result h2 + p { margin-top: var(--space-8); }
.result h3 { margin: var(--space-24) 0 10px; font-size: 1rem; }
.result .btn-primary { margin-top: var(--space-24); }
.result .notice { margin-top: var(--space-16); background: var(--bg); } /* the panel is a tint already, so the notice takes the page colour */
.result-photo { align-self: start; }
.result-photo .photo-frame { aspect-ratio: 1; background: var(--bg); } /* likewise a page-coloured tile */
.more, .also { grid-column: 1 / -1; }

.fit-lines { margin-top: 20px; }
.fit-lines li { display: flex; justify-content: space-between; gap: var(--space-16); padding: 10px 0; font-size: 1rem; }
.fit-lines span { display: inline-flex; align-items: center; gap: var(--space-8); font-weight: 600; white-space: nowrap; }

/* Fit marker: full, half or empty circle, so it never relies on colour alone. */
.fit-2::before, .fit-1::before, .fit-0::before { content: ""; flex: none; width: 13px; height: 13px; border: 1.5px solid var(--accent); border-radius: 50%; }
.fit-2::before { background: var(--accent); }
.fit-1::before { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.fit-0::before { border-color: var(--field); }

.swatches { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.swatch { position: relative; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); font-size: 1rem; line-height: 1.2; }
.sw small { display: block; color: var(--muted); font-size: 0.875rem; }
.dot { flex: none; width: 32px; height: 32px; border: 1px solid var(--field); border-radius: 50%; } /* outlined, so white filament shows on a white pill */
.dot-other { border: 1.5px dashed var(--muted); }
.swatch input:checked + .sw { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.swatch input:focus-visible + .sw { outline: 2px solid var(--focus); outline-offset: 3px; }

.more summary { display: flex; justify-content: space-between; padding: var(--space-16) 0 0; font-weight: 600; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.more summary::after, .faq-item summary::after { content: "+"; flex: none; color: var(--accent); font: 400 1.25rem/1.3 var(--font-mono); }
.more[open] summary::after, .faq-item[open] summary::after { content: "−"; }
.more > p { margin-top: var(--space-16); max-width: 44rem; }
.more > p + p { margin-top: 6px; font-size: 1rem; }
.mat-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.mat-cols li { padding: 6px 0 6px 18px; color: var(--muted); font-size: 1rem; line-height: 1.4; background: linear-gradient(var(--muted), var(--muted)) 0 0.95em / 8px 1.5px no-repeat; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.also .note { margin-right: 6px; }

.table-box { position: relative; overflow-x: auto; } /* relative, so the table's screen-reader text scrolls with it instead of widening the page */
.compare { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { padding: 14px 10px; text-align: center; }
.compare thead th { color: var(--muted); font: 500 0.75rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.compare th:first-child { position: sticky; left: 0; padding-left: 0; background: var(--bg); text-align: left; }
.compare .is-on { background: var(--accent-soft); }
.compare thead .is-on { color: var(--accent); }
.compare td span { display: inline-flex; vertical-align: middle; }
.compare button { padding: 4px 0; border: 0; background: none; color: var(--text); font: 600 1.0625rem/1.2 var(--font-sans); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--field); text-underline-offset: 0.22em; white-space: nowrap; cursor: pointer; }
.compare button:hover { color: var(--accent); text-decoration-color: currentColor; }
.compare .is-shown button { color: var(--accent); text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); padding-top: var(--space-16); color: var(--muted); font-size: 0.875rem; }
.legend span { display: inline-flex; align-items: center; gap: var(--space-8); }

/* ---------- Quote form: it sits on the page, not in a panel ---------- */

.quote-side { display: grid; gap: var(--space-16); align-self: start; position: sticky; top: calc(var(--header) + var(--space-32)); }
.quote-side h1 { margin-bottom: var(--space-8); font-size: clamp(2.25rem, 4vw, 3.25rem); }
.quote-side p { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.quote-side h1 + p { color: var(--text); font-size: 1.125rem; line-height: 1.6; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-24) var(--space-16); }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: var(--space-8); align-content: start; }
.field > label, .label { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.form fieldset { min-width: 0; margin-top: var(--space-16); border: 0; }
.form legend { padding: 0; margin-bottom: var(--space-12); }
.form input:not([type="checkbox"], [type="radio"], [type="file"]), .form select, .form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--field);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.4 var(--font-sans);
  transition: border-color 0.15s;
}
.form input:not([type="checkbox"], [type="radio"], [type="file"]):hover, .form select:hover, .form textarea:hover { border-color: var(--text); }
.form input[type="number"] { font-family: var(--font-mono); font-size: 1rem; }
.form textarea { resize: vertical; }
.form ::placeholder { color: var(--muted); opacity: 1; }

/* A dashed line means "put something here"; it appears nowhere else. */
.drop { position: relative; display: grid; gap: 6px; justify-items: center; padding: var(--space-48) 20px; border: 1.5px dashed var(--field); border-radius: var(--radius-lg); background: var(--surface); text-align: center; transition: background-color 0.15s, border-color 0.15s; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop > span { position: relative; padding-inline: 10px; background: inherit; } /* the words sit on the area's own colour, so no cross runs through them */
/* A faint grid of crosses, like a build plate waiting for a part. */
@supports ((mask-repeat: space) or (-webkit-mask-repeat: space)) {
  .drop::before { content: ""; position: absolute; inset: 0; background: var(--field); opacity: 0.4; -webkit-mask: var(--cross) center / 48px 48px space; mask: var(--cross) center / 48px 48px space; pointer-events: none; }
}
.drop:hover { border-color: var(--text); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop.is-over { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.field > .drop { font-weight: 400; } /* the area is a label, but only its first line reads as one */
.drop-text { font-weight: 600; }
.drop-text u { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.drop-hint { color: var(--muted); font-size: 1rem; }

.files li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-16); padding: 10px 0; font-size: 1rem; }
/* One file's own material, colour, quality and copies: a row of four under its name. */
.file-settings { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 6rem; gap: var(--space-12); padding-bottom: var(--space-8); }
.file-settings label { display: grid; gap: 6px; color: var(--muted); font-size: 0.875rem; }
.form .file-settings select, .form .file-settings input { min-height: 44px; padding: 8px 12px; font-size: 1rem; }
.files span:first-child { overflow-wrap: anywhere; }
.files .data { color: var(--muted); white-space: nowrap; }
.files button { padding: 0; margin-left: var(--space-12); border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; cursor: pointer; }
.files button:hover { color: var(--accent-hover); }
.error { color: var(--alert); font-size: 1rem; white-space: pre-line; }
.error:empty { display: none; }

.consent { display: flex; gap: var(--space-12); align-items: flex-start; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }

/* Notice: a short message that answers something the visitor just did. */
.notice { padding: 14px 16px; border-radius: var(--radius-md); background: var(--accent-soft); font-size: 1rem; line-height: 1.5; }
.sent { padding: var(--space-32); border-radius: var(--radius-lg); }
.sent:focus { outline: none; }
.sent h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.sent p { margin-top: 10px; color: var(--muted); font-size: 1.125rem; }

/* ---------- FAQ: questions separated by space ---------- */

.faq { display: grid; gap: clamp(var(--space-48), 6vw, 88px); }
.faq-group > h2 { align-self: start; position: sticky; top: calc(var(--header) + var(--space-32)); padding-top: 18px; }
.faq-item summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item p { max-width: 44rem; padding: 0 0 26px; color: var(--muted); }

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .hero-anim { aspect-ratio: 5 / 4; min-height: 0; }
  /* Too narrow for four boxes in a row: the flowchart runs downwards, icons beside the titles. */
  .flow { --flow-gap: 36px; grid-template-columns: minmax(0, 1fr); }
  .flow .fact { flex-direction: row; align-items: center; gap: 18px; padding: 18px 20px; }
  .flow-arrow { top: auto; right: auto; bottom: 100%; left: 45px; width: 2px; height: var(--flow-gap); }
  .flow-arrow::after { top: auto; right: auto; bottom: 2px; left: -4px; transform: rotate(135deg); }
  .flow-arrow::before { top: 0; left: -3px; animation-name: flow-dot-y; }
  .hero, .split, .page-head, .cta-band { grid-template-columns: minmax(0, 1fr); }
  .c3, .c4, .tile { grid-column: span 6; }
  .c5, .c7, .c8 { grid-column: 1 / -1; }
  .photo-fill .photo-frame { aspect-ratio: 4 / 3; min-height: 0; }
  .cta-band .blocks { width: auto; height: 56px; }
  .quote-side, .split > .head, .faq-group > h2 { position: static; }
  .faq-group > h2 { padding-top: 0; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  site-header { position: static; } /* two rows of header would take too much of a phone screen if they stuck */
  .top { flex-wrap: wrap; gap: 0 var(--space-12); padding-top: 10px; }
  .top nav { order: 5; width: 100%; gap: 22px; margin: 0; padding-block: 6px 4px; overflow-x: auto; }
  .lang { margin-left: auto; }
  html { scroll-padding-top: var(--space-16); }
  .file-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-12); }
  .fact { flex-direction: row; align-items: center; gap: 18px; padding: 18px 20px; }
  .fact .title { max-width: none; }
  .pairs .fact { align-items: flex-start; } /* beside a few lines of text the icon sits at the top */
}

@media (max-width: 600px) {
  .brand-name { display: none; } /* the mark already reads PM3D; the link keeps its name for screen readers */
  .foot .brand-name { display: inline; }
  .c3, .c4, .c6 { grid-column: 1 / -1; }
  .result, .form, .mat-cols, .pairs, .foot { grid-template-columns: minmax(0, 1fr); }
  .result-photo { order: -1; }
  .result-photo .photo-frame { aspect-ratio: 16 / 9; }
  .tile strong { font-size: 1.125rem; }
  .tile-guide-box { padding: var(--space-16); }
  .tile-guide strong, .tile-guide:hover strong { font-size: 1.125rem; }
  .tile-guide small { font-size: 0.875rem; }
  .tile-guide-arrow { top: var(--space-16); right: var(--space-16); width: 36px; height: 36px; }
  .cta-band .btn { flex: 1 1 100%; }
  .blocks { height: 56px; }
  .blocks-cluster .blocks + .blocks { display: none; } /* one row of blocks is enough on a phone */
}

/* ---------- Motion: blocks rise into place ----------
   The top of each page rises in once on load. Everything below rises in as it scrolls into view,
   driven by the scroll position itself, so no script; a browser without scroll timelines shows it still.
   Off for visitors who ask for reduced motion. */
@keyframes rise { from { opacity: 0; translate: 0 32px; } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :is(.head, .fact, .tile, .photo, .item, .ticks li, .panel, .table-box, .faq-item, .logos, .cta-main, .cta-band .blocks) {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 160px; /* done once its top is 160px above the bottom of the screen */
    }
  }
  :is(.hero, .page-head, main > .grid:first-child, .stack > .grid:first-child) > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  :is(.hero, .page-head, main > .grid:first-child, .stack > .grid:first-child) > :nth-child(2) { animation-delay: 0.12s; }
  .hero + client-logos > .logos { animation: rise 0.7s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) both; } /* on screen at load on the home page, so it rises in with the hero */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip span, .tile .photo-frame, .tile strong, .tile-guide-box, .tile-guide-arrow, .drop, .form input, .form select, .form textarea { transition: none; }
  /* The banner becomes a still, wrapped row of logos. */
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; animation: none; }
  .marquee ul { flex: auto; flex-wrap: wrap; justify-content: center; gap: 28px var(--space-48); padding-right: 0; }
  .marquee ul[aria-hidden] { display: none; }
  /* The flowchart stands still: every step solid, no moving dot. */
  .flow .fact-icon, .flow-arrow::before { animation: none; }
}
