/* === UNONETO · KONFIGURÁTOR-NA-MIERU DEMO — Shared design tokens ====
   Generická verzia pre 5 industries:
   Závesy · Kuchyne · Nábytok · Žalúzie · Postele
   Theme: terracotta #b8552d + unbleached paper #faf6f0 + olive #6b6135
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');

:root {
  /* Brand — konfigurator terracotta palette */
  --kf-acc:        #b8552d;          /* terracotta primary */
  --kf-acc-deep:   #8d3f1f;          /* deep terracotta */
  --kf-acc2:       #d27a4e;          /* warm terracotta */
  --kf-acc-soft:   #f0d4c2;          /* soft terracotta tint */

  /* Surfaces — unbleached paper / cream */
  --kf-paper:        #faf6f0;        /* unbleached paper bg */
  --kf-paper-warm:   #f3ece0;        /* warmer paper */
  --kf-paper-cream:  #ebe1d0;        /* cream paper */
  --kf-paper-deep:   #d8cdb4;        /* deep paper */

  /* Ink — soulful brown + espresso */
  --kf-ink:         #1a1410;         /* deep ink */
  --kf-ink-soft:    #3d3530;         /* soft ink */
  --kf-ink-muted:   #6e5f4f;         /* muted brown */
  --kf-line:        #d8cdb4;         /* line */
  --kf-line-soft:   #ede4d0;         /* soft line */

  /* Secondary palette — sage + olive for accent variety */
  --kf-sage:   #94a37a;              /* sage success */
  --kf-olive:  #6b6135;              /* olive earthy */

  /* === STAGE COLORS — 6 phases of B2C custom-order lifecycle =====
     st-1 configurator — muted brown (klient skladá)
     st-2 quote        — terracotta primary (cenová ponuka)
     st-3 paid         — deep terracotta (záloha schválená)
     st-4 work         — olive (dielenská výroba)
     st-5 finishing    — espresso (žehlenie / doprava)
     st-6 done         — sage success (doručené)
  ============================================================== */
  --st-1: #6e5f4f;   /* configurator — muted brown */
  --st-2: #b8552d;   /* quote — terracotta primary */
  --st-3: #8d3f1f;   /* paid — deep terracotta */
  --st-4: #6b6135;   /* work — olive */
  --st-5: #3d3530;   /* finishing — espresso */
  --st-6: #94a37a;   /* done — sage success */
  --st-done: #94a37a;

  /* Severity */
  --ok:    #94a37a;
  --warn:  #d4a44a;
  --bad:   #b8552d;

  /* Surfaces light */
  --bg-1:    #faf6f0;
  --bg-2:    #f3ece0;
  --bg-3:    #ebe1d0;
  --fg-1:    #1a1410;
  --fg-2:    #3d3530;
  --fg-3:    #6e5f4f;
  --rule:    rgba(26, 20, 16, 0.12);
  --rule-strong: rgba(26, 20, 16, 0.22);

  /* Surfaces dark (olive earthy headers) */
  --dark-bg:    #6b6135;
  --dark-bg-2:  #564e2b;
  --dark-bg-3:  #423a20;
  --dark-fg:    #faf6f0;
  --dark-fg-2:  #ebe1d0;
  --dark-rule:  rgba(250, 246, 240, 0.14);

  /* Spacing & radius — soft B2C feel (more rounded than cross-border) */
  --r-0: 0px;
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-card: 14px;
  --r-pill: 999px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--kf-paper);
  color: var(--kf-ink);
  line-height: 1.55;
  min-height: 100dvh;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--kf-ink);
  line-height: 1.15;
}

.mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', Menlo, Consolas, monospace;
}

.serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
}

a { color: inherit; text-decoration: none; }

