/* P05 · Bitovňa · Retro-tech terminal · phosphor on black */

:root {
  --bg: oklch(0.17 0.01 160);
  --bg-2: oklch(0.21 0.012 160);
  --fg: oklch(0.9 0.02 150);
  --muted: oklch(0.65 0.04 150);
  --accent: oklch(0.85 0.2 150);
  --accent-fg: oklch(0.15 0.01 160);
  --line: oklch(0.32 0.03 150);
  --line-strong: oklch(0.52 0.05 150);
  --accent-soft: oklch(0.85 0.2 150 / 0.55);
  --scan: oklch(0.85 0.2 150 / 0.25);
  --err: oklch(0.78 0.15 60);

  --section-y: clamp(4rem, 3rem + 4vw, 7rem);
  --max: 1200px;
  --gutter: 16px;
  --pad: clamp(16px, 3vw, 32px);
  --sb-h: 40px;
  --r: 2px;

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
  --step-2: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-3: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem);
  --step-4: clamp(2rem, 1.4rem + 2.6vw, 4rem);
  --step-5: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --mono-s: 0.9375rem;
  --mono-xs: 0.75rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.motion { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--sans);
  caret-color: var(--accent);
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-fg); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }
main:focus, [tabindex="-1"]:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--sb-h) + 16px); }

.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;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-fg);
  font: 700 var(--mono-s)/1 var(--mono); padding: 14px 16px; text-decoration: none;
}
.skip:focus { top: 8px; }

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

.display-1 { font: 500 var(--step-4)/1.1 var(--sans); letter-spacing: -0.025em; text-wrap: balance; }
.display-2 { font: 500 var(--step-3)/1.15 var(--sans); letter-spacing: -0.02em; text-wrap: balance; }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 12px 20px;
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--accent); border-radius: var(--r);
  font: 700 var(--mono-s)/1.2 var(--mono); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn::before { content: ">"; content: ">" / ""; }
