/* ================================================================
   BREU — ArboREAL · ICFF NYC 2026
   3 partes: HERO · CINEMA · INVITE
   ================================================================ */

:root {
  --ink:        #000000;
  --ink-warm:   #0a0805;
  --amber:      #ffd9a8;
  --amber-warm: #ffb56b;
  --bone:       #f4f1ec;
  --bone-dim:   rgba(244, 241, 236, 0.6);
  --bone-mute:  rgba(244, 241, 236, 0.35);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-ui:      'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font-ui);
  font-weight: 300;
  background: var(--ink);
  color: var(--bone);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}
img { display: block; max-width: 100%; }

/* ============ CUSTOM CURSOR ============ */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor {
  width: 32px; height: 32px;
  border: 1px solid rgba(244,241,236,0.9);
  border-radius: 50%;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.4s;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: rgba(244,241,236,0.95);
  border-radius: 50%;
}
.cursor.is-hover {
  width: 64px; height: 64px;
  background: rgba(244,241,236,0.06);
  border-color: rgba(255,217,168,0.9);
}
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone);
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav-logo { font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-meta { font-weight: 300; opacity: 0.7; }
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.nav-lang a {
  color: var(--bone-mute);
  text-decoration: none;
  transition: color 0.3s var(--ease);
  pointer-events: auto;
}
.nav-lang a:hover { color: var(--amber); }
.nav-lang a.is-active { color: var(--bone); font-weight: 500; }
.nav-lang-sep { opacity: 0.4; }

/* ================================================================
   I · HERO — 3 esferas pulsando entre 5% e 80% no escuro absoluto
   ================================================================ */
.hero {
  height: 100vh;
  min-height: 560px;
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@supports (height: 100dvh) {
  .hero { height: 100dvh; }
}

/* Background — duas camadas da mesma imagem:
   base muito escura (peça quase silhueta)
   glow oscilando 5% → 80% (a peça "respira" — luzes dimerizando) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
  will-change: opacity, filter, transform;
  transform-origin: center center;
}
.hero-bg-base {
  filter: brightness(0.06) saturate(0.4) contrast(1.05);
  animation: heroDrift 24s ease-in-out infinite alternate;
}
.hero-bg-glow {
  filter: brightness(1.04) contrast(1.12) saturate(1.15);
  mix-blend-mode: screen;
  opacity: 0.05;
  animation:
    heroPulse 8s ease-in-out infinite,
    heroDrift 24s ease-in-out infinite alternate;
}
/* radial vignette pra concentrar foco na peça e escurecer bordas */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 0%,
    transparent 38%,
    rgba(0,0,0,0.55) 78%,
    #000 100%);
  pointer-events: none;
  z-index: 2;
}
@keyframes heroPulse {
  0%, 100% { opacity: 0.05; }
  20%      { opacity: 0.32; }
  48%      { opacity: 0.80; }
  72%      { opacity: 0.42; }
  88%      { opacity: 0.12; }
}
@keyframes heroDrift {
  from { transform: scale(1);    }
  to   { transform: scale(1.06); }
}

/* Copy — eyebrow + title + tagline */
.hero-copy {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 6vw;
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1.6s 0.6s var(--ease) forwards;
}
.hero-eyebrow em {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.06em;
  color: var(--amber);
  font-size: 13px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(96px, 19vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-bottom: 28px;
  color: var(--bone);
  text-shadow:
    0 2px 40px rgba(0,0,0,0.8),
    0 4px 120px rgba(255, 200, 130, 0.25);
  opacity: 0;
  animation: fadeUp 2.0s 1.0s var(--ease) forwards;
}
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.02em;
  color: rgba(244, 241, 236, 0.78);
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
  opacity: 0;
  animation: fadeUp 1.6s 1.7s var(--ease) forwards;
}
.hero-tagline em { font-style: italic; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-foot {
  position: absolute;
  bottom: 36px;
  left: 0; right: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  opacity: 0;
  animation: fadeUp 1.6s 2.4s var(--ease) forwards;
}
.hero-foot-line {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-mute);
  text-align: center;
}
.hero-foot-sci {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}
.hero-foot-sci em { font-style: italic; }

.hero-scroll-cue {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bone-mute);
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, transparent, var(--bone-mute), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ================================================================
   II · CINEMA — image-sequence scroll (150 frames via canvas)
   Outer section is 500vh tall, inner stage sticks 100vh.
   Scroll progress 0..1 drives the active frame index.
   ================================================================ */
.cinema {
  height: 500vh;
  position: relative;
  background: #000;
}
.cinema-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Canvas where the active frame is drawn each tick */
.cinema-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

/* Preload progress overlay */
.cinema-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #000;
  color: var(--bone-mute);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition: opacity 0.8s var(--ease);
}
.cinema-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.cinema-loader-track {
  width: 240px;
  height: 1px;
  background: rgba(244,241,236,0.1);
  overflow: hidden;
}
.cinema-loader-bar {
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width 0.2s linear;
}