/* === Demo frame — common shell for all demo pages === */
.demo-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.demo-topbar {
  background: var(--kf-ink);
  color: var(--dark-fg);
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  border-bottom: 2px solid var(--kf-acc);
  flex-wrap: wrap;
  position: relative;
  z-index: 40;
}
.demo-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.demo-topbar-tag {
  background: var(--kf-acc);
  color: var(--kf-paper);
  padding: 2px 8px;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
  border-radius: var(--r-1);
}
.demo-topbar-title {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.demo-topbar-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.demo-topbar a {
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border: 1px solid var(--dark-fg);
  color: var(--dark-fg);
  transition: background 150ms, color 150ms;
  white-space: nowrap;
  border-radius: var(--r-1);
}
.demo-topbar a:hover {
  background: var(--dark-fg);
  color: var(--kf-ink);
}

/* === Industry switcher — globálny select v topbar ============= */
.industry-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.industry-switcher-label {
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dark-fg-2);
  text-transform: uppercase;
}
.industry-switcher select {
  appearance: none;
  -webkit-appearance: none;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 26px 4px 10px;
  background: var(--dark-fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1410' stroke-width='3' stroke-linecap='square'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: var(--kf-ink);
  border: 1px solid var(--dark-fg);
  cursor: pointer;
  border-radius: var(--r-1);
}
.industry-switcher select:hover {
  background-color: var(--kf-paper-warm);
}
.industry-switcher select:focus {
  outline: 2px solid var(--kf-acc);
  outline-offset: 1px;
}

/* Horizontal scroll-snap chip strip variant (sticky at top of demos.html) */
.industry-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.75rem 1rem;
  background: var(--kf-paper-warm);
  border-bottom: 1px solid var(--kf-line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.industry-strip button {
  scroll-snap-align: start;
  padding: 0.55rem 1rem;
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--kf-ink);
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 150ms;
  cursor: pointer;
  border-radius: var(--r-pill);
}
.industry-strip button:hover {
  border-color: var(--kf-acc);
  background: var(--kf-paper-warm);
}
.industry-strip button[aria-current="true"],
.industry-strip button.active {
  background: var(--kf-acc);
  color: var(--kf-paper);
  border-color: var(--kf-acc);
}

/* Footer */
.demo-footer {
  margin-top: auto;
  padding: 1rem;
  background: var(--kf-paper-warm);
  border-top: 1px solid var(--kf-line);
  font-size: 0.72rem;
  color: var(--kf-ink-muted);
  text-align: center;
  font-family: ui-monospace, monospace;
}
.demo-footer a {
  color: var(--kf-acc-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* === Status chip — 6-stage palette + done ==================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  white-space: nowrap;
  text-transform: uppercase;
  border-radius: var(--r-pill);
}
.chip-st-1   { background: color-mix(in oklab, var(--st-1) 15%, var(--kf-paper)); color: var(--st-1); }
.chip-st-2   { background: color-mix(in oklab, var(--st-2) 15%, var(--kf-paper)); color: var(--st-2); }
.chip-st-3   { background: color-mix(in oklab, var(--st-3) 15%, var(--kf-paper)); color: var(--st-3); }
.chip-st-4   { background: color-mix(in oklab, var(--st-4) 15%, var(--kf-paper)); color: var(--st-4); }
.chip-st-5   { background: color-mix(in oklab, var(--st-5) 15%, var(--kf-paper)); color: var(--st-5); }
.chip-st-6   { background: color-mix(in oklab, var(--st-6) 20%, var(--kf-paper)); color: #4d5d3a; }
.chip-done   { background: color-mix(in oklab, var(--st-done) 20%, var(--kf-paper)); color: #4d5d3a; }

/* Dark variants — for use on olive earthy headers */
.demo-dark .chip-st-1 { background: color-mix(in oklab, var(--st-1) 30%, var(--kf-ink)); color: #c8b8a6; }
.demo-dark .chip-st-2 { background: color-mix(in oklab, var(--st-2) 30%, var(--kf-ink)); color: #f0b896; }
.demo-dark .chip-st-3 { background: color-mix(in oklab, var(--st-3) 35%, var(--kf-ink)); color: #e89e7a; }
.demo-dark .chip-st-4 { background: color-mix(in oklab, var(--st-4) 35%, var(--kf-ink)); color: #c4d09a; }
.demo-dark .chip-st-5 { background: color-mix(in oklab, var(--st-5) 35%, var(--kf-ink)); color: #c8b8a8; }
.demo-dark .chip-st-6 { background: color-mix(in oklab, var(--st-6) 30%, var(--kf-ink)); color: #c4d4a8; }
.demo-dark .chip-done { background: color-mix(in oklab, var(--st-done) 30%, var(--kf-ink)); color: #c4d4a8; }

/* Priority badges */
.pri {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: var(--r-1);
}
.pri-hi   { background: var(--bad);  color: var(--kf-paper); }
.pri-mid  { background: var(--warn); color: var(--kf-ink); }
.pri-lo   { background: var(--kf-line); color: var(--kf-ink-muted); }

/* === Common card patterns ==================================== */
.kf-card {
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  padding: 1rem 1.125rem;
  border-radius: var(--r-card);
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.kf-card:hover {
  border-color: var(--kf-acc);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px rgba(184, 85, 45, 0.22);
}
.kf-card.accent { border-left: 4px solid var(--kf-acc); }
.kf-card.olive { border-left: 4px solid var(--kf-olive); }

/* B2C product card — bigger, photo-forward */
.product-card {
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -12px rgba(26, 20, 16, 0.18);
  border-color: var(--kf-acc);
}
.product-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--kf-paper-warm), var(--kf-paper-cream));
}
.product-card-body {
  padding: 0.875rem 1rem 1rem;
}

/* Configurator step card — used on klient mobile flow */
.config-card {
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  border-radius: var(--r-card);
  padding: 1.25rem;
  margin-bottom: 0.875rem;
}
.config-card.active {
  border-color: var(--kf-acc);
  box-shadow: 0 0 0 3px var(--kf-acc-soft);
}

/* Kanban card */
.kanban-card {
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  padding: 0.75rem;
  margin-bottom: 0.625rem;
  font-size: 0.85rem;
  border-radius: var(--r-2);
}
.kanban-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--kf-ink-muted);
}
.kanban-card-title {
  font-weight: 700;
  color: var(--kf-ink);
  line-height: 1.35;
  margin-bottom: 0.3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
}
.kanban-card-meta {
  font-size: 0.75rem;
  color: var(--kf-ink-muted);
  line-height: 1.4;
}

/* === Layout helpers ========================================== */
.kf-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
}
.kf-container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}
.kf-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.kf-grid-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) {
  .kf-grid-2 { grid-template-columns: 1fr 1fr; }
  .kf-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .kf-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* === Typography scale ======================================== */
.kf-h1 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--kf-ink);
}
.kf-h2 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--kf-ink);
}
.kf-h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--kf-ink);
}
.kf-body {
  font-size: 1rem;
  color: var(--kf-ink-muted);
  line-height: 1.55;
}
.kf-eyebrow {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kf-acc-deep);
}

