/* KUDEN Solutions: the short site. Base from lab/css/base.css (Grafit theme, Krona One), then the sections. */

/* ================================================================ TOKENS */
:root {
  /* Grafit (the current web) */
  --bg: #161412;
  --bg-rgb: 22 20 18;
  --bg-raise: #1e1b18;
  --bg-sunk: #121110;
  --ink: #f2f1ee;
  --ink-rgb: 242 241 238;
  --ink-2: #bcb7ad;
  --ink-3: #847e74;
  --line: rgb(var(--ink-rgb) / 0.13);
  --line-2: rgb(var(--ink-rgb) / 0.24);
  --core: #1a5cff;
  --core-ink: #fff;
  --alert: #ff4632;
  --btn-bg: var(--ink);
  --btn-ink: #121110;
  --btn-hover: #fff;
  --stage-glow: #1f1c19;
  --paper-sheet: #f2f1ee;   /* documents shown on the page (proof, letters) */
  --paper-ink: #0e1116;

  /* the loader's drawing sheet */
  --paper: #f4f5f6;
  --p-ink: #0e1116;
  --p-graphite: #59616c;

  /* display face (switchable) */
  --f-display: "Krona One", "Arial Black", sans-serif;
  --fd-wght: 400;
  --fd-wdth: 100%;
  --fd-track: -0.025em;
  --fd-scale: 1;
  --f-text: "Instrument Sans", "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 5.2vw, 88px);
  --col: min(600px, 43vw);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --chamfer: 10px;
}

