/* ============ VARANDA · Boutique Hotel ============ */

:root {
  --ink: #231c16;
  --ink-2: #2e241c;
  --stone: #ede7dc;
  --stone-2: #e2dbcb;
  --bone: #f3ede2;
  --bone-dim: rgba(35, 28, 22, 0.55);
  --bone-dim-onink: rgba(243, 237, 226, 0.55);
  --amber: #c68a3d;
  --display: "Fraunces", serif;
  --body: "Public Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

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

html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
video { display: block; width: 100%; height: 100%; object-fit: cover; }

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--bone-dim);
}

em { font-style: italic; color: var(--amber); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.preloader__count {
  position: absolute; bottom: 2rem; right: 2.5rem;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--bone-dim-onink);
  font-variant-numeric: tabular-nums;
}
.preloader__wordmark {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 8.5rem);
  letter-spacing: 0.01em;
  color: var(--bone);
  display: flex; overflow: hidden;
}
.preloader__letter { display: inline-block; transform: translateY(110%); }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 99;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-follower {
  position: fixed; top: 0; left: 0; z-index: 98;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(35, 28, 22, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-follower.is-hover {
  width: 64px; height: 64px;
  border-color: var(--amber);
}
@media (hover: none) {
  .cursor, .cursor-follower { display: none; }
  body, a { cursor: auto; }
}

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -100%; z-index: 90;
  pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 5%); }
  40% { transform: translate(5%, -5%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(4%, 2%); }
}

/* ---------- Nav ----------
   mix-blend-mode: difference lets one nav read against both the dark hero/CTA
   bands and the light editorial sections without a second theme. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.75rem 2.5rem;
  mix-blend-mode: difference;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo {
  font-family: var(--display); font-weight: 600;
  font-size: 1.2rem; letter-spacing: 0.06em;
  color: var(--bone);
}
.nav__links { display: flex; gap: 2.5rem; }
.nav__links a {
  font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--bone);
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero (dark full-bleed band) ---------- */
.hero {
  position: relative; height: 100svh; min-height: 640px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero__media {
  position: absolute; inset: 0;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1);
  /* letters glow at land; the scrub eases this back to none by ~35% of the pin */
  filter: brightness(1.35) contrast(1.05);
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(35,28,22,0.35) 0%, rgba(35,28,22,0.15) 40%, rgba(35,28,22,0.9) 100%);
  opacity: 0.75; /* scrub raises it to 1 as the story starts */
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 72% 62% at 28% 72%,
    rgba(35, 28, 22, 0.5) 0%,
    rgba(35, 28, 22, 0.3) 42%,
    transparent 72%);
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.hero__stencil {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
}
.hero__stencil svg { display: block; width: 100%; height: 100%; }
.hero__stencil text {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(56px, 13.5vw, 220px);
  letter-spacing: 0.01em;
}
.hero__content {
  position: relative; z-index: 2;
  padding: 0 2.5rem 7rem;
  width: 100%;
  color: var(--bone);
}
.hero__label { margin-bottom: 1.5rem; }
.hero__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.9rem, 9.6vw, 9.5rem);
  line-height: 0.98; letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--bone);
}
.hero__line { display: block; overflow: hidden; }
.hero__sub {
  margin-top: 2rem; max-width: 34rem;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--bone-dim-onink);
}
.hero__cta {
  margin-top: 2.75rem;
  opacity: 0; visibility: hidden; /* revealed by the hero scrub, stage 4 */
}
.hero__scroll {
  position: absolute; bottom: 2.5rem; right: 2.5rem; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  opacity: 0; visibility: hidden; transform: translateY(16px);
}
.hero__scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--bone), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* ---------- Marquee (dark band, connective tissue) ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  padding: 1.4rem 0;
  background: var(--ink);
}
.marquee__track {
  display: inline-flex;
  font-family: var(--display); font-weight: 500;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--bone-dim-onink);
}
.marquee--footer { background: var(--ink); }
.marquee--footer .marquee__track {
  font-size: clamp(3.6rem, 11vw, 9rem); font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243,237,226,0.28);
  padding: 1rem 0;
}

