/* =========================================================
   KOVO-TOP – styly
   Písmo: Schibsted Grotesk (SIL Open Font License), hostováno lokálně
   ========================================================= */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/schibsted-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/schibsted-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #111111;
  --ink-2: #191919;
  --ink-3: #0b0b0b;
  --paper: #f2f0eb;
  --text: #151515;
  --muted: #5d5b56;
  --muted-d: #9d9a93;
  --line: rgba(21, 21, 21, .14);
  --line-d: rgba(255, 255, 255, .13);
  --red: #e1251b;
  --red-d: #c21c13;

  --max: 1320px;
  --gut: clamp(16px, 4vw, 48px);
  --header-h: 64px;
  --sec: clamp(72px, 10vw, 136px);

  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- základ ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.0625rem; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -.032em;
  line-height: 1;
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.nowrap { white-space: nowrap; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
}
.skip:focus { top: 12px; }

section[id], article[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- odkazy a tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1em 1.4em;
  background: var(--red);
  color: #fff;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color .2s ease;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.btn:hover { background: var(--red-d); }

.link-line {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color .2s ease, background-size .2s ease;
}
.link-line:hover {
  color: var(--red);
}

/* ---------- hlavička ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid var(--line-d);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand__mark {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
}
.brand__name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .02em;
  line-height: 1;
}
.brand__dash { color: var(--red); margin-inline: .04em; }

.nav {
  display: none;
}
.nav a {
  position: relative;
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  transition: color .2s ease;
}
.nav a:hover { color: #fff; }

.header__call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--red);
  color: #fff;
  font-weight: 650;
  font-size: .9375rem;
  white-space: nowrap;
}
.header__call svg { width: 17px; height: 17px; fill: currentColor; }
.header__call span { display: none; }
@media (min-width: 420px) { .header__call span { display: inline; } }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 0 0 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
}
.menu-toggle__label { display: none; }
@media (min-width: 380px) { .menu-toggle__label { display: inline; } }
.menu-toggle__bars {
  position: relative;
  width: 22px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: border-color .2s ease;
}
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { border-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { opacity: 1; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { opacity: 1; transform: rotate(-45deg); }

/* mobilní menu */
@media (max-width: 899px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 8px var(--gut) 32px;
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    overflow-y: auto;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav a {
    padding: 18px 0;
    border-bottom: 1px solid var(--line-d);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
  }
  .nav a.nav__phone {
    margin-top: auto;
    border: 0;
    padding-top: 32px;
    font-size: 1.25rem;
    color: var(--red);
  }
  body.menu-open { overflow: hidden; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .nav {
    display: flex;
    align-items: center;
    gap: 36px;
  }
  .nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .nav a:hover::after,
  .nav a.is-active::after { transform: scaleX(1); }
  .nav a.is-active { color: #fff; }
  .nav__phone { display: none; }
  .menu-toggle { display: none; }
  .header__call { height: 44px; padding: 0 18px; }
  .header__call span { display: inline; }
}

/* ---------- úvod ---------- */

.hero {
  background: var(--ink);
  color: #fff;
}
.hero__grid {
  display: grid;
  gap: 40px;
  padding-top: clamp(40px, 6.5vw, 88px);
  padding-bottom: clamp(48px, 5.5vw, 72px);
}
.hero h1 {
  font-size: clamp(2.75rem, 6.3vw, 5.75rem);
  line-height: .94;
  letter-spacing: -.04em;
}
.hero h1 span {
  display: block;
  color: #77746e;
}
.hero__lead {
  max-width: 34em;
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .74);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.hero__actions .link-line { color: rgba(255, 255, 255, .86); }
.hero__actions .link-line:hover { color: #fff; background-image: linear-gradient(var(--red), var(--red)); }

.hero__photo {
  margin-inline: calc(var(--gut) * -1);
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 30% 50%;
}
.hero__photo figcaption {
  padding: 10px var(--gut) 0;
  font-size: .8125rem;
  color: var(--muted-d);
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(48px, 5vw, 88px);
    align-items: end;
  }
  .hero__photo { margin-inline: 0; }
  .hero__photo img { aspect-ratio: 5 / 6; }
  .hero__photo figcaption { padding-inline: 0; }
}

/* tři obory pod úvodem */
.fields {
  display: grid;
  border-top: 1px solid var(--line-d);
}
.fields li + li { border-top: 1px solid var(--line-d); }
.fields a {
  position: relative;
  display: block;
  padding: 22px 40px 24px 0;
}
.fields a::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: translateY(-50%) rotate(135deg);
  transition: transform .25s ease;
}
.fields a:hover::after { transform: translateY(-20%) rotate(135deg); }
.fields strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.fields span {
  display: block;
  margin-top: 4px;
  font-size: .9375rem;
  color: var(--muted-d);
}

@media (min-width: 760px) {
  .fields { grid-template-columns: repeat(3, 1fr); }
  .fields li + li { border-top: 0; border-left: 1px solid var(--line-d); }
  .fields a { padding: 28px 48px 36px 28px; height: 100%; }
  .fields li:first-child a { padding-left: 0; }
  .fields a::after { top: 34px; transform: rotate(135deg); }
  .fields a:hover::after { transform: translateY(4px) rotate(135deg); }
}

/* ---------- sekce obecně ---------- */

.section { padding-block: var(--sec); }

.section__head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section__head h2 {
  font-size: clamp(2.25rem, 5.4vw, 4.5rem);
}
.section__head p {
  max-width: 36em;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--muted);
}
@media (min-width: 900px) {
  .section__head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 64px;
    align-items: end;
  }
  .section__head p { justify-self: end; }
}

/* ---------- služby ---------- */

