/* =============================================================================
   home.css — Front page styles for fan-construcoes_2026
   Covers: hero, developments carousel, financing form, fanflix carousel,
           history section, blog preview, logos marquee.
   ============================================================================= */

/* ── Hero ──────────────────────────────────────────────────────────────────── */
#hero { position: relative; height: 100vh; min-height: 600px; max-height: 800px; overflow: hidden; }
.hero__track { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.hero__slide--active { opacity: 1; pointer-events: auto; }
.hero__bg { height: 100%; inset: -10% 0; will-change: transform; }
.hero__bg picture { display: block; width: 100%; height: 100%; }
.hero__bg img,
.hero__bg video { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero__bg video { display: block; }

/* Ken Burns: leve zoom automático nas imagens do slide, sem precisar de hover */
.hero__slide--active .hero__bg img:not(.hero__poster) { animation: hero-zoom 6s ease-out forwards; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .hero__slide--active .hero__bg img:not(.hero__poster) { animation: none; }
}
.hero__youtube {
  position: absolute; top: 50%; left: 50%;
  width: max(100%, 177.78vh); height: max(100%, 56.25vw);
  transform: translate(-50%, -50%); border: 0; pointer-events: none;
}
.hero__poster { position: absolute; inset: 0; z-index: 0; }
.hero__deco { position: absolute; bottom: 24px; right: 24px; width: 360px; height: 360px; pointer-events: none; }
.hero__deco img { width: 100%; height: 100%; }
.hero__content { position: absolute; bottom: 80px; left: var(--pp); max-width: 845px; }
.hero__eyebrow {
  font-size: 16px; font-weight: 700; color: white; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 19px;
  text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 2px 12px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(20px); animation: hero-fade-up .7s .3s forwards;
}
.hero__title {
  font-size: 56px; font-weight: 900; color: white; line-height: 1.15; margin-bottom: 32px;
  text-shadow: 0 2px 4px rgba(0,0,0,.6), 0 4px 20px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(20px); animation: hero-fade-up .7s .5s forwards;
}
.btn-glass {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 24px; background: rgba(0,0,0,.4); border-radius: var(--r);
  font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(8px);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  opacity: 0; transform: translateY(20px); animation: hero-fade-up .7s .7s forwards;
}
.btn-glass:hover { border-color: var(--v); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.hero__dots { position: absolute; bottom: 24px; left: var(--pp); display: flex; gap: 8px; align-items: center; }
@keyframes hero-fade-up { to { opacity: 1; transform: translateY(0); } }

/* ── Developments carousel ─────────────────────────────────────────────────── */
#developments { overflow: visible; }
#developments .grid--mb48 { position: relative; z-index: 30; }
#developments .col-12 { position: relative; z-index: 1; }
.home-dev-filter { position: relative; z-index: 5; }
.home-dev-filter.is-open .btn-filter__arrow { transform: rotate(225deg); margin-top: 5px; }
.home-dev-filter__panel {
  position: absolute; top: calc(100% + 12px); left: 0; width: 200px; padding: 8px;
  background: white; border: 1px solid var(--g03); border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,.14); opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: opacity var(--t), transform var(--t), visibility var(--t);
  overflow: hidden;
}
.home-dev-filter.is-open .home-dev-filter__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.home-dev-filter__option {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; padding: 6px 10px; border-radius: 4px; color: var(--preto); font-size: 13px;
  font-weight: 600; text-align: left; transition: background var(--t), color var(--t);
}
.home-dev-filter__option + .home-dev-filter__option { margin-top: 2px; }
.home-dev-filter__option:hover,
.home-dev-filter__option.is-active { background: rgba(255,0,0,.08); color: var(--v); }
.dev-carousel__viewport { overflow: hidden; }
.dev-carousel__track { display: flex; gap: var(--gap); transition: transform .5s cubic-bezier(.4,0,.2,1); }

.dev-card {
  flex: 0 0 calc((100% - var(--gap)) / 2); aspect-ratio: 592 / 480; border-radius: var(--rl);
  overflow: hidden; position: relative; background: var(--g01); cursor: pointer;
}
.dev-card[hidden] { display: none; }
.dev-card__img { position: absolute; inset: -20px 0; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.dev-card__img img { width: 100%; height: calc(100% + 40px); object-fit: cover; }
.dev-card:hover .dev-card__img { transform: scale(1.05); }

.dev-card__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 15%, rgba(0,0,0,.9) 100%); }

.dev-card__badge {
  position: absolute; top: 24px; left: 32px; color: white; font-size: 13px; font-weight: 500;
  text-transform: uppercase; padding: 8px 12px; border-radius: var(--r);
  transition: transform var(--t);
}
.dev-card:hover .dev-card__badge { transform: translateY(-2px); }
.dev-card__badge--launch   { background: var(--v); }
.dev-card__badge--construction { background: #ff6b00; }
.dev-card__badge--ready { background: #0f766e; }
.dev-card__badge--delivered { background: var(--v); }
.dev-card__badge--available { background: #1d4ed8; }
.dev-card__badge--sold     { background: var(--g07); }
.dev-card__badge[style*="--status-color"] { background: var(--status-color); }

.dev-card__body { position: absolute; bottom: 32px; left: 32px; right: 32px; }
.dev-card__location { font-size: 14px; font-weight: 500; color: white; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.dev-card__name { font-size: 32px; font-weight: 700; color: white; line-height: 1.15; margin-bottom: 15px; }
.dev-card__specs { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.4); }
.dev-card__spec { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dev-card__spec-icon { width: 18px; height: 18px; }
.dev-card__spec-icon img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.dev-card__spec-text { font-size: 14px; font-weight: 300; color: white; white-space: nowrap; }
.carousel-empty {
  padding: 24px; border: 1px dashed var(--g04); border-radius: var(--r);
  color: var(--g08); text-align: center; background: var(--g01); margin-top: 16px;
}
.carousel-dots button { border: 0; padding: 0; font-size: 0; }
.btn-arrow:disabled { opacity: .35; pointer-events: none; }

/* ── Financing section ─────────────────────────────────────────────────────── */
#financing { background: var(--ve); }
.financing__icon { width: 32px; height: 32px; filter: brightness(0) invert(1); }
.financing__title { font-size: 48px; font-weight: 500; color: white; line-height: 1.2; }
.financing__text  { font-size: 16px; color: rgba(255,255,255,.9); line-height: 1.4; }
.financing__note  { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.4; margin-top: auto; padding-top: 24px; }

.financing-steps { display: flex; align-items: center; margin-bottom: 40px; }
.financing-step {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 500; flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.financing-step--active   { background: white; color: var(--preto); }
.financing-step--inactive { background: #780000; color: white; }
.financing-line { flex: 1; height: 2px; background: rgba(255,255,255,.2); transition: background .4s; }

.financing-form { display: flex; flex-direction: column; gap: 20px; }
.financing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.financing-field { margin-bottom: 0; }
.financing-label { font-size: 16px; font-weight: 500; color: rgba(255,255,255,.9); display: block; margin-bottom: 8px; }
.financing-input {
  width: 100%; padding: 10px 16px; background: white; border: none; border-radius: 4px;
  font-size: 16px; color: var(--preto); outline: none; font-family: inherit;
  transition: box-shadow var(--t);
}
.financing-input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.financing-input::placeholder { color: var(--g06); }
.financing-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--g08) 50%), linear-gradient(135deg, var(--g08) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.financing-input.field--error { box-shadow: 0 0 0 3px rgba(255,255,255,.4), 0 0 0 5px rgba(255,0,0,.45); }
.error-msg { display: block; color: white; font-size: 12px; font-weight: 600; margin-top: 6px; }

.financing-radios { display: flex; gap: 16px; }
.financing-radio  { display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.financing-radio input { position: absolute; opacity: 0; pointer-events: none; }
.financing-radio__dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5);
  position: relative; flex-shrink: 0; transition: border-color var(--t), background var(--t);
}
.financing-radio__dot--checked { background: white; border-color: #780000; }
.financing-radio__dot--checked::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #780000;
}
.financing-radio__label { font-size: 16px; font-weight: 500; color: rgba(255,255,255,.9); }

.financing-consent { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; }
.financing-consent__input { position: absolute; opacity: 0; pointer-events: none; }
.financing-consent__box {
  width: 12px; height: 12px; border: 1px solid var(--g03); border-radius: 2px;
  cursor: pointer; flex-shrink: 0; transition: background var(--t);
}
.financing-consent__input:checked + .financing-consent__box { background: white; border-color: white; }
.financing-consent.field--error .financing-consent__box { box-shadow: 0 0 0 3px rgba(255,255,255,.35); border-color: white; }
.financing-consent__text { font-size: 14px; color: white; line-height: 1.4; }

.btn-financing {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px; background: rgba(0,0,0,.4); border-radius: var(--r);
  font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.1); transition: background var(--t), transform var(--t);
}
.btn-financing:hover { background: rgba(0,0,0,.65); transform: translateY(-2px); }
.btn-financing--ghost { background: transparent; }

.financing-result-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; }
.financing-result-modal.is-open { display: flex; }
.financing-result-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.financing-result-modal__box {
  position: relative; z-index: 1; width: min(720px, 100%); max-height: calc(100vh - 48px);
  overflow: auto; background: white; border-radius: var(--r); padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.financing-result-modal__close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: var(--r);
  color: var(--preto); transition: background var(--t), color var(--t);
}
.financing-result-modal__close:hover { background: var(--g01); color: var(--v); }
.financing-result-modal__close svg { width: 20px; height: 20px; }
.financing-result-modal__title { font-size: 32px; font-weight: 700; color: var(--preto); line-height: 1.2; margin-bottom: 24px; padding-right: 48px; }
.financing-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.financing-result-card { border: 1px solid var(--g03); border-radius: var(--r); padding: 16px; background: var(--g01); }
.financing-result-card--full { grid-column: span 2; background: var(--ve); color: white; }
.financing-result-card p { font-size: 13px; color: var(--g08); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.financing-result-card--full p { color: rgba(255,255,255,.7); }
.financing-result-card strong { display: block; font-size: 24px; color: var(--preto); line-height: 1.2; }
.financing-result-card--full strong { color: white; font-size: 32px; }
.financing-result-modal__note { font-size: 14px; color: var(--g08); line-height: 1.5; margin-top: 18px; }
.financing-result-modal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.financing-result-modal__actions .btn-financing { background: var(--ve); }
.financing-result-modal__actions .btn-financing--ghost { background: white; color: var(--ve); border-color: var(--ve); }

/* ── FanFlix carousel ──────────────────────────────────────────────────────── */
.video-carousel__viewport { overflow: hidden; }
.video-carousel__track { display: flex; gap: var(--gap); transition: transform .5s cubic-bezier(.4,0,.2,1); }

.video-card {
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3); aspect-ratio: 384 / 520;
  border-radius: var(--rl); overflow: hidden; position: relative; cursor: pointer;
}
.video-card__img { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.video-card__img img { width: 100%; height: 100%; object-fit: cover; }
.video-card:hover .video-card__img { transform: scale(1.05); }

.video-card__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 15%, rgba(0,0,0,.9) 100%); }

.video-card__play {
  position: absolute; top: calc(50% - 42px); left: 50%; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.7); padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--t), transform var(--t);
}
.video-card:hover .video-card__play { background: rgba(255,255,255,.85); transform: translateX(-50%) scale(1.1); }
.video-card__play-icon { width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 18px solid var(--preto); margin-left: 4px; }
.video-card__media { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.video-card.is-playing .video-card__play { z-index: 6; top: 16px; right: 16px; left: auto; width: 42px; height: 42px; transform: none; background: #181818; border-color: rgba(255,255,255,.75); }
.video-card.is-playing .video-card__play:hover { transform: none; background: rgba(255,0,0,.85); }
.video-card.is-playing .video-card__play-icon { position: relative; display: block; width: 20px; height: 20px; border: 0; margin: 0; }
.video-card.is-playing .video-card__play-icon::before,
.video-card.is-playing .video-card__play-icon::after { content: ''; position: absolute; top: 50%; left: 50%; width: 22px; height: 2px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); transform-origin: center; }
.video-card.is-playing .video-card__play-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }

.video-card__duration {
  position: absolute; top: 24px; left: 32px; background: var(--v); color: white;
  font-size: 13px; font-weight: 500; text-transform: uppercase; padding: 8px 12px;
  border-radius: var(--r); transition: transform var(--t);
}
.video-card:hover .video-card__duration { transform: translateY(-2px); }

.video-card__body { position: absolute; bottom: 32px; left: 32px; right: 32px; transition: transform var(--t); }
.video-card:hover .video-card__body { transform: translateY(-4px); }
.video-card__title { font-size: 32px; font-weight: 700; color: white; line-height: 1.2; margin-bottom: 15px; }
.video-card__views { font-size: 14px; font-weight: 300; color: white; }

/* ── History section ───────────────────────────────────────────────────────── */
#history { background: #181818; overflow: visible; position: relative; clip-path: inset(-28px 0 0 0); }
.history__wrapper { display: flex; align-items: center; min-height: 659px; position: relative; }

.history__content {
  position: relative; z-index: 3; max-width: 592px;
  display: flex; flex-direction: column; gap: 48px; padding: 80px 0;
}
.history__eyebrow { font-size: 16px; font-weight: 700; color: #ff2e2e; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 24px; }
.history__title   { font-size: 40px; font-weight: 700; color: white; line-height: 1.2; }
.history__text    { font-size: 16px; color: #e6e6e7; line-height: 1.4; margin-top: 24px; }
.history__text strong { font-weight: 700; }

.history__stats { display: flex; gap: 24px; }
.stat-card { border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 16px 24px; transition: border-color var(--t), transform var(--t); }
.stat-card:hover { border-color: rgba(255,45,46,.5); transform: translateY(-2px); }
.stat-card__value { font-size: 32px; font-weight: 700; color: #ff2e2e; line-height: 1.2; margin-bottom: 8px; }
.stat-card__label { font-size: 14px; font-weight: 500; color: var(--g02); text-transform: uppercase; letter-spacing: .06em; }

.history__image {
  position: absolute; right: 0; bottom: 0;
  width: auto; height: calc(100% + 40px);
  pointer-events: none;
}
.history__image img {
  height: 110%; width: auto; max-width: none;
  display: block; margin-left: auto;
}

/* ── Blog section (home preview) ───────────────────────────────────────────── */
#blog-home { background: white; }

.blog-sidebar__subtitle { font-size: 16px; color: var(--g08); margin-top: 16px; line-height: 1.4; }

.blog-card { cursor: pointer; }
.blog-card__img { height: 220px; overflow: hidden; border-radius: var(--rl); margin-bottom: 24px; }
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.blog-card:hover .blog-card__img img { transform: scale(1.10); }

.blog-card__body { display: flex; flex-direction: column; gap: 19px; }
.blog-card__title { font-size: 24px; font-weight: 500; color: var(--preto); line-height: 1.2; transition: color var(--t); }
.blog-card:hover .blog-card__title { color: var(--v); }
.blog-card__excerpt { font-size: 16px; color: var(--g08); line-height: 1.4; }
.blog-card__link {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700;
  color: var(--preto); text-transform: uppercase; letter-spacing: .06em; transition: color var(--t);
}
.blog-card:hover .blog-card__link { color: var(--v); }
.blog-card__link img,
.blog-card__link svg { width: 16px; height: 16px; flex-shrink: 0; transition: filter var(--t), transform var(--t); }
.blog-card:hover .blog-card__link img,
.blog-card:hover .blog-card__link svg { transform: translateX(4px); }
.blog-card:hover .blog-card__link img {
  filter: invert(13%) sepia(96%) saturate(7494%) hue-rotate(3deg) brightness(95%);
}

/* Logos marquee → global.css */

/* ── Filter dropdown ──────────────────────────────────────────────────────── */
.filter-select { position: relative; z-index: 2; display: inline-block; }
#developments .col--row-end { gap: 24px; }
.filter-select::after {
  content: ''; position: absolute; top: 50%; right: 16px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--preto); border-bottom: 2px solid var(--preto);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
  transition: border-color var(--t);
}
.filter-select:hover::after { border-color: var(--v); }

/* ── Dev modal ──────────────────────────────────────────────────────────── */
.dev-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.dev-modal.is-open { opacity: 1; pointer-events: auto; }
.dev-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.85);
}
.dev-modal__box {
  position: relative; width: min(1000px, 90vw);
  max-height: 85vh; border-radius: var(--rl);
  background: #000; overflow: hidden;
  transform: scale(.92); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.dev-modal.is-open .dev-modal__box { transform: scale(1); }
.dev-modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.5); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white;
  transition: background var(--t);
}
.dev-modal__close:hover { background: rgba(255,0,0,.8); }
.dev-modal__close svg { width: 20px; height: 20px; }
.dev-modal__content {
  position: relative; width: 100%; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
}
.dev-modal__content iframe {
  width: 100%; height: 100%; border: none;
}
.dev-modal__content img {
  width: 100%; height: 100%; object-fit: cover;
}

