/* =====================================================================
   Vasyl Melesh — stavební práce
   Zemitá paleta: antracit + tlumená cihlová, redakční layout, hodně
   bílého místa. Sdíleno homepage i podstránkou /reference.
   ===================================================================== */

:root {
  --ink: #1c1f22;          /* antracit — tmavé plochy a nadpisy */
  --ink-soft: #2a2e33;
  --accent: #c2410c;       /* tlumená cihlová — používat střídmě */
  --accent-dark: #9a3412;
  --paper: #ffffff;
  --paper-alt: #f6f5f2;    /* šedobílá pro střídání sekcí */
  --line: #e6e3dd;
  --muted: #5c6167;
  --ph-bg: #edeae4;        /* podklad foto-placeholderů */
  --radius: 6px;
  --container: 1120px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0rem;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ===== Tlačítka ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn--outline:hover {
  background: var(--ink);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Hlavička ===== */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  position: relative;
}

.nav__logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav__menu a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.nav__menu a:hover {
  color: var(--accent);
}

.nav__cta {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: var(--radius);
}

.nav__cta:hover {
  background: var(--accent-dark);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__toggle span {
  width: 26px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ===== Foto-placeholder (než budou reálné fotky) ===== */
.ph {
  background: var(--ph-bg);
  border: 1px dashed #cbc5ba;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ph span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #97917f;
}

.ph--32 { aspect-ratio: 3 / 2; }
.ph--169 { aspect-ratio: 16 / 9; }

/* ===== Střídavé sekce text/foto ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.split--reverse .split__text { order: 2; }
.split--reverse .split__media { order: 1; }

.split__text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}

.split__text p {
  margin-bottom: 16px;
  color: var(--ink-soft);
}

.split__text .btn {
  margin-top: 8px;
}

.split__media img {
  border-radius: var(--radius);
  width: 100%;
}

/* ===== Hero ===== */
.hero {
  padding: 88px 0 96px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  margin-bottom: 20px;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 34em;
}

/* ===== Sekce ===== */
.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--paper-alt);
}

.section__head {
  max-width: 640px;
  margin-bottom: 52px;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.section__head p {
  color: var(--muted);
  font-size: 1.1rem;
}

.section__more {
  margin-top: 44px;
}

/* ===== Služby ===== */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 64px;
}

.service {
  border-top: 3px solid var(--ink);
  padding-top: 24px;
}

.service h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.service > p {
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.service ul {
  list-style: none;
  margin-bottom: 16px;
  display: grid;
  gap: 6px;
}

.service ul li {
  padding-left: 20px;
  position: relative;
  color: var(--muted);
  font-size: 0.97rem;
}

.service ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service__cta {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.service__cta:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ===== Galerie realizací (homepage i /reference) ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.gallery__item {
  margin: 0;
}

.gallery__item img,
.gallery__item .ph {
  border-radius: var(--radius);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery__item figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ===== Jak pracuji ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  list-style: none;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 0.97rem;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}

/* ===== Mapa působnosti ===== */
.map {
  width: 100%;
  height: 440px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  z-index: 0; /* pod sticky hlavičkou */
}

.map__note {
  margin-top: 24px;
  color: var(--muted);
  max-width: 52em;
}

.map__note strong {
  color: var(--ink);
  font-weight: 600;
}

/* ===== Kontakt ===== */
.section--contact {
  background: var(--ink);
  color: #fff;
}

.section--contact .section__head p {
  color: rgba(255, 255, 255, 0.7);
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.contact__phone {
  margin-bottom: 6px;
}

.contact__phone a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.contact__phone a:hover {
  color: var(--accent);
}

.contact__phone-note {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 28px;
  font-size: 0.97rem;
}

.contact__info ul {
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 1.05rem;
}

.contact__info a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.contact__info a:hover {
  border-bottom-color: #fff;
}

.contact__actions {
  display: grid;
  gap: 16px;
  align-content: start;
}

.contact-card {
  display: grid;
  gap: 2px;
  padding: 20px 26px;
  border-radius: var(--radius);
  background: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.contact-card span {
  font-weight: 400;
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.65);
}

.contact-card:hover {
  border-color: var(--accent);
}

.contact-card:hover span {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Patička ===== */
.site-footer {
  background: #14161a;
  color: rgba(255, 255, 255, 0.6);
  padding: 28px 0;
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
}

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

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

/* ===== Podstránka Reference ===== */
.page-head {
  padding: 72px 0 0;
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.page-head p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 40px;
}

.filters button {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filters button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.gallery__item[hidden] {
  display: none;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 80vh;
  border-radius: var(--radius);
}

.lightbox figcaption {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 14px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

/* ===== Fade-in při scrollu (jen bez omezení pohybu) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ===== Mobil ===== */
@media (max-width: 860px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    display: none;
    z-index: 40;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__menu li {
    border-bottom: 1px solid var(--line);
  }

  .nav__menu li:last-child {
    border-bottom: none;
    margin-top: 14px;
  }

  .nav__menu a {
    display: block;
    padding: 14px 0;
  }

  .nav__cta {
    text-align: center;
  }

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

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

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

  .hero {
    padding: 56px 0 64px;
  }

  .section {
    padding: 60px 0;
  }

  .split,
  .split--reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .split--reverse .split__text { order: 1; }
  .split--reverse .split__media { order: 2; }

  .services {
    grid-template-columns: 1fr;
    gap: 44px;
  }

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

  .map {
    height: 360px;
  }
}