/* --- Caption stack — one caption per scene (5 total) --- */
.caption-stack {
  position: absolute;
  z-index: 5;
  bottom: 14vh;
  left: 6vw;
  max-width: 520px;
  pointer-events: none;
}
.cap {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.3;
  color: var(--bone);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  position: absolute;
  inset: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}
.cap em { color: var(--amber); font-style: italic; }
.cap.is-visible { opacity: 1; transform: translateY(0); }

/* tiny corner index */
.cinema-index {
  position: absolute;
  z-index: 5;
  top: 80px;
  right: 40px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--bone-mute);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.idx-label {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bone-mute);
}
.idx-num {
  font-size: 32px;
  color: var(--amber);
  opacity: 0.75;
  line-height: 1;
}

/* ================================================================
   III · INVITE
   ================================================================ */
.invite {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 217, 168, 0.05) 0%, transparent 55%),
    #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 6vw 120px;
}
.invite-inner {
  max-width: 900px;
  text-align: center;
}
.kicker {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.85;
  margin-bottom: 32px;
}
.kicker em {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 14px;
  color: var(--bone-dim);
}
.invite-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 100px rgba(255, 200, 130, 0.2);
}
.invite-sub {
  margin-top: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.85;
}
.invite-lede {
  margin: 48px auto 0;
  max-width: 620px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.6;
  color: var(--bone-dim);
}
.invite-lede em { color: var(--bone); font-style: italic; }
.invite-lede strong { color: var(--amber); font-weight: 400; }
.invite-grid {
  margin: 72px auto 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 760px;
  text-align: left;
}
@media (max-width: 720px) {
  .invite-grid { grid-template-columns: 1fr; text-align: center; }
}
.invite-grid .label {
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.invite-grid .value {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 20px;
  line-height: 1.5;
  color: var(--bone-dim);
}
.cta {
  display: inline-block;
  padding: 20px 42px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  background: transparent;
  border: 1px solid rgba(255,217,168,0.5);
  text-decoration: none;
  transition: all 0.5s var(--ease);
}
.cta:hover {
  background: var(--amber);
  color: #000;
  letter-spacing: 0.36em;
}

/* --- Whatsapp CTA: neon verde oscilando --- */
.cta-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cta--whatsapp {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.7);
  background: transparent;
  animation: neonPulse 6s ease-in-out infinite;
  will-change: box-shadow, border-color, color, text-shadow;
}
.cta--whatsapp:hover {
  background: rgba(37, 211, 102, 0.12);
  color: #B8FFD3;
  letter-spacing: 0.36em;
  border-color: rgba(74, 255, 135, 1);
  box-shadow:
    0 0 32px rgba(74, 255, 135, 0.9),
    0 0 64px rgba(37, 211, 102, 0.5),
    inset 0 0 16px rgba(37, 211, 102, 0.25);
  text-shadow: 0 0 16px rgba(74, 255, 135, 0.9);
  animation: none;
}
.cta-whatsapp-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #25D366;
  text-shadow: 0 0 6px rgba(37, 211, 102, 0.4);
  animation: neonText 6s ease-in-out infinite;
  will-change: color, text-shadow;
}

