/* ==========================================================================
   3D tisk Šroubci — "slicer viewport" design system
   Colour meaning follows slicer conventions:
   amber = extrusion (things that make / act), cyan = travel (movement, focus)
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin + Czech subset) ---------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sroubci Mono"; src: url("../fonts/dejavusansmono-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0E1726;          /* slicer viewport */
  --bg-raised: #132036;   /* panels */
  --bg-input: #0B1320;
  --grid: #22324B;        /* build-plate grid, hairlines */
  --grid-strong: #2E4262;
  --ink: #E8EDF3;
  --muted: #A3B0C2;
  --amber: #FF7A3C;       /* extrusion */
  --amber-hover: #FF9161;
  --amber-ink: #0E1726;
  --cyan: #39C2C9;        /* travel */

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", system-ui, sans-serif;
  --font-mono: "Sroubci Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* type scale: perfect fourth (1.333) from 17px */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2: clamp(2rem, 1.35rem + 2.4vw, 3.25rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 4.6vw, 5.25rem);

  --space-section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --radius: 10px;
  --header-h: 68px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.022em; text-wrap: balance; }
h3 { font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0; font-variant-numeric: tabular-nums; }
::selection { background: var(--amber); color: var(--amber-ink); }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--amber); color: var(--amber-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }

/* Draft placeholders: easy to spot, easy to grep ("todo") */
.todo {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.4;
  color: var(--amber);
  border: 1px dashed rgba(255, 122, 60, 0.65);
  background: rgba(255, 122, 60, 0.08);
  padding: 3px 8px; border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 8px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--amber); color: var(--amber-ink); }
.btn--primary:hover { background: var(--amber-hover); }
.btn--ghost { border-color: var(--grid-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--muted); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 23, 38, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grid);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-header__actions { display: flex; align-items: center; gap: 14px; }
.lang-link { color: var(--muted); font-size: 0.9375rem; font-weight: 600; text-decoration: none; padding: 6px 4px; }
.lang-link:hover { color: var(--ink); }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--grid-strong); color: var(--ink);
  border-radius: 8px; height: 40px; padding: 0 12px; font: 500 0.9375rem var(--font-body); cursor: pointer;
}

/* ---------- Logo: FDM wordmark, nozzle replaces the i-dot ---------- */
.logo {
  display: inline-flex; align-items: flex-end; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.625rem; letter-spacing: -0.035em; line-height: 1;
  padding-top: 8px;
}
.logo__word {
  color: var(--ink);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo__word {
    color: transparent;
    background-image:
      linear-gradient(to top, var(--ink) 0 52%, transparent 52%),
      repeating-linear-gradient(to bottom, var(--ink) 0 0.1em, transparent 0.1em 0.15em);
    -webkit-background-clip: text; background-clip: text;
  }
}
.logo__i { position: relative; }
.logo__nozzle {
  position: absolute; left: 50%; top: 0.08em;
  width: 0.54em; height: 0.46em; transform: translateX(-46%);
}

