/* ============================================================
   ROI Estate — UI Kit (BEM)
   Used by the main docs page and the website showcase.
   Requires tokens.css loaded first.
   ============================================================ */

/* ------------------------------------------------------------
   LAYOUT PRIMITIVES
   ------------------------------------------------------------ */
.re-container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}
.re-section {
  padding-block: var(--section-padding-block);
}
.re-section--light     { background: var(--white);     color: var(--base); }
.re-section--cream     { background: var(--cream-100); color: var(--base); }
.re-section--cream-50  { background: var(--cream-50);  color: var(--base); }
.re-section--cream-100 { background: var(--cream-100); color: var(--base); }
.re-section--cream-200 { background: var(--cream-200); color: var(--base); }
.re-section--cream-300 { background: var(--cream-300); color: var(--base); }
.re-section--navy      { background: var(--base);      color: var(--white); }

/* ------------------------------------------------------------
   IMAGE-BACKED SECTION (full-bleed photo / slideshow + centered text)
   ------------------------------------------------------------ */
.re-section--image {
  position: relative;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(10rem, 14vw, 18rem);
}
.re-section--image .re-section__bg {
  position: absolute; inset: 0; z-index: -2;
}
.re-section--image .re-section__bg img,
.re-section--image .re-section__bg picture,
.re-section--image .re-section__bg > * {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.re-section--image::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--re-overlay, linear-gradient(180deg, rgba(14,28,57,0.55) 0%, rgba(14,28,57,0.75) 100%));
}
.re-section--image-dark::before     { background: linear-gradient(180deg, rgba(14,28,57,0.70) 0%, rgba(14,28,57,0.85) 100%); }
.re-section--image-light::before    { background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.80) 100%); }
.re-section--image-light            { color: var(--base); }
.re-section--image-gradient::before { background: linear-gradient(135deg, rgba(14,28,57,0.80) 0%, rgba(14,28,57,0.10) 60%, rgba(14,28,57,0.70) 100%); }

.re-section--image .re-section__content {
  position: relative;
  text-align: center;
  max-width: 70ch;
  margin: 0 auto;
}
.re-section--image .re-section__content--left  { text-align: left;  margin-inline: 0; }
.re-section--image .re-section__content--right { text-align: right; margin-left: auto; margin-right: 0; }

/* ------------------------------------------------------------
   SLIDESHOW (crossfade)
   ------------------------------------------------------------ */
.re-slideshow { position: absolute; inset: 0; }
.re-slideshow__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}
.re-slideshow__slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .re-slideshow__slide { transition: none; }
}

/* ------------------------------------------------------------
   FADE-BG — obrázek vpravo/vlevo fade do barvy sekce
   ------------------------------------------------------------ */
.re-fade-bg { position: relative; overflow: hidden; }
.re-fade-bg__img {
  position: absolute; top: 0; bottom: 0; width: 55%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 50%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 0%, #000 50%, transparent 100%);
}
.re-fade-bg__img--right {
  right: 0;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 50%, transparent 100%);
          mask-image: linear-gradient(270deg, #000 0%, #000 50%, transparent 100%);
}
.re-fade-bg__img--left { left: 0; }

/* ------------------------------------------------------------
   FEATURE STRIP — KPI / stats bar pod hero
   Bez bílých koleček; větší ikony; border mezi položkami.
   ------------------------------------------------------------ */
.re-featurestrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: var(--cream-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-m);
}
.re-featurestrip--plain { background: transparent; box-shadow: none; border-radius: 0; }
.re-featurestrip--cream-50  { background: var(--cream-50); }
.re-featurestrip--cream-200 { background: var(--cream-200); }

/* Full-bleed cream band – bez stínu, obsah v containeru */
.re-featurestrip-band {
  background: var(--cream-50);
  padding-block: var(--section-space-s);
}
.re-featurestrip-band--100 { background: var(--cream-100); }
.re-featurestrip-band--200 { background: var(--cream-200); }

.re-featurestrip__item {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-l) var(--space-xl);
  border-left: 1px solid rgba(14, 28, 57, 0.14);
  min-width: 0;
}
.re-featurestrip__item:first-child { border-left: 0; }