@keyframes neonPulse {
  0%, 100% {
    border-color: rgba(37, 211, 102, 0.55);
    color: #1FAE55;
    box-shadow:
      0 0 6px rgba(37, 211, 102, 0.25),
      inset 0 0 4px rgba(37, 211, 102, 0.06);
    text-shadow: 0 0 4px rgba(37, 211, 102, 0.3);
  }
  50% {
    border-color: rgba(74, 255, 135, 1);
    color: #4AFF87;
    box-shadow:
      0 0 22px rgba(74, 255, 135, 0.85),
      0 0 44px rgba(37, 211, 102, 0.35),
      inset 0 0 14px rgba(37, 211, 102, 0.22);
    text-shadow:
      0 0 14px rgba(74, 255, 135, 0.9),
      0 0 28px rgba(37, 211, 102, 0.5);
  }
}

@keyframes neonText {
  0%, 100% {
    color: #1FAE55;
    text-shadow: 0 0 4px rgba(37, 211, 102, 0.3);
  }
  50% {
    color: #4AFF87;
    text-shadow:
      0 0 12px rgba(74, 255, 135, 0.95),
      0 0 28px rgba(37, 211, 102, 0.55);
  }
}
.invite-spec {
  margin-top: 64px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.9;
  color: var(--bone-mute);
}

