/* ---------------------------------------------------
   Martin Patoprstý — static rebuild
   Tokens: deep spruce (#1f3b33) + warm sand (#f6f3ea)
   background, brick accent (#a3492f) for CTAs/links.
   Display type: Newsreader (serif). Body: Public Sans.
--------------------------------------------------- */

:root{
  --ink: #1c1e1c;
  --ink-soft: #4a504b;
  --spruce: #1f3b33;
  --spruce-dark: #142722;
  --sand: #f6f3ea;
  --sand-deep: #eee8d8;
  --brick: #a3492f;
  --brick-dark: #863a25;
  --line: #dcd5c2;
  --white: #ffffff;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1120px;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--brick); text-decoration: none; }
a:hover{ text-decoration: underline; }

h1, h2, h3{
  font-family: var(--font-display);
  color: var(--spruce-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h2{ font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
h3{ font-size: 1.15rem; font-weight: 600; }

p{ margin: 0 0 1em; }

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

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

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--spruce-dark);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus{ left: 12px; top: 12px; }

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

/* ---------- Buttons ---------- */
.btn{
  display: inline-block;
  padding: 12px 22px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover{ text-decoration: none; }

.btn-primary{
  background: var(--brick);
  color: var(--white);
}
.btn-primary:hover{ background: var(--brick-dark); }

.btn-outline{
  background: transparent;
  border-color: var(--spruce);
  color: var(--spruce-dark);
}
.btn-outline:hover{ background: var(--spruce); color: var(--white); }

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

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand{
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--spruce-dark);
  white-space: nowrap;
}
.brand:hover{ text-decoration: none; }

.main-nav ul{
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-nav a{
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover{ color: var(--brick); text-decoration: none; }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 24px; height: 2px;
  background: var(--spruce-dark);
}

.social-icon{
  color: var(--spruce-dark);
  display: inline-flex;
  align-items: center;
}
.social-icon:hover{ color: var(--brick); }

/* ---------- Hero ---------- */
.hero{
  padding: 72px 0;
  background: linear-gradient(180deg, var(--sand) 0%, var(--sand-deep) 100%);
}

.hero-inner{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 0.2em;
}

.hero h1{
  font-size: clamp(2.4rem, 1.8rem + 3vw, 3.8rem);
  margin-bottom: 0.15em;
}

.hero-sub{
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34ch;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media img{
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  background: var(--sand-deep);
}

/* ---------- Section base ---------- */
.section{ padding: 80px 0; }
.section h2{ margin-bottom: 0.3em; }
.section-lead{
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Program ---------- */
.program{ background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.program-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 36px;
}

.program-card h3{ color: var(--brick-dark); }
.program-card p{ color: var(--ink-soft); }

/* ---------- About ---------- */
.about-inner{
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.about-media img{
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--sand-deep);
  position: sticky;
  top: 96px;
}

.about-text .lead{
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--spruce-dark);
}

.about-text p{ color: var(--ink-soft); }

/* ---------- Portfolio / Vystavba grids ---------- */
.portfolio{ background: var(--sand-deep); }

.card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.port-card{
  display: block;
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--ink);
}
.port-card:hover{ text-decoration: none; border-color: var(--brick); }

.port-card img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sand-deep);
}

.port-card h3{
  margin: 0;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--spruce-dark);
}
.port-card:hover h3{ color: var(--brick); }

.vystavba{ background: var(--white); }

/* ---------- Media ---------- */
.media-list{
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.media-list li{
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.media-list li:last-child{ border-bottom: 1px solid var(--line); }

.media-list p{ color: var(--ink-soft); max-width: 68ch; }
.media-list a{ font-size: 1.02rem; }

/* ---------- Kontakt ---------- */
.kontakt{ background: var(--spruce-dark); color: var(--sand); }
.kontakt h2{ color: var(--white); }
.kontakt .section-lead{ color: #cfd8d2; }

.kontakt-inner{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-form{
  display: grid;
  gap: 18px;
}

.form-row{ display: grid; gap: 6px; }

.form-row label{ font-size: 0.9rem; color: #cfd8d2; }

.form-row input,
.form-row textarea{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-row input::placeholder,
.form-row textarea::placeholder{ color: #93a099; }

.form-row input:focus,
.form-row textarea:focus{
  outline: none;
  border-color: var(--brick);
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--spruce-dark);
  color: #93a099;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.9rem;
}

.footer-inner .social-icon{ color: #93a099; }
.footer-inner .social-icon:hover{ color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .hero-inner,
  .about-inner,
  .kontakt-inner{
    grid-template-columns: 1fr;
  }
  .about-media img{ position: static; }
  .program-grid{ grid-template-columns: 1fr; }
  .card-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px){
  .main-nav ul{
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .main-nav ul.open{ display: flex; }
  .nav-toggle{ display: flex; }
  .card-grid{ grid-template-columns: 1fr; }
  .section{ padding: 56px 0; }
  .hero{ padding: 56px 0; }
}

/* ---------- Article / single-post pages ---------- */
.post{ padding-top: 56px; }

.post-wrap{ max-width: 820px; }

.breadcrumb{
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.breadcrumb a{ color: var(--ink-soft); }
.breadcrumb a:hover{ color: var(--brick); }

.post h1{
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  margin-bottom: 0.6em;
}

.post-body p{
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 68ch;
}
.post-body a{ color: var(--brick); }

.post-video{
  margin: 28px 0;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--sand-deep);
  border-radius: 4px;
  overflow: hidden;
}
.post-video iframe{
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gallery slider: native scroll-snap by default (works with no JS),
   progressively enhanced with arrows + dots by gallery.js */
.gallery-wrap{
  position: relative;
  margin: 28px 0 8px;
}

.post-gallery{
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 6px;
  background: var(--sand-deep);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}
.post-gallery::-webkit-scrollbar{ display: none; }

.post-gallery img{
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--sand-deep);
}

.gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 39, 34, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}
.gallery-arrow:hover{ background: var(--brick); }
.gallery-arrow:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }
.gallery-prev{ left: 12px; }
.gallery-next{ right: 12px; }
.gallery-arrow[disabled]{ opacity: 0.35; cursor: default; }

.gallery-dots{
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-dot{
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: width 0.15s ease, background 0.15s ease;
}
.gallery-dot.active{
  width: 20px;
  background: #fff;
}

.gallery-counter{
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 9px;
  border-radius: 12px;
  background: rgba(20, 39, 34, 0.55);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 2;
}

.post-nav{
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.post-nav-link{
  font-weight: 600;
  color: var(--spruce-dark);
  max-width: 45%;
}
.post-nav-link:hover{ color: var(--brick); text-decoration: none; }
.post-nav-link.next{ margin-left: auto; text-align: right; }

@media (max-width: 640px){
  .post-gallery{ aspect-ratio: 4 / 3; }
  .gallery-arrow{ width: 34px; height: 34px; font-size: 1.25rem; }
  .post-nav-link{ max-width: 100%; }
}
