/* ==========================================================================
   Terra Lab — styles
   Palette: anthracite (grain), black, graphite, concrete, white
            + one accent, Terra zelena, used sparingly.
   Shape: plain rectangles with rounded corners (radii --cut-sm/md/lg).
   Type: Figtree, semi-bold headings and light lead text (from the old Terra Lab page).
   ========================================================================== */

:root {
  --anthracite: #212223;        /* matches the background photo's average tone */
  --anthracite-deep: #1F2123;
  --black: #000000;
  --graphite: #55585B;
  --concrete: #B4B6B8;
  --mist: #ECEDED;
  --white: #FFFFFF;
  --accent: #3CC47C;        /* Terra zelena — fills, and text on dark */
  --accent-hover: #5CD493;
  --on-accent: #062615;     /* text on accent fills */
  --accent-ink: #187A47;    /* accent as text/lines on light surfaces */
  --error-dark: #FF9C94;
  --error-light: #B3261E;

  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --max: 1240px;
  --header-h: 72px;
  --cut-sm: 8px;                      /* corner radii */
  --cut-md: 12px;
  --cut-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--anthracite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  hyphens: manual;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }   /* height:auto keeps proportions when width shrinks */
button { font: inherit; color: inherit; }

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

.sr-only {
  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: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

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

/* ---------- Surfaces ---------- */
.dark {
  --bg: var(--anthracite);
  --fg: var(--white);
  --fg-2: var(--concrete);
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .34);
  --ph: #35383B;
  --ph-lines: rgba(255, 255, 255, .045);
  --accent-text: var(--accent);
  --focus: var(--accent);
  --error: var(--error-dark);
  background-color: var(--bg);
  color: var(--fg);
}

.light {
  --bg: var(--white);
  --fg: var(--black);
  --fg-2: var(--graphite);
  --line: #DCDDDE;
  --line-strong: #A9ABAD;
  --ph: var(--mist);
  --ph-lines: rgba(0, 0, 0, .05);
  --accent-text: var(--accent-ink);
  --focus: var(--accent-ink);
  --error: var(--error-light);
  background-color: var(--bg);
  color: var(--fg);
}

.mist {
  --bg: var(--mist);
  --fg: var(--black);
  --fg-2: #4A4D50;
  --line: #CFD1D2;
  --line-strong: #9EA1A3;
  --ph: #DCDEDF;
  --ph-lines: rgba(0, 0, 0, .055);
  --accent-text: var(--accent-ink);
  --focus: var(--accent-ink);
  --error: var(--error-light);
  background-color: var(--bg);
  color: var(--fg);
}

/* Dark sections: abstract black organic, layer-lined structure
   (Media/"Apstraktna crna organska arhitektura", assets/img/bg-organska*.jpg)
   under a light dark veil for readable text. Phones get the smaller file.
   The previous generated line background is kept in _backup/lines-bg-v3-talasi. */
.grain {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)),
    url("../assets/img/bg-organska-sm.jpg");
  background-size: auto, cover;
  background-position: center, 70% center;
}
@media (min-width: 761px) {
  .grain {
    background-image:
      linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)),
      url("../assets/img/bg-organska.jpg");
  }
}
/* On computers the image stays fixed while the page scrolls over it:
   one continuous backdrop behind every dark section, with a sense of depth. */
@media (min-width: 1024px) and (hover: hover) {
  .grain { background-attachment: scroll, fixed; }
}
/* Generated line background (js/lines-bg.js): one fixed canvas behind the page.
   When it runs, dark sections in <main> become transparent so it shows through. */
.lines-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.linesbg-on main .grain { background-image: none; background-color: transparent; }

/* Keep text readable on the grain: darker behind the hero text, soft text shadow */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(10, 11, 12, .35);
}
@media (min-width: 960px) {
  .hero::before {
    background: linear-gradient(90deg, rgba(10, 11, 12, .62) 0%, rgba(10, 11, 12, .3) 48%, rgba(10, 11, 12, 0) 78%);
  }
}
.grain .lead, .grain .body-text, .grain p, .grain dt, .grain li { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }

/* ---------- Frame system (rounded rectangles, radius --cut) ----------
   The shape is painted by two pseudo-layers, so the element itself stays
   unclipped and its focus outline remains visible:
   ::before = edge colour (--cut-line), ::after = fill inset 1px (--cut-fill). */
.pill, .btn, .badge, .chip, .tech, .printer, .inquiry, .lb-btn, .nav-dd-panel, .social-btn, .mat-btn,
.nav-desktop a, .lang-switch button {
  --cut: var(--cut-md);
  --cut-line: transparent;
  --cut-fill: transparent;
  position: relative;
  isolation: isolate;
  background: none;
  border: 0;
  border-radius: 0;
}
:is(.pill, .btn, .badge, .chip, .tech, .printer, .inquiry, .lb-btn, .nav-dd-panel, .social-btn, .mat-btn, .nav-desktop a, .lang-switch button)::before,
:is(.pill, .btn, .badge, .chip, .tech, .printer, .inquiry, .lb-btn, .nav-dd-panel, .social-btn, .mat-btn, .nav-desktop a, .lang-switch button)::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  transition: background-color .2s var(--ease);
}
:is(.pill, .btn, .badge, .chip, .tech, .printer, .inquiry, .lb-btn, .nav-dd-panel, .social-btn, .mat-btn, .nav-desktop a, .lang-switch button)::before {
  inset: 0;
  background: var(--cut-line);
  clip-path: inset(0 round var(--cut));
}
:is(.pill, .btn, .badge, .chip, .tech, .printer, .inquiry, .lb-btn, .nav-dd-panel, .social-btn, .mat-btn, .nav-desktop a, .lang-switch button)::after {
  inset: 1px;
  background: var(--cut-fill);
  clip-path: inset(0 round calc(var(--cut) - 1px));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); }