.re-featurestrip__icon {
  flex-shrink: 0;
  width: 7.2rem;
  height: 7.2rem;
  color: var(--base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.re-featurestrip__icon img,
.re-featurestrip__icon svg { width: 100%; height: 100%; }

.re-featurestrip__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.re-featurestrip__value {
  font-size: clamp(2.4rem, 1.6rem + 1.2vw, 3.2rem);
  font-weight: 700;
  color: var(--base);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.re-featurestrip__label {
  font-size: var(--text-s);
  color: color-mix(in srgb, var(--base) 70%, transparent);
  line-height: 1.35;
}

@media (max-width: 960px) { .re-featurestrip { grid-template-columns: 1fr 1fr; }
  .re-featurestrip__item:nth-child(3) { border-left: 0; }
  .re-featurestrip__item:nth-child(n+3) { border-top: 1px solid rgba(14,28,57,0.14); }
}
@media (max-width: 560px) { .re-featurestrip { grid-template-columns: 1fr; }
  .re-featurestrip__item { border-left: 0; }
  .re-featurestrip__item + .re-featurestrip__item { border-top: 1px solid rgba(14,28,57,0.14); }
}

/* Wave divider between sections — SVG as mask, flip with --dir */
.re-wave {
  display: block;
  width: 100%;
  height: 6rem;
  background-color: var(--re-wave-to, var(--cream));
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='M0,60 C240,10 480,110 720,60 C960,10 1200,110 1440,60 L1440,100 L0,100 Z'/></svg>");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='M0,60 C240,10 480,110 720,60 C960,10 1200,110 1440,60 L1440,100 L0,100 Z'/></svg>");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
}
.re-wave--flip { transform: scaleY(-1); }

/* ------------------------------------------------------------
   TYPOGRAFIE
   ------------------------------------------------------------ */
.re-h1, .re-h2, .re-h3, .re-h4 {
  font-family: var(--ff-sans);
  font-weight: var(--heading-font-weight);
  line-height: var(--heading-line-height);
  margin: 0;
  text-wrap: pretty;
}
.re-h1 { font-size: var(--h1-size); font-weight: 700; letter-spacing: -0.01em; }
.re-h2 { font-size: var(--h2-size); font-weight: 600; }
.re-h3 { font-size: var(--h3-size); font-weight: 700; }
.re-h4 { font-size: var(--h4-size); font-weight: 700; }

.re-eyebrow {
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 var(--space-s);
}
.re-text   { font-size: var(--text-m); line-height: var(--base-text-lh); margin: 0; }
.re-text--l { font-size: var(--text-l); }
.re-text--s { font-size: var(--text-s); }

.re-accent { color: var(--secondary); }
.re-signature {
  font-family: "Source Sans 3", cursive;
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-xl);
  color: var(--base);
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
a.re-btn,
a.re-btn:hover,
a.re-btn:focus,
a.re-btn:visited { text-decoration: none; }

.re-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.4rem 2.8rem;
  font: inherit;
  font-size: var(--btn-font-size, 1.6rem);
  font-weight: var(--btn-font-weight, 600);
  letter-spacing: var(--btn-letter-spacing, 0.02em);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--btn-radius, 5rem);
  border: 0.1rem solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-duration, 0.3s) var(--transition-timing, ease),
              color var(--transition-duration, 0.3s) var(--transition-timing, ease),
              border-color var(--transition-duration, 0.3s) var(--transition-timing, ease),
              transform var(--transition-duration, 0.3s) var(--transition-timing, ease),
              box-shadow var(--transition-duration, 0.3s) var(--transition-timing, ease);
  line-height: 1.2;
  white-space: nowrap;
}
.re-btn__arrow {
  display: inline-block;
  transition: transform var(--transition-duration, 0.3s) var(--transition-timing, ease);
}
.re-btn:hover .re-btn__arrow { transform: translateX(4px); }