/* ================================================================ RESET */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
.rm { scroll-behavior: auto; }
.intro-lock, .intro-lock body { overflow: hidden; }
.intro-lock { background: var(--paper); }
body {
  margin: 0;
  background: var(--bg);
  font: 400 17px/1.55 var(--f-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 50;
  padding: 10px 14px; background: var(--ink); color: var(--bg);
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ================================================================ LOADER */
.intro, .wave-edge { display: none; }
.intro-on .intro {
  display: block; position: fixed; inset: 0; z-index: 100;
  background: var(--paper); overflow: hidden;
  animation: intro-failsafe .5s 7s both;
}
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
.intro-on .wave-edge { display: block; }
.wave-edge {
  position: fixed; left: 0; top: 0; z-index: 101; pointer-events: none;
  width: 0; height: 0; opacity: 0;
  border: 2px solid var(--core);
  box-shadow: 0 0 26px 3px rgba(26, 92, 255, .55), inset 0 0 26px 3px rgba(26, 92, 255, .38);
}
.intro-dwg {
  position: absolute; left: 50%; top: 50%;
  width: min(82vw, 88vh, 640px); height: auto;
  transform: translate(-50%, -50%); transform-origin: 50% 50%;
  overflow: visible; --sw: 1;
}
.intro-dwg text { font-family: var(--f-mono); font-size: 13px; fill: var(--p-graphite); text-anchor: middle; }
.intro-dwg .cl { fill: none; stroke: var(--p-graphite); stroke-width: calc(.8px * var(--sw)); stroke-dasharray: 22 5 3 5; }
.intro-dwg .dg { stroke-dasharray: 7 6; }
.intro-dwg .cc { fill: none; stroke: var(--p-graphite); stroke-width: calc(.8px * var(--sw)); }
.intro-dwg .bl { fill: var(--p-ink); stroke: var(--p-ink); stroke-width: calc(1.4px * var(--sw)); stroke-linejoin: miter; }
.intro-dwg .ex { fill: none; stroke: var(--p-graphite); stroke-width: calc(.6px * var(--sw)); }
.intro-dwg .dl { fill: none; stroke: var(--p-graphite); stroke-width: calc(.8px * var(--sw)); }
.intro-dwg .halo { paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.intro-dwg .core { fill: var(--core); }
.intro-dwg .core-glow { fill: var(--core); opacity: 0; }
.intro-dwg .k-con { opacity: .55; transition: opacity .4s ease; }
.intro-dwg .k-dim { opacity: .9; transition: opacity .4s ease; }
.intro.docked .k-con { opacity: .18; }
.intro.docked .k-dim { opacity: 0; }

@keyframes i-grow { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes i-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes i-fill { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes i-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes i-core { 0% { transform: scale(0); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes i-pulse { 0% { opacity: 0; transform: scale(1); } 35% { opacity: .95; transform: scale(1.5); } 100% { opacity: .55; transform: scale(1.25); } }
@keyframes i-breathe { from { opacity: .15; } to { opacity: .6; } }
@keyframes i-kick { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

.intro-on .intro-dwg .cl { animation: i-grow .55s var(--d) cubic-bezier(.7, 0, .2, 1) both; }
.intro-on .intro-dwg .cc { stroke-dasharray: 1 1; animation: i-draw .6s var(--d) cubic-bezier(.6, 0, .2, 1) both; }
.intro-on .intro-dwg .bl {
  stroke-dasharray: 1 1;
  animation: i-draw .62s var(--d) cubic-bezier(.55, 0, .25, 1) both, i-fill .4s var(--f) ease-out both;
}
.intro-on .intro-dwg .dm { animation: i-fade .3s var(--d) ease-out both; }
.intro-dwg .core, .intro-dwg .core-glow { transform-box: fill-box; transform-origin: center; }
.intro-on .intro-dwg .core { animation: i-core .35s 1.45s cubic-bezier(.3, 0, .2, 1) both; }
.intro.wait .core-glow { animation: i-breathe .9s ease-in-out infinite alternate; }
.intro.pulse .core-glow { animation: i-pulse .45s ease-out both; }
.intro.pulse .core { animation: i-kick .32s cubic-bezier(.3, 0, .2, 1) both; }
.intro-short .intro-dwg { opacity: 0; transition: opacity .12s; }
.intro-short .intro-dwg * { animation: none !important; }
.intro-short .intro.pulse .core-glow { animation: i-pulse .3s ease-out both !important; }
.intro-short .intro-dwg.shown { opacity: 1; }

/* ================================================================= STAGE */
.stage {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(56vw 62vh at 71.5% 52%, var(--stage-glow) 0%, rgb(var(--bg-rgb) / 0) 100%);
}
.stage canvas { width: 100%; height: 100%; display: block; }
.stage.is-hidden { visibility: hidden; }
.stage-fallback { display: none; }
.no-webgl .stage canvas { display: none; }
.no-webgl .stage-fallback {
  display: block; position: absolute;
  width: min(30vw, 420px); left: 71.5%; top: 50%; transform: translate(-50%, -50%);
}
.rm .stage { position: absolute; height: 100vh; height: 100svh; }
/* without WebGL the static mark belongs to the first screen only, not behind every later section */
.no-webgl .stage { position: absolute; height: 100vh; height: 100svh; }

/* red markers pinned to the broken parts of the 3D mark */
.alerts {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(255, 70, 50, .5));
}
.no-webgl .alerts { display: none; }
.alerts .al-lead { fill: none; stroke: var(--alert); stroke-width: 1.2; }
.alerts .al-dot { fill: var(--alert); }
.alerts .al-icon path { fill: var(--alert); stroke: var(--alert); stroke-width: 2.5; stroke-linejoin: round; }
.alerts .al-icon text { font: 700 18px var(--f-text); fill: var(--bg); text-anchor: middle; }
.alerts .al-lbl {
  font: 500 14px var(--f-mono); fill: var(--alert);
  paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round;
}

/* ================================================================ HEADER */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 40px;
  padding: 20px var(--gutter);
  transition: background-color .4s, backdrop-filter .4s, padding .4s, box-shadow .4s;
}
.bar.is-solid {
  background: rgb(var(--bg-rgb) / 0.72);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  padding-top: 14px; padding-bottom: 14px;
  box-shadow: 0 1px 0 var(--line);
}
.bar-logo img { width: 140px; height: auto; }
.bar-nav { display: flex; gap: 32px; margin-left: auto; font-size: 15px; }
.bar-nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; white-space: nowrap; }
.bar-nav a:hover { color: var(--ink); }

/* ======================================================= BUTTONS & LINKS */
.btn {
  --c: var(--chamfer);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink);
  font: 600 16px/1 var(--f-text); text-decoration: none;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { clip-path: none; outline-offset: 3px; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; --c: 7px; }
.bar .btn-small { margin-left: 8px; }
.btn-core:hover, .btn-core:focus-visible { background: var(--core); color: var(--core-ink); }
/* outline button: the chamfer cuts the inset border, so the two cut corners get their own 45° strokes */
.btn-ghost {
  --cut: linear-gradient(to bottom right, transparent calc(50% - .8px), var(--line-2) calc(50% - .8px) calc(50% + .8px), transparent calc(50% + .8px));
  background: var(--cut) 0 0 / var(--c) var(--c) no-repeat, var(--cut) 100% 100% / var(--c) var(--c) no-repeat, transparent;
  color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: var(--cut) 0 0 / var(--c) var(--c) no-repeat, var(--cut) 100% 100% / var(--c) var(--c) no-repeat, rgb(var(--ink-rgb) / .06); }

.link {
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px; transition: background-size .3s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-big { font-size: 20px; }

/* ================================================= SHARED TYPE & LAYOUT */
main { position: relative; z-index: 1; }
.panel {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter);
}
.copy { width: var(--col); position: relative; }

.display {
  font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  letter-spacing: var(--fd-track); line-height: 1.04;
  text-wrap: balance;
}
h1.display { font-size: calc(clamp(40px, 4.3vw, 66px) * var(--fd-scale)); line-height: 1.02; }
.h2 { font-size: calc(clamp(28px, 3.05vw, 46px) * var(--fd-scale)); line-height: 1.12; }
.h3 { font-size: calc(clamp(26px, 2.6vw, 40px) * var(--fd-scale)); line-height: 1.14; }
.h4 { font: 600 21px/1.25 var(--f-text); letter-spacing: -0.005em; }

.sub { margin-top: 32px; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.45; color: var(--ink); max-width: 30em; text-wrap: pretty; }
.lead { margin-top: 18px; color: var(--ink-2); max-width: 32em; text-wrap: pretty; }
.body-l { margin-top: 28px; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }

.nw { white-space: nowrap; }
.sq { display: inline-block; width: 9px; height: 9px; background: var(--core); flex: none; }

/* sequence marker: only for things that really are a sequence */
.index {
  font: 400 14px/1 var(--f-mono); color: var(--ink-3); margin-bottom: 28px;
  display: flex; align-items: center; gap: 6px;
}
.index span { color: var(--ink); }
.index-core { gap: 12px; color: var(--ink); }

/* two-row definition list used by several sections */
.spec { margin-top: 36px; border-top: 1px solid var(--line-2); }
.spec > div {
  display: grid; grid-template-columns: 110px 1fr; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.spec dt { font: 400 13px/1.9 var(--f-mono); color: var(--ink-3); }
.spec dd { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; }
.spec > div:last-child dd { color: var(--ink); }
.spec > div:first-child dd { color: var(--ink-2); }

/* hero entrance after the loader (shared by all hero variants) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.intro-on:not(.intro-done) [data-rise],
.intro-on:not(.intro-done) .bar { opacity: 0; }
.intro-done [data-rise] { animation: rise 1.1s var(--ease) both; animation-delay: calc(.3s + var(--r, 0) * .12s); }
.intro-done [data-rise="fade"] { animation-name: fade; }
.intro-done .bar { animation: fade 1s ease .8s both; }

/* ================================================================= TABLET */
@media (max-width: 1080px) {
  :root { --col: min(560px, 50vw); }
  .bar-nav { gap: 22px; }
}
@media (max-width: 1180px) {
  .bar-nav a:nth-child(n+5) { display: none; }
}
@media (max-width: 960px) {
  .bar-nav { display: none; }
  .bar .btn-small { margin-left: auto; }
}

/* ================================================================= MOBILE */
@media (max-width: 760px) {
  :root { --col: 100%; --chamfer: 8px; }
  body { font-size: 16px; }
  .bar { padding: 14px 20px; gap: 12px; }
  .bar.is-solid { padding-top: 10px; padding-bottom: 10px; }
  .bar-logo img { width: 118px; }

  .intro-dwg { width: min(92vw, 70vh); --sw: 1.5; }
  .intro-dwg text { font-size: 18px; }

  .panel {
    min-height: 100svh;
    align-items: flex-end;
    padding: 46svh 20px 56px;
  }
  /* functional scrim: keeps type readable where the object passes behind */
  .copy::before {
    content: ""; position: absolute; z-index: -1;
    inset: -56px -20px -56px;
    background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0) 0, rgb(var(--bg-rgb) / .9) 56px, rgb(var(--bg-rgb) / .96) 100%);
  }
  .no-scrim::before { content: none; }
  h1.display { font-size: calc(clamp(32px, 9.2vw, 40px) * var(--fd-scale)); }
  .sub { margin-top: 20px; font-size: 18px; }
  .lead { font-size: 15.5px; }
  .actions { margin-top: 28px; gap: 16px 24px; }
  .body-l { margin-top: 20px; }
  .alerts .al-lbl { font-size: 12px; }
  .spec > div { grid-template-columns: 84px 1fr; gap: 12px; padding: 16px 0; }
  .link-big { font-size: 18px; }
  .stage { background: radial-gradient(90vw 40vh at 50% 26%, var(--stage-glow) 0%, rgb(var(--bg-rgb) / 0) 100%); }
  .no-webgl .stage-fallback { width: 62vw; left: 50%; top: 26.5%; }
}

/* ========================================================= REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  /* no transitions at all: a style change is final at once, so scripts can measure it immediately */
  *, *::before, *::after { transition-property: none !important; transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}


/* ================================================================== HERO */
/* From Úvod B (lab): copy on the left, the 3D mark on the right, one ruled row of commitments. */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
}
.hero .hero-main { display: flex; align-items: center; padding: 112px var(--gutter) 56px; }
.hero .hero-copy { width: min(700px, 50vw); }
.hero .hero-lead {
  margin-top: 30px; max-width: 29em;
  font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty;
}
.hero .actions { margin-top: 42px; }

/* ---- the title-block row ---- */
.hero .hero-strip {
  position: relative; margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 var(--gutter);
}
.hero .hero-strip::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: rgb(var(--ink-rgb) / .34); transform-origin: 0 50%;
}
.hero .hero-cell { position: relative; padding: 24px 32px 34px; min-width: 0; }
.hero .hero-cell:first-child { padding-left: 0; }
.hero .hero-cell + .hero-cell::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--line); transform-origin: 50% 0;
}
.hero .hero-k { font: 400 12px/1 var(--f-mono); color: var(--ink-3); }
.hero .hero-v {
  margin-top: 16px;
  font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  letter-spacing: -0.02em; line-height: 1.1;
  font-size: calc(clamp(19px, 1.6vw, 24px) * var(--fd-scale));
}
.hero .hero-v span { display: inline-block; }
.hero .hero-n { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 24em; }