/* Primary action: Terra zelena */
.btn-accent { --cut-line: var(--accent); --cut-fill: var(--accent); color: var(--on-accent); }
.btn-accent:hover { --cut-line: var(--accent-hover); --cut-fill: var(--accent-hover); }

.btn-light { --cut-line: var(--white); --cut-fill: var(--white); color: var(--black); }
.btn-light:hover { --cut-line: var(--concrete); --cut-fill: var(--concrete); }

.btn-ghost { --cut-line: var(--line-strong); --cut-fill: var(--bg); color: var(--fg); }
.btn-ghost:hover { --cut-line: var(--fg); }

.btn-block { width: 100%; }

.text-btn {
  background: none;
  border: 0;
  padding: 6px 2px;
  min-height: 32px;
  color: var(--fg-2);
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-btn:hover { color: var(--fg); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  --cut: var(--cut-sm);
  --cut-line: var(--line-strong);
  --cut-fill: var(--bg);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--fg-2);
  white-space: nowrap;
}
.badge-accent { --cut-line: var(--accent); --cut-fill: var(--accent); color: var(--on-accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  pointer-events: none;
  --focus: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 12px var(--gutter);
}

.pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  --cut: var(--cut-sm);               /* tighter corners in the header bar */
  /* frosted glass (see .pill::before below): a thin light rim and a slightly
     lighter fill, so the bar stands out on the dark line background too */
  --cut-line: rgba(255, 255, 255, .16);
  --cut-fill: rgba(38, 40, 43, .8);
  color: var(--white);
}
/* Frosted glass: blur what's behind the bar. On the rounded layer, so the
   blur follows the corners too. */
.pill::before {
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
}

/* The logo sits with the same gap on all four sides of its box: side padding
   = (bar height - logo height) / 2; 1px less on the right, where the SVG
   has a little empty space after the "b". */
.brand {
  --logo-h: 28px;
  --gap: calc((48px - var(--logo-h)) / 2);
  padding: 0 calc(var(--gap) - 1px) 0 var(--gap);
  text-decoration: none;
}
/* Outlined logo (icon + Conthrax wordmark as paths), 143:27 */
.brand-logo { display: block; height: 28px; width: auto; flex: none; }
.site-header .brand-logo { height: var(--logo-h); }
/* Larger on computers: the two triangles in the mark are tiny at 28 px and
   their slanted edges look stepped on standard-density screens. */
@media (min-width: 760px) {
  .brand { --logo-h: 34px; }
}
.footer-brand .brand-logo { height: 26px; }

.nav-desktop { display: none; padding: 4px; gap: 2px; }
.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  --cut: 5px;                         /* bar radius minus its 4px padding: concentric */
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: #D2D4D6;                     /* lighter than before: stays readable on the see-through bar */
  transition: color .2s var(--ease);
}
.nav-desktop a:hover { color: var(--white); }
.nav-desktop a[aria-current="location"] { color: var(--white); --cut-line: rgba(255, 255, 255, .12); }
.nav-desktop a::before, .nav-desktop a::after { transition: none; }
.nav-desktop a[aria-current="location"]::after {
  /* small accent tick marking the current section */
  inset: auto auto 7px 14px;
  width: 12px;
  height: 2px;
  clip-path: none;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { pointer-events: auto; --cut: var(--cut-sm); }

.lang-switch { padding: 4px; gap: 2px; }
.lang-switch button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 8px;
  --cut: 5px;
  color: #D2D4D6;
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] { --cut-line: var(--white); color: var(--black); }
.lang-switch button:focus-visible { outline-offset: 1px; }

.menu-btn {
  justify-content: center;
  width: 48px;
  padding: 0;
  cursor: pointer;
}
.menu-icon,
.menu-icon::before {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease);
}
.menu-icon { position: relative; transform: translateY(-3px); }
.menu-icon::before { content: ""; position: absolute; top: 6px; left: 0; }
.menu-btn[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }

.header-cta { display: none; }

@media (max-width: 400px) {
  .header-inner { gap: 6px; }
  .header-actions { gap: 6px; }
  .brand { padding: 0 14px 0 12px; }
  .brand .brand-logo { height: 22px; }
  .lang-switch button { min-width: 34px; padding: 0 6px; }
}