/* ---------- Manifesto (light editorial) ---------- */
.manifesto {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 10rem 2.5rem;
  max-width: 1200px; margin: 0 auto;
}
.manifesto__label { margin-bottom: 3rem; }
.manifesto__text {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.7rem, 4.2vw, 3.7rem);
  line-height: 1.3; letter-spacing: -0.005em;
  color: var(--ink);
}
.manifesto__text .word { opacity: 0.14; }

/* ---------- Ambiente (dark full-bleed video band) ---------- */
.ambient {
  position: relative;
  height: 72vh; min-height: 420px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
}
.ambient__media { position: absolute; inset: 0; }
.ambient__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.ambient__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(35,28,22,0.55) 0%, rgba(35,28,22,0.25) 35%, rgba(35,28,22,0.65) 100%);
}
.ambient__text {
  position: relative; z-index: 1;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  line-height: 1.15; text-align: center;
  color: var(--bone);
}

/* ---------- Acomodações (light, pinned horizontal on desktop) ---------- */
.portfolio { position: relative; background: var(--stone); }
.portfolio__pin {
  height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.portfolio__header {
  padding: 0 2.5rem; margin-bottom: 2rem;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
.portfolio__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 4rem);
  line-height: 1.05; letter-spacing: -0.005em;
  text-align: right;
  color: var(--ink);
}
.portfolio__track {
  display: flex; gap: 3rem;
  padding: 0 2.5rem;
  width: max-content;
  will-change: transform;
}
.property {
  width: clamp(240px, min(30vw, 75vh - 295px), 460px);
  flex-shrink: 0;
}
.property__media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone-2);
}
.property__media img,
.property__media video {
  transform: scale(1.15);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.property:hover .property__media img,
.property:hover .property__media video { transform: scale(1.02); }
.property__meta {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(35,28,22,0.15);
  margin-top: 1.25rem;
  position: relative;
}
.property__index { color: var(--amber); display: block; margin-bottom: 0.5rem; }
.property__name {
  font-family: var(--display); font-weight: 600;
  font-size: 1.5rem; letter-spacing: 0; color: var(--ink);
}
.property__loc { margin: 0.35rem 0 0.75rem; }
.portfolio__end {
  width: clamp(320px, 38vw, 560px);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.portfolio__end-text {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.9rem, 3.8vw, 3.4rem);
  line-height: 1.15; text-align: center;
  color: var(--ink);
}

/* ---------- Stats (light) ---------- */
.stats { padding: 12rem 2.5rem; max-width: 1400px; margin: 0 auto; }
.stats__label { margin-bottom: 4rem; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 4rem 3rem;
}
.stat { border-top: 1px solid rgba(35,28,22,0.15); padding-top: 1.5rem; }
.stat__value {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(3.2rem, 6.6vw, 6rem);
  line-height: 1; display: block;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat:first-child .stat__value::before { content: "Nº"; color: var(--amber); }
.stat__suffix { color: var(--amber); }
.stat__desc { display: block; margin-top: 1rem; }

/* ---------- Depoimentos (light) ---------- */
.testimonials { padding: 10rem 2.5rem 12rem; max-width: 1400px; margin: 0 auto; }
.testimonials__label { margin-bottom: 4rem; }
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 3rem 2.5rem;
}
.testimonial { border-top: 1px solid rgba(35,28,22,0.15); padding-top: 1.5rem; }
.testimonial__quote {
  font-family: var(--display); font-weight: 600;
  font-size: 3rem; line-height: 1; color: var(--amber);
  margin-bottom: 0.5rem;
}
.testimonial__text {
  font-family: var(--display); font-weight: 500;
  font-size: 1.15rem; line-height: 1.5; color: var(--ink);
  margin-bottom: 1.5rem;
}
.testimonial__name { color: var(--bone-dim); }

/* ---------- Reserva / CTA (dark full-bleed band) ---------- */
.access {
  position: relative;
  min-height: 90vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 8rem 2.5rem;
  background: var(--ink);
  color: var(--bone);
  overflow: hidden;
}
.access__media { position: absolute; inset: 0; }
.access__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.access__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(35,28,22,0.55) 0%, rgba(35,28,22,0.75) 55%, rgba(35,28,22,0.92) 100%);
}
.access__label, .access__title, .access__btn { position: relative; z-index: 1; }
.access__label { margin-bottom: 2.5rem; }
.access__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.6rem, 8.6vw, 8rem);
  line-height: 1; letter-spacing: -0.01em;
  margin-bottom: 4rem;
  color: var(--bone);
}
.access__line { display: block; overflow: hidden; }
.access__btn {
  position: relative;
  display: inline-block;
  font-family: var(--mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.22em;
  padding: 1.4rem 3.2rem;
  border: 1px solid rgba(243,237,226,0.35);
  border-radius: 999px;
  overflow: hidden;
  color: var(--bone);
}
.hero__cta.access__btn { border-color: rgba(243,237,226,0.4); }
.access__btn-fill {
  position: absolute; inset: 0;
  background: var(--amber); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.access__btn:hover .access__btn-fill { transform: translateY(0); }

/* ---------- Footer (dark) ---------- */
.footer { background: var(--ink); color: var(--bone-dim-onink); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 2rem 2.5rem 3rem;
}
.footer .mono { color: var(--bone-dim-onink); }

/* ---------- Reveal helpers ---------- */
[data-reveal] { opacity: 0; transform: translateY(30px); }

main, footer, .nav { visibility: hidden; }
html.is-ready main, html.is-ready footer, html.is-ready .nav { visibility: visible; }

html.is-static main, html.is-static footer, html.is-static .nav { visibility: visible; }
html.is-static .preloader { display: none; }
html.is-static [data-reveal],
html.is-static .hero__cta,
html.is-static .hero__scroll { opacity: 1; visibility: visible; transform: none; }
html.is-static .hero__stencil { display: none; }
html.is-static .hero__overlay { opacity: 1; }
html.is-static .hero__video { transform: scale(1); filter: none; }
html.is-static .manifesto__text .word { opacity: 1; }

html.is-locked, html.is-locked body { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (min-width: 769px) and (max-height: 850px) {
  .hero__title { font-size: clamp(2.7rem, 8vw, 7.5rem); }
  .hero__label { margin-bottom: 1rem; }
  .hero__sub { margin-top: 1.5rem; }
  .hero__cta { margin-top: 2rem; }
  .hero__content { padding-bottom: 4.5rem; }
}

@media (max-width: 768px) {
  .nav { padding: 1.25rem 1.25rem; }
  .nav__links { gap: 1.25rem; }
  .nav__links a:not([href="#reserva"]) { display: none; }
  .hero__content { padding: 0 1.25rem 5rem; }
  .hero__scroll { right: 1.25rem; bottom: 1.5rem; }
  .manifesto, .stats { padding-left: 1.25rem; padding-right: 1.25rem; }
  .portfolio__header { flex-direction: column; align-items: flex-start; }
  .portfolio__title { text-align: left; }

  .portfolio__pin {
    height: auto; overflow: visible;
    display: block;
    padding: 7rem 0 3rem;
  }
  .portfolio__header { padding: 0 1.25rem; margin-bottom: 3.5rem; }
  .portfolio__track {
    flex-direction: column;
    width: auto;
    gap: 4.5rem;
    padding: 0 1.25rem;
  }
  .property { width: 100%; }
  .portfolio__end { width: 100%; padding: 2rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scroll-line { animation: none; }
}