/* ---- signature moment: the row is ruled, then the values are set in ---- */
.hero .hero-strip::before { transition: transform 1.05s cubic-bezier(.65, 0, .2, 1); }
.hero .hero-cell + .hero-cell::before { transition: transform .7s cubic-bezier(.65, 0, .2, 1) .5s; }
.hero .hero-cell:nth-child(3)::before { transition-delay: .66s; }
.hero .hero-k, .hero .hero-n { transition: opacity .7s ease; }
.hero .hero-v span { transition: transform .8s var(--ease), clip-path .8s var(--ease); }
.hero .hero-cell:nth-child(1) .hero-k { transition-delay: .35s; }
.hero .hero-cell:nth-child(2) .hero-k { transition-delay: .5s; }
.hero .hero-cell:nth-child(3) .hero-k { transition-delay: .65s; }
.hero .hero-cell:nth-child(1) .hero-v span { transition-delay: .5s; }
.hero .hero-cell:nth-child(2) .hero-v span { transition-delay: .65s; }
.hero .hero-cell:nth-child(3) .hero-v span { transition-delay: .8s; }
.hero .hero-cell:nth-child(1) .hero-n { transition-delay: .85s; }
.hero .hero-cell:nth-child(2) .hero-n { transition-delay: 1s; }
.hero .hero-cell:nth-child(3) .hero-n { transition-delay: 1.15s; }

