:root {
  --dark: #545454;
  --dark-2: #454545;
  --light-gray: #edecec;
  --white: #ffffff;
  --accent: #f6b600;
  --max-width: 1600px;
  --gutter: 4rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0 auto;
  max-width: var(--max-width);
  font-family: 'Montserrat', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.5;
}

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

#o-nas, #sluzby, #kontakt, #projekty {
  scroll-margin-top: 74px;
}

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

picture { display: contents; }

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

p { margin: 0 0 1rem; }

a { color: inherit; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 5px solid var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--gutter);
  gap: 1.5rem;
}

.brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  text-decoration: none;
}

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

.main-nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

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

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-switch a {
  display: block;
  line-height: 0;
  opacity: 0.85;
}

.lang-switch a:hover,
.lang-switch a[aria-current="true"] { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(40%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.hero-logo {
  max-width: 745px;
  width: 100%;
  margin: 0 auto;
}

.hero-tagline {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: 0.03em;
  color: #000;
}

/* Split sections (O NÁS / KONTAKT) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.split--dark { border-top: 5px solid var(--accent); }

#o-nas { border-bottom: 5px solid var(--accent); }

#o-nas .split-text p { text-align: justify; }

.split-text {
  background: var(--dark);
  color: var(--white);
  padding: 3.5rem var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-text h2 { color: var(--white); }

.split-image { overflow: hidden; }

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  font-size: 0.9rem;
}

.contact-grid p { margin: 0 0 1rem; }

.contact-grid > div {
  border-left: 5px solid var(--accent);
  padding-left: 1rem;
}

/* Services */
.services {
  padding: 4rem var(--gutter);
  text-align: left;
}

.services h2 { color: var(--dark); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.service-icon {
  width: 110px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.service-card p { font-size: 0.9rem; }

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: underline;
  margin-top: auto;
  padding-top: 1rem;
  align-self: flex-start;
}

.service-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  flex-shrink: 0;
}

.service-link-icon img { width: 16px; height: auto; }

.service-link:hover { text-decoration: none; }

button.service-link {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* Lightbox gallery */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.94);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-figure figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-nav:hover { background: var(--accent); color: #3a2c00; }

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 700px) {
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.1rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
}

/* CTA + form */
.cta-form {
  background: var(--light-gray);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 4rem var(--gutter);
  align-items: center;
  border-bottom: 5px solid var(--accent);
}

.cta-text {
  max-width: 600px;
  padding: 0;
  border: 50px solid transparent;
  border-image: url("/assets/bracket.svg") 38% stretch;
  text-align: center;
}

.cta-text h2 {
  font-size: 1.9rem;
  margin: 0;
}

.cta-text h2 span { display: block; margin-top: 1.5rem; }

.contact-form {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.form-legend {
  margin: 0;
  align-self: flex-end;
  font-size: 0.8rem;
  font-style: italic;
  color: #8f8f8f;
}

.contact-form textarea::placeholder {
  font-style: italic;
  color: #9a9a9a;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  padding: 0.6rem 0.7rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
}

.contact-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form legend {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 0.2rem;
}

.checkbox {
  flex-direction: row !important;
  align-items: center;
  font-weight: 400 !important;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  padding: 0.6rem 0.7rem;
  background: var(--white);
  gap: 0.5rem;
}

.checkbox input { width: auto; }

.contact-form button {
  background: var(--accent);
  color: #3a2c00;
  border: none;
  padding: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  cursor: pointer;
}

.contact-form button:hover { filter: brightness(0.95); }

.contact-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  margin: 0;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-status--ok { color: #2f7a3d; font-weight: 600; }
.form-status--error { color: #b3261e; font-weight: 600; }

/* Projects */
.projects {
  padding: 4rem var(--gutter);
}

.projects h2 { color: var(--dark); }

.project-showcase { position: relative; }

.project-showcase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(84, 84, 84, 0.88);
}

.project-showcase-overlay p {
  margin: 0;
  max-width: 38ch;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.project-logo-frame {
  height: 200px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.project-card p { font-size: 0.9rem; }

.web-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: underline;
  margin-top: auto;
  padding-top: 1rem;
}

.web-link:hover { text-decoration: none; }

.web-link img {
  width: 32px;
  height: 32px;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  border-top: 5px solid var(--accent);
}

.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 1100px) {
  :root { --gutter: 2rem; }
}

@media (max-width: 900px) {
  :root { --gutter: 1.5rem; }

  #o-nas .split-text p { text-align: left; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .main-nav.open { display: flex; }

  .header-inner { position: relative; }

  .nav-toggle { display: flex; }

  .split,
  .cta-form,
  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-image { min-height: 260px; order: -1; }

  .service-grid { grid-template-columns: 1fr; }

  .cta-text { max-width: 100%; border-width: 40px; }

  .hero-logo { max-width: 497px; }

  .project-grid { gap: 2.5rem; }

  .project-showcase-overlay { align-items: flex-start; }

  .project-showcase-overlay p {
    position: sticky;
    top: 40vh;
    font-size: 1.3rem;
  }

  .service-icon { width: 90px; height: 82px; }
}

@media (max-width: 480px) {
  .service-grid,
  .project-grid {
    row-gap: 2rem;
  }
}
