/* ============================================
   Krovy Hradec — projektové styly
   Stavíme na Heartwood (system.css). Všechny tokeny
   používáme z --hw-* proměnných.
   ============================================ */

:root {
  --header-height: 72px;
  /* Tmavší overlay přes hero video pro lepší čitelnost paper-white textu */
  --hero-overlay: rgba(34, 34, 34, 0.55);
}

/* Anchor scroll offset — sekce nebudou schované pod fixed headerem */
section[id],
footer[id] {
  scroll-margin-top: var(--header-height);
}

/* Heartwood editorial accent — italic + lighter weight + gold.
   Vychází z preview.html (řádky 152, 265, 412):
   ".hero h1 em { font-style: italic; font-weight: 300; color: var(--hw-gold); }" */
h1 em,
h2 em,
h3 em,
.hw-display-xl em,
.hw-display-lg em,
.hw-headline-lg em,
.hw-headline-md em {
  font-style: italic;
  font-weight: 300;
  color: var(--hw-gold);
}

/* ---------- ANCHOR OVERRIDE ----------
   system.css dělá z <a> gold + underline. Pro nav, footer
   linky, tlačítka apod. potřebujeme čistý odkaz bez podtržení. */

a.nolink,
.site-nav a,
.mobile-menu a,
.site-header__logo,
.footer-links a,
.contact-list a,
.social-list a,
.hero__scroll,
.hw-spec-card a,
.project-card a {
  color: inherit;
  text-decoration: none;
}

.hw-button,
.hw-button:hover {
  color: var(--hw-btn-color);
  text-decoration: none;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--hw-paper);
  border-bottom: var(--hw-hairline);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

/* Offset pro stránky bez hero videa — sekce začínají pod fixed headerem.
   Stránky s hero videem ho nepotřebují (video je plánovaně za hlavičkou). */
.has-header-offset {
  padding-top: var(--header-height);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--hw-space-5);
}

.site-header__logo {
  display: flex;
  align-items: center;
  height: 44px;
}

.site-header__logo img {
  height: 40px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--hw-space-6);
}

.site-nav__link {
  position: relative;
  font-family: var(--hw-font-ui);
  font-weight: 600;
  font-size: var(--hw-text-13);
  line-height: var(--hw-leading-snug);
  letter-spacing: var(--hw-tracking-wider);
  text-transform: uppercase;
  color: var(--hw-charcoal);
  padding: var(--hw-space-3) 0;
  transition: color var(--hw-duration-fast) var(--hw-ease);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--hw-gold);
  transition: width var(--hw-duration-base) var(--hw-ease);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after,
.site-nav__link[aria-current="page"]::after {
  width: 100%;
}

.site-nav__link[aria-current="page"]::after {
  height: 2px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--hw-charcoal);
}

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

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--hw-paper);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hw-space-6);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu__close {
  position: absolute;
  top: var(--hw-space-4);
  right: var(--hw-space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hw-charcoal);
}

.mobile-menu__close svg {
  width: 24px;
  height: 24px;
}

.mobile-menu__link {
  font-family: var(--hw-font-display);
  font-weight: 400;
  font-size: var(--hw-text-24);
  color: var(--hw-charcoal);
  transition: color var(--hw-duration-fast) var(--hw-ease);
}

.mobile-menu__link:hover {
  color: var(--hw-gold);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--hw-charcoal);
  color: var(--hw-paper);
  padding: var(--hw-space-9) 0 var(--hw-space-6) 0;
}

.site-footer__label {
  color: var(--hw-gold);
  display: block;
  margin-top: var(--hw-space-4);
  margin-bottom: var(--hw-space-4);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--hw-space-7);
  margin-top: var(--hw-space-6);
  align-items: start;
}

.footer-col__title {
  font-family: var(--hw-font-display);
  font-weight: 400;
  font-size: var(--hw-text-24);
  line-height: var(--hw-leading-snug);
  color: var(--hw-paper);
  margin-bottom: var(--hw-space-4);
}

.footer-col__label {
  color: var(--hw-gold);
  display: block;
  margin-bottom: var(--hw-space-4);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-3);
  margin-bottom: var(--hw-space-5);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--hw-space-3);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--hw-text-16);
  line-height: var(--hw-leading-relaxed);
}

.contact-list svg {
  width: 18px;
  height: 18px;
  color: var(--hw-gold);
  flex-shrink: 0;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  transition: color var(--hw-duration-fast) var(--hw-ease);
}

.contact-list a:hover {
  color: var(--hw-gold);
}

.social-list {
  display: flex;
  gap: var(--hw-space-4);
}

.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--hw-gold);
  text-decoration: none;
  transition: color var(--hw-duration-fast) var(--hw-ease),
              transform var(--hw-duration-base) var(--hw-ease);
}

.social-list a:hover {
  color: var(--hw-paper);
  transform: translateY(-2px);
}

.social-list svg {
  width: 24px;
  height: 24px;
}

#map {
  height: 300px;
  width: 100%;
  border-radius: var(--hw-radius-lg);
  overflow: hidden;
  background: #F5F1EA;
}

.krovy-map-label {
  background: #FFFFFF;
  border: 1px solid rgba(176, 138, 60, 0.4);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #222222;
  box-shadow: 0 2px 8px rgba(34, 34, 34, 0.12);
  white-space: nowrap;
}

.krovy-map-label::before {
  display: none;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-3);
}

.footer-links a {
  color: var(--hw-paper);
  font-size: var(--hw-text-16);
  text-decoration: none;
  transition: color var(--hw-duration-fast) var(--hw-ease);
  position: relative;
  display: inline-block;
}

.footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--hw-gold);
  transition: width var(--hw-duration-base) var(--hw-ease);
}

.footer-links a:hover {
  color: var(--hw-gold);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-bottom {
  margin-top: var(--hw-space-7);
  padding-top: var(--hw-space-5);
  border-top: 1px solid rgba(176, 138, 60, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--hw-text-12);
  line-height: var(--hw-leading-normal);
}

/* ============================================
   FOCUS STATES (accessibility)
   ============================================ */

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--hw-gold);
  outline-offset: 3px;
  border-radius: var(--hw-radius-xs);
}

/* ============================================
   ANIMATION TARGET STATES (GSAP from-states)
   ============================================ */

.anim-fade-up {
  opacity: 0;
  transform: translateY(16px);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-16px);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(16px);
}

.anim-rule {
  display: inline-block;
  width: 0;
  height: 2px;
  background: var(--hw-gold);
  vertical-align: middle;
  overflow: hidden;
}

/* ============================================
   HW-MARK PROJECT EXTENSIONS
   ============================================ */

/* Centrovaná varianta signature mark */
.hw-mark--center {
  display: block;
  margin: 0 auto var(--hw-space-5) auto;
}

.hw-mark--block {
  display: block;
  margin-right: 0;
  margin-bottom: var(--hw-space-4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--hw-space-6);
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--hw-space-6);
  }
  .hw-section {
    padding-block: var(--hw-space-8);
  }
}

@media (max-width: 480px) {
  .hw-section {
    padding-block: var(--hw-space-7);
  }
  .hw-display-xl {
    font-size: 2.5rem;
  }
  .hw-display-lg {
    font-size: 2rem;
  }
  .hw-headline-lg {
    font-size: 1.75rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-fade-left,
  .anim-fade-right {
    opacity: 1;
    transform: none;
  }
  .anim-rule {
    width: 24px;
  }
}