.js:not(.rm) .hero:not(.hero-on) .hero-strip::before { transform: scaleX(0); }
.js:not(.rm) .hero:not(.hero-on) .hero-cell + .hero-cell::before { transform: scaleY(0); }
.js:not(.rm) .hero:not(.hero-on) .hero-k,
.js:not(.rm) .hero:not(.hero-on) .hero-n { opacity: 0; }
.js:not(.rm) .hero:not(.hero-on) .hero-v span { transform: translateY(.45em); clip-path: inset(0 -.1em 100% -.1em); }
.hero .hero-v span { clip-path: inset(-.4em -.1em -.3em -.1em); }

/* short screens: keep the row in the first screen without crowding the copy */
@media (min-width: 761px) and (max-height: 780px) {
  .hero .hero-main { padding-top: 96px; padding-bottom: 36px; }
  .hero .hero-cell { padding-top: 18px; padding-bottom: 24px; }
  .hero .actions { margin-top: 32px; }
}
@media (max-width: 1080px) and (min-width: 761px) {
  .hero .hero-cell { padding-left: 22px; padding-right: 22px; }
  .hero .hero-n { font-size: 14px; }
}

/* ---- phones: mark on top, text below, the row becomes stacked rows after the call to action ---- */
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding: 46svh 0 48px; }
  .hero .hero-main { display: block; padding: 0 20px; }
  .hero .hero-copy { width: 100%; }
  .hero .hero-copy::before { background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0) 0, rgb(var(--bg-rgb) / .84) 56px, rgb(var(--bg-rgb) / .96) 100%); }
  .hero .hero-lead { margin-top: 20px; font-size: 16.5px; }
  .hero .actions { margin-top: 28px; }
  .hero .hero-strip {
    grid-template-columns: 1fr; margin-top: 44px; padding: 0 20px;
    background: rgb(var(--bg-rgb) / .96);
  }
  .hero .hero-strip::before { left: 20px; right: 20px; }
  .hero .hero-cell, .hero .hero-cell:first-child {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px;
    padding: 18px 0 20px;
  }
  .hero .hero-cell + .hero-cell::before {
    left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; transform-origin: 0 50%;
  }
  .js:not(.rm) .hero:not(.hero-on) .hero-cell + .hero-cell::before { transform: scaleX(0); }
  .hero .hero-k { grid-row: 1 / span 2; padding-top: 6px; line-height: 1.35; }
  .hero .hero-v { grid-column: 2; margin-top: 0; font-size: calc(19px * var(--fd-scale)); }
  .hero .hero-n { grid-column: 2; margin-top: 6px; font-size: 14.5px; }
}


