:root {
  --site-header-height: 104px;
  --site-grid: color-mix(in srgb, var(--color-accent-700) 8%, transparent);
  --site-ease: cubic-bezier(.2, .75, .25, 1);
}

html {
  scroll-padding-top: calc(var(--site-header-height) + 20px);
}

body {
  overflow-x: hidden;
}

.site-shell,
main {
  display: block;
}

[hidden] {
  display: none !important;
}

.section-drawing,
.city-field {
  display: contents;
}

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

.site-shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--site-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--site-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 84%, transparent);
  opacity: .36;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: var(--color-bg);
  background: var(--color-accent-800);
  transform: translateY(-150%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(242, 242, 243, .08);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-accent-300);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  will-change: transform;
}

.site-header {
  min-height: var(--site-header-height);
  isolation: isolate;
  transition: box-shadow .25s ease, background-color .25s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--color-bg) 94%, transparent) !important;
  box-shadow: 0 12px 40px rgba(10, 20, 30, .18);
  backdrop-filter: blur(18px) saturate(125%);
}

.header-inner {
  display: grid;
  max-width: 1280px;
  min-height: 58px;
  margin: 0 auto;
  padding: 5px clamp(16px, 4vw, 48px);
  grid-template-columns: 124px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
}

.site-brand {
  display: block;
  width: 124px;
  height: 48px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter .3s ease;
}

.site-header:hover .brand-logo {
  filter: saturate(1.08) contrast(1.04);
}

.header-info {
  display: grid;
  min-width: 0;
  align-self: stretch;
  grid-template-columns: minmax(200px, 1.05fr) minmax(128px, .72fr) minmax(230px, 1.35fr);
  border-inline: 1px solid var(--color-divider);
}

.header-info-item {
  display: flex;
  min-width: 0;
  padding: 5px clamp(9px, 1.1vw, 14px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--color-divider);
  text-align: center;
  line-height: 1.25;
}

.header-info-item:first-child { border-left: 0; }
.header-info-item:nth-child(2) { background: var(--color-neutral-100); }
.header-info-item strong { color: var(--color-accent-900); font-family: var(--font-heading); font-size: 12px; font-weight: 600; white-space: nowrap; }
.header-info-contact { color: inherit; text-decoration: none; }
.header-info-contact strong { font-size: 14px; letter-spacing: .015em; }
.header-info-item span { margin-top: 1px; color: var(--color-neutral-700); font-size: 10.5px; white-space: nowrap; }
.header-info-contact:hover strong { color: var(--color-accent-700); }

.header-compact-tools { display: none; align-items: center; justify-content: flex-end; gap: 4px; }
.header-icon-button { display: inline-grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--color-divider); color: var(--color-accent-800); background: var(--color-bg); cursor: pointer; text-decoration: none; list-style: none; }
.header-icon-button::-webkit-details-marker { display: none; }
.header-details { position: relative; height: 44px; }
.header-details[open] > summary { color: #fff; border-color: var(--color-accent-700); background: var(--color-accent-700); }
.header-details-panel { position: absolute; z-index: 90; top: calc(100% + 10px); right: 0; width: min(330px, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--color-divider); background: var(--color-bg); box-shadow: 0 24px 60px rgba(10,20,30,.2); }
.header-details-panel > * { display: flex; min-height: 54px; padding: 9px 11px; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--color-divider); color: inherit; line-height: 1.25; text-decoration: none; }
.header-details-panel > *:last-child { border-bottom: 0; }
.header-details-panel strong { color: var(--color-accent-900); font-family: var(--font-heading); font-size: 14px; }
.header-details-panel span { margin-top: 3px; color: var(--color-neutral-700); font-size: 12px; }
.header-actions { justify-self: end; }
.header-cta { min-height: 44px; padding-inline: 16px !important; font-size: 12.5px !important; white-space: nowrap; }
.header-cta-short { display: none; }

