/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --paper:   #F5F0E8;
  --panel:   #E8E0D0;
  --line:    #B8A898;
  --ink-2:   #6B5C4E;
  --ink:     #2E2520;
  --scribe:  #1F3DB5;

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --mono:  'DM Mono', 'Courier New', monospace;

  --nav-h: 64px;
  --max-w: 1200px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================================
   PAPER GRAIN LAYER
   ============================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 16px;
  z-index: 99999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 8px;
}

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
}

h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}

p {
  max-width: 68ch;
}

p + p {
  margin-top: 1em;
}

strong {
  font-weight: 500;
}

/* ============================================================
   LINKS
   ============================================================ */
.text-link {
  text-decoration: none;
  border-bottom: 1px solid var(--scribe);
  color: var(--ink);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.text-link:hover {
  color: var(--scribe);
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: clamp(64px, 10vw, 120px) 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  z-index: 1000;
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(245,240,232,0.96);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.logo-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.logo-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--scribe);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 10px 20px;
  position: relative;
  overflow: hidden;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--scribe);
  transition: width 0.3s ease;
}

.nav-cta:hover::after {
  width: 100%;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 32px var(--gutter);
  z-index: 999;
  flex-direction: column;
  gap: 24px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.nav-mobile a:last-child {
  border-bottom: none;
  color: var(--paper);
  background: var(--ink);
  padding: 14px 20px;
  text-align: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 16px 32px;
  position: relative;
  overflow: hidden;
  transition: color 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--scribe);
  transition: width 0.35s ease;
}

.btn-primary:hover::after {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  padding: 15px 32px;
  border: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--panel);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
}

/* ============================================================
   SHEET SECTION LABELS
   ============================================================ */
.sheet-ref {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sheet-ref::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--scribe);
  flex-shrink: 0;
}

/* ============================================================
   CROSSHAIR CORNER CARDS
   ============================================================ */
.card {
  background: var(--panel);
  padding: 40px;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 14px 1px;
}

/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: var(--panel);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  padding-right: 64px;
}

.marquee-item .sep {
  color: var(--scribe);
  margin: 0 8px;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 24px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 32px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--scribe);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  line-height: 0.97;
  margin-bottom: 32px;
  position: relative;
}

.h1-underline {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--scribe);
  margin-top: 20px;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: 8px;
}

.hero-microline {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   HERO SVG — self-drafting technical drawing
   ============================================================ */
.hero-svg-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  overflow: visible;
}

.hero-svg .draw-path {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.hero-svg .svg-page-outline {
  stroke: var(--ink-2);
  stroke-width: 1.5;
}

.hero-svg .svg-inner-line {
  stroke: var(--line);
  stroke-width: 1;
}

.hero-svg .svg-dim-line {
  stroke: var(--scribe);
  stroke-width: 1;
}

.hero-svg .svg-crosshair {
  stroke: var(--scribe);
  stroke-width: 1;
}

.hero-svg .svg-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--scribe);
}

.hero-svg .svg-label-vertical {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--scribe);
  writing-mode: vertical-rl;
}

/* ============================================================
   SHEET SECTIONS — general
   ============================================================ */
.sheet-section {
  border-top: 1px solid var(--line);
  padding: clamp(80px, 12vw, 140px) 0;
}

.sheet-section:last-of-type {
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   TEARDOWN VIGNETTE — mini browser composite
   ============================================================ */
.teardown-wrap {
  margin-top: 56px;
}

.teardown-caption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 16px;
  text-align: center;
}

.mini-browser {
  border: 1px solid var(--line);
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  background: var(--paper);
}

.mini-browser-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mb-dots {
  display: flex;
  gap: 5px;
}

.mb-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--line);
}

.mb-url {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 3px 8px;
}

.mini-browser-content {
  padding: 32px 28px 28px;
  min-height: 240px;
  position: relative;
}

.mb-header {
  height: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 24px;
}

.mb-header-dot {
  width: 60px;
  height: 8px;
  background: var(--line);
}

.mb-nav-item {
  width: 40px;
  height: 6px;
  background: var(--line);
  opacity: 0.5;
}

