/* =============================================================
   Instalatérství Petrův · style.css
   ============================================================= */

/* -------------------------------------------------------------
   1. Custom properties
   ------------------------------------------------------------- */
:root {
  /* Barevná identita */
  --c-navy: #0c2231;
  --c-navy-panel: #14344a;
  --c-navy-deep: #071823;
  --c-accent: #a93b22;
  --c-accent-hover: #8a2e18;
  --c-gold: #c4a05a;
  --c-cream: #f5f2ed;
  --c-border: #e2ddd5;

  /* Text */
  --c-ink: #16212a;
  --c-text: #31404b;
  --c-text-soft: #55646f;
  --c-white: #ffffff;

  /* Focus */
  --c-focus: #c4a05a;

  /* Typografie */
  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  /* Layout */
  --container: 1180px;
  --container-pad: clamp(16px, 4vw, 40px);
  --section-y: clamp(48px, 7vw, 88px);
  --header-h: 72px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-pill: 999px;
}

/* -------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--c-accent);
}

a:hover {
  color: var(--c-accent-hover);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

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

/* -------------------------------------------------------------
   3. Společné
   ------------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--c-navy);
}

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

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

.section--cream {
  background: var(--c-cream);
}

.section--dark {
  background: var(--c-navy);
  color: var(--c-white);
}

.section--dark h2,
.section--dark h3 {
  color: var(--c-white);
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.eyebrow--gold {
  color: var(--c-gold);
}

.section__title {
  max-width: 30ch;
  margin-bottom: clamp(28px, 4vw, 44px);
  font-size: clamp(26px, 3.6vw, 38px);
}

.section__title--light {
  color: var(--c-white);
}

/* Tlačítka */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn--primary {
  background: var(--c-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--c-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn--call {
  min-height: 44px;
  padding: 11px 18px;
  background: var(--c-accent);
  color: #fff;
  font-size: 15px;
}

.btn--call:hover {
  background: var(--c-accent-hover);
  color: #fff;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--c-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* -------------------------------------------------------------
   4. Header / navigace
   ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  overflow: hidden;
  background: var(--c-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: #fff;
  flex: none;
}

.brand:hover {
  color: #fff;
}

.brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}

.nav__menu a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.nav__menu a:hover {
  color: #fff;
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: #fff;
  align-items: center;
  justify-content: center;
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}

.nav__toggle .icon-close {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* -------------------------------------------------------------
   5. Hero
   ------------------------------------------------------------- */
.hero {
  background: var(--c-navy);
  color: #fff;
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 76px) clamp(32px, 5vw, 60px);
}

.hero__title {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
}

/* Vstupní animace hera – čisté CSS, neběží na JS/IntersectionObserveru,
   takže hlavní text nikdy nečeká na scroll-reveal skript. */
.hero__content > * {
  animation: hero-in 0.7s cubic-bezier(0.22, 0.68, 0, 1) both;
}

.hero__content > *:nth-child(1) {
  animation-delay: 0.05s;
}

.hero__content > *:nth-child(2) {
  animation-delay: 0.16s;
}

.hero__content > *:nth-child(3) {
  animation-delay: 0.27s;
}

.hero__content > *:nth-child(4) {
  animation-delay: 0.38s;
}

.hero__content > *:nth-child(5) {
  animation-delay: 0.49s;
}

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

.hero__media {
  animation: hero-media-in 0.8s cubic-bezier(0.22, 0.68, 0, 1) 0.15s both;
}

@keyframes hero-media-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero__lead {
  max-width: 46ch;
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__secondary {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.66);
}

.hero__secondary a {
  color: var(--c-gold);
  font-weight: 700;
  text-decoration: none;
}

.hero__secondary a:hover {
  text-decoration: underline;
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: opacity 0.5s ease;
}

.hero__media img.is-fading {
  opacity: 0;
}

.hero__media figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--c-navy);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 0 var(--radius-md) 0 var(--radius-md);
}

