/* ============================================================
   Zber plienok — vizuálny systém
   Display: Bricolage Grotesque · Text: Inter · Dáta: Space Mono
   ============================================================ */

:root {
  --ink:        #14312E;   /* text – tmavá teal-zelená */
  --ink-soft:   #4A605B;   /* sekundárny text */
  --teal:       #157A6E;   /* brand */
  --teal-deep:  #0E5A50;
  --sun:        #F4C430;   /* akcent – srdiečko */
  --paper:      #F6F8F5;   /* pozadie */
  --card:       #FFFFFF;
  --line:       #DBE4DE;   /* hairline */
  --line-strong:#0E2B28;

  /* stavy */
  --st-active:  #157A6E;
  --st-install: #2A6FB0;
  --st-prep:    #E0A100;
  --st-talks:   #8A9A95;
  --st-no:      #C0492F;

  --maxw: 1180px;
  --r: 6px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--maxw), 90%); margin-inline: auto; }

/* focus – prístupnosť */
a:focus-visible, input:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ---------- Kicker (mono label) ---------- */
.kicker {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.kicker--center { text-align: center; }

/* ---------- Tlačidlá (hranaté, nie pills) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.1;
  padding: 0.85rem 1.4rem;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn--lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }
.btn--solid { background: var(--teal); color: #fff; }
.btn--solid:hover { background: var(--teal-deep); }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: #ffd452; }

.link-arrow {
  font-weight: 600;
  color: var(--teal);
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s ease;
}
.link-arrow:hover { border-bottom-color: var(--teal); }
.link-arrow--light { color: #fff; }
.link-arrow--light:hover { border-bottom-color: rgba(255,255,255,.7); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,248,245,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex; align-items: center; gap: 2rem;
  height: 76px;
}
.brand img { height: 40px; }
.header-menu {
  display: flex; align-items: center; gap: 2rem;
  margin-left: auto;
}
.nav {
  display: flex; gap: 1.8rem;
  font-size: 0.95rem; font-weight: 500;
}
.nav a { color: var(--ink-soft); padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--sun); }

/* hamburger – len na mobile */
.nav-toggle {
  display: none; margin-left: auto;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 100%; height: 2.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin-bottom: 1.4rem;
}
.hero h1 .u {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 6px;
  text-underline-offset: 6px;
}
.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero-actions {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 1.6rem; margin: 2rem 0 1.6rem;
}
.hero-meta {
  font-family: "Space Mono", monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

/* hero panel + ilustrácia */
.hero-panel {
  position: relative;
  background: var(--teal);
  background-image: radial-gradient(rgba(255,255,255,.10) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  border-radius: 14px;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  aspect-ratio: 5 / 5.4;
  display: grid; place-items: center;
  box-shadow: 0 24px 50px -24px rgba(14,49,46,.5);
}
.bin { width: min(78%, 300px); height: auto; }
.panel-tag {
  position: absolute; left: 1.4rem; bottom: 1.2rem;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem; letter-spacing: .04em;
  color: rgba(255,255,255,.82);
}

/* ---------- Sekcie ---------- */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 2.6rem;
}
.steps .section-title, .kicker--center + .section-title { text-align: center; }

/* ---------- Ako to funguje ---------- */
.steps-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  padding: 2.2rem 1.8rem;
  border-left: 1px solid var(--line);
}
.step:first-child { border-left: none; }
.step-num {
  font-family: "Space Mono", monospace;
  font-size: 1.5rem; font-weight: 700;
  color: var(--teal);
  display: block; margin-bottom: 1rem;
}
.step h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.step p { color: var(--ink-soft); }

/* ---------- Prečo kontajner ---------- */
.value-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.value-intro { position: sticky; top: 100px; }
.value-intro .section-title { text-align: left; margin-bottom: 1.3rem; }
.value-lead { color: var(--ink-soft); font-size: 1.1rem; }

.value-list { list-style: none; margin: 0; padding: 0; }
.value-item {
  display: flex; gap: 1.4rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.value-item:first-child { padding-top: 0; }
.value-item:last-child { border-bottom: none; }
.value-item .ic {
  flex: none; width: 30px; height: 30px;
  fill: none; stroke: var(--teal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  margin-top: .2rem;
}
.value-item h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.value-item p { color: var(--ink-soft); }

/* ---------- Register obcí (signature) ---------- */
.register { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.register-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.register-head .section-title { text-align: left; margin-bottom: 0; }
.register-tools { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }

.search { position: relative; }
.search svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--ink-soft); stroke-width: 2;
  stroke-linecap: round;
}
.search input {
  width: min(320px, 70vw);
  font-family: "Inter", sans-serif; font-size: .98rem;
  padding: .7rem 1rem .7rem 2.4rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  outline: none;
}
.search input:focus { border-color: var(--teal); }
.count {
  font-family: "Space Mono", monospace;
  font-size: .78rem; color: var(--ink-soft);
}

/* tabuľka */
.ledger { width: 100%; border-collapse: collapse; }
.ledger thead th {
  font-family: "Space Mono", monospace;
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--ink-soft);
  text-align: left;
  padding: 0 1rem .8rem;
  border-bottom: 2px solid var(--line-strong);
}
.ledger tbody td {
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  vertical-align: middle;
}
.ledger tbody td:first-child { font-weight: 600; }
.ledger tbody td:nth-child(2) { color: var(--ink-soft); }
.ledger tbody tr:hover td { background: var(--paper); }
.ledger tbody td:last-child { white-space: nowrap; }

/* stav – malý štvorček + slovo (žiadne pills) */
.sw {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: .6rem;
  vertical-align: baseline;
  position: relative; top: 0;
}
.sw--active  { background: var(--st-active); }
.sw--install { background: var(--st-install); }
.sw--prep    { background: var(--st-prep); }
.sw--talks   { background: var(--st-talks); }
.sw--no      { background: var(--st-no); }

/* rozklikávateľný riadok obce */
.reg-row.is-expandable { cursor: pointer; }
.reg-row.is-expandable:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.reg-row .caret {
  display: inline-block; width: 0; height: 0; margin-right: .55rem;
  border-left: 5px solid var(--ink-soft);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  vertical-align: middle; transition: transform .15s ease;
}
.reg-row.is-open .caret { transform: rotate(90deg); }
.reg-row.is-open td { background: var(--paper); }

/* rozbalený detail – horizontálny stepper */
.reg-detail > td { padding: .3rem 1rem 1.5rem 1rem !important; border-bottom: 1px solid var(--line); }
.timeline--h {
  display: flex; list-style: none; margin: .8rem 0 .2rem; padding: .2rem 0 0;
  overflow-x: auto;                 /* na úzkych displejoch radšej scroll ako rozbitie */
}
.tl-step {
  flex: 1 1 0; min-width: 116px; position: relative;
  text-align: center; padding: 22px .35rem 0;
}
.tl-step::before {                  /* spojnica prichádzajúca zľava */
  content: ''; position: absolute; top: 30px; left: -50%;
  width: 100%; height: 3px; background: #C8D2CD; z-index: 0;
}
.tl-step:first-child::before { display: none; }
.tl-step.is-done::before     { background: var(--tl, var(--sun)); }
.tl-step.is-rejected::before { background: var(--tl, var(--st-no)); }
.tl-dot {
  display: block;                   /* span je inak inline -> rozmery by sa ignorovali */
  position: relative; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: #C8D2CD; margin: 0 auto .55rem;
  box-shadow: 0 0 0 3px #fff;
}
.tl-step.is-done .tl-dot     { background: var(--tl, var(--sun)); }
.tl-step.is-rejected .tl-dot { background: var(--tl, var(--st-no)); }
.tl-step.is-rejected .tl-dot::after {
  content: '✕'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.tl-body { display: block; }
.tl-label { display: block; font-size: .82rem; font-weight: 600; line-height: 1.25; }
.tl-date {
  display: block; font-family: "Space Mono", monospace;
  font-size: .72rem; color: var(--ink-soft); margin-top: .2rem;
}
.tl-plan {
  display: block; font-family: "Space Mono", monospace;
  font-size: .7rem; color: var(--st-install); margin-top: .1rem;
}
.tl-step.is-pending .tl-label { color: var(--ink-soft); font-weight: 500; }
.tl-step.is-rejected .tl-label { color: var(--tl, var(--st-no)); }

.empty {
  padding: 2rem 1rem; color: var(--ink-soft);
  font-family: "Space Mono", monospace; font-size: .9rem;
}

.register-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; margin-top: 1.6rem;
}
.legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  font-family: "Space Mono", monospace; font-size: .78rem; color: var(--ink-soft);
}
.legend li { display: flex; align-items: center; }
.register-note { color: var(--ink-soft); font-size: .92rem; }
.register-note a { color: var(--teal); border-bottom: 1.5px solid var(--teal); }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #fff; padding: clamp(4rem, 9vw, 7rem) 0; }
.cta-inner { text-align: center; }
.cta h2 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.cta p { color: rgba(255,255,255,.72); font-size: 1.15rem; margin-bottom: 2.2rem; }
.cta-actions {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 1.6rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); padding: 2rem 0 2.6rem; border-top: 1px solid rgba(255,255,255,.12); }
.footer-inner {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  color: rgba(255,255,255,.72); font-size: .9rem;
}
.footer-logo { height: 34px; background: #fff; padding: .35rem .6rem; border-radius: 6px; }
.footer-tag { margin-right: auto; }

/* ---------- Responzívne ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { order: -1; aspect-ratio: 16 / 11; }
  .value-grid { grid-template-columns: 1fr; }
  .value-intro { position: static; }
  .steps-list { grid-template-columns: 1fr; border-top: none; }
  .step { border-left: none; border-top: 1px solid var(--line); }
  .step:first-child { border-top: none; padding-top: 0; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .header-menu {
    display: none;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin-left: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -22px rgba(14,49,46,.4);
    padding: .4rem 0 1.1rem;
  }
  .header-menu.is-open { display: flex; }
  .header-menu .nav { flex-direction: column; gap: 0; }
  .header-menu .nav a {
    padding: .95rem 1.3rem; border-bottom: 1px solid var(--line);
  }
  .header-menu .btn { margin: 1rem 1.3rem 0; }

  .register-head { flex-direction: column; align-items: flex-start; }
  .register-tools { align-items: flex-start; width: 100%; }
  .search input { width: 100%; }
  .ledger td:nth-child(2), .ledger th:nth-child(2) { display: none; } /* skry kraj na mobile */

  /* timeline na mobile = zvislá (nepreteká cez obrazovku) */
  .timeline--h {
    flex-direction: column; align-items: stretch;
    overflow-x: visible; padding: .5rem 0 .2rem;
  }
  .tl-step {
    flex: none; min-width: 0;
    display: flex; align-items: flex-start; gap: .8rem;
    text-align: left; padding: 0 0 1.2rem;
  }
  .tl-step:last-child { padding-bottom: 0; }
  .tl-dot { margin: 1px 0 0; }
  .tl-body { flex: 1; }
  /* spojnica smeruje nadol od bodu k nasledujúcemu */
  .tl-step::before {
    top: 18px; bottom: -3px; left: 7.5px;
    width: 3px; height: auto;
  }
  .tl-step:first-child::before { display: block; }
  .tl-step:last-child::before  { display: none; }
}
