:root {
  color-scheme: dark;

  --brand-olive-deep: #322e22;
  --brand-cream: #f8efe6;
  --brand-camel: #a17d63;

  --background: #2c2c20;
  --foreground: #f2ebe1;
  --card: #3a3729;
  --muted-foreground: #b3ab97;
  --accent: #a1663f;
  --accent-tint: rgba(161, 102, 63, 0.14);
  --stone: #d9c9b6;
  --border: rgba(242, 235, 225, 0.14);
  --overlay: 34, 32, 22;
  --glass-bg: rgba(58, 55, 41, 0.35);
  --glass-border: rgba(242, 235, 225, 0.08);
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

:root[data-theme='light'] {
  color-scheme: light;

  --background: #f8efe6;
  --foreground: #2f2c20;
  --card: #f2e9e0;
  --muted-foreground: #6f6a56;
  --accent: #8a5635;
  --accent-tint: rgba(138, 86, 53, 0.12);
  --stone: #4c4936;
  --border: rgba(47, 44, 32, 0.16);
  --overlay: 47, 44, 32;
  --glass-bg: rgba(248, 239, 230, 0.45);
  --glass-border: rgba(47, 44, 32, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--background); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--background); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- utilities ---------- */
.wrap { max-width: 1600px; margin: 0 auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.upper { text-transform: uppercase; letter-spacing: 0.2em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--muted-foreground);
}
.eyebrow--xs { font-size: 0.8rem; }

.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-size: clamp(2.5rem, 10vw, 9rem);
}
.display--md { font-size: clamp(2.5rem, 9vw, 8rem); }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
}

.dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); display: inline-block; flex: none;
}

/* ---------- grain ---------- */
.grain-overlay {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  width: 14px; height: 14px; border-radius: 999px;
  border: 1px solid var(--stone);
  display: none;
  align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  transition: width 0.35s ease, height 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
}
.cursor.is-hover { width: 56px; height: 56px; background: rgba(160, 125, 82, 0.15); border-color: var(--accent); }
.cursor__label {
  font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.18em;
  opacity: 0; transition: opacity 0.3s ease; white-space: nowrap; color: var(--stone);
}
.cursor.is-hover .cursor__label { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .cursor { display: flex; }
  body.cursor-active, body.cursor-active a, body.cursor-active button { cursor: none; }
}

/* ---------- topbar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 80; padding: 1.5rem 0; }
.topbar__inner {
  max-width: 1600px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-family: var(--serif); font-size: 1.25rem; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.topbar__actions {
  display: inline-flex; align-items: center; gap: 0.75rem; margin-left: auto;
}
.back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em;
}
.back__arrow { display: inline-block; transition: transform 0.5s ease; }
.back:hover .back__arrow { transform: translateX(-4px); }

/* --- Alternador de tema --- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.theme-toggle-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}
.theme-toggle-icon svg {
  grid-area: 1 / 1;
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.icon-moon {
  opacity: 0;
  transform: rotate(-45deg) scale(0.6);
}
:root[data-theme='light'] .icon-sun {
  opacity: 0;
  transform: rotate(45deg) scale(0.6);
}
:root[data-theme='light'] .icon-moon {
  opacity: 1;
  transform: none;
}
.theme-toggle-label { display: none; }
@media (min-width: 1024px) {
  .theme-toggle-label { display: inline; }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 100svh; width: 100%; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(var(--overlay), 0.9),
    rgba(var(--overlay), 0.15) 55%,
    rgba(var(--overlay), 0.35)
  );
}
.hero__content { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 1.5rem 3.5rem; }
.hero__content > * { max-width: 1600px; margin: 0 auto; }
.hero__meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 999px; padding: 0.375rem 1rem;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--stone);
}

/* ---------- sections ---------- */
.section { padding: 5rem 1.5rem; }
.section--tight { padding: 0 1.5rem 5rem; }

.grid12 { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.lead {
  max-width: 42rem; font-size: 1.125rem; line-height: 1.75; color: var(--stone);
  margin-bottom: 1.5rem; text-wrap: pretty;
}
.price { margin-bottom: 2.5rem; }
.price__value { font-family: var(--serif); font-size: clamp(3.25rem, 7vw, 4.75rem); line-height: 1.05; color: var(--accent); }

.overview-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.spec { border-top: 1px solid var(--border); padding-top: 1rem; }
.spec .eyebrow { font-size: 1.35rem; letter-spacing: .1em; }
.spec__value { font-family: var(--serif); font-size: 2.4rem; margin-top: 0.5rem; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.shot { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--card); }
.shot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.shot:hover img { transform: scale(1.05); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: 1fr; gap: 1.5rem 3rem; }
.features li {
  display: flex; align-items: center; gap: 1rem;
  border-top: 1px solid var(--border); padding-top: 1.25rem; font-size: 1.125rem;
}

.cta {
  margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem;
}
.cta p { max-width: 28rem; line-height: 1.7; color: var(--muted-foreground); }

.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.75rem;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 1rem 2rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.18em;
  transition: border-color 0.5s ease, background-color 0.5s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); background: var(--accent-tint); }
.btn__arrow { display: inline-block; transition: transform 0.5s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 6rem 1.5rem 2.5rem; }
.footer__top {
  display: flex; flex-direction: column; gap: 2.5rem;
  justify-content: space-between; margin-bottom: 5rem;
}
.footer__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem;
  border-top: 1px solid var(--border); padding: 3.5rem 0;
}
.soft { color: var(--stone); line-height: 1.7; }
.links li + li { margin-top: 0.5rem; }
.links a { color: var(--muted-foreground); transition: color 0.3s ease; }
.links a:hover { color: var(--foreground); }
.links--social a { display: inline-flex; align-items: center; gap: 0.5rem; }
.rule { height: 1px; width: 0; background: var(--accent); transition: width 0.5s ease; display: inline-block; }
.links--social a:hover .rule { width: 1rem; }