/* ---------- Hero: the slicer viewport ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--grid); }
.hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  align-items: center;
  min-height: min(780px, calc(100svh - var(--header-h) - 96px));
  padding-block: clamp(40px, 6vw, 72px) 32px;
}
.hero__copy { grid-column: 1 / span 6; grid-row: 1; position: relative; z-index: 2; }
.hero__title { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.035em; max-width: 11ch; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  /* printed-layer texture: fine horizontal gaps like FDM layer lines */
  .hero__title {
    /* brand FDM effect, per line: solid lower half, visible layer lines in the upper half */
    color: transparent;
    background-image:
      linear-gradient(to top, var(--ink) 0 50%, transparent 50%),
      repeating-linear-gradient(to bottom, var(--ink) 0 0.055em, transparent 0.055em 0.075em);
    background-size: 100% 0.98em;
    background-repeat: repeat-y;
    -webkit-background-clip: text; background-clip: text;
  }
}
@media (forced-colors: active) { .hero__title, .logo__word { color: CanvasText; background: none; } }
.hero__sub { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.375rem, 1rem + 1.2vw, 1.875rem); letter-spacing: -0.015em; color: var(--muted); margin: 18px 0 26px; line-height: 1.2; }
.hero__lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink); max-width: 34em; margin-bottom: 32px; }
.hero__lead span { color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.viewport {
  grid-column: 6 / span 7; grid-row: 1; position: relative; z-index: 1;
  margin-right: clamp(-48px, -3vw, -20px); aspect-ratio: 68 / 60;
}
.viewport__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.viewport.is-dragging .viewport__canvas { cursor: grabbing; }
.viewport__fallback { display: none; position: absolute; inset: 8% 14% 8% 6%; width: 80%; height: auto; object-fit: contain; }
.viewport.no-webgl .viewport__canvas, .viewport.no-webgl .viewport__hint { display: none; }
.viewport.no-webgl .viewport__fallback { display: block; }
.viewport__hint { position: absolute; left: 6%; bottom: 4%; margin: 0; font-size: 0.8125rem; color: var(--muted); pointer-events: none; }
.viewport__hud {
  position: absolute; right: 8px; top: 6%; bottom: 10%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.viewport__readout { text-align: right; line-height: 1.5; min-width: 9.5em; align-self: flex-end; margin: 0; }
.viewport__readout strong { color: var(--ink); font-weight: 400; }
.layer-slider {
  flex: 1; min-height: 160px; width: 28px; margin: 0; cursor: ns-resize;
  writing-mode: vertical-lr; direction: rtl;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.layer-slider::-webkit-slider-runnable-track { width: 4px; background: var(--grid-strong); border-radius: 2px; }
.layer-slider::-moz-range-track { width: 4px; background: var(--grid-strong); border-radius: 2px; }
.layer-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 14px; margin-left: -9px;
  border-radius: 4px; background: var(--cyan); border: 2px solid var(--bg);
}
.layer-slider::-moz-range-thumb { width: 22px; height: 14px; border-radius: 4px; background: var(--cyan); border: 2px solid var(--bg); }
.viewport__replay {
  background: none; border: 0; padding: 4px 2px; color: var(--muted);
  font: 500 0.8125rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.viewport__replay:hover { color: var(--ink); }
.viewport.is-done .viewport__readout [data-read-status] { color: var(--cyan); }

.hero__specs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--grid); margin: 0;
}
.hero__specs div { padding: 18px 20px 22px 0; }
.hero__specs div + div { padding-left: 20px; border-left: 1px solid var(--grid); }
.hero__specs dt { font-size: var(--fs-small); color: var(--muted); margin-bottom: 4px; }
.hero__specs dd { margin: 0; font-weight: 500; }
.hero__specs .mono { white-space: nowrap; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); border-bottom: 1px solid var(--grid); }
.section__head { max-width: 40rem; margin-bottom: clamp(36px, 4vw, 56px); }
.section__title { font-size: var(--fs-h2); }
.section__intro { color: var(--muted); font-size: var(--fs-lead); line-height: 1.55; margin: 18px 0 0; max-width: 36em; }
.section__head .todo { margin-top: 16px; }