/* Primary (filled blue pill) */
.re-btn--primary,
a.re-btn--primary,
a.re-btn--primary:visited {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.re-btn--primary:hover,
a.re-btn--primary:hover,
.re-btn--primary:focus,
a.re-btn--primary:focus {
  background: var(--action-hover, #1F47C9);
  border-color: var(--action-hover, #1F47C9);
  color: var(--white);
}
.re-btn--primary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 3px;
}

/* Outline (dark on light) */
.re-btn--outline,
a.re-btn--outline,
a.re-btn--outline:visited {
  background: transparent;
  color: var(--base);
  border-width: 0.2rem;
  border-color: var(--base);
}
.re-btn--outline:hover,
a.re-btn--outline:hover,
.re-btn--outline:focus,
a.re-btn--outline:focus {
  background: var(--base);
  color: var(--white);
  border-color: var(--base);
}

/* Outline light (light on dark) */
.re-btn--outline-light,
a.re-btn--outline-light,
a.re-btn--outline-light:visited {
  background: transparent;
  color: var(--white);
  border-width: 0.2rem;
  border-color: var(--white);
}
.re-btn--outline-light:hover,
a.re-btn--outline-light:hover,
.re-btn--outline-light:focus,
a.re-btn--outline-light:focus {
  background: var(--white);
  color: var(--base);
  border-color: var(--white);
}

/* Ghost (text + arrow) */
.re-btn--ghost,
a.re-btn--ghost,
a.re-btn--ghost:visited {
  background: transparent;
  color: var(--primary);
  padding: 0.6rem 0;
  border: 0;
  border-radius: 0;
  text-transform: uppercase;
}
.re-btn--ghost:hover,
a.re-btn--ghost:hover,
.re-btn--ghost:focus,
a.re-btn--ghost:focus { color: var(--action-hover, #1F47C9); background: transparent; }

.re-btn[disabled],
.re-btn--disabled {
  opacity: 0.4;
  pointer-events: none;
}
.re-btn--sm { padding: 1rem 2rem; font-size: var(--text-s); }
.re-btn--lg { padding: 1.8rem 3.6rem; }

/* ------------------------------------------------------------
   BADGE
   ------------------------------------------------------------ */
.re-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 5rem;
  background: var(--secondary);
  color: var(--white);
  line-height: 1.2;
}
.re-badge--primary { background: var(--primary); }
.re-badge--navy    { background: var(--base); }
.re-badge--outline {
  background: transparent;
  color: var(--base);
  border: 1px solid var(--border-color-dark);
}
.re-badge--sold {
  background: var(--base);
  color: var(--secondary);
}

/* Round gold "stamp" badge — 'Prověřeno & doporučeno', etc. */
.re-stamp {
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem;
  font-size: var(--text-s);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  box-shadow: var(--box-shadow-m);
}

/* ------------------------------------------------------------
   INPUT / FORM
   ------------------------------------------------------------ */
.re-field { display: flex; flex-direction: column; gap: 0.8rem; }
.re-field__label {
  font-size: clamp(1.5rem, calc(0.208vw + 1.433rem), 1.7rem);
  font-weight: 600;
  color: var(--base);
}
.re-field__hint { font-size: var(--text-s); color: color-mix(in srgb, var(--base) 65%, transparent); }
.re-input,
.re-select,
.re-textarea {
  width: 100%;
  padding: 1.4rem 1.6rem;
  font: inherit;
  font-size: var(--text-m);
  color: var(--base);
  background: var(--white);
  border: 1px solid var(--border-color-dark);
  border-radius: var(--radius);
  transition: var(--transition);
}
.re-input::placeholder,
.re-textarea::placeholder { color: color-mix(in srgb, var(--base) 45%, transparent); }
.re-input:focus,
.re-select:focus,
.re-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.re-textarea { min-height: 12rem; resize: vertical; }

/* Checkbox */
.re-check { display: inline-flex; gap: 1rem; align-items: center; cursor: pointer; user-select: none; }
.re-check__input { position: absolute; opacity: 0; pointer-events: none; }
.re-check__box {
  width: 2.2rem; height: 2.2rem;
  border: 1.5px solid var(--border-color-dark);
  border-radius: 0.4rem;
  background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.re-check__input:checked + .re-check__box {
  background: var(--primary);
  border-color: var(--primary);
}
.re-check__input:checked + .re-check__box::after {
  content: "";
  width: 0.6rem; height: 1.1rem;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */
.re-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--box-shadow-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-duration) var(--transition-timing),
              box-shadow var(--transition-duration) var(--transition-timing);
}
.re-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-l);
}

/* Property card */
.re-property {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-m);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-duration) var(--transition-timing),
              box-shadow var(--transition-duration) var(--transition-timing);
}
.re-property:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-l);
}
.re-property__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream);
  overflow: hidden;
}
.re-property__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.re-property:hover .re-property__media img { transform: scale(1.04); }

