/* ============================================================
   Viktor Skoczek — stránka KOUPIT (raw wireframe 1:1 z Figma)
   Stránkově specifické styly. Sdílené: tokens.css, base.css.
   ============================================================ */

/* ============================================================
   1 · HERO (funnel: solid header + vsazená foto karta, base.css
   .hero-inset/.hero-card) — jen odchylky téhle stránky od Figmy:
   ============================================================ */
.hero-card__img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Figma: eyebrow na tmavé kartě je bílý (80%), ne oranžový default z base.css */
.hero-card__content .eyebrow { color: var(--on-dark-75); }
.hero-card__text h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.12;
  max-width: 560px;
}
.hero-card__text .lead { max-width: 560px; }

.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
/* Figma: outline CTA na tmavém pozadí má 2px bílý 80% border (btn--on-dark default je jemnější) */
.hero-cta-row .btn--on-dark { border-width: 2px; border-color: rgba(255,255,255,0.8); }

.hero-card__note { font-size: 14px; color: var(--on-dark-60); }
.hero-card__rating {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--on-dark-75);
}
.hero-card__g { font-weight: 600; }
.hero-card__stars { color: #8A6200; letter-spacing: 2px; }

/* ============================================================
   2 · NOVĚ NABÍZENÉ NEMOVITOSTI — coverflow (portováno z HP, hp.css)
   ============================================================ */
.nv-section { background: #fff; padding: var(--section-y) 0; overflow: hidden; }
.nv-head { max-width: 620px; margin: 0 auto 40px; padding: 0 var(--gutter); text-align: center; }
.nv-title { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 14px; }
.nv-lead { font-family: var(--font-text); font-size: 17px; line-height: 1.55; color: var(--ink-60); margin: 0; }

/* coverflow — středová karta zvětšená, boční zmenšené; projíždí se šipkami / scrollem / swipem */
.nv-carousel { position: relative; display: flex; align-items: center; justify-content: center; height: 470px; user-select: none; touch-action: pan-y; }
.nv-card {
  position: absolute; display: block; width: 280px; aspect-ratio: 4 / 5; cursor: pointer;
  border-radius: var(--r-card); overflow: hidden; box-shadow: 0 20px 45px -16px rgba(36,34,35,0.28);
  transition: transform 0.5s cubic-bezier(.16,1,.3,1), opacity 0.5s ease, box-shadow 0.3s ease; will-change: transform, opacity; text-decoration: none;
}
.nv-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.nv-card.is-center:hover .nv-card-img { transform: scale(1.04); }
/* boční karty v coverflow nemají is-center zoom (kliknutí je jen přesune do středu) — dostanou aspoň zvýrazněný stín */
@media (hover: hover) {
  .nv-card:hover { box-shadow: 0 26px 55px -14px rgba(36,34,35,0.42); }
}
.nv-badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: var(--font-text); font-size: 11px; font-weight: 600; color: #fff;
  padding: 6px 13px; border-radius: var(--r-pill);
}
.nv-badge--sale { background: var(--accent); color: var(--on-accent); }
.nv-badge--reserved { background: var(--ink); }
.nv-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(36,34,35,0.92) 0%, rgba(36,34,35,0.35) 45%, rgba(36,34,35,0) 78%); }
.nv-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px; color: #fff; }
.nv-price { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; color: #fff; margin: 0 0 4px; }
.nv-name { font-family: var(--font-text); font-weight: 500; font-size: 14px; line-height: 1.35; color: rgba(255,255,255,0.85); margin: 0; }
/* meta + detail: na středové (aktivní) kartě vždy vidět */
.nv-details { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s ease, opacity .4s ease, margin-top .4s ease; }
.nv-card.is-center .nv-details { max-height: 130px; opacity: 1; margin-top: 10px; }
.nv-meta { font-family: var(--font-text); font-size: 13px; line-height: 1.4; color: rgba(255,255,255,0.75); margin: 0; }
.nv-detail-link { display: inline-block; margin-top: 8px; font-family: var(--font-text); font-weight: 600; font-size: 13px; color: var(--accent-40); }

.nv-controls { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 32px; }
.nv-nav-btn {
  width: 48px; height: 48px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.nv-nav-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.nv-nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nv-counter { font-family: var(--font-text); color: var(--ink-40); font-size: 14px; font-weight: 500; min-width: 48px; text-align: center; }

.nv-cta-wrap { text-align: center; margin-top: 36px; padding: 0 24px; }
.nv-cta {
  font-family: var(--font-text); display: inline-block; font-weight: 600; font-size: 15px;
  color: var(--accent-text); border: 2px solid var(--accent); padding: 13px 26px; border-radius: var(--r-pill);
  text-decoration: none; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nv-cta:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-2px); }
/* cena/meta jen na aktivní kartě (boční jen fotka) */
.nv-card .nv-content { opacity: 0; transition: opacity .35s ease; }
.nv-card.is-center .nv-content { opacity: 1; }

/* ============================================================
   2b · E-MAIL CAPTURE BAND — přednostní přístup (peach)
   ============================================================ */
.prio-band { padding-block: var(--section-y); background: rgba(0, 0, 0, 0.08); }
.prio-band__inner {
  max-width: 660px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.prio-band__title { font-size: 32px; line-height: 1.18; }
.prio-band__text { font-family: var(--font-text); font-size: 17px; line-height: 1.55; color: var(--ink-80); max-width: 560px; margin: 0; }
.prio-band .lead-form { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 10px; }
.prio-band .lead-form__row { display: flex; gap: 12px; align-items: stretch; width: 100%; }
.prio-band .lead-form__row .field { flex: 1; min-width: 0; }
.prio-band .btn { border: none; width: 100%; height: 52px; }
.prio-band .form-fine { font-size: 12px; color: var(--ink-40); margin: 0; }
@media (max-width: 620px) {
  .prio-band .lead-form__row { flex-direction: column; }
}

/* ============================================================
   3 · FOTO PÁS + 3 DŮVODY (overlay)
   ============================================================ */
.koupit-reasons {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.koupit-reasons__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.koupit-reasons__overlay {
  position: absolute; inset: 0;
  background: rgba(36,34,35,0.7);
}
.koupit-reasons__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 1000px;
  text-align: center;
  padding-block: 64px;
}
.koupit-reasons__eyebrow {
  color: var(--on-dark-75);
  letter-spacing: 1.4px;
}
.koupit-reasons__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.24;
  color: #fff;
}
.koupit-reasons__sub {
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--on-dark-75);
  margin-bottom: 8px;
}