.hero__strip {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__strip-inner {
  padding-block: clamp(16px, 3vw, 22px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px 28px;
}

.hero__strip-inner p {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}

.hero__strip-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.hero__strip-rating:hover {
  color: var(--c-gold);
}

/* -------------------------------------------------------------
   6. Jak to probíhá
   ------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.steps__item {
  border-top: 2px solid var(--c-navy);
  padding-top: 18px;
}

.steps__num {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-accent);
}

.steps__item h3 {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 20px;
}

.steps__item p:not(.steps__num) {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text-soft);
}

/* -------------------------------------------------------------
   7. Služby
   ------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.services__col h3 {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 600;
  font-size: 21px;
}

.services__col ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.services__col li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
}

/* -------------------------------------------------------------
   8. Realizace / galerie
   ------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--c-navy-panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item span {
  display: block;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

/* -------------------------------------------------------------
   9. Recenze
   ------------------------------------------------------------- */
.reviews__meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -8px 0 clamp(28px, 4vw, 44px);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-soft);
  text-decoration: none;
}

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

.reviews__meta:hover .reviews__meta-text {
  text-decoration: underline;
}

.reviews__meta-google {
  width: 17px;
  height: 17px;
  flex: none;
}

.reviews__meta-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.reviews__meta-star {
  width: 14px;
  height: 14px;
  flex: none;
  fill: var(--c-gold);
}

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.reviews__card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.reviews__card blockquote {
  margin: 0;
  flex: 1;
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
}

.reviews__card figcaption {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-navy);
}

/* -------------------------------------------------------------
   10. Kam jezdíme
   ------------------------------------------------------------- */
.areas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.areas__tag {
  background: var(--c-cream);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}

.areas__tag--main {
  background: var(--c-navy);
  border-color: var(--c-navy);
  color: #fff;
  padding: 8px 18px;
  font-size: 16px;
  font-weight: 700;
}

.areas__note {
  margin-top: 22px;
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text-soft);
}

/* -------------------------------------------------------------
   11. Kontakt
   ------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 4vw, 56px);
}

.contact__blocks {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.contact__block {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 16px;
}

.contact__area {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.contact__name {
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.contact__phone {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.contact__phone:hover {
  color: var(--c-gold);
}

.contact__email {
  display: inline-block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-gold);
  text-decoration: none;
}

.contact__email:hover {
  text-decoration: underline;
}

.contact__hours {
  margin-top: 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.contact__form-wrap {
  background: var(--c-navy-panel);
  border-radius: var(--radius-md);
  padding: clamp(22px, 3vw, 32px);
}

.contact__form-wrap h3 {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 22px;
}

.contact__form-lead {
  margin-bottom: 20px;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

/* -------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------- */
.footer {
  background: var(--c-navy-deep);
  color: rgba(255, 255, 255, 0.62);
}

.footer__grid {
  padding-block: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  align-items: start;
  font-size: 14px;
  line-height: 1.7;
}

.footer__grid a {
  color: var(--c-gold);
  text-decoration: none;
}

.footer__grid a:hover {
  text-decoration: underline;
}

.footer__brand {
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.footer__legal {
  font-family: ui-monospace, Menlo, monospace;
  color: rgba(255, 255, 255, 0.5);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.footer__bottom p {
  padding-block: 16px;
}

/* -------------------------------------------------------------
   13. Lightbox
   ------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  background: rgba(4, 14, 20, 0.94);
  backdrop-filter: blur(4px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-width: min(900px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__btn svg {
  width: 24px;
  height: 24px;
}

.lightbox__btn--close {
  top: 18px;
  right: 18px;
}

.lightbox__btn--prev {
  left: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__btn--next {
  right: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
}

/* -------------------------------------------------------------
   13b. Souhlas s cookies
   ------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--c-navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner__inner p {
  margin: 0;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.cookie-banner__inner a {
  color: var(--c-gold);
}

.cookie-banner__actions {
  display: flex;
  flex: none;
  gap: 10px;
}

.cookie-banner__actions .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}

/* -------------------------------------------------------------
   14. Scroll-reveal
   ------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------
   15. Responsivita
   ------------------------------------------------------------- */
@media (max-width: 700px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--container-pad) 16px;
    background: var(--c-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .nav__menu.is-open {
    display: flex;
    animation: nav-in 0.18s ease;
  }

  @keyframes nav-in {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .nav__menu a {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header {
    overflow: visible;
  }

  .hero__media {
    order: -1;
  }
}

@media (max-width: 480px) {
  .contact__form-wrap .btn,
  .hero__cta .btn {
    width: 100%;
  }
}

/* -------------------------------------------------------------
   16. prefers-reduced-motion
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