/* === Buttons ================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--kf-acc);
  color: var(--kf-paper);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
  transition: all 150ms ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--kf-acc-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px rgba(141, 63, 31, 0.5);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--kf-olive);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1.5px solid var(--kf-olive);
  border-radius: var(--r-pill);
  transition: all 150ms ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-ghost:hover {
  background: var(--kf-olive);
  color: var(--kf-paper);
}

/* === Konfigurator-specific primitives ======================== */

/* Stitching divider — used as section separator in demos.
   Mirrors the segment page stitching pattern (terracotta dashes).  */
.stitch-divider {
  height: 1px;
  border: none;
  background-image: linear-gradient(
    to right,
    var(--kf-acc) 0,
    var(--kf-acc) 6px,
    transparent 6px,
    transparent 12px
  );
  background-size: 12px 1px;
  background-repeat: repeat-x;
  margin: 1.5rem 0;
}

/* Configurator step indicator — 4-step lifecycle dots */
.config-steps {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.config-step {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--kf-paper-warm);
  border: 1.5px solid var(--kf-line);
  font-size: 11px;
  font-weight: 600;
  color: var(--kf-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, monospace;
}
.config-step--active {
  background: var(--kf-acc);
  border-color: var(--kf-acc);
  color: var(--kf-paper);
}
.config-step--done {
  background: var(--kf-sage);
  border-color: var(--kf-sage);
  color: var(--kf-paper);
}
.config-step-line {
  flex: 0 0 18px;
  height: 1.5px;
  background: var(--kf-line);
}
.config-step-line--done { background: var(--kf-sage); }

/* Fabric / material swatch card — material picker visual */
.swatch-card {
  border-radius: var(--r-card);
  background: var(--kf-paper);
  border: 1px solid var(--kf-line);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.swatch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12);
}
.swatch-card[aria-pressed="true"] {
  border-color: var(--kf-acc);
  box-shadow: 0 0 0 3px var(--kf-acc-deep) inset;
}
.swatch-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--kf-paper-warm), var(--kf-paper-cream));
}
.swatch-meta {
  padding: 10px 12px;
}
.swatch-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--kf-ink);
  margin-bottom: 2px;
}
.swatch-price {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--kf-ink-muted);
  letter-spacing: 0.04em;
}

/* Skip-to-main for a11y */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
