/* ═══════════════════════════════════════════════════════════
   FORMA — Arquitetura de Luxo
   Premium Landing Page Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
  --blue:   #49769f;
  --blue-d: #2d5577;
  --beige:  #CCCBA9;
  --light:  #EFEAE4;
  --dark:   #0b0b0b;
  --dark2:  #141414;
  --dark3:  #1c1c1c;
  --white:  #ffffff;

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  overflow-x: hidden;
  /* Lenis manages scroll */
  scroll-behavior: auto;
}

body {
  background: var(--dark);
  color: var(--light);
  font-family: var(--ff-body);
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

img, video, canvas { display: block; }

a { text-decoration: none; color: inherit; }

/* ── GRAIN ──────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9995;
  opacity: 0.025;
  animation: grain 6s steps(8) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-4%, -6%); }
  24%  { transform: translate(6%, 3%); }
  36%  { transform: translate(-3%, 8%); }
  48%  { transform: translate(8%, -4%); }
  60%  { transform: translate(-6%, 6%); }
  72%  { transform: translate(4%, -8%); }
  84%  { transform: translate(-8%, 2%); }
  100% { transform: translate(0, 0); }
}

/* ── LOADER ─────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.loader-logo {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--beige);
}

.loader-bar-wrap {
  width: 220px;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.loader-bar-fill {
  height: 100%;
  background: var(--beige);
  width: 0%;
  transition: width 0.12s linear;
}

.loader-pct {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(239,234,228,0.35);
}

/* ── CURSOR ─────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--beige);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .18s, height .18s, background .18s;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(204,203,169,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width .14s, height .14s, border-color .2s;
  will-change: left, top;
}

body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 14px; height: 14px;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 56px; height: 56px;
  border-color: rgba(204,203,169,0.7);
}

/* ── NAV ────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 3rem;
  transition: background .4s;
}

#nav.scrolled {
  background: rgba(11,11,11,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--light);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(239,234,228,0.55);
  transition: color .3s;
}
.nav-links a:hover { color: var(--light); }

.nav-cta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--light);
  padding: .55rem 1.6rem;
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--beige); }

.nav-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--blue);
  transition: width .1s linear;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11,11,11,0.78) 0%,
    rgba(11,11,11,0.4)  55%,
    rgba(11,11,11,0.1)  100%
  );
  pointer-events: none;
}

.hero-body {
  position: relative;
  z-index: 10;
  padding: 0 3rem 5rem;
  max-width: 52%;
}

.hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--beige);
  opacity: 0;
  transform: translateY(16px);
  margin-bottom: 1.8rem;
  display: block;
}

.hero-h1 {
  font-family: var(--ff-display);
  font-size: clamp(3.2rem, 7.5vw, 9.5rem);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line span {
  display: block;
  transform: translateY(105%);
}

.hero-h1 em {
  font-style: italic;
  color: var(--beige);
}

.hero-sub {
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(239,234,228,0.58);
  opacity: 0;
  transform: translateY(14px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 4rem;
  right: 3rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .6rem;
  opacity: 0;
}

.hero-scroll-hint span {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(204,203,169,0.5);
}

.hero-line-anim {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--beige), transparent);
  animation: lineAnim 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes lineAnim {
  0%   { transform: scaleY(0); opacity: 1; }
  45%  { transform: scaleY(1); opacity: 1; }
  80%  { transform: scaleY(1); opacity: 0; }
  100% { transform: scaleY(0); opacity: 0; }
}

.hero-frame-count {
  position: absolute;
  bottom: 4rem;
  left: 3rem;
  z-index: 10;
  font-family: var(--ff-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: rgba(239,234,228,0.28);
  opacity: 0;
}

.fc-sep { opacity: 0.4; }

/* ── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.6rem;
}

/* ── DATA-REVEAL ANIMATIONS ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── MANIFESTO ──────────────────────────────────────────── */
.manifesto {
  min-height: 100vh;
  background: var(--light);
  color: var(--dark);
  display: flex;
  align-items: center;
  padding: 9rem 3rem;
}

.manifesto-wrap {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.manifesto .section-label { color: var(--blue); }

.manifesto-title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 4.5vw, 6rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-bottom: 3rem;
  max-width: 780px;
}

.manifesto-title em { font-style: italic; color: var(--blue); }

.manifesto-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 760px;
  margin-bottom: 5rem;
}

