/* =====================================================================
   SITE PÚBLICO
   Depende de base.css (cores, fontes e componentes básicos).
   ===================================================================== */

/* ---------------------------------------------------------------------
   LAYOUT: topo, rodapé, seções
   --------------------------------------------------------------------- */
@layer layout {
  .skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 200; padding: var(--s-2) var(--s-4); background: var(--ink); color: var(--white); border-radius: var(--radius); }
  .skip-link:focus { top: var(--s-2); }

  site-header { display: block; position: sticky; top: 0; z-index: 100; }
  .site-header { background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
  .site-header__bar { display: flex; align-items: center; gap: var(--s-6); height: var(--header-h); }
  .site-header__logo img { width: 132px; }
  .site-header__toggle { display: none; margin-left: auto; color: var(--ink); }
  .site-header__toggle .icon { width: 26px; height: 26px; }

  .site-nav { display: flex; align-items: center; gap: var(--s-6); flex: 1; }
  .site-nav ul { display: flex; gap: var(--s-5); list-style: none; padding: 0; }
  .site-nav ul a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: var(--s-2) 0; border-bottom: 2px solid transparent; }
  .site-nav ul a:hover { color: var(--blue); }
  .site-nav ul a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--ipe); }
  .site-nav__contact { display: flex; align-items: center; gap: var(--s-4); margin-left: auto; }
  .site-nav__phone { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }

  @media (max-width: 1100px) {
    .site-nav__phone { display: none; }
    .site-nav ul { gap: var(--s-4); }
  }
  @media (max-width: 960px) {
    :root { --header-h: 64px; }
    /* backdrop-filter prenderia o menu (position: fixed) dentro do topo; no celular o topo fica branco sólido */
    .site-header { backdrop-filter: none; background: var(--white); }
    .site-header__toggle { display: inline-flex; }
    .site-nav {
      position: fixed; inset: var(--header-h) 0 0; z-index: 99;
      flex-direction: column; align-items: stretch; gap: var(--s-6);
      padding: var(--s-5) 1.25rem var(--s-7); background: var(--white); overflow-y: auto;
      visibility: hidden; opacity: 0; transform: translateY(-8px);
      transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s 0.2s;
    }
    .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s, transform 0.2s var(--ease); }
    .nav-open { overflow: hidden; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav ul a { display: block; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font-size: var(--step-1); font-variation-settings: 'wdth' var(--wide); }
    .site-nav ul a[aria-current='page'] { border-bottom-color: var(--line); color: var(--blue); }
    .site-nav__contact { margin: 0; flex-direction: column; align-items: stretch; }
    .site-nav__phone { display: inline-flex; justify-content: center; min-height: 44px; }
  }

  .site-footer { margin-top: var(--s-9); background: var(--ink); color: #c4d0dd; font-size: 0.9375rem; }
  .site-footer a { color: #e7eef5; text-decoration: none; }
  .site-footer a:hover { color: var(--ipe); }
  .site-footer h2 { font-size: var(--step-0); color: var(--white); margin-bottom: var(--s-4); }
  .site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: var(--s-7); padding-block: var(--s-8) var(--s-7); }
  .site-footer__brand img { width: 150px; filter: brightness(0) invert(1); margin-bottom: var(--s-4); }
  .site-footer__brand p { max-width: 30ch; }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
  .site-footer address { font-style: normal; display: grid; gap: var(--s-3); align-content: start; }
  .site-footer address a, .site-footer address p { display: flex; gap: var(--s-3); align-items: flex-start; }
  .site-footer address .icon { margin-top: 0.15em; color: var(--ipe); }
  .social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
  .social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; }
  .social a:hover { border-color: var(--ipe); }
  .site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); padding-block: var(--s-5); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: var(--step--1); }
  .site-footer__legal p { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
  @media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }
  @media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

  .whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 90;
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--whatsapp); color: var(--white); box-shadow: 0 6px 20px rgba(13, 36, 64, 0.25);
  }
  .whatsapp-float:hover { color: var(--white); background: #178a45; }
  .whatsapp-float .icon { width: 28px; height: 28px; }

  main { display: block; }
  .section { padding-block: var(--s-8) 0; }
  .section__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap; }
  .section__head p { color: var(--muted); max-width: 60ch; margin-top: var(--s-2); }
  .link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; text-decoration: none; }

  /* Cabeçalho das páginas internas */
  .page-head { padding-block: var(--s-7) var(--s-6); border-bottom: 1px solid var(--line); background: var(--white); }
  .page-head h1 { font-size: var(--step-4); }
  .page-head p { color: var(--muted); max-width: 62ch; margin-top: var(--s-3); font-size: 1.0625rem; }
  .breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin-bottom: var(--s-3); font-size: var(--step--1); color: var(--muted); }
  .breadcrumb li + li::before { content: '/'; margin-right: var(--s-2); color: #a6b3c1; }
  .breadcrumb a { color: var(--muted); }
  .breadcrumb--page { margin-top: var(--s-5); }
  .divider { border: 0; border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------------
   COMPONENTES DO SITE
   --------------------------------------------------------------------- */
@layer ui {
  /* Cartão de imóvel */
  .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--s-6) var(--s-5); }
  .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.15s; }
  .card:hover { border-color: #aebdcc; }
  .card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
  .card__link:hover { color: inherit; }
  .card__media { position: relative; aspect-ratio: 4 / 3; background: var(--sky); overflow: hidden; }
  .card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
  .card:hover .card__media img { transform: scale(1.03); }
  .card__badge { position: absolute; left: var(--s-3); top: var(--s-3); }
  .card__body { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4) var(--s-4) var(--s-5); flex: 1; }
  .card__price { font-variation-settings: 'wdth' var(--wide); font-weight: 700; font-size: var(--step-1); color: var(--ink); }
  .card__title { font-size: 1rem; font-weight: 500; font-variation-settings: 'wdth' 100; letter-spacing: 0; line-height: 1.35; color: var(--text); }
  .card__place { color: var(--muted); font-size: 0.875rem; }
  .card .specs { margin-top: auto; padding-top: var(--s-3); }

  .specs { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); list-style: none; padding: 0; font-size: 0.875rem; color: var(--ink); }
  .specs li { display: inline-flex; align-items: center; gap: var(--s-1); }
  .specs .icon { color: var(--blue); width: 1.1em; height: 1.1em; }

  /* Paginação */
  .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-7); }
  .pagination button { min-width: 44px; height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-weight: 600; }
  .pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
  .pagination button[aria-current='page'] { background: var(--ink); border-color: var(--ink); color: var(--white); }
  .pagination button:disabled { opacity: 0.4; cursor: default; }

  /* Formulários de contato */
  .form-card { display: grid; gap: var(--s-4); padding: var(--s-6); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .form-card h2 { font-size: var(--step-2); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
  .form-legal { font-size: var(--step--1); color: var(--muted); }
  @media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .form-card { padding: var(--s-5); } }

  /* Texto corrido (páginas legais e "sobre") */
  .prose { max-width: 68ch; }
  .prose h2 { font-size: var(--step-2); margin: var(--s-7) 0 var(--s-3); }
  .prose p, .prose ul { margin-bottom: var(--s-4); }
  .prose ul { padding-left: 1.25rem; }
}