/* ============ FOOTER ============ */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-mute);
  background: #000;
  border-top: 1px solid rgba(255,217,168,0.08);
}

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  .nav { padding: 16px 20px; font-size: 9px; }
  .nav-meta { display: none; }
  .nav-lang { font-size: 9px; letter-spacing: 0.32em; }

  .hero-eyebrow { font-size: 9px; letter-spacing: 0.34em; margin-bottom: 20px; padding: 0 20px; }
  .hero-eyebrow em { font-size: 11px; }
  .hero-title { font-size: clamp(72px, 22vw, 130px); margin-bottom: 18px; letter-spacing: -0.04em; }
  .hero-tagline { font-size: 16px; padding: 0 20px; }
  .hero-foot { bottom: 22px; gap: 14px; padding: 0 20px; }
  .hero-foot-line { font-size: 9px; letter-spacing: 0.24em; line-height: 1.6; }
  .hero-foot-sci { display: block; margin-left: 0; margin-top: 6px; font-size: 11px; }

  .caption-stack { bottom: 12vh; left: 5vw; right: 5vw; max-width: none; }
  .cap { font-size: 18px; }
  .cinema-index { top: 60px; right: 20px; }
  .idx-num { font-size: 24px; }

  .invite { padding: 110px 6vw 80px; }
  .invite-title { font-size: clamp(64px, 22vw, 110px); }
  .invite-sub { font-size: 12px; letter-spacing: 0.26em; }
  .invite-lede { font-size: 16px; line-height: 1.55; margin-top: 36px; }
  .invite-grid { margin: 54px auto 44px; gap: 32px; }

  .cta { padding: 18px 32px; font-size: 10px; letter-spacing: 0.28em; }
  .cta:hover { letter-spacing: 0.30em; }
  .cta-whatsapp-label { font-size: 10px; letter-spacing: 0.36em; }

  .footer { flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   LIGHT MODE — overrides for TAUÁ (museum/gallery vibe)
   ================================================================ */
body.light-mode {
  background: #F5F0E6;
  color: #2A2520;
}
body.light-mode .hero,
body.light-mode .cinema,
body.light-mode .cinema-stage,
body.light-mode .cinema-loader,
body.light-mode .footer {
  background: #F5F0E6;
}
body.light-mode .invite {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(184, 120, 44, 0.06) 0%, transparent 55%),
    #F5F0E6;
}
body.light-mode .nav { mix-blend-mode: normal; color: #2A2520; }
body.light-mode .nav-meta,
body.light-mode .nav-lang a { color: rgba(42, 37, 32, 0.55); }
body.light-mode .nav-lang a.is-active { color: #2A2520; }
body.light-mode .nav-lang a:hover { color: #B8782C; }

/* Overlay cream pra dar contraste pro texto sobre a foto */
body.light-mode .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(245, 240, 230, 0.55) 0%, rgba(245, 240, 230, 0.35) 60%, rgba(245, 240, 230, 0.15) 100%);
  pointer-events: none;
  z-index: 2;
}
body.light-mode .hero-copy,
body.light-mode .hero-foot {
  position: relative;
  z-index: 3;
}

body.light-mode .hero-eyebrow {
  color: #1A1410;
  font-weight: 500;
  text-shadow:
    0 1px 0 rgba(245, 240, 230, 0.95),
    0 0 16px rgba(245, 240, 230, 0.9);
}
body.light-mode .hero-eyebrow em {
  color: #8B5A1A;
  text-shadow: 0 1px 0 rgba(245, 240, 230, 0.95);
}
body.light-mode .hero-title {
  color: #1A1410;
  font-weight: 400;
  text-shadow:
    0 2px 0 rgba(245, 240, 230, 0.95),
    0 0 40px rgba(245, 240, 230, 1),
    0 0 80px rgba(245, 240, 230, 0.9);
}
body.light-mode .hero-tagline {
  color: #2A2520;
  font-weight: 400;
  text-shadow:
    0 1px 0 rgba(245, 240, 230, 0.95),
    0 0 24px rgba(245, 240, 230, 0.9);
}
body.light-mode .hero-foot-line {
  color: #2A2520;
  text-shadow:
    0 1px 0 rgba(245, 240, 230, 0.9),
    0 0 16px rgba(245, 240, 230, 0.85);
}
body.light-mode .hero-foot-sci {
  color: #2A2520;
  text-shadow:
    0 1px 0 rgba(245, 240, 230, 0.9),
    0 0 16px rgba(245, 240, 230, 0.85);
}
body.light-mode .hero-scroll-cue {
  color: #2A2520;
  text-shadow:
    0 1px 0 rgba(245, 240, 230, 0.9),
    0 0 12px rgba(245, 240, 230, 0.85);
}
body.light-mode .hero-scroll-line {
  background: linear-gradient(180deg, transparent, rgba(42, 37, 32, 0.5), transparent);
}

body.light-mode .cinema-loader { color: rgba(42, 37, 32, 0.6); }
body.light-mode .cinema-loader-track { background: rgba(42, 37, 32, 0.12); }
body.light-mode .cinema-loader-bar { background: #B8782C; }

body.light-mode .cap {
  color: #2A2520;
  text-shadow: 0 1px 0 rgba(245, 240, 230, 0.6), 0 2px 16px rgba(245, 240, 230, 0.7);
}
body.light-mode .cap em { color: #B8782C; }

body.light-mode .idx-label { color: rgba(42, 37, 32, 0.5); }
body.light-mode .idx-num { color: #B8782C; opacity: 0.85; }

body.light-mode .kicker { color: #B8782C; }
body.light-mode .kicker em { color: rgba(42, 37, 32, 0.6); }
body.light-mode .invite-title {
  color: #2A2520;
  text-shadow: 0 4px 60px rgba(184, 120, 44, 0.18);
}
body.light-mode .invite-sub { color: rgba(42, 37, 32, 0.6); }
body.light-mode .invite-lede { color: rgba(42, 37, 32, 0.75); }
body.light-mode .invite-lede em { color: rgba(42, 37, 32, 0.85); }
body.light-mode .invite-lede strong { color: #2A2520; }
body.light-mode .invite-grid .label { color: #B8782C; }
body.light-mode .invite-grid .value { color: rgba(42, 37, 32, 0.7); }
body.light-mode .invite-spec { color: rgba(42, 37, 32, 0.45); }

body.light-mode .footer {
  color: rgba(42, 37, 32, 0.45);
  border-top: 1px solid rgba(184, 120, 44, 0.15);
}

body.light-mode .cta {
  color: #B8782C;
  border-color: rgba(184, 120, 44, 0.5);
}
body.light-mode .cta:hover {
  background: #B8782C;
  color: #F5F0E6;
}

body.light-mode .cursor {
  border-color: rgba(42, 37, 32, 0.6);
  mix-blend-mode: normal;
}
body.light-mode .cursor-dot {
  background: rgba(42, 37, 32, 0.7);
  mix-blend-mode: normal;
}
body.light-mode .cursor.is-hover {
  background: rgba(42, 37, 32, 0.08);
  border-color: rgba(184, 120, 44, 0.9);
}