.manifesto-cols p {
  font-size: 0.9rem;
  line-height: 1.95;
  color: rgba(11,11,11,0.55);
}

.manifesto-stats {
  display: flex;
  gap: 5rem;
  border-top: 1px solid rgba(73,118,159,0.18);
  padding-top: 3rem;
}

.stat-num {
  font-family: var(--ff-display);
  font-size: 3.8rem;
  font-weight: 300;
  line-height: 1;
  color: var(--blue);
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(11,11,11,0.4);
  margin-top: .45rem;
}

/* ── VIDEO SCROLL SECTION ───────────────────────────────── */
.vid-section {
  position: relative;
  height: 700vh;
}

.vid-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* #mainVideo removed — using WebP frame array instead */

#mainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vid-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11,11,11,0.72) 0%,
    rgba(11,11,11,0.35) 45%,
    rgba(11,11,11,0.08) 100%
  );
  pointer-events: none;
  z-index: 5;
}

/* chapters */
.chapters {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 5vw;
  opacity: 0;
  transition: opacity 0.65s ease;
}

.chapter.ch-active { opacity: 1; }

.ch-inner {
  max-width: 420px;
  transform: translateY(12px);
  transition: transform 0.65s var(--ease-out);
}

.chapter.ch-active .ch-inner { transform: translateY(0); }

.ch-label {
  display: block;
  font-size: 0.63rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(204,203,169,0.65);
  margin-bottom: 1.4rem;
}

.ch-title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 4.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.4rem;
}

.ch-title em {
  font-style: italic;
  color: var(--beige);
}

.chapter p {
  font-size: 0.83rem;
  line-height: 1.9;
  color: rgba(239,234,228,0.55);
  max-width: 300px;
}

/* progress */
.vid-progress {
  position: absolute;
  bottom: 2.8rem;
  right: 3rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

.vp-bar {
  width: 130px;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.vp-fill {
  height: 100%;
  background: var(--beige);
  width: 0%;
  transition: width .08s linear;
}

.vp-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(204,203,169,0.5);
}

/* ── SPACES ─────────────────────────────────────────────── */
.spaces {
  background: var(--light);
  color: var(--dark);
  padding: 9rem 3rem;
}

.spaces-head {
  max-width: 1200px;
  margin: 0 auto 5rem;
}

.spaces-head .section-label { color: var(--blue); }

.spaces-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--dark);
}

.spaces-head h2 em { font-style: italic; color: var(--blue); }

.spaces-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.space-card {
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.space-card.is-visible { opacity: 1; transform: translateY(0); }

.sc-visual {
  height: 360px;
  transform: scale(1);
  transition: transform 0.55s var(--ease-out);
  background-size: auto 50%; !important;  /* ← aquí controlas el zoom */
  background-position: center; !important; /* ← aquí la posición */
  background-repeat: no-repeat; !important;
}

.space-card:hover .sc-visual { transform: scale(1); }

.sc-body { padding: 1.4rem 0; }

.sc-tag {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid rgba(73,118,159,0.3);
  padding: .28rem .75rem;
  display: inline-block;
  margin-bottom: .9rem;
}

.sc-body h3 {
  font-family: var(--ff-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: .55rem;
}

.sc-body p {
  font-size: 0.8rem;
  line-height: 1.85;
  color: rgba(11,11,11,0.5);
}

/* ── PROCESS ────────────────────────────────────────────── */
.process {
  background: var(--dark2);
  padding: 9rem 3rem;
}

.process-head {
  max-width: 1200px;
  margin: 0 auto 5.5rem;
}

.process-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--light);
}

