/* ========================================
   CIVITECH — styly
   Minimalistický, tlumený vizuál
   ======================================== */

/* --- Reset a základy --- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --c-bg:         #ffffff;
  --c-bg-alt:     #f5f6f8;
  --c-text:       #1a1d24;
  --c-text-soft:  #5a6270;
  --c-muted:      #8a909b;
  --c-line:       #e4e6ea;
  --c-accent:     #2c4a6b;
  --c-accent-dk:  #1f3651;
  --c-accent-lt:  #e8eef5;

  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(26, 29, 36, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 29, 36, 0.06);
  --shadow-lg: 0 12px 40px rgba(26, 29, 36, 0.10);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --head-height: 72px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--c-accent-dk); }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-text);
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-accent); font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.section-intro {
  font-size: 1.125rem;
  color: var(--c-text-soft);
  max-width: 58ch;
  margin: 0 0 3rem;
}

/* --- Sekce --- */
.section {
  padding: 6rem 0;
  scroll-margin-top: var(--head-height);
}
.section-alt { background: var(--c-bg-alt); }
.section-narrow .container { max-width: 820px; }

/* --- Tlačítka --- */
.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn-primary:hover {
  background: var(--c-accent-dk);
  border-color: var(--c-accent-dk);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   Hlavička a navigace
   ======================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--head-height);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  height: 42px;
  width: auto;
  transition: filter 0.3s ease;
}
/* Na fotce v úvodu logo zesvětlíme, po skrolování vrátíme */
.site-header:not(.is-scrolled) .brand img {
  filter: brightness(0) invert(1);
}

.menu {
  list-style: none;
  display: flex;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
}
.menu a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.menu a:hover::after { transform: scaleX(1); }

/* Barvy menu nad fotkou (před skrolováním) */
.site-header:not(.is-scrolled) .menu a {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.site-header:not(.is-scrolled) .menu a::after { background: #fff; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-text);
  transition: all 0.3s ease;
}
.site-header:not(.is-scrolled) .menu-toggle span { background: #fff; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   Hero — úvodní sekce se slideshow
   ======================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}
.hero-slide.is-active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(15,22,35,0.55) 0%, rgba(15,22,35,0.35) 50%, rgba(15,22,35,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
}
.hero h1 {
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-sub {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 300;
  color: rgba(255,255,255,0.92);
  margin-bottom: 2.5rem;
  max-width: 56ch;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 30px;
  height: 48px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 15px;
  display: block;
}
.hero-scroll span {
  display: block;
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  margin: 6px auto;
  animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 20% { transform: translateY(0); opacity: 1; }
  80%, 100% { transform: translateY(18px); opacity: 0; }
}

/* ========================================
   Vize — narativní úvod
   ======================================== */
.vision {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--c-text-soft);
}
.vision strong { color: var(--c-text); font-weight: 600; }
.vision p + p { margin-top: 1.25rem; }

/* ========================================
   Služby
   ======================================== */
.services {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}
.service {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.service h3 {
  font-size: 1.75rem;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--c-accent-lt);
}
.service .lead {
  font-size: 1.0625rem;
  color: var(--c-text-soft);
  margin-bottom: 2rem;
}

.service-phases {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.phase h4 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-line);
}
.phase ul,
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.phase li,
.check-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.6rem;
  color: var(--c-text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
.phase li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85rem;
  width: 6px; height: 6px;
  background: var(--c-accent);
  border-radius: 50%;
}
.check-list li { padding: 0.55rem 0 0.55rem 2rem; font-size: 1rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85rem;
  width: 14px; height: 8px;
  background: none;
  border-left: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  border-radius: 0;
  transform: rotate(-45deg);
}

/* ========================================
   Reference
   ======================================== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}
.project {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-alt);
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project:hover .project-img img { transform: scale(1.04); }
.project-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.project h3 { font-size: 1.1875rem; margin-bottom: 0.25rem; }
.project-subtitle {
  font-size: 0.875rem;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
}
.project-meta {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.project-meta > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.project-meta dt {
  color: var(--c-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin: 0;
  align-self: center;
}
.project-meta dd {
  margin: 0;
  color: var(--c-text);
  font-weight: 500;
}
.project-scope {
  font-size: 0.9rem;
  color: var(--c-text-soft);
  margin: 0;
  line-height: 1.55;
}

.projects-more {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--c-line);
}
.projects-more h3 {
  font-size: 1.125rem;
  color: var(--c-text-soft);
  margin-bottom: 1rem;
}
.projects-more ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.projects-more li {
  color: var(--c-text-soft);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.projects-more strong { color: var(--c-text); margin-right: 0.5rem; }

/* ========================================
   Kontakt
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 {
  font-size: 1.25rem;
  color: var(--c-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--c-accent-lt);
}
.contact-person {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.contact-card address {
  font-style: normal;
  color: var(--c-text-soft);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.ico { color: var(--c-muted); font-size: 0.9rem; margin: 0; }

.contact-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: baseline;
}
.contact-list .label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  font-weight: 500;
}
.contact-list a {
  font-size: 1.0625rem;
  font-weight: 500;
}

/* ========================================
   Patička
   ======================================== */
.site-footer {
  background: var(--c-text);
  color: rgba(255,255,255,0.75);
  padding: 2rem 0;
  font-size: 0.875rem;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: #fff; }
.site-footer .sep { margin: 0 0.75rem; opacity: 0.5; }

/* ========================================
   Responsivita
   ======================================== */
@media (max-width: 860px) {
  .section { padding: 4.5rem 0; }

  .menu-toggle { display: flex; }
  .menu {
    position: fixed;
    top: var(--head-height);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    padding: 1rem 0;
    max-height: calc(100vh - var(--head-height));
    overflow-y: auto;
  }
  .menu.is-open { transform: translateY(0); }
  .menu li { width: 100%; border-bottom: 1px solid var(--c-line); }
  .menu li:last-child { border-bottom: none; }
  .menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--c-text) !important;
    text-shadow: none !important;
  }
  .menu a::after { display: none; }

  .hero { min-height: 520px; }
  .hero h1 { font-size: 2.25rem; }

  .service { padding: 1.75rem 1.5rem; }
  .service-phases { gap: 1.75rem; }

  .contact-card { padding: 1.75rem 1.5rem; }
  .contact-list li { grid-template-columns: 70px 1fr; }

  .footer-wrap { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 1.25rem; }
  .hero-content { padding-top: 3rem; }
  .project-meta > div { grid-template-columns: 110px 1fr; gap: 0.5rem; }
}

/* Accessibility — preferované omezení pohybu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