.btn:hover { background: transparent; color: var(--accent); }
.btn--block { width: 100%; }
.tlink {
  font: 400 var(--mono-s)/1.5 var(--mono); color: var(--fg);
  text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
  display: inline-flex; align-items: center; min-height: 44px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.tlink:hover { color: var(--accent); text-decoration-color: var(--accent); }
.tbtn {
  min-height: 44px; min-width: 44px; padding: 8px 14px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: 700 var(--mono-s)/1 var(--mono); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.tbtn:hover { border-color: var(--accent); color: var(--accent); }
.tbtn--sq { padding: 0; }
.tbtn[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* ---------- status bar ---------- */
.sb {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  font: 400 0.8125rem/1 var(--mono);
}
.sb__in {
  max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad);
  height: var(--sb-h); display: flex; align-items: center; gap: 20px;
}
.sb__logo { font-weight: 800; letter-spacing: 0.08em; text-decoration: none; color: var(--fg); display: inline-flex; align-items: center; min-height: 40px; }
.sb__state { color: var(--muted); white-space: nowrap; }
.sb__state.is-open { color: var(--accent); }
.sb__addr { color: var(--muted); white-space: nowrap; }
.sb__tel { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; color: var(--fg); white-space: nowrap; }
.sb__tel:hover { color: var(--accent); }
.sb__nav { margin-left: auto; display: flex; gap: 4px; }
.sb__nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; text-decoration: none; color: var(--fg); white-space: nowrap; }
.sb__nav a::before { content: "> "; content: "> " / ""; color: var(--accent); white-space: pre; }
.sb__nav a:hover { color: var(--accent); }

@media (max-width: 1099px) { .sb__addr { display: none; } }
@media (max-width: 1023px) { :root { --sb-h: 44px; } .sb__logo, .sb__tel, .sb__nav a { min-height: 44px; } }
@media (max-width: 899px) { .sb__tel-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .sb__tel { min-width: 44px; justify-content: center; } }
@media (max-width: 767px) {
  :root { --sb-h: 88px; }
  .sb__long { display: none; }
  .sb__in { height: auto; flex-wrap: wrap; gap: 0 12px; padding-inline: var(--pad); }
  .sb__logo { min-height: 44px; }
  .sb__state { flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .sb__tel { min-height: 44px; margin-right: -12px; }
  .sb__nav { order: 3; width: 100%; margin: 0 0 0 -8px; border-top: 1px solid var(--line); }
  .sb__nav a { min-height: 44px; flex: 1; padding: 0 8px; }
}

/* ---------- sections ---------- */
.sec { padding-block: var(--section-y); position: relative; }
.sec--cut::before {
  content: "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////";
  content: "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" / "";
  position: absolute; top: 0; left: 0; right: 0;
  font: 400 var(--mono-xs)/1 var(--mono); color: var(--line); letter-spacing: 0.2em;
  white-space: nowrap; overflow: hidden; pointer-events: none;
}
.sec__head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 44rem; }
.sec__lead { color: var(--muted); font-size: var(--step-1); max-width: 40rem; }

/* ---------- boxes ---------- */
.box { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); min-width: 0; }
.box__head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  font: 700 var(--mono-xs)/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.box__head > span:last-child:not(:first-child) { text-align: right; }
.box__body { padding: 24px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: clip;
  padding-block: clamp(28px, 5vw, 72px) clamp(48px, 6vw, 96px);
  background: radial-gradient(ellipse 70% 80% at 72% 45%, color-mix(in oklch, var(--bg-2) 60%, transparent), transparent 72%);
}
.hero__scan { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hero__scan::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--scan); }
@media (prefers-reduced-motion: no-preference) {
  .hero__scan { animation: scan 6s linear 0.3s infinite; }
}
@keyframes scan {
  0% { transform: translateY(0); opacity: 1; }
  20% { transform: translateY(100%); opacity: 1; }
  20.01%, 100% { transform: translateY(100%); opacity: 0; }
}
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; position: relative; z-index: 1; }
.hero__main { grid-column: 1 / span 7; display: grid; gap: 24px; }
.hero h1 { max-width: 20ch; }
.hero h1 span { display: block; }
.hero__sub { font-size: var(--step-1); color: var(--fg); max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.term { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); max-width: 40rem; }
.term__head {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  font: 700 var(--mono-xs)/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.term__dots { display: inline-flex; gap: 6px; }
.term__dots i { width: 8px; height: 8px; border: 1px solid var(--line-strong); border-radius: 50%; }
.term__pid { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.term__body {
  padding: 16px 20px; min-height: calc(4 * 1.5em + 32px);
  font: 400 1rem/1.5 var(--mono); color: var(--accent);
}
.term__line { min-height: 1.5em; white-space: pre-wrap; overflow-wrap: anywhere; }
.cursor {
  display: inline-block; width: 0.6em; height: 1.1em; margin-left: 0.15em;
  vertical-align: -0.18em; background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.06s steps(2, jump-none) infinite; }
  /* JS types the lines; hide the static copy until it takes over (failsafe after 4 s) */
  @media (scripting: enabled) {
    .term:not(.is-live) .term__txt, .term:not(.is-live) .cursor { visibility: hidden; animation: term-show 0s 4s forwards; }
  }
}
@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes term-show { to { visibility: visible; } }

.wire { grid-column: 8 / span 5; display: grid; gap: 12px; justify-items: center; }
.wire__svg { width: 100%; max-width: 440px; height: auto; aspect-ratio: 400 / 480; overflow: visible; }
.wire__svg .hud { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.dev { opacity: 0; transition: opacity 150ms linear; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dev.is-on { opacity: 1; }
.dev .dim { stroke: var(--accent-soft); }
.dev .err { stroke: var(--accent); stroke-width: 2; }
.dev .lead { stroke: var(--accent-soft); stroke-width: 1; }
.dev .guide { stroke: var(--line-strong); stroke-dasharray: 4 4; }
.w-tag { fill: var(--accent); stroke: none; font: 700 12px var(--mono); letter-spacing: 0.04em; }
@media (prefers-reduced-motion: no-preference) {
  .dev.is-on .draw { stroke-dasharray: 1; animation: draw 0.9s var(--ease-out) both; }
  .dev.is-on .draw:nth-child(n+4) { animation-delay: 0.15s; }
  .dev.is-on .err, .dev.is-on .lead { animation-delay: 0.45s !important; }
  .dev.is-on .w-tag { animation: tag 0.4s steps(4) 0.8s both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes tag { from { opacity: 0; } to { opacity: 1; } }
.wire__cap { font: 400 var(--mono-xs)/1.5 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; text-align: center; }

@media (min-width: 1024px) {
  .hero { min-height: calc(100svh - var(--sb-h)); display: grid; align-items: center; }
}
@media (max-width: 1023px) {
  .hero__main { grid-column: 1 / -1; }
  .wire { grid-column: 1 / -1; margin-top: 32px; }
  .wire__svg { width: 40vw; min-width: 180px; max-width: 320px; }
}
@media (max-width: 639px) {
  .hero__main { gap: 20px; }
  .term__body { font-size: 0.875rem; padding: 14px 16px; min-height: calc(5 * 1.5em + 28px); }
  .term__pid { display: none; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--gutter); align-items: stretch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: 400 0.875rem/1.2 var(--mono); color: var(--fg); white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
  pointer-events: none;
}
.chip span::before { content: "[ ]\00a0"; content: "[ ]\00a0" / ""; color: var(--muted); }
.chip:hover span { border-color: var(--fg); }
.chip input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in oklch, var(--accent) 8%, var(--bg)); }
.chip input:checked + span::before { content: "[x]\00a0"; content: "[x]\00a0" / ""; color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.box__flag { color: var(--accent); text-transform: none; letter-spacing: 0; font-weight: 400; }
.res { display: grid; gap: 16px; align-content: start; }
.res__out { display: grid; gap: 4px; }
.res__pre { font: 700 var(--mono-s)/1.5 var(--mono); color: var(--muted); min-height: 1.5em; }
.res__num { font: 800 var(--step-5)/1 var(--mono); color: var(--accent); letter-spacing: -0.03em; min-height: 1em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.res__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 400 var(--mono-s)/1.5 var(--mono); color: var(--fg); min-height: 1.5em; margin-top: 8px; }
.res__meta span { min-height: 1.5em; }
.res__note { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 1023px) {
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .box--res { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .box__body { padding: 20px 16px; }
}

/* ---------- services ---------- */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.svc__item { transition: border-color 0.2s; }
.svc__item .box__body { display: grid; gap: 8px; }
.svc__item h3 { font: 500 var(--step-2)/1.25 var(--sans); margin-top: 12px; }
.svc__item p:not(.box__head) { color: var(--muted); }
.svc__item:hover { border-color: var(--accent); }
.svc__item:hover .box__head { color: var(--accent); }
.ico-lg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 0.85; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .svc__item:hover .ico-lg { animation: icodraw 300ms var(--ease-out); }
  html.motion .svc__item.reveal.is-in .ico-lg { animation: icodraw 600ms var(--ease-out) 200ms both; }
  html.motion .svc__item.reveal.is-in:hover .ico-lg { animation: icodraw 300ms var(--ease-out); }
}
@keyframes icodraw { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
.extra { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 24px; font: 400 var(--mono-s)/1.5 var(--mono); color: var(--fg); }
.extra li::before { content: "+ "; content: "+ " / ""; color: var(--accent); white-space: pre; }
@media (max-width: 1023px) { .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) {
  .svc { gap: 8px; }
  .svc__item .box__body { padding: 16px 12px; }
  .svc__item h3 { font-size: 1.0625rem; margin-top: 8px; }
  .svc__item p:not(.box__head) { font-size: 0.875rem; line-height: 1.5; }
  .ico-lg { width: 36px; height: 36px; }
  .extra { flex-direction: column; }
}

/* ---------- teardown ---------- */
.td__stage { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "fig" "pointa" "ctrl" "list"; }
.td__head { grid-area: head; max-width: 34rem; }
.td__head h2 { margin-bottom: 12px; }
.td__list { grid-area: list; display: grid; gap: 4px; }
.td-item {
  display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding-block: 10px;
  border-bottom: 1px solid var(--line);
  font: 400 var(--mono-s)/1.5 var(--mono); color: var(--fg);
}
.td-n { flex: none; width: 2.2em; color: var(--muted); }
.td-n::before { content: "0"; }
.td-txt { flex: none; max-width: calc(100% - 4em); }
.td-type { white-space: pre-wrap; }
.td-fill { flex: 1; min-width: 12px; }
.td-item.is-open .td-n { color: var(--accent); }
.td-item:not(.is-open) .td-type { color: var(--muted); }
.td-item:not(.is-open) .td-type:empty::before { content: "············"; content: "············" / ""; color: var(--line-strong); }
.td-type.is-typing::after, .td-pointa .td-type.is-typing::after {
  content: ""; display: inline-block; width: 0.55em; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent);
}

.td__fig { grid-area: fig; display: grid; justify-items: center; }
.td-svg { width: min(60vw, 300px); height: auto; aspect-ratio: 400 / 650; overflow: visible; }
.td-svg .slab, .td-svg .face { fill: var(--bg-2); stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.td-svg .slab { fill: var(--bg); stroke: var(--accent-soft); }
.td-svg .edge { stroke: var(--accent-soft); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.td-svg .det { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.td-svg .det.dim { stroke: var(--accent-soft); stroke-width: 1; }
.td-lead { fill: none; stroke: var(--accent-soft); stroke-width: 0.9; stroke-dasharray: 1; stroke-dashoffset: 1; }
.td-lead.is-open { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) { .td-lead { transition: stroke-dashoffset 0.3s var(--ease-out); } }
@media (max-width: 1023px) { .td-leads { display: none; } }

/* static / fallback positions (no GSAP or reduced motion): exploded per data-step */
.td-layer[data-layer="1"] { --k: 1; --dx: -45; --dy: -225; }
.td-layer[data-layer="2"] { --k: 2; --dx: -27; --dy: -135; }
.td-layer[data-layer="3"] { --k: 3; --dx: -9; --dy: -45; }
.td-layer[data-layer="4"] { --k: 4; --dx: 9; --dy: 45; }
.td-layer[data-layer="5"] { --k: 5; --dx: 27; --dy: 135; }
.td-layer[data-layer="6"] { --k: 6; --dx: 45; --dy: 225; }
.td__fig[data-step="0"] { --step: 0; }
.td__fig[data-step="1"] { --step: 1; }
.td__fig[data-step="2"] { --step: 2; }
.td__fig[data-step="3"] { --step: 3; }
.td__fig[data-step="4"] { --step: 4; }
.td__fig[data-step="5"] { --step: 5; }
.td__fig[data-step="6"] { --step: 6; }
html:not(.motion) .td-layer {
  --on: clamp(0, var(--step) - var(--k) + 1, 1);
  transform: translate(calc(var(--dx) * var(--on) * 1px), calc(var(--dy) * var(--on) * 1px));
}
@media (prefers-reduced-motion: no-preference) { html:not(.motion) .td-layer { transition: transform 0.6s var(--ease-out); } }

.td-pointa { grid-area: pointa; font: 700 var(--mono-s)/1.5 var(--mono); color: var(--accent); text-align: center; min-height: 3em; justify-self: center; max-width: 34rem; }
.td-pointa:not(.is-open) .td-type { visibility: hidden; }
.td-ctrl { grid-area: ctrl; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-self: start; gap: 8px; }
.td-tabs { display: flex; gap: 6px; }
.td-ctrl .tbtn:not(.tbtn--sq) { min-width: 110px; }

@media (min-width: 1024px) {
  .td { padding-block: 0; }
  .td__stage {
    min-height: calc(100vh - var(--sb-h));
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "head fig" "list fig" "ctrl fig" ". pointa";
    column-gap: var(--gutter); row-gap: 24px;
    align-content: center; padding-block: 32px;
  }
  .td__list { align-self: start; }
  .td-ctrl { justify-content: flex-start; }
  .td__fig { align-self: center; }
  .td-svg { width: auto; height: calc(100vh - var(--sb-h) - 152px); min-height: 400px; max-height: 900px; }
  .td-pointa { min-height: 1.5em; align-self: end; }
}
@media (max-width: 479px) {
  .td-item { font-size: 0.875rem; }
  .td-tabs { gap: 4px; }
  .td-ctrl .tbtn--sq { min-width: 44px; }
}

/* ---------- flow / log ---------- */
.flow { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.flow__log { grid-column: 1 / span 4; }
.flow__img { grid-column: 5 / span 4; }
.log { display: grid; gap: 22px; }
.log__line { font: 400 var(--mono-s)/1.5 var(--mono); color: var(--accent); }
.log__t { color: var(--muted); }
.log__d { color: var(--muted); margin-top: 4px; padding-left: 8ch; }
@media (max-width: 899px) {
  .flow__log, .flow__img { grid-column: 1 / -1; }
}
@media (max-width: 479px) { .log__d { padding-left: 0; } .log__line { font-size: 0.875rem; } }

/* ---------- media ---------- */
.media { position: relative; overflow: hidden; background: var(--bg-2); }
.media--3x2 { aspect-ratio: 3 / 2; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing {
  background-color: var(--bg-2);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 16px 16px; background-position: -1px -1px;
}
.media.is-missing::after {
  content: "[ obrázok ]"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 var(--mono-xs)/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gutter); }
.faq .sec__head { grid-column: 1 / span 3; align-self: start; }
.faq__list { grid-column: 4 / span 5; border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline;
  min-height: 56px; padding: 16px 4px; font: 700 var(--mono-s)/1.5 var(--mono); color: var(--fg);
  transition: color 0.15s;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::before { content: ">"; content: ">" / ""; color: var(--accent); flex: none; width: 1ch; }
.faq__list details[open] summary::before { content: "v"; content: "v" / ""; }
.faq__list summary:hover { color: var(--accent); }
.faq__list details p { padding: 0 4px 20px calc(1ch + 16px); color: var(--muted); max-width: 60ch; }
@media (max-width: 899px) {
  .faq .sec__head, .faq__list { grid-column: 1 / -1; }
}

/* ---------- order ---------- */
.order { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.order__form { grid-column: 1 / span 5; }
.order__side { grid-column: 6 / span 3; display: grid; gap: var(--gutter); }
.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px var(--gutter); }
.f { display: grid; gap: 6px; align-content: start; }
.f--wide { grid-column: 1 / -1; }
.f label { font: 700 var(--mono-xs)/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.f input:not([type="checkbox"]), .f select, .f textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r);
  font: 400 var(--mono-s)/1.4 var(--mono); color: var(--fg);
}
.f textarea { resize: vertical; min-height: 96px; }
.f select { appearance: none; background-image: none; padding-right: 36px; }
.f:has(select) { position: relative; }
.f:has(select)::after { content: "v"; content: "v" / ""; position: absolute; right: 14px; bottom: 14px; font: 700 var(--mono-s)/1 var(--mono); color: var(--accent); pointer-events: none; }
.f ::placeholder { color: var(--muted); opacity: 1; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: var(--fg); }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.f [aria-invalid="true"] { border-color: var(--err) !important; }
.f__err { font: 400 0.8125rem/1.4 var(--mono); color: var(--err); min-height: 0; }
.f__err:empty { display: none; }
.f--check { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 12px; }
.f--check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.f--check label { font: 400 0.9375rem/1.5 var(--sans); text-transform: none; letter-spacing: 0; color: var(--fg); cursor: pointer; padding-block: 2px; }
.f--check .f__err { grid-column: 1 / -1; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__log { font: 400 0.875rem/1.5 var(--mono); color: var(--muted); flex: 1; min-width: 16rem; }
.form__log.is-err { color: var(--err); }
.form__log.is-ok { color: var(--accent); }
.contact { display: grid; gap: 16px; font: 400 var(--mono-s)/1.5 var(--mono); }
.contact p { display: flex; gap: 12px; align-items: flex-start; }
.contact .ico { color: var(--accent); margin-top: 3px; }
.contact .tlink { min-height: 0; margin-top: -2px; }

@media (max-width: 1023px) {
  .order__form, .order__side { grid-column: 1 / -1; }
  .order__side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .order__side { grid-template-columns: minmax(0, 1fr); }
  .form__end .btn { width: 100%; }
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; background: var(--bg-2); }
.foot__line { display: flex; flex-wrap: wrap; gap: 6px 0; font: 400 0.8125rem/1.6 var(--mono); color: var(--fg); }
.foot__line span:not(:last-child)::after { content: "·"; content: "·" / ""; color: var(--muted); margin-inline: 12px; }
.foot__demo { margin-top: 12px; font: 400 0.8125rem/1.6 var(--mono); color: var(--muted); }
.foot__demo strong { color: var(--fg); font-weight: 700; }

/* ---------- reveal (only with html.motion) ---------- */
html.motion .reveal { opacity: 0; clip-path: inset(0 100% 100% 0); }
html.motion .reveal.is-in {
  opacity: 1; clip-path: inset(0);
  transition: clip-path 320ms steps(8, end), opacity 320ms steps(4, end);
}
html.motion.is-safari .reveal { clip-path: none; }
html.motion.is-safari .reveal.is-in { transition: opacity 320ms steps(4, end); }
html.motion .flow__log .log li { opacity: 0; }
html.motion .flow__log.is-in .log li { opacity: 1; transition: opacity 0.2s steps(2, end); }
html.motion .flow__log.is-in .log li:nth-child(1) { transition-delay: 0.35s; }
html.motion .flow__log.is-in .log li:nth-child(2) { transition-delay: 0.7s; }
html.motion .flow__log.is-in .log li:nth-child(3) { transition-delay: 1.05s; }
html.motion .flow__log.is-in .log li:nth-child(4) { transition-delay: 1.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .cursor { display: none; }
}