/* Services: sticky intro + list */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.services .section__head { grid-column: 1 / span 4; align-self: start; }
.services__list { grid-column: 6 / span 7; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.services__item { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 30px 0 32px; border-top: 1px solid var(--grid); }
.services__item h3 { font-size: 1.25rem; }
.services__item p { font-size: 1rem; }
.services__item p { color: var(--muted); margin: 0; max-width: 38em; }

/* Materials table */
.materials-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.materials-table th, .materials-table td { text-align: left; vertical-align: top; padding: 20px 24px 20px 0; border-top: 1px solid var(--grid); }
.materials-table thead th { font-size: var(--fs-small); color: var(--muted); font-weight: 500; padding-block: 0 14px; border-top: 0; }
.materials-table tbody tr:last-child > * { border-bottom: 1px solid var(--grid); }
.materials-table tbody th { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em; width: 18%; }
.materials-table td { color: var(--muted); }
.materials-table td:first-of-type { color: var(--ink); width: 38%; }

/* Process: a sequence joined by a travel move */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; }
.process__step { position: relative; padding-top: 64px; }
/* travel move from one step to the next */
.process__step:not(:last-child)::after {
  content: ""; position: absolute; left: 45px; right: -24px; top: 18px;
  border-top: 1.5px dashed var(--cyan); opacity: .75;
}
.process__num {
  position: absolute; top: 0; left: 0;
  width: 37px; height: 37px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--amber); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.875rem;
}
.process__step h3 { font-size: 1.375rem; margin-bottom: 10px; }
.process__step p { color: var(--muted); margin: 0; }
.process__step .todo { margin-top: 12px; }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.faq .section__head { grid-column: 1 / span 4; }
.faq__list { grid-column: 6 / span 7; border-top: 1px solid var(--grid); }
.faq__item { border-bottom: 1px solid var(--grid); }
.faq__item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 48px 22px 0; font-weight: 600; font-size: 1.125rem; line-height: 1.4;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(var(--amber), var(--amber)) center / 14px 2px no-repeat,
    linear-gradient(var(--amber), var(--amber)) center / 2px 14px no-repeat;
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: #fff; }
.faq__answer { padding: 0 48px 24px 0; color: var(--muted); }
.faq__answer p:last-child { margin-bottom: 0; }