/* ============================================================ SHEETS */
/* Every section below the hero is a drawing sheet: a heading row, then a ruled table. */
.sheet { position: relative; padding: clamp(110px, 17vh, 190px) var(--gutter) 0; }
.sheet-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 20px; }
.sheet-head .h2 { grid-column: 1 / span 6; }
.sheet-head .body-l { grid-column: 8 / span 5; align-self: end; margin-top: 0; }

/* a ruled block that settles in when it comes into view */
.js:not(.rm) .reveal { transition: opacity .8s ease, transform .8s var(--ease); }
.js:not(.rm) .reveal:not(.in) { opacity: 0; transform: translateY(16px); }

/* ============================================================ CO STAVÍME */
.build .bd-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line-2); }
.build .bd-cell {
  display: flex; flex-direction: column; min-width: 0;
  padding: 28px 36px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.build .bd-cell:nth-child(2n) { border-right: 0; }
.build .dwg { height: clamp(240px, 31vh, 320px); margin: 4px 0 30px; }
.build .bd-i { font: 400 12px/1 var(--f-mono); color: var(--ink-3); }
.build .bd-t {
  margin-top: 12px;
  font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  font-size: calc(clamp(20px, 1.65vw, 25px) * var(--fd-scale)); line-height: 1.18; letter-spacing: -.02em; text-wrap: balance;
}
.build .bd-spec { margin-top: 22px; border-top: 1px solid var(--line-2); }
.build .bd-spec > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.build .bd-spec > div:last-child { border-bottom: 0; padding-bottom: 0; }
.build .bd-spec dt { font: 400 12px/1.9 var(--f-mono); color: var(--ink-3); }
.build .bd-spec dd { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.build .bd-spec > div:last-child dd { color: var(--ink); }
.build .bd-core {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 18px 28px;
  padding: 28px 36px 30px; background: var(--bg-raise);
}
.build .bd-core .sq { align-self: center; }
.build .bd-core-t {
  font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  font-size: calc(clamp(18px, 1.45vw, 22px) * var(--fd-scale)); line-height: 1.3; letter-spacing: -.02em;
}
.build .bd-core-n { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.build .bd-core-n .link { color: var(--ink); }

/* exploded axonometric drawings (js/axo.js); faces mixed from the theme */
.dwg { display: block; width: 100%; overflow: visible;
  --f1: color-mix(in srgb, var(--ink) 3%, var(--bg)); --f2: color-mix(in srgb, var(--ink) 11%, var(--bg)); --f3: color-mix(in srgb, var(--ink) 6%, var(--bg)); }
.dwg .f-top { fill: var(--f1); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.dwg .f-side { fill: var(--f2); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.dwg .f-front { fill: var(--f3); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.dwg .ln { fill: none; stroke: var(--ink); stroke-width: .9; stroke-linejoin: round; }
.dwg .lg { fill: none; stroke: var(--ink-3); stroke-width: .6; }
.dwg .inkl { fill: var(--ink); stroke: var(--ink); stroke-width: .8; stroke-linejoin: round; }
.dwg .blue { fill: var(--core); stroke: none; }
.dwg .bline { fill: none; stroke: var(--core); stroke-width: 1.2; }
.dwg .axis { fill: none; stroke: var(--ink-3); stroke-width: .7; stroke-dasharray: 3 3; }
.dwg .lbl path { fill: none; stroke: var(--ink-3); stroke-width: .7; }
.dwg .lbl circle { fill: var(--ink); }
.dwg .lbl text { font: 400 15px var(--f-mono); fill: var(--ink-2); }
.dwg .layer { transition: transform 1.25s var(--ease), opacity .6s ease; transition-delay: calc(var(--i, 0) * 120ms); }
.dwg .lbl { transition: opacity .6s ease; transition-delay: calc(.9s + var(--i, 0) * 120ms); }
.dwg .axis { transition: opacity .8s ease 1.2s; }
.dwg.pre:not(.in) .layer { transform: translate(var(--ox, 0px), var(--oy, 0px)); opacity: 0; transition: none; }
.dwg.pre:not(.in) .lbl, .dwg.pre:not(.in) .axis { opacity: 0; transition: none; }

/* ============================================================ POSTUP: the title block */
.steps .stamp { margin-top: 64px; }
.steps .bom { border: 1px solid var(--line-2); border-bottom: 0; }
.steps .bom-h { font: 500 13px/1 var(--f-text); padding: 15px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.steps .bom-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.steps .bom-list li {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; font-size: 16px;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.steps .bom-list li:nth-child(4n) { border-right: 0; }
.steps .bom-list li span { font: 400 12px/1 var(--f-mono); color: var(--ink-3); min-width: 14px; }
.steps .bom-note { padding: 14px 16px; font-size: 15px; color: var(--ink-3); }

.steps .tb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--ink); border-bottom: 0; }
.steps .tb-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; border-bottom: 2px solid var(--ink); }
.steps .tb-c { position: relative; min-width: 0; padding: 18px 20px 22px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.steps .tb-c:last-child { border-right: 0; }
.steps .tb-foot .tb-c { border-bottom: 0; }
.steps .tb-step { display: flex; flex-direction: column; }
.steps .tb-k { display: block; font: 400 12px/1 var(--f-mono); color: var(--ink-3); margin-bottom: 18px; }
.steps .tb-v {
  display: block; font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  font-size: calc(clamp(19px, 1.55vw, 24px) * var(--fd-scale)); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance;
}
.steps .tb-c p { margin-top: 12px; font-size: 15.5px; line-height: 1.45; max-width: 24em; color: var(--ink-2); }
.steps .tb-pay { margin-top: auto; padding-top: 22px; display: flex; align-items: center; gap: 10px; font: 400 12px/1 var(--f-mono); color: var(--ink); }
.steps .tb-pay .sq { width: 7px; height: 7px; }
.steps .c-scale strong { font: 500 22px/1 var(--f-mono); }
/* the signature is written in from left to right, then underlined */
.steps .sig { display: inline-block; margin-top: -6px; }
.steps .sig-t {
  display: block; padding: 4px 18px 8px 4px;
  font: 400 54px/1 "Ms Madi", cursive; color: var(--ink);
  transform: rotate(-2deg); transform-origin: 0 100%;
  clip-path: inset(-30% -10% -40% -10%); transition: clip-path 1.5s cubic-bezier(.5, 0, .3, 1) .6s;
}
.steps .sig-u { display: block; width: 112%; height: 12px; margin: -14px 0 0 -2%; overflow: visible; }
.steps .sig-u path { fill: none; stroke: rgb(var(--ink-rgb) / .8); stroke-width: 1; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke-dashoffset .6s ease 2.1s; }
.js:not(.rm) .steps .stamp:not(.in) .sig-t { clip-path: inset(-30% 110% -40% -10%); }
.js:not(.rm) .steps .stamp:not(.in) .sig-u path { stroke-dashoffset: 1; }
.steps .blank { display: block; margin-top: 28px; padding-top: 6px; border-top: 1px dashed var(--ink-3); font: 400 12px/1.3 var(--f-mono); color: var(--ink-3); }

/* ============================================================ KONTAKT */
.contact {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(32px, 5vw, 96px);
  padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(80px, 12vh, 140px);
}
.contact .ct-text { max-width: 680px; }
.contact .ct-side { position: relative; }
.contact .ct-slot { position: sticky; top: max(72px, calc(50vh - 290px)); height: min(580px, calc(100vh - 144px)); }
.contact .ct-fallback { display: none; }
.rm .contact .ct-fallback, .no-webgl .contact .ct-fallback {
  display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(70%, 340px);
}

.contact .ct-form { margin-top: 48px; border-top: 1px solid var(--line-2); padding-top: 32px; }
.contact .ct-q { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.contact .ct-l { display: block; padding: 0; margin-bottom: 12px; font-size: 16px; font-weight: 600; }
.contact .ct-hint { font-weight: 400; color: var(--ink-3); font-size: 14px; margin-left: 6px; }
.contact .ct-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.contact .ct-chip { position: relative; cursor: pointer; }
.contact .ct-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.contact .ct-chip span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 14px;
  border: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); transition: border-color .2s, color .2s, background-color .2s;
}
.contact .ct-chip span::before { content: ""; width: 8px; height: 8px; flex: none; border: 1px solid var(--ink-3); transition: background-color .2s, border-color .2s; }
.contact .ct-chip:hover span { border-color: rgb(var(--ink-rgb) / .5); color: var(--ink); }
.contact .ct-chip input:checked + span { border-color: var(--ink); color: var(--ink); background: rgb(var(--ink-rgb) / .05); }
.contact .ct-chip input:checked + span::before { background: var(--core); border-color: var(--core); }
.contact .ct-chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.contact .ct-in {
  display: block; width: 100%; padding: 13px 15px;
  background: var(--bg-sunk); color: var(--ink); border: 1px solid var(--line-2); border-radius: 0;
  font: 400 16px/1.45 var(--f-text); transition: border-color .2s;
}
.contact .ct-in::placeholder { color: var(--ink-3); }
.contact .ct-in:hover { border-color: rgb(var(--ink-rgb) / .4); }
.contact .ct-in:focus { outline: none; border-color: var(--ink); }
.contact .ct-in:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.contact .ct-in[aria-invalid="true"] { border-color: var(--alert); }
.contact .ct-area { resize: vertical; min-height: 124px; }
.contact .ct-err { margin-top: 8px; font-size: 14px; color: var(--alert); }
.contact .ct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.contact .ct-wide { grid-column: 1 / -1; }
.contact .ct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact .ct-send { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }
.contact .ct-submit { min-width: 160px; }
.contact .ct-submit[disabled] { opacity: .6; cursor: progress; }
.contact .ct-note { flex: 1 1 260px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.contact .ct-note a { color: var(--ink-2); text-underline-offset: 3px; }
.contact .ct-status { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.contact .ct-status:empty { display: none; }
.contact .ct-status.is-error { color: var(--alert); }
.contact .ct-done { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line-2); outline: none; }
.contact .ct-done-t {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-display); font-weight: var(--fd-wght); font-stretch: var(--fd-wdth);
  font-size: calc(clamp(22px, 2vw, 30px) * var(--fd-scale)); letter-spacing: -.02em;
}
.contact .ct-done .body-l { margin-top: 16px; }
.contact .ct-direct { margin-top: 44px; font-size: 16px; color: var(--ink-2); }
.contact .ct-direct .link { color: var(--ink); }

/* ============================================================ FOOTER */
.foot {
  position: relative; z-index: 1; background: var(--bg);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px 48px; align-items: start;
  padding: 48px var(--gutter) 32px; border-top: 1px solid var(--line);
}
.foot-firm img { width: 140px; height: auto; }
.foot-dl { justify-self: end; display: flex; gap: clamp(32px, 5vw, 72px); }
.foot-dl dt { font: 400 12px/1 var(--f-mono); color: var(--ink-3); margin-bottom: 10px; }
.foot-dl dd { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.foot-legal {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3);
}
.foot-legal a { color: var(--ink-2); text-underline-offset: 3px; }

/* ============================================================ SHEETS: TABLET & PHONE */
@media (max-width: 1080px) {
  .build .bd-cell { padding: 24px 24px 28px; }
  .steps .tb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps .tb-step:nth-child(2) { border-right: 0; }
}
@media (max-width: 900px) {
  .build .bd-grid { grid-template-columns: 1fr; }
  .build .bd-cell { border-right: 0; }
  .build .bd-core { grid-template-columns: auto minmax(0, 1fr); }
  .build .bd-core-n { grid-column: 2; }
  .contact { grid-template-columns: 1fr; }
  .contact .ct-side { order: -1; }
  .contact .ct-slot { position: relative; top: auto; height: min(46vh, 380px); }
}
@media (max-width: 760px) {
  .sheet { padding: 96px 20px 0; }
  .sheet-head { grid-template-columns: 1fr; }
  .sheet-head > * { grid-column: 1 !important; }
  .sheet-head .body-l { margin-top: 2px; }
  .build .bd-grid, .steps .stamp { margin-top: 36px; }
  .build .bd-cell { padding: 20px 18px 24px; }
  .build .dwg { height: 190px; margin: 4px 0 22px; }
  .build .bd-spec > div { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .build .bd-core { padding: 22px 18px 24px; gap: 12px 16px; }
  .steps .bom-list { grid-template-columns: 1fr 1fr; }
  .steps .bom-list li:nth-child(4n) { border-right: 1px solid var(--line); }
  .steps .bom-list li:nth-child(2n) { border-right: 0; }
  .steps .tb, .steps .tb-foot { grid-template-columns: 1fr; }
  .steps .tb-c { border-right: 0; }
  .steps .tb-foot .tb-c { border-bottom: 1px solid var(--line-2); }
  .steps .tb-foot .tb-c:last-child { border-bottom: 0; }
  .contact { padding: 72px 20px 72px; }
  .contact .ct-slot { height: 300px; margin: 0 -20px 8px; }
  .contact .ct-form { margin-top: 36px; padding-top: 26px; }
  .contact .ct-fields { grid-template-columns: 1fr; }
  .contact .ct-submit { width: 100%; }
  .foot { grid-template-columns: 1fr; padding: 40px 20px 28px; }
  .foot-dl { justify-self: start; flex-direction: column; gap: 22px; }
}