.service {
  display: grid;
  gap: 32px;
  padding-block: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.service:last-child { padding-bottom: 0; }

.service h3 {
  font-size: clamp(1.875rem, 3.4vw, 2.875rem);
  line-height: 1.02;
}
.service__lead {
  margin-top: 18px;
  max-width: 32em;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--muted);
}

.spec {
  margin-top: 32px;
  border-bottom: 1px solid var(--line);
}
.spec li {
  display: grid;
  gap: 2px;
  padding: 14px 0 15px;
  border-top: 1px solid var(--line);
}
.spec strong { font-weight: 650; }
.spec span { color: var(--muted); }
@media (min-width: 600px) {
  .spec li { grid-template-columns: 13.5em 1fr; gap: 24px; }
}

.service__where {
  margin-top: 22px;
  font-size: .9375rem;
  color: var(--muted);
}
.service__where span {
  display: block;
  margin-bottom: 2px;
  font-weight: 650;
  color: var(--text);
}

.service__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.service__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #dcd8cf;
}

@media (min-width: 960px) {
  .service {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(48px, 6vw, 104px);
    align-items: start;
  }
  .service--flip .service__text { order: 2; }
  .service__media { gap: 12px; }
  .service__media img:last-child { margin-top: 72px; }
}

/* ---------- realizace ---------- */

.works {
  background: var(--ink);
  color: #fff;
}
.works .section__head p { color: var(--muted-d); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 42vw;
  grid-auto-flow: dense;
  gap: 6px;
}
.g {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-2);
}
.g img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}
.g span {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: calc(100% - 16px);
  padding: 8px 12px;
  background: var(--ink);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.g:hover img { transform: scale(1.035); }
.g:hover span,
.g:focus-visible span { opacity: 1; transform: none; }
.g:focus-visible { outline-offset: -2px; }

.g--big { grid-column: span 2; grid-row: span 2; }
.g--wide { grid-column: span 2; }
.g--tall { grid-row: span 2; }

@media (min-width: 760px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(150px, 16.5vw, 228px);
    gap: 8px;
  }
}

/* ---------- reference ---------- */

.ref-list { border-bottom: 1px solid var(--line); }
.ref-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 24px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--line);
}
.ref-list strong {
  grid-column: 1 / -1;
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.ref-list span { color: var(--muted); }
.ref-list span:last-child { text-align: right; color: var(--text); font-weight: 550; }

@media (min-width: 760px) {
  .ref-list li {
    grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr);
    align-items: baseline;
    padding: 30px 0 32px;
  }
  .ref-list strong { grid-column: auto; }
}

/* ---------- kontakt ---------- */

.contact {
  background: var(--ink);
  color: #fff;
  border-top: 4px solid var(--red);
}
.contact__grid {
  display: grid;
  gap: 48px;
}
.contact h2 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: .96;
  letter-spacing: -.04em;
}
.contact__intro p {
  max-width: 30em;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: rgba(255, 255, 255, .7);
}

.contact__phone {
  display: inline-block;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  white-space: nowrap;
  transition: color .2s ease;
}
.contact__phone:hover { color: var(--red); }
.contact__mail {
  display: inline-block;
  margin-top: 10px;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .86);
  transition: color .2s ease;
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--red); }
.contact__details > a { display: table; }

.contact__list {
  margin-top: 40px;
  border-bottom: 1px solid var(--line-d);
}
.contact__list > div {
  display: grid;
  gap: 4px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line-d);
}
.contact__list dt { color: var(--muted-d); font-size: .9375rem; }
.contact__list dd { line-height: 1.55; }
.contact__list .link-line { display: inline-block; margin-top: 6px; color: rgba(255, 255, 255, .86); }
.contact__list .link-line:hover { color: #fff; background-image: linear-gradient(var(--red), var(--red)); }
@media (min-width: 600px) {
  .contact__list > div { grid-template-columns: 11em 1fr; gap: 24px; }
}

@media (min-width: 960px) {
  .contact__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(48px, 6vw, 104px);
    align-items: start;
  }
}

/* ---------- patička ---------- */

.footer {
  background: var(--ink-3);
  color: var(--muted-d);
  font-size: .875rem;
  padding-block: 48px;
  border-top: 1px solid var(--line-d);
}
.footer__grid {
  display: grid;
  gap: 32px;
}
.footer__brand .brand__name { color: #fff; font-size: 1.125rem; }
.footer__brand p { margin-top: 10px; }
.footer__brand .footer__copy { margin-top: 4px; }
.footer__eu {
  display: grid;
  gap: 16px;
  align-items: center;
}
.footer__eu img {
  width: 220px;
  background: #fff;
  padding: 8px;
}
.footer__eu p { max-width: 30em; }
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1fr auto; align-items: center; }
  .footer__eu { grid-template-columns: auto minmax(0, 22em); }
}

/* ---------- lightbox ---------- */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 10, 10, .96);
  color: #fff;
}
.lightbox::backdrop { background: rgba(10, 10, 10, .96); }
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox__figure {
  display: grid;
  gap: 12px;
  max-width: min(1200px, calc(100vw - 32px));
  padding: 64px 0 24px;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  width: auto;
  margin-inline: auto;
  object-fit: contain;
}
.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: .9375rem;
}
.lightbox__count { color: var(--muted-d); font-variant-numeric: tabular-nums; }

.lb-btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(17, 17, 17, .8);
  border: 1px solid var(--line-d);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { bottom: 16px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (min-width: 760px) {
  .lb-close { top: 20px; right: 20px; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
}
@media (max-width: 759px) {
  .lightbox__figure { padding-bottom: 80px; }
}

/* ---------- jemné odhalení při scrollu ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}
