/* Reset, typografia, layout, header, footer */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase; /* verzálky ako wordmark TATRAHOLZ */
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
  line-height: 1.15;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--larch);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.section {
  padding-block: var(--s-8);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--larch);
}

.lead {
  font-size: var(--fs-lg);
  color: var(--ink-2);
  max-width: 56ch;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}

.section-head > div {
  display: grid;
  gap: var(--s-3);
}

/* ---------- Top strip + header ---------- */
.top-strip {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.top-strip .container {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: 7px;
  white-space: nowrap;
  overflow: hidden;
}

.top-strip .partner a {
  color: var(--larch);
  text-decoration: underline;
  text-decoration-color: rgb(200 137 63 / 45%);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.top-strip .partner a:hover {
  text-decoration-color: currentColor;
}

.top-strip span + span::before {
  content: "·";
  margin-inline: var(--s-3);
  color: var(--larch);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(246 242 234 / 88%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  height: var(--header-h);
}

.brand img {
  height: 22px;
  width: auto;
}

.nav {
  display: flex;
  gap: var(--s-5);
  margin-right: auto;
  font-weight: 500;
  font-size: var(--fs-sm);
}

.nav a {
  position: relative;
  white-space: nowrap;
  padding-block: var(--s-2);
  color: var(--ink-2);
  transition: color 0.2s;
}

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

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--larch);
}

.header-phone {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.receipt-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: background 0.2s, color 0.2s;
}

.receipt-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

.receipt-toggle .count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--larch);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-align: center;
}

.receipt-toggle .count.bump {
  animation: bump 0.4s var(--ease);
}

@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}

@media (min-width: 1100px) {
  body.has-rail .receipt-toggle {
    display: none;
  }
}

/* Služby v menu + odkaz na družstvo v lište: na stredných šírkach uberieme menej dôležité */
@media (max-width: 1240px) {
  .header-phone,
  .top-strip span:nth-child(n + 3),
  .top-strip .strip-mail {
    display: none;
  }
}

@media (max-width: 640px) {
  .top-strip .container > div:first-child {
    display: none;
  }

  .top-strip .container {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .nav,
  .header-phone,
  .top-strip span:nth-child(n + 3),
  .top-strip .strip-mail {
    display: none;
  }

  .site-header .container {
    justify-content: space-between;
  }
}

/* ---------- Mobilné menu ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .site-header .container {
    gap: var(--s-2);
  }

  .brand {
    margin-right: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

/* úzky mobil: z tlačidla ostane len ikona */
@media (max-width: 400px) {
  .menu-toggle {
    padding-inline: 12px;
  }

  .menu-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90; /* nad účtenkou (60–70) aj toastom */
}

.mm-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(20 19 15 / 45%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.mm-panel {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  align-content: start;
  gap: var(--s-6);
  width: min(360px, 88vw);
  padding: var(--s-7) var(--s-5) var(--s-6);
  overflow-y: auto;
  background: var(--paper);
  box-shadow: var(--shadow-2);
  transform: translateX(100%);
  transition: transform 0.25s var(--ease);
}

.mm-panel:focus {
  outline: none;
}

.mobile-menu.is-open .mm-backdrop {
  opacity: 1;
}

.mobile-menu.is-open .mm-panel {
  transform: none;
}

.mm-close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  font-size: 1.5rem;
  line-height: 1;
}

.mm-links {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.mm-links a {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: var(--fs-xl);
  font-weight: 700;
  text-transform: uppercase;
}

.mm-links a[aria-current="page"] {
  color: var(--larch-2);
}

.mm-contact {
  display: grid;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.mm-contact a,
.mm-contact span {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.mm-contact [data-icon] svg {
  width: 16px;
  height: 16px;
}

.mm-partner {
  margin-top: var(--s-2);
  color: var(--larch-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mm-backdrop,
  .mm-panel {
    transition: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--s-8);
  background: var(--ink);
  color: var(--paper);
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-6);
  padding-block: var(--s-8) var(--s-6);
}

.site-footer img {
  height: 24px;
  width: auto;
  filter: invert(1);
  margin-bottom: var(--s-4);
}

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--larch);
  margin-bottom: var(--s-3);
}

.site-footer p,
.site-footer li {
  color: rgb(246 242 234 / 72%);
  font-size: var(--fs-sm);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.site-footer a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  border-top: 1px solid rgb(246 242 234 / 14%);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: rgb(246 242 234 / 55%);
}

.site-footer .footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-block: var(--s-4);
}

@media (max-width: 800px) {
  .site-footer .container {
    grid-template-columns: 1fr 1fr;
  }

  /* miesto pre spodnú lištu dopytu */
  .site-footer {
    padding-bottom: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.top-strip [data-icon],
.site-footer li [data-icon],
.header-phone [data-icon],
.mm-contact [data-icon] {
  margin-right: 4px;
  color: var(--larch);
}
