/* ============================================================
   home.css -- homepage (index.html) only
   ============================================================ */

/* ── ===================================================== ── */
/* ── HERO                                                  ── */
/* ── ===================================================== ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background-color: #0E0E0E;
  /* Reserve the fixed header's height so the photo starts below it instead
     of being dimmed by the translucent bar; the strip left behind is filled
     by background-color, which is what the header then sits on. */
  padding-top: var(--header-h);
  background-origin: content-box;
  /* No photo on this layer, deliberately. It used to paint a second `cover`
     copy of hero.jpg under the sharp one in .hero::after; the two crops scale
     differently, so past ~1600px a ghost Tauana appeared beside the real one
     (67px apart at 1920x1080, 446px at 3440x1440). The band left of the photo
     is this gradient instead, and ::before already darkens that side.
     Phones re-add the photo here — see the 768px block. */
  background-image: linear-gradient(to right, #0B0B0B 0%, #16232F 100%);
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5,5,5,0.92) 0%,
    rgba(5,5,5,0.80) 20%,
    rgba(5,5,5,0.45) 40%,
    rgba(5,5,5,0.12) 56%,
    transparent         70%
  );
  pointer-events: none;
  z-index: 1; /* over the sharp photo layer, under the text panel */
}

/* The one and only copy of the photo, fitted to the full height and anchored
   right, so nothing of Tauana is ever cropped. aspect-ratio makes the box
   exactly the image's shape, so `cover` fits it with no crop at all and the
   mask's percentage lands on the photo's own left edge whatever the viewport
   — the edge dissolves into the gradient behind it instead of ending in a hard
   seam. No max-width on purpose: in a narrow window the box is wider than the
   viewport and simply bleeds off to the left (.hero clips it), where clamping
   it would shrink its height too and leave a seam above the fold.
   Keep the ratio in sync with assets/hero.jpg (2974x1702). */
.hero::after {
  content: '';
  position: absolute;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  aspect-ratio: 2974 / 1702;
  background-image: url("/assets/hero.jpg");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
  pointer-events: none;
  z-index: 0;
}


.hero-panel {
  width: clamp(320px, 48%, 620px);
  margin-left: clamp(0px, 7vw, 170px); /* nudge the wordmark toward center */
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 140px; /* the hero's own padding-top now clears the header */
  z-index: 2;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-brand {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Stacked wordmark: ASCENZA over FEMME GROUP. Set on one line the name runs
   607px at the old 45px size against a 524px panel, so a single line would
   have to drop to ~38px -- smaller than the section titles further down the
   page. Two lines keep it the largest thing in the hero. Each .hero-brand-word
   is its own line; the space between them in the markup keeps the heading
   reading as "Ascenza Femme Group" for screen readers and search engines. */
.hero-brand-name {
  font-family: var(--font-brand);
  font-size: clamp(1.75rem, 3.2vw, 2.9rem);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap; /* no line ever breaks on its own */
  line-height: 1.04;   /* tight, so the two lines read as one mark */
  color: var(--hero-brand-color);
  margin: 0;
}

.hero-brand-word { display: block; }

.hero-brand-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  margin-top: 6px;
}

.hero-brand-rule {
  flex: 1;
  height: 1px;
  background-color: var(--color-primary);
  opacity: 0.75;
}

.hero-brand-re {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  color: var(--color-primary);
  white-space: nowrap;
}

/* ── ===================================================== ── */
/* ── HOME SEARCH (index.html)                              ── */
/* ── ===================================================== ── */
.home-search {
  position: relative;
  z-index: 5;
  margin-top: calc(-1 * var(--search-pull)); /* card sits fully inside the hero, by its bottom */
}

.search-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--color-surface);
  border-radius: 10px;
  padding: 22px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Thin gold shimmer along the top edge */
.search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-primary) 18%,
    var(--color-primary-hover) 50%,
    var(--color-primary) 82%,
    transparent
  );
}

/* Venda / Aluguel tabs above the search card. The active tab carries a
   small caret pointing down at the card. */
.search-finalidade {
  display: flex;
  gap: 10px;
  padding: 0 6px;
  margin-bottom: 14px;
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 22px;
}

/* first field of the row (the finalidade row + hidden input precede it) */
input[name="finalidade"] + .search-field { padding-left: 0; }

.search-sep {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-border), transparent);
  flex-shrink: 0;
}

.search-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-primary-deep);
}

.search-select-wrap {
  position: relative;
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--transition);
}

.search-select-wrap:focus-within,
.search-select-wrap:hover {
  border-color: var(--color-primary);
}

.search-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.938rem;
  font-weight: 300;
  color: var(--color-text);
  padding: 8px 26px 8px 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-chevron {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  pointer-events: none;
  transition: transform var(--transition);
}

.search-select-wrap:focus-within .search-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.search-btn {
  align-self: center;
  flex-shrink: 0;
  margin-left: 26px;
  padding: 15px 38px;
}

/* ── ===================================================== ── */
/* ── PROPERTIES                                            ── */
/* ── ===================================================== ── */
.properties {
  padding: var(--section-pad);
  background: var(--color-surface);
}