.mb-hero-area {
  height: 80px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.mb-body-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mb-line {
  height: 6px;
  background: var(--line);
  opacity: 0.4;
}

.mb-line:nth-child(2) { width: 75%; }
.mb-line:nth-child(3) { width: 60%; }

/* Teardown callout annotations */
.td-callout {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  opacity: 0;
}

.td-callout.visible {
  opacity: 1;
}

.td-callout-line {
  width: 1px;
  background: var(--scribe);
  flex-shrink: 0;
}

.td-callout-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--scribe);
  white-space: nowrap;
  border: 1px solid var(--scribe);
  padding: 3px 6px;
}

/* Static callouts for no-JS / reduced motion */
.td-callout { opacity: 1; }

/* ============================================================
   MECHANISM CARDS
   ============================================================ */
.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 56px;
}

.mechanism-card {
  background: var(--panel);
  padding: 40px;
  position: relative;
}

.mechanism-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 14px 1px;
}

.mechanism-card .card-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 20px;
}

.mechanism-card h3 {
  margin-bottom: 16px;
}

.mechanism-card p {
  color: var(--ink-2);
  font-size: 16px;
}

/* ============================================================
   ARITHMETIC / COUNTER BLOCK
   ============================================================ */
.counter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  border: 1px solid var(--line);
}

.counter-item {
  flex: 1;
  min-width: 180px;
  padding: 32px 36px;
  border-right: 1px solid var(--line);
}

.counter-item:last-child {
  border-right: none;
}

.counter-op {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 24px;
  color: var(--line);
  border-right: 1px solid var(--line);
  min-width: 48px;
}

.counter-number {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.counter-suffix {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.counter-desc {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 100%;
}

/* ============================================================
   COMPACT TIMELINE (domov — summary)
   ============================================================ */
.timeline-compact {
  margin-top: 56px;
  border: 1px solid var(--line);
}

.timeline-compact-track {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.timeline-compact-track::-webkit-scrollbar {
  display: none;
}

.tc-day {
  flex: 1;
  min-width: 140px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}

.tc-day:last-child {
  border-right: none;
}

.tc-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 10px;
}

.tc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.4;
}

.timeline-compact-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.timeline-compact-footer a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.timeline-compact-footer a:hover {
  color: var(--scribe);
}

/* ============================================================
   CASE STUDY CARDS
   ============================================================ */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 56px;
}

.case-card {
  background: var(--panel);
  position: relative;
}

.case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 14px 1px;
}

.case-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
  border-bottom: 1px solid var(--line);
}

.case-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-card:hover .case-img-wrap img {
  transform: scale(1.02);
}

.case-body {
  padding: 32px;
}

.case-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.case-spec-table td {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}

.case-spec-table td:first-child {
  color: var(--scribe);
  width: 120px;
  padding-right: 16px;
}

.case-spec-table tr:last-child td {
  border-bottom: none;
}

.case-body h3 {
  margin-bottom: 20px;
}

.case-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.case-link:hover {
  color: var(--scribe);
  border-color: var(--scribe);
}

/* ============================================================
   PROMISE LIST (cena / domov LIST 04)
   ============================================================ */
.promise-list {
  margin-top: 48px;
  counter-reset: promise;
}

.promise-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.promise-item:first-child {
  border-top: 1px solid var(--line);
}

.promise-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--scribe);
  padding-top: 2px;
}

.promise-text {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.55;
  max-width: 72ch;
}

/* ============================================================
   AVAILABILITY BADGE
   ============================================================ */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 18px;
  box-shadow: 2px 2px 0 var(--ink);
  margin-top: 32px;
}

.avail-dot {
  width: 7px;
  height: 7px;
  background: var(--scribe);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============================================================
   FULL TIMELINE (postopek.html)
   ============================================================ */
.timeline-full {
  margin-top: 64px;
}

/* Desktop: horizontal pinned */
.timeline-full-desktop {
  display: block;
}

.timeline-full-mobile {
  display: none;
}

.tfd-track {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
}

.tfd-day {
  flex: 1;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.tfd-day:last-child {
  border-right: none;
}

.tfd-day-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.tfd-day-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 6px;
}

.tfd-day-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.4;
}

.tfd-day-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tfd-actor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tfd-actor-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
}

.tfd-actor-label.vi {
  color: var(--ink-2);
}