@media (min-width: 720px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .nav-desktop { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Services dropdown: opens on hover and on keyboard focus */
.nav-dd { position: relative; display: inline-flex; }
.nav-desktop .nav-dd-trigger { gap: 6px; padding-right: 10px; }
.dd-chev {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease);
}
.nav-dd-menu {
  position: absolute;
  top: 100%;
  left: -4px;
  z-index: 60;
  min-width: 250px;
  padding-top: 12px;                 /* hover bridge between trigger and panel */
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu,
.nav-dd.is-open .nav-dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.nav-dd:hover .dd-chev,
.nav-dd:focus-within .dd-chev,
.nav-dd.is-open .dd-chev { transform: rotate(180deg); }
.nav-dd.is-closed .nav-dd-menu { opacity: 0; transform: translateY(-4px); pointer-events: none; }
.nav-dd.is-closed .dd-chev { transform: none; }
.nav-dd-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  --cut: var(--cut-md);
  --cut-line: rgba(31, 33, 35, .97);
}
.nav-desktop .nav-dd-panel a { justify-content: flex-start; min-height: 44px; white-space: nowrap; }
.nav-desktop .nav-dd-panel a:hover { --cut-line: rgba(255, 255, 255, .08); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.625rem, 7vw, 2.25rem);
  font-weight: 650;
  line-height: 1.15;
  text-decoration: none;
}
.mobile-sub { display: flex; flex-direction: column; padding-left: 16px; border-left: 2px solid var(--accent); margin: 4px 0 4px 2px; }
.mobile-menu .mobile-sub a {
  padding: 8px 0;
  border-bottom: 0;
  font-size: clamp(1.125rem, 5vw, 1.375rem);
  font-weight: 550;
  color: var(--fg-2);
}
.mobile-menu-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}
.mobile-menu-tel { color: var(--fg-2); text-decoration: none; font-size: 1.0625rem; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: calc(var(--header-h) + 40px) 0 40px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 13ch;
}
/* Rotating service under the heading, typed letter by letter (js/intro.js) */
.ht-rot {
  display: block;
  margin-top: .14em;
  min-height: 1.1em;
  font-size: .7em;
  white-space: nowrap;
  color: var(--accent);
}
.ht-caret {
  display: inline-block;
  width: .08em;
  height: .9em;
  margin-left: .06em;
  vertical-align: -.08em;
  background: var(--accent);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* ---------- Entrance and scroll-in motion (js/intro.js) ----------
   Only when the script runs (html.js-motion), and never with reduced motion. */
@keyframes charIn { from { opacity: 0; transform: translateY(.5em); filter: blur(6px); } }
@keyframes introIn { from { opacity: 0; transform: translateY(22px); filter: blur(8px); } }
.ht-chars { white-space: nowrap; }
.ht-char {
  display: inline-block;
  animation: charIn .7s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i) * 32ms + 80ms);
}
.js-motion .intro { animation: introIn .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.js-motion .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--rd, 0s);
}
.js-motion .reveal.is-in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .ht-char, .js-motion .intro { animation: none; }
  .js-motion .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .ht-caret { animation: none; }
}
.hero .lead { margin-top: 24px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.lead {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  font-weight: 350;
  color: var(--fg-2);
  max-width: 48ch;
}

/* Printer figure — the one animated moment on the page */
.printer {
  margin: 0;
  --cut: var(--cut-lg);
  --cut-line: var(--line-strong);
  --cut-fill: #222426;
  padding: 12px 12px 4px;
}
.printer-svg { display: block; width: 100%; height: auto; overflow: visible; }

.bed line { stroke: var(--concrete); stroke-width: .5; }
.bed .bed-tick { stroke-width: .4; }
.ghost {
  fill: none;
  stroke: rgba(255, 255, 255, .28);
  stroke-width: .7;
  stroke-dasharray: 2 1.6;
  vector-effect: non-scaling-stroke;
}
.gantry line { stroke: rgba(255, 255, 255, .22); stroke-width: .5; }
.nozzle rect { fill: var(--graphite); stroke: var(--concrete); stroke-width: .35; }
.nozzle path { fill: var(--accent); }
.layer-glow { fill: var(--accent); }

/* Laser engraving under the print */
#engrave-text { fill: #C3C5C7; }
.engrave-ghost { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: .6; }
.laser rect { fill: var(--graphite); stroke: var(--concrete); stroke-width: .3; }
.laser .beam { stroke: var(--accent); stroke-width: .35; }
.laser .spot { fill: #E9FFF2; }
.laser .spot-halo { fill: var(--accent); opacity: .45; }

.printer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  font-size: .875rem;
  color: var(--fg-2);
}
.layer-readout { display: inline-flex; gap: 6px; }

/* Production-line scene */
.scene-svg { display: block; width: 100%; height: auto; overflow: hidden; }
.scene-svg.ring-hot { cursor: pointer; }          /* over the pulsing ring at the end of the animation */
.scene-status { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.scene-steps { display: inline-flex; flex: none; margin: -10px 0; }
/* Each step is a button: the bar is drawn inside a larger, easy-to-hit area. */
.scene-steps button {
  display: block; width: 22px; height: 24px; padding: 0 2px;
  border: 0; background: none; cursor: pointer;
}
.scene-steps button::before {
  content: ""; display: block; height: 4px;
  background: var(--line-strong); transition: background-color .3s var(--ease);
}
.scene-steps button:hover::before { background: var(--fg-2); }
.scene-steps button.is-done::before { background: var(--concrete); }
.scene-steps button.is-on::before { background: var(--accent); }
.scene-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.num { font-variant-numeric: tabular-nums; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: center; gap: 4px; text-align: center; }
.stat dd {
  margin: 0;
  font-size: clamp(1.875rem, 3.8vw, 3rem);
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat dt {
  font-size: .9375rem; color: var(--fg-2); line-height: 1.35;
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere;   /* long German compounds on phones */
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 144px); }

.section h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
@media (min-width: 960px) {
  .section-head { grid-template-columns: 5fr 7fr; align-items: end; gap: 48px; }
  .section-head .lead { justify-self: start; }
}

.split { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 48px; }
}

/* About */
/* Heading and text together in the left column; the right column is kept
   free for content still to be decided (empty for now). */
.about-grid { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 7fr 5fr; gap: 64px; }
}
.about-grid { align-items: center; }
.about-aside { margin: 0; }
.about-aside img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--cut-lg);
}
.about-title { margin: 0 0 28px; }
.about-text .body-text { margin-top: 20px; }
.about-social { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: .9375rem; color: var(--fg-2); }
.statement {
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  max-width: 30ch;
  text-wrap: pretty;
}
.body-text {
  margin-top: 28px;
  max-width: 58ch;
  color: var(--fg-2);
}