/* ============================================================
   4 · JAK FUNGUJE NÁKUP — scroll-scrub progress (portováno z prodat.css)
   ============================================================ */
.steps-head { text-align: center; max-width: 1280px; margin: 0 auto 40px; }
.steps-head p { margin-top: 12px; }
.steps-track {
  position: relative;
  height: 8px;
  background: var(--ink-10);
  border-radius: 4px;
  margin-bottom: 46px;
}
.steps-track-fill {
  position: absolute;
  left: 0; top: 0; height: 8px;
  width: 40%;
  background: var(--accent);
  border-radius: 4px;
}
.steps-track-dot {
  position: absolute;
  top: 50%; left: 40%;
  width: 22px; height: 22px;
  background: var(--accent);
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step { display: flex; flex-direction: column; gap: 8px; }
.step-num { font-family: var(--font-text); font-weight: 600; font-size: 20px; color: var(--ink); }
.step-title { font-family: var(--font-text); font-weight: 600; font-size: 18px; color: var(--ink); }
.step-desc { font-family: var(--font-text); font-size: 13.5px; line-height: 1.5; color: rgba(36,34,35,0.85); }
/* scroll-scrub: čára se plní + kroky se postupně odkrývají (app.js přepíná .is-dim) */
.js .steps-track-fill { width: 0; transition: width .12s linear; }
.js .steps-track-dot { left: 0; transition: left .12s linear; }
/* .steps-grid .step = stejná specificita jako .js .reveal-up, pozdější soubor vyhrává */
.steps-grid .step { transition: opacity .4s ease, transform .4s ease; }
.step .step-num, .step .step-title, .step .step-desc { transition: color .35s ease; }
.step.is-dim { opacity: 0.1; transform: translateY(14px); }
.step.is-dim .step-num,
.step.is-dim .step-title { color: rgba(36,34,35,0.62); }
.step.is-dim .step-desc { color: rgba(36,34,35,0.55); }

/* ============================================================
   5 · ZÁVĚREČNÉ CTA (formulář poptávky)
   1:1 s indexem (hp.css .final-cta__panel … .final-cta__fine)
   ============================================================ */
.final-cta__panel {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 56px; align-items: center;
  background: #F5F5F7; border-radius: 28px; padding: 48px 52px;
}

.final-cta-card { flex: 0 0 300px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.final-cta-card img { width: 100%; aspect-ratio: 300/340; object-fit: cover; border-radius: 20px; }
.final-cta-card__meta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; width: 100%; }
.final-cta-card__name { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); }
.final-cta-card__role { font-size: 15px; color: var(--ink-60); margin-top: -8px; }
.final-cta-card__contact { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-80); width: 100%; }
.final-cta-card__contact a { display: inline-flex; align-items: center; gap: 10px; transition: color .2s ease; }
.final-cta-card__contact svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--accent-text); }
.final-cta-card__social { display: flex; gap: 20px; }
.final-cta-card__social a { display: inline-flex; transition: transform .2s ease; }
.final-cta-card__social svg { width: 22px; height: 22px; color: var(--ink); transition: color .2s ease; }
@media (hover: hover) {
  .final-cta-card__contact a:hover { color: var(--ink); }
  .final-cta-card__social a:hover { transform: scale(1.12); }
  .final-cta-card__social a:hover svg { color: var(--ink); }
}