.tfd-actor-text {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

.tfd-actor-text.empty {
  color: var(--line);
  font-family: var(--mono);
  font-size: 11px;
}

.timeline-summary {
  margin-top: 32px;
  padding: 20px 28px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.timeline-summary p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  max-width: 100%;
}

/* Mobile timeline (vertical) */
.tfm-day {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.tfm-day:last-child {
  border-bottom: none;
}

.tfm-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 8px;
}

.tfm-title {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}

.tfm-actors {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px 16px;
}

.tfm-actor-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--scribe);
  padding-top: 2px;
}

.tfm-actor-label.vi {
  color: var(--ink-2);
}

.tfm-actor-text {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ============================================================
   FAQ ACCORDION (postopek)
   ============================================================ */
.faq {
  margin-top: 80px;
}

.faq-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 32px;
}

details.faq-item {
  border-top: 1px solid var(--line);
}

details.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

summary.faq-q {
  font-size: 17px;
  font-family: var(--sans);
  font-weight: 500;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--ink);
  user-select: none;
}

summary.faq-q::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  color: var(--scribe);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}

.faq-icon::before {
  width: 14px;
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

details[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-a {
  padding: 0 0 28px 0;
  max-width: 68ch;
}

.faq-a p {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 100%;
}

.faq-a a {
  color: var(--scribe);
  text-decoration: underline;
}

/* ============================================================
   BEFORE / AFTER SLIDER (delo)
   ============================================================ */
.ba-wrap {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  touch-action: pan-y;
  aspect-ratio: 16/9;
  background: var(--panel);
  border: 1px solid var(--line);
}

.ba-side {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ba-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before {
  clip-path: inset(0 50% 0 0);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--ink);
  transform: translateX(-50%);
  cursor: col-resize;
  z-index: 2;
}

.ba-handle::before {
  content: '◁  ▷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  white-space: nowrap;
}

.ba-label {
  position: absolute;
  top: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 8px;
  z-index: 3;
}

.ba-label-before {
  left: 16px;
}

.ba-label-after {
  right: 16px;
}

/* ============================================================
   CONTACT FORM (kontakt)
   ============================================================ */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--panel);
  padding: 32px;
  position: relative;
  border-left: 3px solid var(--line);
  transition: border-color 0.2s;
}

.contact-card.active {
  border-left-color: var(--scribe);
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 14px 1px;
}

.contact-card-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scribe);
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 100%;
}

.form-wrap {
  position: relative;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.form-row:first-child {
  border-top: 1px solid var(--line);
}

.form-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 14px 0 6px;
}

.form-label span.required {
  color: var(--scribe);
}

.form-input,
.form-textarea {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  padding: 0 0 14px;
  width: 100%;
  resize: none;
  line-height: 1.5;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
}

.form-row:focus-within {
  border-bottom-color: var(--scribe);
}

.form-textarea {
  min-height: 96px;
}

.form-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-bottom: 14px;
}

.form-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 20px 8px 0;
}

.form-radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
}

.form-radio-label input[type="radio"]:checked {
  border-color: var(--scribe);
  background: var(--scribe);
}

.form-radio-label input[type="radio"]:focus-visible {
  outline: 2px solid var(--scribe);
  outline-offset: 2px;
}

/* Honeypot */
.form-hp {
  display: none !important;
  visibility: hidden;
}

.form-submit-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.form-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.6;
}

.form-success {
  display: none;
  padding: 32px;
  background: var(--panel);
  border-left: 3px solid var(--scribe);
}

.form-success.visible {
  display: block;
}

.form-success p {
  font-size: 17px;
  color: var(--ink);
}

.form-error {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink);
  padding: 16px;
  border: 1px solid var(--ink);
  margin-top: 16px;
}

.form-error.visible {
  display: block;
}