/* Quote form */
.quote { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.quote__main { grid-column: 1 / span 7; }
.quote__aside { grid-column: 9 / span 4; padding-top: 8px; }
.form-panel { background: var(--bg-raised); border: 1px solid var(--grid); border-radius: 14px; padding: clamp(24px, 3vw, 40px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: 0.9375rem; }
.field .optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: var(--bg-input); border: 1px solid #5B7196; border-radius: 8px;
  padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }
.field input::placeholder, .field textarea::placeholder { color: #8090A6; }
.form-note { color: var(--muted); font-size: 0.9375rem; margin: 22px 0 0; }
.form-note a { color: var(--ink); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.form-status { margin: 0; font-weight: 500; }
.form-status[data-state="success"] { color: var(--cyan); }
.form-status[data-state="error"] { color: var(--amber); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.contact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-list li { padding: 18px 0; border-top: 1px solid var(--grid); }
.contact-list li:last-child { border-bottom: 1px solid var(--grid); }
.contact-list span { display: block; color: var(--muted); font-size: var(--fs-small); margin-bottom: 2px; }
.contact-list a { font-size: 1.1875rem; font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--amber); }
.quote__aside h3 { font-size: 1.375rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 48px 56px; color: var(--muted); font-size: 0.9375rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; }
.site-footer__id { margin: 14px 0 0; max-width: 40em; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 8px 0 0; }
.site-footer__links a { color: var(--ink); text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Text pages (privacy, 404) ---------- */
.prose { max-width: 44rem; padding-block: clamp(48px, 8vw, 96px); }
.prose h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); margin-bottom: 28px; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 12px; letter-spacing: -0.01em; }
.prose p, .prose li { color: #CBD4E0; }
.prose h3 { font-size: 1.125rem; margin: 28px 0 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose .todo { margin-bottom: 8px; }
.notfound { min-height: 70svh; display: grid; align-content: center; }
.notfound p { font-size: var(--fs-lead); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site-nav ul { gap: 18px; }
  .hero__copy { grid-column: 1 / span 7; }
  .viewport { grid-column: 6 / span 7; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--grid);
    display: none; margin: 0;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px clamp(20px, 4vw, 48px) 16px; }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.0625rem; border-bottom: 1px solid var(--grid); }
  .site-header__inner { gap: 12px; }
  .site-header__actions { margin-left: auto; }

  .hero__grid { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .hero__copy, .viewport { grid-column: 1; grid-row: auto; }
  .viewport { margin: 8px -12px 0; }
  .hero__title { max-width: 12ch; }
  .hero__specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__specs div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__specs div:nth-child(n+3) { border-top: 1px solid var(--grid); }

  .services, .faq, .quote { grid-template-columns: 1fr; }
  .services .section__head, .faq .section__head { grid-column: 1; position: static; }
  .services__list, .faq__list, .quote__main, .quote__aside { grid-column: 1; }
  .services__list { grid-template-columns: 1fr; }
  .quote__aside { margin-top: 48px; }

  .process { grid-template-columns: 1fr; row-gap: 36px; }
  .process__step { padding: 4px 0 0 64px; }
  .process__step:not(:last-child)::after { left: 18px; right: auto; top: 45px; bottom: -28px; border-top: 0; border-left: 1.5px dashed var(--cyan); }

}
@media (max-width: 640px) {
  .header-cta { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .materials-table thead { display: none; }
  .materials-table, .materials-table tbody, .materials-table tr, .materials-table th, .materials-table td { display: block; width: auto !important; }
  .materials-table tbody tr { border-top: 1px solid var(--grid); padding: 18px 0; }
  .materials-table tbody tr:last-child { border-bottom: 1px solid var(--grid); }
  .materials-table th, .materials-table td, .materials-table tbody tr:last-child > * { border: 0; padding: 0 0 4px; }
  .hero__specs { grid-template-columns: 1fr; }
  .hero__specs div, .hero__specs div + div, .hero__specs div:nth-child(3) {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 14px 0; border-left: 0; border-top: 1px solid var(--grid);
  }
  .hero__specs div:first-child { border-top: 0; }
  .hero__specs dt { margin: 0; }
  .hero__specs dd { text-align: right; }
  .viewport__hud { top: 2%; right: 4px; }
  .viewport__readout { min-width: 0; font-size: 0.75rem; }
  .hero__specs div { padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


/* ---------- Photos ---------- */
figure { margin: 0; }
figcaption { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; margin-top: 12px; }
.photo, .spare__photo img, .gallery img, .process-layout__photo img { width: 100%; height: auto; border-radius: 12px; background: var(--bg-raised); }

/* Spare parts: before / after */
.spare__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.spare__photo { grid-column: 1 / span 7; }
.spare__copy { grid-column: 9 / span 4; }
.spare__copy .section__intro { margin-top: 16px; }
.spare__copy .btn { margin-top: 28px; }

/* What we print: real work */
.gallery {
  list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px;
  grid-auto-rows: auto;
}
.gallery__item figure { display: flex; flex-direction: column; height: 100%; }
.gallery__item img { flex: 1 1 auto; min-height: 0; object-fit: cover; height: 100%; }
.gallery__item--insert { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.gallery__item--flange { grid-column: 8 / span 5; grid-row: 1; }
.gallery__item--favors { grid-column: 8 / span 5; grid-row: 2; }
.gallery__item--handles { grid-column: 1 / span 4; grid-row: 3; }
.gallery__item--compass { grid-column: 5 / span 5; grid-row: 3; }
.gallery__item--chess { grid-column: 10 / span 3; grid-row: 3; }
.gallery__item--flange img, .gallery__item--favors img { aspect-ratio: 16 / 10; }
.gallery__item--handles img, .gallery__item--compass img, .gallery__item--chess img { aspect-ratio: 4 / 3.2; height: auto; }

/* Process with the workshop photo */
.process-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.process-layout__photo { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
.process-layout__steps { grid-column: 7 / span 6; }
.process-layout .process { grid-template-columns: 1fr; row-gap: 40px; }
.process-layout .process__step { padding: 4px 0 0 64px; }
.process-layout .process__step:not(:last-child)::after { left: 18px; right: auto; top: 45px; bottom: -32px; border-top: 0; border-left: 1.5px dashed var(--cyan); }

@media (max-width: 900px) {
  .spare__grid, .process-layout { grid-template-columns: 1fr; }
  .spare__photo, .spare__copy, .process-layout__photo, .process-layout__steps { grid-column: 1; }
  .spare__copy { margin-top: 32px; }
  .process-layout__photo { position: static; max-width: 520px; margin-bottom: 48px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .gallery__item--insert { grid-column: 1 / -1; grid-row: auto; }
  .gallery__item--flange, .gallery__item--favors, .gallery__item--handles, .gallery__item--compass, .gallery__item--chess { grid-column: auto; grid-row: auto; }
  .gallery__item img { aspect-ratio: 4 / 3; height: auto; }
  .viewport { margin: 8px -12px 0; }
}
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
}