.final-cta__form-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.final-cta__form-col h2 { font-size: 30px; }
.final-cta__form-col .lead { margin-top: -6px; }

.final-cta__form {
  width: 100%; display: flex; flex-direction: column; gap: 14px;
}
.final-cta__form .field { background: #fff; }
.final-cta__form-row { display: flex; gap: 14px; }
.final-cta__form-row .field { flex: 1; width: auto; }
.final-cta__form textarea.field { width: 100%; height: 120px; resize: none; font-family: inherit; }
.final-cta__submit { width: 100%; height: 56px; }
.final-cta__fine { font-size: 12px; color: var(--ink-40); text-align: center; margin-top: 2px; }

/* ============================================================
   Responsive (základní stack < 900px)
   ============================================================ */
@media (max-width: 900px) {
  /* světlá hero fotka: tmavší scrim než base.css, ať je text čitelný */
  .hero-card__scrim { background: linear-gradient(90deg, rgba(36,34,35,0.95) 0%, rgba(36,34,35,0.84) 60%, rgba(36,34,35,0.62) 100%); }
  .hero-card__text h1 { font-size: 36px; }

  .koupit-reasons__title { font-size: 26px; }

  /* kroky: 2 sloupce na tabletu/mobilu */
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }

  /* CTA panel: stack + vizitka (fotka+jméno+role nahoře, kontakty pod tím v plné šířce) */
  .final-cta__panel { flex-direction: column; align-items: stretch; gap: 26px; padding: 30px 22px; border-radius: 24px; }
  .final-cta-card {
    flex: 0 0 auto; width: 100%;
    display: grid; grid-template-columns: 84px 1fr;
    grid-template-areas: "photo name" "photo role" "contact contact";
    column-gap: 16px; row-gap: 4px; align-items: center;
  }
  .final-cta-card img { grid-area: photo; align-self: start; flex: none; width: 84px; height: 84px; aspect-ratio: 1; border-radius: 18px; }
  .final-cta-card__meta { display: contents; }
  .final-cta-card__name { grid-area: name; align-self: end; font-size: 19px; }
  /* role ani e-mail se nesmí lámat — nowrap + menší font */
  .final-cta-card__role { grid-area: role; align-self: start; margin-top: 0; font-size: 13px; white-space: nowrap; }
  .final-cta-card__contact { grid-area: contact; margin-top: 12px; font-size: 14px; }
  .final-cta-card__contact a { max-width: 100%; }
  .final-cta-card__contact span { white-space: nowrap; }
  .final-cta-card__social { display: none; }
  .final-cta__form-col { flex-basis: auto; width: 100%; }
  .final-cta__form-col h2 { font-size: 25px; }

  .final-cta__form-row { flex-direction: column; }
}