.contact-direct {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.contact-direct p {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  max-width: 100%;
}

.contact-direct a {
  color: var(--scribe);
  text-decoration: none;
  border-bottom: 1px solid var(--scribe);
}

/* ============================================================
   DELO PAGE
   ============================================================ */
.delo-case {
  padding: clamp(64px, 10vw, 120px) 0;
  border-bottom: 1px solid var(--line);
}

.delo-case:first-of-type {
  border-top: 1px solid var(--line);
}

.delo-case-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.delo-case-media {
  position: relative;
}

.delo-case-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.delo-case-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.delo-case-text p {
  color: var(--ink-2);
  max-width: 100%;
}

/* Teardown exhibit (delo) */
.teardown-exhibit {
  margin-top: clamp(64px, 10vw, 120px);
  border-top: 1px solid var(--line);
  padding-top: clamp(64px, 10vw, 120px);
}

.teardown-exhibit .mini-browser {
  max-width: 100%;
}

/* ============================================================
   CENA PAGE
   ============================================================ */
.cena-lead {
  max-width: 72ch;
}

.cena-section {
  margin-top: clamp(56px, 8vw, 96px);
}

.cena-section h2 {
  margin-bottom: 32px;
}

.cena-section p {
  color: var(--ink-2);
  max-width: 68ch;
}

.cena-note {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--panel);
  border-left: 3px solid var(--line);
}

.cena-note p {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 100%;
}

/* ============================================================
   O MENI PAGE
   ============================================================ */
.omeni-hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: clamp(64px, 10vw, 120px);
}

.omeni-photo-wrap {
  border: 1px solid var(--line);
  position: relative;
}

.omeni-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 0 / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 14px 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 1px 14px,
    linear-gradient(var(--line), var(--line)) no-repeat 100% 100% / 14px 1px;
  z-index: 1;
}

.omeni-photo-placeholder {
  aspect-ratio: 3/4;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.omeni-photo-placeholder p {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
  max-width: 100%;
}

.omeni-photo-caption {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.omeni-sections {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 64px);
}

.omeni-section h2 {
  margin-bottom: 20px;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

.omeni-section p {
  color: var(--ink-2);
  font-size: 17px;
}

.omeni-closing {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--line);
  max-width: 52ch;
}

/* ============================================================
   PAGE HEADERS (inner pages)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: clamp(48px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 24px;
}

.page-hero .intro {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.7;
}

/* ============================================================
   FINAL CTA BLOCK
   ============================================================ */
.cta-block {
  padding: clamp(80px, 12vw, 140px) 0;
  border-top: 1px solid var(--line);
}

.cta-block h2 {
  margin-bottom: 24px;
  max-width: 22ch;
}

.cta-block .cta-sub {
  color: var(--ink-2);
  font-size: clamp(16px, 1.8vw, 18px);
  max-width: 60ch;
  margin-bottom: 0;
}

.cta-email-line {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 32px;
}

.cta-email-line a {
  color: var(--scribe);
  text-decoration: none;
  border-bottom: 1px solid var(--scribe);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.footer-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.footer-brand {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.footer-brand span {
  color: var(--scribe);
  margin: 0 6px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--scribe);
}

.footer-tagline {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--line);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.footer-timer {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line);
}

.footer-timer[hidden] {
  display: none;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

.page-404 h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  margin-bottom: 24px;
}

.page-404 .sub-404 {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-2);
  margin-bottom: 48px;
}

/* ============================================================
   REVEAL ANIMATION CLASSES (set by GSAP)
   ============================================================ */
.reveal-up {
  will-change: transform, opacity;
}

/* ============================================================
   RESPONSIVE — 1100px
   ============================================================ */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-svg-wrap {
    order: -1;
  }

  .hero-svg {
    max-width: 420px;
    margin: 0 auto;
  }

  .mechanism-grid {
    grid-template-columns: 1fr;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .delo-case-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .omeni-hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .omeni-photo-wrap {
    max-width: 360px;
  }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .timeline-full-desktop {
    display: none;
  }

  .timeline-full-mobile {
    display: block;
  }

  .counter-grid {
    flex-direction: column;
  }

  .counter-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .counter-item:last-child {
    border-bottom: none;
  }

  .counter-op {
    display: none;
  }

  .omeni-hero {
    padding-top: calc(var(--nav-h) + 48px);
  }

  .ba-handle::before {
    display: none;
  }

  .cta-block h2 {
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .promise-item {
    grid-template-columns: 40px 1fr;
  }

  .footer-row {
    flex-direction: column;
  }
}

/* ============================================================
   PREFERS REDUCED MOTION — kill all animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
  }
}