.header-nav-row { border-top: 1px solid var(--color-divider); background: color-mix(in srgb, var(--color-bg) 94%, var(--color-surface)); }
.desktop-nav { display: grid; width: min(600px, calc(100% - 32px)); min-height: 44px; margin: 0 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 2px; }
.desktop-nav .header-nav-link {
  display: inline-flex;
  min-height: 44px;
  padding: 3px 14px;
  position: relative;
  align-items: center;
  justify-content: center;
  color: var(--color-neutral-700);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.desktop-nav .header-nav-link:hover,
.desktop-nav .header-nav-link:focus-visible,
.desktop-nav .header-nav-link[aria-current="true"] {
  color: var(--color-accent-900);
  background: color-mix(in srgb, var(--color-accent-100) 72%, var(--color-bg));
  box-shadow: inset 0 -2px var(--color-accent-700);
}

.hero {
  position: relative;
  overflow: clip;
  background-image:
    radial-gradient(circle at var(--pointer-x, 72%) var(--pointer-y, 32%), rgba(181, 217, 253, .12), transparent 26%),
    linear-gradient(rgba(181, 217, 253, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 217, 253, .045) 1px, transparent 1px) !important;
  background-color: var(--color-accent-900) !important;
  background-size: auto, 48px 48px, 48px 48px !important;
}

.hero::after {
  content: "07 / INSI / LSTK";
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  bottom: 13px;
  color: rgba(242, 242, 243, .28);
  font: 600 11px/1 var(--font-body);
  letter-spacing: .16em;
  pointer-events: none;
}

.hero h1 {
  text-wrap: balance;
  text-shadow: 0 14px 36px rgba(0, 0, 0, .15);
}

.hero-media {
  min-height: 350px;
  background: color-mix(in srgb, var(--color-accent-800) 70%, #fff);
  box-shadow: 0 32px 80px rgba(7, 20, 32, .3);
  transform: perspective(1100px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform .3s var(--site-ease), box-shadow .3s ease;
}

.media-frame {
  position: relative;
  overflow: visible;
}

.media-frame > img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(.92);
  transition: filter .6s ease, transform 1.1s var(--site-ease);
}

.hero-media > img {
  object-position: center 48%;
}

.media-frame::after {
  z-index: 1;
  mix-blend-mode: color;
  opacity: .72;
}

.media-frame:hover > img {
  filter: grayscale(.72) contrast(1.05) brightness(.98);
}

.media-frame figcaption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  align-items: center;
  margin: 0;
  padding: 9px 12px;
  color: rgba(242, 242, 243, .82);
  background: rgba(16, 32, 47, .82);
  border-top: 1px solid rgba(242, 242, 243, .2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.media-frame figcaption span + span::before {
  content: "+";
  margin-right: 16px;
  color: var(--color-accent-300);
}

.media-frame > .corner {
  z-index: 3;
}

.production-media {
  min-height: 230px;
}

.production-media:nth-child(2) > img {
  object-position: 46% center;
}

.blueprint {
  transition: border-color .25s ease, box-shadow .3s ease, transform .3s var(--site-ease), background-color .3s ease;
}

.blueprint:not(.hero-media):hover {
  border-color: color-mix(in srgb, var(--color-accent) 62%, transparent);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--color-accent-900) 9%, transparent);
  transform: translateY(-2px);
}

.blueprint > .corner {
  transition: color .25s ease, transform .35s var(--site-ease);
}

.blueprint:hover > .corner {
  color: var(--color-accent-600);
  transform: rotate(90deg);
}

.btn {
  position: relative;
  overflow: hidden;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s var(--site-ease), box-shadow .2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 24%, rgba(255, 255, 255, .22) 50%, transparent 76%);
  transform: translateX(-130%);
  transition: transform .55s var(--site-ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:hover::before {
  transform: translateX(130%);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px color-mix(in srgb, var(--color-accent-900) 26%, transparent);
}

label:has(input[type="radio"]:checked),
label:has(input[type="checkbox"]:checked) {
  border-color: var(--color-accent-600) !important;
  background: var(--color-accent-100);
  color: var(--color-accent-900);
}

#kontakty label:has(input:checked) {
  color: var(--color-bg);
  background: rgba(181, 217, 253, .08);
}

.input {
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.input:focus-visible {
  background: var(--color-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
}

details summary {
  transition: color .2s ease, padding-left .25s var(--site-ease);
}

details summary:hover,
details[open] summary {
  color: var(--color-accent-800);
  padding-left: 10px;
}

details[open] > p {
  animation: details-in .32s var(--site-ease) both;
}

@keyframes details-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .7s var(--site-ease) var(--reveal-delay, 0ms),
    transform .7s var(--site-ease) var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1199px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 62px; }
  .header-info { display: none; }
  .header-compact-tools { display: flex; }
}

@media (max-width: 1020px) {
  .hero-media { min-height: 310px; }
}

@media (max-width: 859px) {
  :root { --site-header-height: 64px; }
  .header-nav-row { display: none; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 62px; gap: 6px; padding: 1px 16px; }
  .site-brand { width: 114px; height: 44px; }
  .header-cta { padding-inline: 12px !important; font-size: 12px !important; }
  .header-details-panel { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }

  .hero {
    padding-top: 38px !important;
  }

  .hero-media {
    min-height: 250px;
  }

  .production-media {
    min-height: 240px;
  }

  .media-frame figcaption {
    gap: 5px 10px;
    font-size: 9px;
  }

  .media-frame figcaption span + span::before {
    margin-right: 10px;
  }

  summary {
    font-size: 19px !important;
  }
}

@media (max-width: 430px) {
  .header-inner { padding-inline: 11px; gap: 4px; }
  .site-brand { width: 106px; height: 42px; }
  .header-cta-long { display: none; }
  .header-cta-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-media,
  .blueprint:hover,
  .btn:hover,
  .media-frame:hover > img {
    transform: none !important;
  }
}