/* ---------------------------------------------------------------------
   PÁGINAS
   --------------------------------------------------------------------- */
@layer pages {
  /* ===== Início ===== */
  .hero { padding-block: var(--s-8) var(--s-7); background: linear-gradient(180deg, var(--white) 0%, var(--paper) 100%); overflow: hidden; }
  .hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-8); align-items: center; }
  .hero h1 { font-size: var(--step-5); font-variation-settings: 'wdth' 118; letter-spacing: -0.025em; max-width: 14ch; }
  .hero__lede { margin-top: var(--s-5); font-size: 1.125rem; color: var(--muted); max-width: 48ch; }

  .hero-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--s-2); align-items: end; margin-top: var(--s-7); padding: var(--s-3); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 18px 40px -24px rgba(13, 36, 64, 0.35); }
  .hero-search .field > span { padding-left: var(--s-1); }
  .hero-search .input { border-color: transparent; background-color: var(--paper); }
  .hero-search .btn { min-height: 44px; }

  /* A foto em hexágono com "profundidade" é a assinatura visual: o mesmo desenho do logo */
  .hex { position: relative; width: min(100%, 470px); margin-inline: auto; aspect-ratio: 0.866; }
  .hex::before, .hex::after, .hex img { position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
  .hex::before { content: ''; background: var(--ink); transform: translate(-7%, 5%); }
  .hex::after { content: ''; background: var(--blue); transform: translate(-3.5%, 2.5%); }
  .hex img { z-index: 1; width: 100%; height: 100%; object-fit: cover; }
  .hex figcaption { position: absolute; z-index: 2; right: 4%; bottom: 14%; max-width: 220px; padding: var(--s-3) var(--s-4); background: var(--white); border-radius: var(--radius); box-shadow: 0 10px 30px -12px rgba(13, 36, 64, 0.4); font-size: 0.875rem; }
  .hex figcaption strong { display: block; font-variation-settings: 'wdth' var(--wide); color: var(--ink); font-size: var(--step-1); }
  .hex figcaption a { text-decoration: none; color: inherit; }

  @media (max-width: 960px) {
    .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
    .hero-search { grid-template-columns: 1fr 1fr; }
    .hero-search .btn { grid-column: 1 / -1; }
    .hex { width: min(78%, 380px); }
  }
  @media (max-width: 560px) {
    .hero { padding-top: var(--s-6); }
    .hero-search { grid-template-columns: 1fr; }
  }

  /* Índice de categorias: os números de imóveis são a informação principal */
  .category-index { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .category-index a { display: grid; gap: var(--s-1); padding: var(--s-5) var(--s-4); text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); transition: background-color 0.15s; }
  .category-index li:first-child a { border-left: 0; }
  .category-index a:hover { background: var(--white); color: var(--blue); }
  .category-index strong { font-size: var(--step-4); font-variation-settings: 'wdth' 125; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
  .category-index span { font-weight: 500; }
  .category-index ul { display: contents; }
  .category-index li { list-style: none; }
  @media (max-width: 860px) {
    .category-index { grid-template-columns: repeat(3, 1fr); }
    .category-index li:nth-child(4) a { border-left: 0; }
    .category-index li:nth-child(n+4) a { border-top: 1px solid var(--line); }
  }
  @media (max-width: 480px) {
    .category-index { grid-template-columns: 1fr 1fr; }
    .category-index li a { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
    .category-index li:nth-child(odd) a { border-left: 0; }
    .category-index li:nth-child(-n+2) a { border-top: 0; }
  }

  /* Faixa "desde 1986" */
  .story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--s-8); align-items: center; }
  .story img { border-radius: var(--radius-lg); }
  .story h2 { font-size: var(--step-4); max-width: 16ch; }
  .story p { margin-top: var(--s-4); color: var(--muted); max-width: 56ch; font-size: 1.0625rem; }
  .facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s-7); margin-top: var(--s-6); padding: 0; list-style: none; }
  .facts strong { display: block; font-size: var(--step-4); font-variation-settings: 'wdth' 125; font-weight: 800; color: var(--blue); line-height: 1; }
  .facts span { color: var(--muted); font-size: 0.9375rem; }
  @media (max-width: 860px) {
    .story { grid-template-columns: 1fr; gap: var(--s-6); }
    .story img { max-width: 360px; }
    .facts { gap: var(--s-5); }
  }

  /* Empreendimentos (mosaico de fotos com legenda) */
  .ventures { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
  .venture { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; color: var(--white); text-decoration: none; background: var(--ink); }
  .venture img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.4s var(--ease), opacity 0.2s; }
  .venture:hover img { transform: scale(1.03); opacity: 0.7; }
  .venture__text { position: absolute; inset: auto 0 0; padding: var(--s-8) var(--s-5) var(--s-5); background: linear-gradient(transparent, rgba(13, 36, 64, 0.9)); }
  .venture h3 { color: var(--white); font-size: var(--step-2); }
  .venture p { color: #d9e3ee; font-size: 0.9375rem; }
  .venture:hover { color: var(--white); }

  /* Chamada final (fundo escuro) */
  .cta-band { margin-top: var(--s-9); background: var(--ink); color: #c9d5e2; }
  .cta-band .container { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-7); align-items: center; padding-block: var(--s-8); }
  .cta-band h2 { color: var(--white); font-size: var(--step-4); max-width: 18ch; }
  .cta-band p { margin-top: var(--s-4); max-width: 52ch; font-size: 1.0625rem; }
  .cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: flex-end; }
  [data-page='home'] .site-footer { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  @media (max-width: 860px) {
    .cta-band .container { grid-template-columns: 1fr; }
    .cta-band__actions { justify-content: flex-start; }
  }

  /* ===== Busca de imóveis ===== */
  .listing { display: grid; grid-template-columns: 280px 1fr; gap: var(--s-7); align-items: start; padding-top: var(--s-6); }
  .filters { position: sticky; top: calc(var(--header-h) + var(--s-4)); display: grid; gap: var(--s-4); }
  .filters fieldset { border: 0; padding: 0; display: grid; gap: var(--s-2); }
  .filters legend { font-size: var(--step--1); font-weight: 600; color: var(--ink); margin-bottom: var(--s-1); }
  .filters .chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .chip { position: relative; }
  .chip input { position: absolute; opacity: 0; pointer-events: none; }
  .chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 0.875rem; cursor: pointer; }
  .chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
  .chip input:focus-visible + span { box-shadow: var(--focus); }
  .range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .filters__actions { display: flex; gap: var(--s-2); }
  .filters__close { display: none; }

  .results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
  .results-bar h2 { font-size: var(--step-1); }
  .results-bar__tools { display: flex; gap: var(--s-2); align-items: center; }
  .results-bar__tools .input { width: auto; min-height: 40px; }
  .filters-open { display: none; }
  .active-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: calc(var(--s-3) * -1) 0 var(--s-5); }
  .active-filters button { display: inline-flex; align-items: center; gap: var(--s-1); padding: 0.2rem 0.4rem 0.2rem 0.7rem; border: 0; border-radius: 999px; background: var(--sky); font-size: var(--step--1); font-weight: 600; color: var(--ink); }
  .active-filters .icon { width: 1em; height: 1em; }

  @media (max-width: 960px) {
    .listing { grid-template-columns: 1fr; }
    .filters-open { display: inline-flex; }
    .filters {
      position: fixed; inset: 0; z-index: 150; overflow-y: auto; align-content: start;
      padding: var(--s-5) 1.25rem var(--s-7); background: var(--white);
      visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0s 0.2s;
    }
    .filters.is-open { visibility: visible; opacity: 1; transition: opacity 0.2s; }
    .filters__close { display: inline-flex; justify-self: end; }
  }

  /* ===== Página do imóvel ===== */
  .gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--s-2); height: min(62vh, 520px); margin-top: var(--s-5); border-radius: var(--radius-lg); overflow: hidden; }
  .gallery button { position: relative; padding: 0; border: 0; background: var(--sky); overflow: hidden; cursor: zoom-in; }
  .gallery button:first-child { grid-row: span 2; }
  .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
  .gallery button:hover img { transform: scale(1.03); }
  .gallery[data-count='1'] { grid-template-columns: 1fr; }
  .gallery[data-count='2'] { grid-template-columns: 2fr 1fr; }
  .gallery[data-count='2'] button:nth-child(2) { grid-row: span 2; }
  .gallery[data-count='3'] { grid-template-columns: 2fr 1fr; }
  .gallery__all { position: absolute; right: var(--s-3); bottom: var(--s-3); z-index: 1; }
  .gallery-wrap { position: relative; }
  @media (max-width: 760px) {
    .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 300px; border-radius: 0; margin-inline: -1.25rem; }
    .gallery button { flex: 0 0 88%; scroll-snap-align: center; }
  }

  .property { display: grid; grid-template-columns: 1fr 360px; gap: var(--s-8); align-items: start; margin-top: var(--s-6); }
  .property__head h1 { font-size: var(--step-3); }
  .property__place { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); color: var(--muted); }
  .property__tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
  .key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: var(--s-6) 0; border-block: 1px solid var(--line); }
  .key-facts div { padding: var(--s-4) var(--s-3); border-left: 1px solid var(--line); }
  .key-facts div:first-child { border-left: 0; padding-left: 0; }
  .key-facts dt { font-size: var(--step--1); color: var(--muted); }
  .key-facts dd { font-variation-settings: 'wdth' var(--wide); font-weight: 700; font-size: var(--step-2); color: var(--ink); }
  .property section + section { margin-top: var(--s-7); }
  .property h2 { font-size: var(--step-2); margin-bottom: var(--s-4); }
  .property__description { white-space: pre-line; max-width: 70ch; }
  .features { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; }
  .features li { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: 0.9375rem; }
  .features .icon { color: var(--success); }
  .map-box { height: 340px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--sky); }
  .map-note { margin-top: var(--s-2); font-size: var(--step--1); color: var(--muted); }

  .price-box { position: sticky; top: calc(var(--header-h) + var(--s-4)); display: grid; gap: var(--s-4); }
  .price-box__price { padding: var(--s-5); background: var(--ink); color: #c9d5e2; border-radius: var(--radius-lg); }
  .price-box__price strong { display: block; font-size: var(--step-3); font-variation-settings: 'wdth' var(--wide); color: var(--white); line-height: 1.1; }
  .price-box__price dl { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-4); margin-top: var(--s-3); font-size: 0.9375rem; }
  .price-box__price dd { color: var(--white); text-align: right; }
  .agent { display: flex; gap: var(--s-3); align-items: center; }
  .agent img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--sky); }
  .agent strong { display: block; color: var(--ink); }
  .agent small { color: var(--muted); }
  .property-code { font-size: var(--step--1); color: var(--muted); }
  @media (max-width: 960px) {
    .key-facts { grid-template-columns: repeat(3, 1fr); }
    .key-facts dd { font-size: var(--step-1); }
    .key-facts div:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
    .property { grid-template-columns: 1fr; gap: var(--s-7); }
    .price-box { position: static; }
  }

  /* Fotos em tela cheia */
  .lightbox { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; border-radius: 0; background: rgba(8, 20, 36, 0.97); color: var(--white); }
  .lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
  .lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4); }
  .lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--s-8) var(--s-5); }
  .lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
  .lightbox .btn { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: var(--white); --btn-border: transparent; }
  .lightbox .btn:hover { --btn-bg: rgba(255, 255, 255, 0.2); }
  .lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
  .lightbox__nav--prev { left: var(--s-4); }
  .lightbox__nav--next { right: var(--s-4); }
  @media (max-width: 760px) {
    .lightbox__stage { padding: 0 var(--s-2) var(--s-8); }
    .lightbox__nav { top: auto; bottom: var(--s-4); transform: none; }
  }

  /* ===== Mapa ===== */
  .map-page { position: relative; height: calc(100dvh - var(--header-h)); display: grid; grid-template-columns: 340px 1fr; }
  .map-page__side { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-right: 1px solid var(--line); background: var(--white); overflow-y: auto; }
  .map-page__side h1 { font-size: var(--step-2); }
  .map-page__list { display: grid; gap: var(--s-3); list-style: none; padding: 0; }
  .map-page__list a { display: grid; grid-template-columns: 84px 1fr; gap: var(--s-3); padding: var(--s-2); border-radius: var(--radius); color: inherit; text-decoration: none; }
  .map-page__list a:hover, .map-page__list a.is-active { background: var(--sky); }
  .map-page__list img { width: 84px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
  .map-page__list strong { display: block; color: var(--ink); }
  .map-page__list span { font-size: var(--step--1); color: var(--muted); }
  .map-canvas { height: 100%; background: var(--sky); }
  .legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--step--1); list-style: none; padding: 0; }
  .legend li { display: inline-flex; align-items: center; gap: var(--s-1); }
  .legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
  .map-page + site-footer { display: none; }
  @media (max-width: 860px) {
    .map-page { grid-template-columns: 1fr; grid-template-rows: auto 60dvh; height: auto; }
    .map-page__side { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
    .map-page__list { display: none; }
  }
  .popup { display: grid; gap: 2px; width: 220px; color: var(--text); text-decoration: none; font-family: var(--font); }
  .popup img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: var(--s-2); }
  .popup strong { font-size: 1rem; color: var(--ink); }
  .popup span { font-size: var(--step--1); color: var(--muted); }

  /* ===== Corretores ===== */
  .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-6) var(--s-5); padding: 0; list-style: none; }
  .person { display: grid; gap: var(--s-3); padding: 0; border: 0; background: none; text-align: left; }
  .person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius-lg); background: var(--sky); }
  .person strong { display: block; font-size: var(--step-1); font-variation-settings: 'wdth' var(--wide); color: var(--ink); }
  .person small { color: var(--muted); }
  .person__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

  /* ===== Sobre ===== */
  .about-hero { position: relative; min-height: 360px; display: grid; align-items: end; background: var(--ink) url('../img/fachada.webp') center / cover no-repeat; color: var(--white); }
  .about-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 36, 64, 0.2), rgba(13, 36, 64, 0.85)); }
  .about-hero .container { position: relative; padding-block: var(--s-8) var(--s-6); }
  .about-hero h1 { color: var(--white); font-size: var(--step-5); max-width: 16ch; }
  .timeline { list-style: none; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: var(--s-2); }
  .timeline li { position: relative; padding: 0 0 var(--s-6) var(--s-6); }
  .timeline li::before { content: ''; position: absolute; left: -7px; top: 0.45em; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
  .timeline strong { display: block; font-variation-settings: 'wdth' 125; font-weight: 800; font-size: var(--step-2); color: var(--ink); line-height: 1.1; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
  .values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); padding: 0; list-style: none; }
  .values h3 { margin-bottom: var(--s-2); }
  .values p { color: var(--muted); }
  @media (max-width: 860px) { .two-col, .values { grid-template-columns: 1fr; gap: var(--s-6); } }

  /* ===== Contato e Anuncie ===== */
  .contact-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--s-8); align-items: start; padding-top: var(--s-7); }
  .contact-list { display: grid; gap: var(--s-5); list-style: none; padding: 0; }
  .contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-3); align-items: start; }
  .contact-list .icon-box { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--sky); color: var(--blue); }
  .contact-list strong { display: block; color: var(--ink); }
  .steps { list-style: none; padding: 0; display: grid; gap: var(--s-5); counter-reset: step; margin-top: var(--s-5); }
  .steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: var(--s-4); }
  .steps li::before { content: counter(step); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--ipe); font-weight: 800; font-size: var(--step-1); font-variation-settings: 'wdth' 125; }
  .steps strong { display: block; color: var(--ink); font-size: 1.0625rem; }
  .steps p { color: var(--muted); }
  @media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; gap: var(--s-7); } }

  /* ===== 404 ===== */
  .not-found { padding-block: var(--s-9); text-align: center; }
  .not-found .hex { width: 180px; margin-bottom: var(--s-6); }
  .not-found p { color: var(--muted); margin: var(--s-3) auto var(--s-6); max-width: 46ch; }
  .not-found .actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
}

/* Aviso quando o site é aberto com dois cliques (file://) */
.file-warning { position: relative; z-index: 300; padding: 1rem 1.25rem; background: #fff6dc; color: #0d2440; border-bottom: 2px solid #f4b41a; font: 15px/1.5 system-ui, sans-serif; }
.file-warning code { background: #fff; padding: 0.1em 0.35em; border-radius: 4px; }