.financing__info { display: flex; flex-direction: column; gap: 24px; }
.history__container { width: 100%; }
.blog-sidebar__cta { margin-top: 64px; width: fit-content; }
.blog-card--offset { padding-top: 64px; }
.hero__bg--mobile { display: none; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #developments .col-7,
  #developments .col-5 { grid-column: span 12; }
  #financing .col-4,
  #financing .col-7 { grid-column: span 12; }
  #blog-home .col-4,
  #blog-home .col-4:first-child { grid-column: span 12; }
  #blog-home .blog-card--offset { padding-top: 0 !important; }
  .history__image { height: calc(100% + 25px); }
  .dev-card { flex: 0 0 calc(80% - 16px); }
  .video-card { flex: 0 0 calc(90% - 21.5px); }
}
@media (max-width: 640px) {
  .hero__bg--desktop { display: none; }
  .hero__bg--mobile  { display: block; }
  .hero__title  { font-size: 32px; }
  .hero__deco   { display: none; }
  .home-dev-filter,
  .home-dev-filter .btn-filter,
  .home-dev-filter__panel { width: 100%; }
  .home-dev-filter__panel { left: 0; right: auto; }
  #developments .col--row-end { align-items: stretch; }
  .financing-grid,
  .financing-result-grid { grid-template-columns: 1fr; }
  .financing-result-card--full { grid-column: span 1; }
  .financing-result-modal__box { padding: 24px; }
  .financing-result-modal__title { font-size: 26px; }
  .financing-result-card--full strong { font-size: 26px; }
  .financing__title { font-size: 32px; }
  .dev-card, .video-card { flex: 0 0 100%; }
  .history__image { display: none; }
  #developments .col--row-end { flex-direction: column; align-items: stretch; }
  #developments .col--row-end .btn-outline { width: 100%; text-align: center; }
  #developments .col--row-end .filter-select { width: 100%; }
  #developments .col--row-end .btn-filter { width: 100%; }
}
@media (max-width: 1100px) {

}