.wordmark { overflow: hidden; padding: 2rem 0; }
.wordmark p {
  text-align: center; white-space: nowrap; color: var(--card);
  font-size: clamp(3rem, 20vw, 18rem); line-height: 1;
}

.footer__bottom {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  border-top: 1px solid var(--border); padding-top: 2rem;
  font-size: 0.75rem; color: var(--muted-foreground); text-align: center;
}

/* ---------- animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(40px); }
[data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.mask .mask-line { display: block; overflow: hidden; }
.mask .mask-line > span {
  display: inline-block; transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--delay, 0s);
}
.mask.is-in .mask-line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .mask .mask-line > span { opacity: 1 !important; transform: none !important; }
  .grain-overlay { animation: none; }
}

/* ---------- responsive ---------- */
@media (min-width: 768px) {
  .topbar__inner, .hero__content { padding-left: 3rem; padding-right: 3rem; }
  .hero__content { padding-bottom: 5rem; }
  .section { padding: 8rem 3rem; }
  .section--tight { padding: 0 3rem 8rem; }
  .grid12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .col-7 { grid-column: span 7; }
  .col-5 { grid-column: span 5; padding-left: 2rem; }
  .specs { column-gap: 2rem; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer { padding: 10rem 3rem 2.5rem; }
  .footer__top { flex-direction: row; align-items: flex-end; }
  .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ================= CARROSSEL ================= */

.carousel {
position: relative;
width: 100%;
display: flex;
align-items: center;
}

.carousel__viewport {
width: 100%;
overflow: hidden;
}

.carousel__track {
display: flex;
gap: 20px;
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform;
}

.carousel .shot {
flex: 0 0 100%;
margin: 0;
overflow: hidden;
aspect-ratio: 16 / 9;
background: var(--card);
}

.carousel .shot img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
transition: transform 0.5s ease;
}

.carousel .shot:hover img {
transform: scale(1.03);
}


/* ================= BOTÕES ================= */

.carousel__btn {
position: absolute;
z-index: 10;

width: 48px;
height: 48px;

border: none;
border-radius: 50%;

background: rgba(var(--overlay), 0.75);
color: var(--foreground);

display: flex;
align-items: center;
justify-content: center;

font-size: 24px;
cursor: pointer;

transition:
  background 0.3s ease,
  transform 0.3s ease,
  opacity 0.3s ease;
}

.carousel__btn:hover {
background: rgba(var(--overlay), 0.92);
transform: scale(1.08);
}

.carousel__btn--prev {
left: 15px;
}

.carousel__btn--next {
right: 15px;
}


/* ================= INDICADORES ================= */

.carousel__dots {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
margin-top: 24px;
}

.carousel__dot {
width: 8px;
height: 8px;

padding: 0;
border: none;
border-radius: 50%;

background: var(--accent);
cursor: pointer;

transition:
  width 0.3s ease,
  background 0.3s ease;
}

.carousel__dot.active {
width: 25px;
border-radius: 10px;
background: var(--stone);
}


/* ================= TABLET ================= */

@media (max-width: 900px) {

.carousel .shot {
  flex: 0 0 100%;
}

}


/* ================= CELULAR ================= */

@media (max-width: 600px) {

.carousel__track {
  gap: 12px;
}

.carousel .shot {
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
}

.carousel__btn {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.carousel__btn--prev {
  left: 10px;
}

.carousel__btn--next {
  right: 10px;
}

}
/* ================= DETALHES DESTACADOS ================= */
.details-card {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  background: linear-gradient(180deg, var(--accent-tint, rgba(255, 255, 255, 0.04)), transparent 65%);
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.55);
  position: relative;
}
.details-card::before {
  content: '';
  position: absolute;
  left: 1.75rem;
  right: 1.75rem;
  top: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.9;
}
.details-card__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.details-card .price { margin-bottom: 2rem; }
.details-card .price__label { color: var(--accent); }
.details-group {
  margin: 2.5rem 0 1.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.specs--highlight .spec {
  border-top: 1px solid var(--accent);
  padding-top: 1rem;
}
.specs--highlight .spec__value { font-size: 3.6rem; }
.spec--large .spec__value { font-size: 5rem; }
.spec--xl .spec__value { font-size: 6.5rem; }
.details-card .spec__value { color: var(--foreground); }

/* galeria dentro da seção de detalhes */
.details-gallery { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.details-gallery .carousel .shot { aspect-ratio: 16 / 10; }
.details-gallery .carousel__btn { width: 40px; height: 40px; font-size: 20px; }
.details-gallery .carousel__dots { margin-top: 16px; }

@media (min-width: 768px) {
  .details-card { padding: 2.5rem 2.25rem; }
}

/* ================= CARROSSEL NA COLUNA DE DETALHES ================= */

.details-gallery--aside {
  margin-top: 32px;
}

.details-gallery--aside .carousel .shot {
  aspect-ratio: 4 / 3;
}

.details-gallery--aside .carousel__btn {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.details-gallery--aside .carousel__btn--prev { left: 10px; }
.details-gallery--aside .carousel__btn--next { right: 10px; }

.details-gallery--aside .carousel__dots {
  margin-top: 16px;
}

/* Textos maiores na página do imóvel */
.details-card__title { font-size: 2.6rem; }
.details-group { font-size: 1.5rem; }
.price__value { font-size: 3.2rem; }
@media (max-width: 768px) {
  .spec--large .spec__value { font-size: 3rem; }
  .spec--xl .spec__value { font-size: 4rem; }
  .specs--highlight .spec__value { font-size: 2.4rem; }
  .spec__value { font-size: 1.8rem; }
}