/* Services: white cards side by side (5 across on computers, a swipeable
   row below that); a card lifts and grows a little on hover */
.service-list {
  list-style: none;
  margin: 0 calc(var(--gutter) * -1);
  /* room above/below so the lifted card and its shadow aren't cut off */
  padding: 12px var(--gutter) 28px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 78%);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.service-list::-webkit-scrollbar { display: none; }
.service-list > li { display: flex; scroll-snap-align: start; }
@media (min-width: 640px) { .service-list { grid-auto-columns: minmax(250px, 42%); } }
@media (min-width: 1024px) {
  .service-list {
    margin-inline: 0;
    padding-inline: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }
}
.service-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 26px 22px 22px;
  background: var(--white);
  border-radius: var(--cut-lg);
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgba(0, 0, 0, .06);
  color: var(--fg);
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.service-row h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.2;
}
.service-row p { flex: 1; color: var(--fg-2); font-size: .9375rem; }
.service-row .chev,
.service-row .badge { align-self: flex-start; margin-top: 8px; }
a.service-row:hover,
a.service-row:focus-visible {
  box-shadow: 0 0 0 1px var(--accent), 0 22px 44px -16px rgba(0, 0, 0, .28);
}
@media (prefers-reduced-motion: no-preference) {
  a.service-row:hover,
  a.service-row:focus-visible { transform: translateY(-8px) scale(1.03); }
}
.service-row.is-soon { background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px var(--line); }
.chev {
  width: 28px; height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease);
}
a.service-row:hover .chev { transform: translateX(4px); color: var(--accent-ink); }
.service-row.is-soon h3 { color: var(--fg-2); }
/* Line icon in a small tile above each service name */
.svc-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--cut-md);
  background: var(--mist);
  box-shadow: 0 0 0 1px var(--line);
  transition: background-color .2s var(--ease);
}
.svc-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a.service-row:hover .svc-icon { background: var(--accent); }
a.service-row:hover .svc-icon svg { stroke: var(--on-accent); }
.service-row.is-soon .svc-icon svg { stroke: var(--fg-2); }

/* Icon animations on hover / keyboard focus of a service card:
   print head lays the layers, the CAD cube draws itself, the caliper measures,
   the laser burns with sparks, the scanner line sweeps over the part. */