.re-property__watermark {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.re-property__badges {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  display: flex;
  gap: 0.8rem;
}
.re-property__body {
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.re-property__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--base);
  margin: 0;
  line-height: 1.25;
}
.re-property__location {
  font-size: var(--text-s);
  color: color-mix(in srgb, var(--base) 70%, transparent);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.re-property__meta {
  display: flex;
  gap: var(--space-s);
  padding-block: var(--space-s) 0;
  margin-top: var(--space-s);
  border-top: 1px solid var(--border-color-dark);
  font-size: var(--text-s);
  color: color-mix(in srgb, var(--base) 75%, transparent);
}
.re-property__meta-item { display: inline-flex; gap: 0.4rem; align-items: center; }
.re-property__price {
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--base);
  margin-top: 0.6rem;
}
.re-property__price-sub {
  font-size: var(--text-s);
  color: color-mix(in srgb, var(--base) 60%, transparent);
  font-weight: 500;
}
.re-property--sold .re-property__media::after {
  content: "";
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--base) 50%, transparent);
}

/* ------------------------------------------------------------
   NAV / HEADER
   ------------------------------------------------------------ */
.re-nav {
  position: relative;
  z-index: 10;
}
.re-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 2.4rem;
  gap: var(--space-l);
}
.re-nav__logo img { height: 4.2rem; width: auto; }
.re-nav__links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  margin: 0; padding: 0;
  font-size: var(--text-s);
}
.re-nav__link {
  color: var(--base);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: var(--transition);
}
.re-nav__link:hover,
.re-nav__link--active { color: var(--primary); }
.re-nav--on-dark .re-nav__link { color: var(--white); }
.re-nav--on-dark .re-nav__link:hover,
.re-nav--on-dark .re-nav__link--active { color: var(--secondary); }

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.re-hero {
  position: relative;
  background: var(--base);
  color: var(--white);
  overflow: hidden;
  padding-block: clamp(8rem, 12vw, 14rem) clamp(10rem, 16vw, 18rem);
}
.re-hero__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background: url("assets/pattern/roi-pattern.svg") center / 90rem no-repeat;
  color: var(--secondary);
}
.re-hero__pattern svg .cls-1 { fill: none; stroke: var(--secondary); stroke-width: 0.6; }
.re-hero__eyebrow {
  color: var(--secondary);
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
}
.re-hero__eyebrow::before {
  content: ""; width: 4rem; height: 1px; background: var(--secondary);
  display: inline-block;
}
.re-hero__title {
  font-size: var(--h1-size);
  font-weight: 700;
  line-height: 1.08;
  margin: var(--space-m) 0 var(--space-l);
  max-width: 22ch;
  text-wrap: balance;
}
.re-hero__title em { font-style: normal; color: var(--secondary); }
.re-hero__lead {
  font-size: var(--text-l);
  max-width: 58ch;
  color: color-mix(in srgb, var(--white) 85%, transparent);
  margin: 0 0 var(--space-xl);
}
.re-hero__actions { display: flex; gap: var(--space-m); flex-wrap: wrap; }

/* CTA section (footer-style) */
.re-cta {
  position: relative;
  padding-block: var(--section-space-xl);
  background: var(--base);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
.re-cta__inner { max-width: 70ch; margin: 0 auto; position: relative; }
.re-cta__title {
  font-size: clamp(3rem, 1.8rem + 2.4vw, 4.4rem);
  font-weight: 700;
  margin: 0 0 var(--space-m);
  line-height: 1.12;
}
.re-cta__lead {
  font-size: var(--text-l);
  color: color-mix(in srgb, var(--white) 82%, transparent);
  margin: 0 0 var(--space-xl);
}
.re-cta__actions { display: inline-flex; gap: var(--space-m); flex-wrap: wrap; justify-content: center; }

/* ------------------------------------------------------------
   GRID PATTERNS
   ------------------------------------------------------------ */
.re-grid { display: grid; gap: var(--space-xl); }
.re-grid--properties {
  grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
}
.re-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
}

/* ------------------------------------------------------------
   ICON TOKENS
   ------------------------------------------------------------ */
.re-icon {
  width: 6.4rem;
  height: 6.4rem;
  display: inline-block;
  color: var(--base);   /* mapped to .cls-1 via tokens.css fallback */
}
.re-icon svg { width: 100%; height: 100%; }
.re-icon--lg { width: 9.6rem; height: 9.6rem; }
.re-icon--sm { width: 3.2rem; height: 3.2rem; }
.re-icon--on-dark { color: var(--white); --svg-accent: var(--secondary); }
.re-icon--primary { color: var(--primary); --svg-accent: var(--secondary); }

/* ------------------------------------------------------------
   MISC
   ------------------------------------------------------------ */
.re-divider {
  height: 1px;
  background: var(--border-color-dark);
  border: 0;
}