.process-head h2 em { font-style: italic; color: var(--beige); }

.process-steps {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.ps-step {
  border-top: 1px solid rgba(239,234,228,0.08);
  padding-top: 2rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.ps-step.is-visible { opacity: 1; transform: translateY(0); }

.ps-num {
  font-family: var(--ff-display);
  font-size: 4.5rem;
  font-weight: 300;
  color: rgba(204,203,169,0.1);
  line-height: 1;
  margin-bottom: 2rem;
}

.ps-body h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--light);
  margin-bottom: .6rem;
}

.ps-body p {
  font-size: 0.8rem;
  line-height: 1.9;
  color: rgba(239,234,228,0.38);
}

/* ── 3D SCENE ───────────────────────────────────────────── */
.scene3d {
  position: relative;
  height: 100vh;
  background: var(--dark3);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.scene3d-info {
  position: relative;
  z-index: 10;
  padding: 3rem 4rem 3rem 5rem;
  min-width: 380px;
  max-width: 400px;
  background: linear-gradient(
    to right,
    rgba(11,11,11,0.9) 0%,
    rgba(11,11,11,0.6) 70%,
    transparent 100%
  );
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}

.scene3d-info h2 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 3.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--light);
}

.scene3d-info h2 em { font-style: italic; color: var(--beige); }

.scene3d-info > p {
  font-size: 0.82rem;
  line-height: 1.9;
  color: rgba(239,234,228,0.5);
}

.s3d-controls {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: .5rem;
}

.ctrl-hint {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.ctrl-icon {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(204,203,169,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--beige);
  flex-shrink: 0;
}

.ctrl-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239,234,228,0.35);
}

#threeContainer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#threeContainer canvas {
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

#threeContainer canvas:active { cursor: grabbing; }

/* ── CTA ────────────────────────────────────────────────── */
.cta {
  min-height: 100vh;
  background: var(--blue);
  display: flex;
  align-items: center;
  padding: 9rem 3rem;
}

.cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.cta .section-label { color: rgba(255,255,255,0.5); }

.cta-title {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 7vw, 9.5rem);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--white);
  margin: 1rem 0 2.5rem;
}

.cta-title em {
  font-style: italic;
  color: var(--beige);
}

.cta-inner > p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 3rem;
}

.btn-cta {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--white);
  padding: 1.1rem 3rem;
  transition: background .35s, color .35s;
}

.btn-cta:hover { background: var(--beige); color: var(--dark); }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.f-logo {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--light);
  margin-bottom: .6rem;
}

.footer-left p,
.footer-right p {
  font-size: 0.72rem;
  line-height: 1.9;
  color: rgba(239,234,228,0.25);
}

.footer-right { text-align: right; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .spaces-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .manifesto-stats { gap: 3rem; }
}

@media (max-width: 768px) {
  #nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }

  .hero-body { max-width: 100%; padding: 0 1.5rem 4rem; }
  .hero-h1 { font-size: clamp(2.8rem, 11vw, 5rem); }

  .manifesto { padding: 6rem 1.5rem; }
  .manifesto-cols { grid-template-columns: 1fr; }
  .manifesto-stats { flex-wrap: wrap; gap: 2rem; }

  .spaces { padding: 6rem 1.5rem; }
  .spaces-grid { grid-template-columns: 1fr; }
  .sc-visual { height: 260px; }

  .process { padding: 6rem 1.5rem; }
  .process-steps { grid-template-columns: 1fr; gap: 2rem; }

  .scene3d-info {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    min-width: unset; max-width: unset;
    height: auto;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(11,11,11,0.9) 0%, transparent 100%);
    gap: .8rem;
  }
  .scene3d-info h2 { font-size: 2rem; }

  .cta { padding: 6rem 1.5rem; }
  .cta-title { font-size: clamp(2.5rem, 10vw, 4rem); }

  .footer { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .footer-right { text-align: left; }
}