/* Building-group cards: price-floor label + unit-count chip */
.card-price-from {
  display: block;
  font-family: var(--font-body);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.card-units-chip {
  display: inline-block;
  vertical-align: 3px;
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--color-primary-deep);
  white-space: nowrap;
}


.properties-cta {
  text-align: center;
  margin-top: 52px;
}

/* ── ===================================================== ── */
/* ── CITY GUIDES (index.html)                              ── */
/* ── ===================================================== ── */
.cities {
  padding: var(--section-pad);
  background: var(--color-cream);
  overflow-x: hidden; /* slanted corners + entrance drift must not cause page scroll */
}

/* Shares the property carousel's wide grid and 28px gutter, so a city card
   carries roughly the same visual weight on the page as a property card. */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  /* Absorbs the first/last cards' protruding corners: the 6deg skew pushes a
     corner out by tan(6deg) x half the card height -- ~21px on the widest
     layout, less as the cards shrink, hence the clamp. */
  padding: 0 clamp(16px, 1.4vw, 22px);
}

/* The <a> is the animated element (fadeInRight ends at transform:none),
   so the parallelogram skew lives on the frame inside it. */
.city-card {
  display: block;
  aspect-ratio: 2 / 3;
}

.city-card-frame {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform: skewX(-6deg); /* slight lean to the right */
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate; /* keeps the sheen inside the rounded slanted frame */
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: var(--shadow-card);
  transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s ease;
}

.city-card:hover .city-card-frame {
  border-color: rgba(201, 168, 76, 0.85);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), 0 0 26px rgba(201, 168, 76, 0.35);
  transform: skewX(-6deg) translateY(-6px);
}

/* Counter-skew, oversized sideways so the photo fills the slanted frame */
.city-card-inner {
  display: block;
  position: absolute;
  inset: 0 -14%;
  transform: skewX(6deg);
}

.city-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.city-card:hover .city-card-inner img { transform: scale(1.07); }

.city-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 8, 0.92) 0%,
    rgba(8, 8, 8, 0.55) 26%,
    rgba(8, 8, 8, 0.08) 52%,
    transparent 70%
  );
  transition: background 0.45s ease;
}

/* Gold sheen that sweeps across on hover */
.city-card-sheen {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  width: 46%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(244, 241, 234, 0.22) 50%,
    transparent
  );
  transform: skewX(-14deg);
  pointer-events: none;
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.city-card:hover .city-card-sheen { left: 130%; }

.city-card-info {
  position: absolute;
  left: 16%;
  right: 16%;
  /* Tracks the card, which is fluid between the 1024 breakpoint and the
     1520px wide container. */
  bottom: clamp(18px, 2.1vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.city-card-count {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.city-card-count.visible {
  opacity: 1;
  transform: translateY(0);
}

.city-card-name {
  font-family: var(--font-display);
  font-size: clamp(1.188rem, 1.9vw, 1.75rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-cream);
  transition: transform 0.45s ease;
}

.city-card:hover .city-card-name { transform: translateX(4px); }

.city-card-arrow {
  display: flex;
  align-items: center;
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.city-card-arrow svg {
  width: 20px;
  height: 20px;
}

.city-card:hover .city-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── ===================================================== ── */
/* ── RESPONSIVE                                            ── */
/* ── ===================================================== ── */
@media (max-width: 1024px) {
  .search-field { padding: 0 14px; }
  .search-btn   { margin-left: 16px; padding: 14px 26px; }

  .cities-grid { gap: 18px; }
  .city-card-name { font-size: 1.188rem; }
  .city-card-info { bottom: 18px; }
}


@media (max-width: 768px) {

  /* Fale Comigo deliberately stays hidden while the menu is open. It used to
     un-hide here, but it is a sibling of the fixed dropdown, not a child of it,
     so it appeared inside the 72px bar instead — wrapping onto two lines and
     covering her name. The floating WhatsApp button already carries this
     action on a phone. */

  /* Hero */
  .hero {
    flex-direction: column;
  }

  .hero-panel {
    width: 100%;
    min-height: 100vh;
    padding: 80px 24px 60px;
  }

  .hero-brand       { max-width: 320px; }
  .hero-brand-name  { font-size: 1.6rem; letter-spacing: 0.08em; }

  /* One layer is enough on a phone, and here the `cover` crop is the one that
     wins: at this width a height-fitted photo would leave more band than photo. */
  .hero::after { display: none; }
  .hero {
    background-image: url("/assets/hero.jpg");
    background-size: cover;
    background-position: 74% center;
  }

  /* Home search — fields stack */
  .home-search { margin-top: -40px; }

  .search-card {
    flex-direction: column;
    gap: 18px;
    padding: 26px 24px;
  }

  .search-sep { display: none; }

  .search-field,
  .search-field:first-child { padding: 0; }

  .search-btn {
    align-self: stretch;
    margin-left: 0;
    margin-top: 4px;
  }

  /* City guides — swipeable slanted gallery */
  .cities-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding: 4px 24px 18px;
    margin: 0 -30px; /* bleed to the screen edges inside .container */
  }

  .cities-grid::-webkit-scrollbar { display: none; }

  .city-card {
    flex: 0 0 56%;
    max-width: 240px;
    scroll-snap-align: center;
  }

  .city-card-name { font-size: 1.375rem; }
}