.svc-icon svg * { transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .service-row:is(:hover, :focus-visible) .ic-print .a-head { animation: ic-head 1.2s ease-in-out infinite; }
  .service-row:is(:hover, :focus-visible) .ic-print .a-l { stroke-dasharray: 16; animation: ic-layer 1.8s linear infinite both; }
  .service-row:is(:hover, :focus-visible) .ic-print .a-l2 { animation-delay: .3s; }
  .service-row:is(:hover, :focus-visible) .ic-print .a-l3 { animation-delay: .6s; }

  .service-row:is(:hover, :focus-visible) .ic-cad .a-out { stroke-dasharray: 60; animation: ic-draw60 1.6s ease-in-out both; }
  .service-row:is(:hover, :focus-visible) .ic-cad .a-in { stroke-dasharray: 30; animation: ic-draw30 1s ease-in-out .5s both; }
  .service-row:is(:hover, :focus-visible) .ic-cad { animation: ic-turn 2.4s ease-in-out .9s infinite; transform-origin: 50% 50%; }

  .service-row:is(:hover, :focus-visible) .ic-rev .a-jaw { animation: ic-jaw 1.6s ease-in-out infinite; }

  .service-row:is(:hover, :focus-visible) .ic-laser .a-move { animation: ic-head 1.4s ease-in-out infinite; }
  .service-row:is(:hover, :focus-visible) .ic-laser .a-beam { animation: ic-beam .18s steps(2) infinite; }
  .service-row:is(:hover, :focus-visible) .ic-laser .a-spark { transform-origin: 12px 16.5px; animation: ic-spark .5s ease-out infinite; }

  .service-row:is(:hover, :focus-visible) .ic-scan .a-scan { animation: ic-sweep 1.4s ease-in-out infinite alternate; }
  .service-row:is(:hover, :focus-visible) .ic-scan .a-cube { transform-origin: 12px 12px; animation: ic-turn 2.8s ease-in-out infinite; }
}
@keyframes ic-head { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
@keyframes ic-layer { 0% { stroke-dashoffset: 16; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ic-draw60 { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes ic-draw30 { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes ic-turn { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
@keyframes ic-jaw { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4.5px); } }
@keyframes ic-beam { 0% { opacity: 1; } 100% { opacity: .35; } }
@keyframes ic-spark { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ic-sweep { from { transform: translateY(-7px); } to { transform: translateY(7px); } }

/* 3D printing — technologies */
.sub-title {
  font-size: 1.25rem;
  font-weight: 650;
  margin-bottom: 20px;
  color: var(--fg-2);
}
.tech-grid { display: grid; gap: 16px; }
.tech {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  --cut: var(--cut-lg);
  --cut-line: var(--line);
  --cut-fill: var(--bg);
  color: var(--fg-2);
  text-decoration: none;
  transition: translate .35s cubic-bezier(.2, .8, .2, 1), filter .35s var(--ease);
}
/* Same hover for all three cards: lifts a little, green edge, soft shadow
   (drop-shadow follows the rounded frame, a box-shadow would be square;
   `translate`, not `transform`, so the scroll reveal can't override it) */
/* slow, soft lift; listed here with the scroll-reveal transitions, because the
   reveal's own `transition` would otherwise replace this one */
.tech-grid > .tech {
  transition:
    translate .7s cubic-bezier(.22, .8, .25, 1),
    filter .7s cubic-bezier(.22, .8, .25, 1),
    opacity .8s cubic-bezier(.2, .7, .2, 1),
    transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: 0s, 0s, var(--rd, 0s), var(--rd, 0s);   /* keep the reveal's stagger */
}
.tech-grid > .tech:hover { --cut-line: var(--accent); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .45)); }
@media (prefers-reduced-motion: no-preference) {
  .tech-grid > .tech:hover { translate: 0 -6px; }
}
.tech.is-active { --cut-line: var(--accent); --cut-fill: #2F3133; color: var(--fg); }
.tech-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--fg);
}
.tech-more .chev { width: 20px; height: 20px; }
.tech:hover .tech-more .chev { transform: translateX(4px); }
.tech.is-active .tech-more { color: var(--accent); }
.tech .badge { --cut-fill: var(--bg); }
.tech.is-active .badge-accent { --cut-fill: var(--accent); }
.tech-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tech h4 { font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 700; line-height: 1; }
.tech:not(.is-active) h4 { color: var(--fg-2); }
.tech p { max-width: 40ch; }
/* Small looping process sketches (generated SVG + SMIL in index.html):
   FDM head laying filament, SLS roller + laser, SLA platform dipping into resin */
/* shown in a small dark "machine window" with a faint grid, as wide as the card */
.tech-anim {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px 6px 4px;
  border-radius: var(--cut-md);
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 14px 100%,
    radial-gradient(120% 90% at 50% 100%, rgba(60, 196, 124, .07), transparent 60%),
    rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.tech-anim .ta-line { fill: none; stroke: #A7ACB0; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.tech-anim .ta-frame { fill: none; stroke: #63676B; stroke-width: 1.5; }
.tech-anim .ta-solid { fill: #43474B; stroke: #A7ACB0; stroke-width: 1.2; }
.tech.is-soon .tech-anim { opacity: .85; }

@media (min-width: 860px) {
  .tech-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tech { padding: 28px; min-height: 260px; }
}

/* ---------- Technology detail sections (FDM, SLS, SLA) ---------- */
.tech-section { padding-block: clamp(56px, 7vw, 92px); }   /* tighter than other sections */
.tech-head { display: grid; gap: 10px; margin-bottom: clamp(24px, 3vw, 36px); }
.tech-name { display: flex; align-items: center; gap: 16px; }
.tech-section h2 { font-size: clamp(2.75rem, 6vw, 4.25rem); font-weight: 700; line-height: 1; }
.tech-fullname { font-size: 1rem; font-weight: 600; color: var(--fg-2); }
.tech-head .lead { margin-top: 4px; max-width: 56ch; }

.tech-body { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) {
  .tech-body { grid-template-columns: 6fr 5fr; gap: 64px; }
}
.tech-info .list-title { margin-bottom: 10px; }
.tech-info .body-text { margin-top: 0; margin-bottom: 32px; }
.tech-info .line-list { margin-top: 0; }

/* FDM photo trio: one wide photo above two tall ones */
.tech-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
.tech-photos .tile-wide { grid-column: 1 / -1; }
.tech-photos .tile-wide .tile-btn img { aspect-ratio: 3 / 2; }
/* FDM: one frame, the photos cross-fade in it every few seconds; arrows and
   dots laid over it pick one */
.photo-fade { grid-template-columns: 1fr; gap: 0; }
.photo-fade > .tile {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s var(--ease), visibility 0s .7s;
}
.photo-fade > .tile.is-current { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.photo-fade .tile-btn img { aspect-ratio: var(--fade-ar, 4 / 3); }
.photo-fade .tile-btn { cursor: default; }   /* not enlargeable */
/* Photos whose shape differs from the frame (upright ones in FDM, all in the
   engraving frame): shown whole over a blurred copy of themselves instead of
   being cropped */
.photo-fade .tile--fit .tile-btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--cut-lg);
  isolation: isolate;
}
.photo-fade .tile--fit .tile-btn::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: var(--img) center / cover;
  filter: blur(20px) brightness(.75);
}
.photo-fade .tile--fit img { object-fit: contain; background: none; }
/* a smaller frame: the photo column is narrower than the text beside it */
@media (min-width: 960px) {
  .tech-body:has(.photo-fade) { grid-template-columns: 4fr 5fr; }
}
/* Controls laid over the photo (same box as the image, caption stays below):
   light round arrows at the sides, dots at the bottom between them */
.fade-ctrl {
  grid-area: 1 / 1;
  align-self: start;
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: var(--fade-ar, 4 / 3);
  pointer-events: none;
}
.fade-ctrl button { pointer-events: auto; cursor: pointer; border: 0; padding: 0; }
.fade-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  color: var(--black);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.fade-arrow:hover { background: var(--white); transform: scale(1.08); }
.fade-arrow.prev { left: 12px; }
.fade-arrow.next { right: 12px; }
.fade-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fade-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 12px;
  background: rgba(20, 21, 22, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.fade-dots button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: none;
}
.fade-dots button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.fade-dots button:hover::before { background: rgba(255, 255, 255, .8); }
.fade-dots button[aria-current="true"]::before { background: var(--white); transform: scale(1.25); }

.tech-materials { margin-top: clamp(32px, 4vw, 48px); }
.tech-materials .sub-title { margin-bottom: 6px; color: var(--fg); }
.mat-note { color: var(--fg-2); max-width: 72ch; margin-bottom: 18px; text-wrap: pretty; }

.mat-groups { display: grid; gap: 8px 40px; }
@media (min-width: 760px) { .mat-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mat-group h4 {
  margin: 20px 0 4px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--accent-text);
}
.mat-group ul, .mat-grid { list-style: none; margin: 0; padding: 0; }
.mat-item {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mat-item strong { font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.mat-item span { font-size: .9375rem; color: var(--fg-2); line-height: 1.45; }
.mat-grid { display: grid; gap: 0 40px; border-top: 1px solid var(--line); }

.mat-hint { margin: -12px 0 8px; font-size: .875rem; color: var(--fg-2); }
.tech-section { overflow-x: clip; }

/* FDM materials as printed filament swatches (like real swatch cards: coloured
   frame with layer lines, a hanging slot, a white label and four thickness
   steps), side by side in one row, each overlapping the one before it.
   Hover / tap / focus lifts one out in front and shows its details below. */
.swatch-row {
  --w: 220px;                          /* full swatch width */
  --h: 128px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 44px var(--gutter) 18px;    /* room above for the lifted swatch */
  overflow-x: auto;
  scrollbar-width: none;
}
.swatch-row::-webkit-scrollbar { display: none; }
.swatches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* every swatch starts in its own narrow column and reaches over the next ones;
     the last column is a full swatch wide */
  grid-template-columns: repeat(11, minmax(60px, 1fr)) var(--w);
}
@media (min-width: 1024px) {
  .swatch-row { margin-inline: 0; padding-inline: 0; overflow: visible; }
}
.sw-item { position: relative; height: var(--h); }
.swatch {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w);
  height: var(--h);
  padding: 0;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #1A1B1C;
  font: inherit;
  text-align: left;
  /* the printed frame: material colour with fine horizontal layer lines and a
     soft top light; the darker edge below gives it thickness */
  background:
    linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .08)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    var(--c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 5px 0 var(--c2),
    -6px 10px 18px -6px rgba(0, 0, 0, .28);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s var(--ease);
}
/* carbon / glass fibre filled: matte, speckled surface */
.swatch.sw-fibre {
  background:
    linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 45%),
    radial-gradient(rgba(255, 255, 255, .09) .6px, rgba(255, 255, 255, 0) 1.2px) 0 0 / 4px 4px,
    radial-gradient(rgba(0, 0, 0, .25) .6px, rgba(0, 0, 0, 0) 1.2px) 2px 2px / 5px 5px,
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 0 var(--c2), -6px 10px 18px -6px rgba(0, 0, 0, .35);
}
.sw-hole {                             /* hanging slot, the page shows through */
  position: absolute;
  left: 9px;
  top: 50%;
  width: 9px;
  height: 46%;
  transform: translateY(-50%);
  border-radius: 5px;
  background: var(--bg);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, .25);
}
.sw-label {                            /* printed paper label in a shallow pocket */
  position: absolute;
  left: 24px;
  top: 13px;
  bottom: 13px;
  width: 56%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 0 8px;
  border-radius: 5px;
  background: #FAFAF8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 2px rgba(0, 0, 0, .1);
  overflow: hidden;
  white-space: nowrap;
}
.sw-label small { font-size: .625rem; font-weight: 600; letter-spacing: .04em; color: #7A7D80; }
.sw-label b { font-size: 1.0625rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.sw-item.is-active .sw-label b, .sw-item:last-child .sw-label b { font-size: 1.25rem; }
.sw-label i { font-size: .6875rem; font-style: normal; color: #55595C; }
.sw-steps {                            /* four thickness steps: thinner = lighter */
  position: absolute;
  right: 11px;
  top: 13px;
  bottom: 13px;
  width: 25%;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
}
.sw-steps span {
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
.sw-steps span:nth-child(1) { background: linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .42)), var(--c); }
.sw-steps span:nth-child(2) { background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)), var(--c); }
.sw-steps span:nth-child(3) { background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)), var(--c); }
/* lifted out: in front of the others, raised and tilted a little */
.sw-item.is-active { z-index: 20; }
.sw-item.is-active .swatch {
  transform: translateY(-34px) rotate(-2.5deg) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 5px 0 var(--c2), 0 24px 34px -10px rgba(0, 0, 0, .38);
}
.swatch:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .swatch { transition: none; }
  .sw-item.is-active .swatch { transform: translateY(-20px); }
}
@media (max-width: 759px) {
  .swatch-row { --w: 190px; --h: 112px; }
}
/* details of the lifted swatch */
.sw-info {
  min-height: 74px;
  max-width: 62ch;
  margin-top: 6px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.sw-info em { display: block; font-style: normal; font-size: .8125rem; font-weight: 600; color: var(--accent-text); }
.sw-info strong { display: block; margin: 2px 0 4px; font-size: 1.0625rem; font-weight: 700; }
.sw-info > span { display: block; font-size: .9375rem; line-height: 1.5; color: var(--fg-2); }
.sw-info:empty { border-left-color: transparent; }
@media (min-width: 760px) { .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.soon-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.soon-note p { max-width: 56ch; color: var(--fg-2); }

/* Process illustrations (SLS, SLA) */
.diagram { margin: 0; }
.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  padding: 20px;
  background: var(--ph);
  --cut: var(--cut-lg);
  clip-path: inset(0 round var(--cut));
}
.diagram figcaption { margin-top: 10px; font-size: .875rem; color: var(--fg-2); }
.dg-line { fill: none; stroke: var(--fg); stroke-width: 1.6; }
.dg-solid { fill: var(--fg); }
.dg-beam { fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; }
.dg-accent-fill { fill: var(--accent-text); }
.dg-leader { stroke: var(--fg-2); stroke-width: 1; stroke-dasharray: 3 3; }
.dg-dot { fill: var(--fg-2); opacity: .55; }
.dg-resin { fill: var(--accent-text); opacity: .16; }
.dg-label { fill: var(--fg-2); font-family: var(--font); font-size: 12px; font-weight: 600; }

/* Media split (CAD, laser) */
.media-split { display: grid; gap: 40px; align-items: center; }
.media-split .lead { margin-top: 20px; }
.media-split-rev > .ph { order: 2; }
@media (min-width: 960px) {
  .media-split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .media-split-rev > .ph { order: 0; }
}

.line-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.line-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }

.two-lists { display: grid; gap: 32px; margin-top: 36px; }
.two-lists .line-list { margin-top: 12px; }
.list-title { font-size: 1.125rem; font-weight: 650; color: var(--fg-2); }
@media (min-width: 560px) { .two-lists { grid-template-columns: 1fr 1fr; } }

/* Placeholders — layer lines stand in for photos until real images arrive */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  --cut: var(--cut-lg);
  clip-path: inset(0 round var(--cut));
  background-color: var(--ph);
  background-image: repeating-linear-gradient(to bottom, transparent 0 6px, var(--ph-lines) 6px 7px);
  overflow: hidden;
}
.ph-tall { aspect-ratio: 4 / 5; }
.ph-label { font-size: .875rem; color: var(--fg-2); }

/* Reverse engineering steps (a real sequence, so numbered) */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: none;
}
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line-strong);
}
.step-num {
  grid-row: 1 / span 2;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 750;
  line-height: .9;
  color: var(--accent-text);
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
}
/* Each step has a small looping sketch of the same broken gear: measured,
   rebuilt in CAD, printed new (generated SVG + SMIL in index.html) */
.rev-anim {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 14px;
  border-radius: var(--cut-md);
  background:
    linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 14px 100%,
    #F4F5F5;
  box-shadow: inset 0 0 0 1px var(--line);
}
.rev-anim .ra-old { fill: #D5D8DA; stroke: #7E8387; stroke-width: 1.2; }
.rev-anim .ra-crack { fill: none; stroke: #C2463A; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.rev-anim .ra-tool { fill: #E9EBEC; stroke: #4A4E52; stroke-width: 1.2; }
.rev-anim .ra-tick { fill: none; stroke: #4A4E52; stroke-width: .9; }
.rev-anim .ra-bar { fill: #E6E8E9; stroke: #C9CDCF; stroke-width: .8; }
.rev-anim .ra-dim { fill: none; stroke: #2C2F33; stroke-width: .9; }
.rev-anim .ra-lcd { font: 600 7.5px/1 ui-monospace, "Consolas", monospace; fill: #7CE0A6; }
.rev-anim .ra-dimtxt { font: 600 8px/1 "Figtree", sans-serif; fill: #2C2F33; }
.steps h3 { font-size: 1.625rem; font-weight: 700; }
.steps p { color: var(--fg-2); max-width: 36ch; }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { grid-template-columns: 1fr; gap: 12px; padding-top: 24px; }
  .step-num { grid-row: auto; margin-bottom: 12px; }
}

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  --cut: var(--cut-sm);
  --cut-line: var(--line-strong);
  --cut-fill: var(--bg);
  font-size: .9375rem;
  font-weight: 550;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.chip:hover { --cut-line: var(--fg); }
.chip[aria-pressed="true"] { --cut-line: var(--fg); --cut-fill: var(--fg); color: var(--bg); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 12px;
}
.tile { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tile[hidden] { display: none; }
.tile-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
/* Photos share the rounded corners of the rest of the site */
.tile-btn img,
.media-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--ph);
  --cut: var(--cut-lg);
  clip-path: inset(0 round var(--cut));
  transition: filter .25s var(--ease), transform .6s var(--ease), clip-path .6s var(--ease);
}
.tile-btn:hover img { filter: brightness(1.08); }
/* Gentle zoom on hover: the photo grows 5 % while its clip shrinks by the
   same amount, so the frame stays put and only the picture moves closer. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover img,
  .tile-btn:focus-visible img,
  .media-photo:hover img {
    transform: scale(1.05);
    clip-path: inset(2.381% round calc(var(--cut) / 1.05));
  }
}
.tile-count {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  background: rgba(20, 21, 22, .82);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.tile figcaption { font-size: .9375rem; line-height: 1.4; color: var(--fg); }

@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Gallery mosaic: large, wide, tall and regular tiles on a fixed row height.
   Captions sit on the photo so every tile fills its cells exactly. */
.gallery {
  grid-auto-rows: 170px;
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery .tile { position: relative; gap: 0; min-height: 0; }
.gallery .tile-btn { height: 100%; }
.gallery .tile-btn img { height: 100%; aspect-ratio: auto; }
.gallery .tile--large { grid-column: span 2; grid-row: span 2; }
.gallery .tile--wide { grid-column: span 2; }
.gallery .tile--tall { grid-row: span 2; }
.gallery .tile figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 48px 14px 12px;
  color: var(--white);
  font-size: .875rem;
  font-weight: 550;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  background: linear-gradient(to top, rgba(10, 11, 12, .78), rgba(10, 11, 12, 0) 58%);
  --cut: var(--cut-lg);
  clip-path: inset(0 round var(--cut));
  pointer-events: none;
}
.gallery .tile--large figcaption { font-size: 1rem; padding: 64px 20px 18px; }
@media (min-width: 760px) { .gallery { grid-auto-rows: 210px; gap: 14px; } }
@media (min-width: 1100px) { .gallery { grid-auto-rows: 240px; gap: 16px; } }

/* Photo beside text (CAD, engraving) */
.media-photo { margin: 0; }
.media-wide img { aspect-ratio: 3 / 2; }   /* landscape photos (CAD) */
.media-photo figcaption { margin-top: 10px; font-size: .875rem; color: var(--fg-2); }
.media-split-rev > .media-photo { order: 2; }
@media (min-width: 960px) { .media-split-rev > .media-photo { order: 0; } }

/* Lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(18, 19, 20, .97);
  color: var(--white);
  --focus: var(--accent);
  --line: rgba(255, 255, 255, .16);
}
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lb-frame { position: relative; min-height: 0; }
/* Absolutely sized so tall phone photos always fit inside the frame */
.lb-img {
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 24px);
  object-fit: contain;
}
.lb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px var(--gutter) 20px;
  border-top: 1px solid var(--line);
}
.lb-caption { flex: 1 1 260px; font-size: 1rem; line-height: 1.4; }
.lb-count { color: var(--concrete); font-size: .875rem; }
.lb-nav { display: flex; gap: 8px; }
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  --cut: var(--cut-sm);
  --cut-line: rgba(255, 255, 255, .3);
  --cut-fill: #1E1F21;
  color: var(--white);
  cursor: pointer;
}
.lb-btn:hover { --cut-line: var(--white); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn[hidden] { display: none; }

/* Contact */
.contact-grid { display: grid; gap: 48px; }
.contact-grid .lead { margin-top: 20px; }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; }
}

.contact-list { margin: 40px 0 0; display: grid; gap: 24px; }
.contact-list dt { font-size: .875rem; color: var(--fg-2); margin-bottom: 4px; }
.contact-list dd {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.contact-list dd a { text-decoration: none; background-image: linear-gradient(var(--accent-text), var(--accent-text)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s var(--ease); }
.contact-list dd a:hover { background-size: 100% 2px; }
.contact-list .dd-sub { font-size: 1rem; font-weight: 400; color: var(--fg-2); }

.inquiry {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  --cut: var(--cut-lg);
  --cut-line: var(--line);
  --cut-fill: #242628;
}
.field { display: grid; gap: 8px; align-content: start; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label { font-size: .9375rem; font-weight: 550; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(255, 255, 255, .04);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4B6B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
.field select option { background: var(--anthracite); color: var(--white); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--concrete); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 0;
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-help { font-size: .875rem; color: var(--fg-2); }
.field-error { font-size: .875rem; font-weight: 550; color: var(--error); }
.form-note { font-size: .875rem; color: var(--fg-2); }
.form-status { font-size: .9375rem; font-weight: 550; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--accent-text); }
.form-status.is-error { color: var(--error); }

/* File picker */
.field input[type="file"] { padding: 10px 12px; cursor: pointer; font-size: .9375rem; color: var(--fg-2); }
.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { border-color: var(--fg); }

.btn:disabled { opacity: .6; cursor: progress; }

/* Spam trap field: off-screen for people, still in the form for bots */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--anthracite-deep);
  color: var(--concrete);
  --focus: var(--white);
  padding: 32px 0;
  font-size: .9375rem;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
/* Social icon buttons in the Kontakt list */
.contact-social { display: flex; gap: 10px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  --cut: var(--cut-sm);
  --cut-line: var(--line-strong);
  --cut-fill: var(--bg);
  color: var(--fg);                  /* white on dark sections, dark on light ones */
  transition: color .2s var(--ease);
}
.social-btn svg { width: 24px; height: 24px; fill: currentColor; }
.contact-list .social-btn { background-image: none; }   /* no hover underline on icon buttons */
.social-btn:hover { --cut-line: var(--accent); --cut-fill: var(--accent); color: var(--on-accent); }

.footer-links { display: flex; align-items: center; gap: 20px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--concrete);
  transition: color .2s var(--ease);
}
.social-link svg { width: 22px; height: 22px; fill: currentColor; }
.social-link:hover { color: var(--white); }
.footer-top { text-decoration: underline; text-underline-offset: 3px; }
.footer-top:hover { color: var(--white); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .replay { display: none; }
}
