/* ========================================
   SPAZIO JULLIARD — Portal do Condomínio
   Theme: Editorial Brutalism / Organic Depth
   Mobile-first
   ======================================== */

/* --- Reset & Tokens --- */
:root {
  --verde: #4A6B3A;
  --dourado: #C8A830;
  --bordo: #7B2A26;
  
  --bg: #F4F3EF;       /* Off-white quente */
  --bg-alt: #EBEAE5;   /* Contraste suave */
  --text: #1C1B1A;
  --text-muted: #6B6A68;
  --border: rgba(28,27,26,0.1);
  --white: #FFFFFF;
  
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  
  --max-w: 1200px; /* Mais largo para editorial */
  --nav-h: 80px;
  
  /* Spring animations */
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition: 0.5s var(--ease);
  --transition-fast: 0.3s var(--ease);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

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

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

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 900px; margin: 0 auto; }

/* --- NAV --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(244,243,239,0.7);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  opacity: 0; transition: opacity var(--transition);
}
.nav--scrolled::before { opacity: 1; }
.nav--scrolled { border-bottom-color: var(--border); }

.nav__container {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.nav__logo { height: 48px; width: auto; mix-blend-mode: multiply; }

.nav__links {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  background: rgba(244,243,239,0.98); backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.nav__links.open { opacity: 1; pointer-events: auto; }
.nav__link {
  font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em;
  color: var(--text-muted); position: relative;
  transition: color var(--transition-fast), transform var(--spring);
}
.nav__link:hover { color: var(--bordo); transform: translateX(8px); }

/* Toggle */
.nav__toggle {
  display: flex; flex-direction: column; gap: 6px;
  width: 32px; background: none; border: none; cursor: pointer;
  z-index: 101; padding: 4px 0;
}
.nav__toggle span {
  display: block; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform var(--spring), opacity var(--transition-fast);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- HERO (Typographic Brutalism) --- */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) 24px 6vh;
  position: relative; overflow: hidden;
}
.hero__bg-watermark {
  position: absolute; right: -20%; bottom: -10vh;
  width: 140vw; max-width: 1200px;
  opacity: 0; mix-blend-mode: multiply;
  pointer-events: none; z-index: 0;
  transform: rotate(-5deg);
}
.hero__content {
  position: relative; z-index: 10;
  max-width: var(--max-w); margin: 0 auto; width: 100%;
}
.hero__content--centered {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__main-logo {
  width: clamp(240px, 50vw, 400px); height: auto;
  margin-bottom: 6vh;
  filter: drop-shadow(0 16px 40px rgba(123,42,38,0.12));
}

.hero__meta { margin-bottom: 8vh; max-width: 500px; }
.hero__tagline { font-weight: 500; font-size: 1.15rem; letter-spacing: 0.1em; color: var(--verde); text-transform: uppercase; }
.hero__divider { width: 64px; height: 3px; background: linear-gradient(90deg, var(--verde), var(--dourado), var(--bordo)); margin: 24px auto; border-radius: 2px; }
.hero__address { font-size: 1.05rem; color: var(--text-muted); }

.hero__scroll {
  position: absolute; bottom: 32px; right: 50%; transform: translateX(50%);
  color: var(--verde);
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition-fast);
  z-index: 10;
  animation: bounce 2.5s infinite var(--spring);
}
.hero__scroll:hover { color: var(--dourado); }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(50%) translateY(0); }
  40% { transform: translateX(50%) translateY(-10px); }
  60% { transform: translateX(50%) translateY(-4px); }
}

/* --- SECTIONS --- */
.section { padding: 120px 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--text); color: var(--bg); border: none; }

.section__header { margin-bottom: 64px; }
.section__header--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section__title {
  font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 600;
  line-height: 1; letter-spacing: -0.03em;
}
.section__title--left { margin-right: auto; }
.section__desc {
  font-size: 1.1rem; color: var(--text-muted); margin-top: 16px;
  max-width: 500px; line-height: 1.5;
}
.section--dark .section__title { color: var(--white); }
.section--dark .section__desc { color: rgba(255,255,255,0.6); }

/* --- CARDS (Visão Geral) --- */
.cards { display: grid; gap: 16px; }
.card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 32px 24px; border-radius: 20px; background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform var(--spring), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); }
.card__icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; background: var(--white); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.04); }
.card__content h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.card__content p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* --- APP CARDS (Moradores) --- */
.apps-grid { display: grid; gap: 24px; }
.app-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
  background: var(--white); padding: 48px 32px;
  border-radius: 24px; border: 1px solid var(--border);
  transition: transform var(--spring), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.app-card:hover {
  background: var(--white); box-shadow: 0 16px 40px rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1);
  transform: translateY(-8px);
}
.app-card__logo { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; background: var(--white); box-shadow: 0 12px 32px rgba(0,0,0,0.1); margin-bottom: 8px; }
.app-card__content h3 { font-size: 1.5rem; color: var(--text); font-weight: 600; margin-bottom: 16px; }
.app-card__content p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.app-card__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }

/* --- PROVEDORES --- */
.providers {
  margin-top: 80px; padding-top: 64px; border-top: 1px solid rgba(0,0,0,0.05);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.providers__title { font-size: 1.4rem; color: var(--text); font-weight: 600; margin-bottom: 32px; letter-spacing: -0.01em; }
.providers__list {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; align-items: center; margin-bottom: 24px;
}
.provider-logo {
  height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--white); padding: 12px 24px; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04); border: 1px solid var(--border);
}
.provider-logo img { max-height: 100%; width: auto; object-fit: contain; }
.provider-logo--text { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: #f26522; font-family: system-ui, sans-serif; }
.provider-logo--text span { color: #0056b3; }
.providers__desc { font-size: 0.95rem; color: var(--text-muted); max-width: 600px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500; letter-spacing: -0.01em;
  transition: transform var(--spring), background var(--transition-fast), opacity var(--transition-fast);
  cursor: pointer;
}
.btn--solid { background: var(--text); color: var(--bg); border: none; }
.btn--solid:hover { background: var(--bordo); color: var(--white); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--outline:hover { background: var(--white); color: var(--text); border-color: var(--text); transform: translateY(-2px); }

/* --- MAPA E LOCATION --- */
.geo-wrap { display: flex; flex-direction: column; gap: 40px; align-items: center; text-align: center; }
.geo-text { max-width: 600px; }
.geo-address { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.6; }
.map-container {
  width: 100%; max-width: 900px; aspect-ratio: 16/9; border-radius: 24px;
  overflow: hidden; background: var(--border);
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* --- CONTACT LIST (Massive Rows) --- */
.footer { background: var(--verde); color: var(--bg); padding: 120px 0 40px; border: none; }
.footer .section__title { color: var(--bg); margin-bottom: 64px;}
.contact-list { display: flex; flex-direction: column; margin-bottom: 80px; }
.contact-row {
  display: flex; flex-direction: column; padding: 40px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  position: relative; transition: opacity var(--transition-fast);
}
.contact-row:first-child { border-top: 1px solid rgba(255,255,255,0.15); }
.contact-row:hover { opacity: 0.8; }
.contact-row__label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; margin-bottom: 12px; }
.contact-row__value { font-size: clamp(1.5rem, 5vw, 3.5rem); font-weight: 500; letter-spacing: -0.03em; word-break: break-all; }
.contact-row__arrow {
  position: absolute; right: 0; bottom: 40px;
  background: var(--bg); color: var(--verde);
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(-16px); transition: all var(--spring);
}
.contact-row:hover .contact-row__arrow { opacity: 1; transform: translateX(0); }

.footer__bot {
  display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15); padding-top: 64px; margin-top: 40px;
}
.footer__logo { height: 160px; filter: brightness(0) invert(1); mix-blend-mode: screen; width: auto; object-fit: contain; }
.footer__bot p { font-size: 0.85rem; opacity: 0.5; }

/* --- ANIMATIONS & INTERACTIONS --- */
.magnetic-hover { transition: transform var(--spring); }
.magnetic-hover:hover { transform: scale(1.02); z-index: 10; }

.anim-fade-up { opacity: 0; transform: translateY(32px); transition: opacity 0.8s var(--ease), transform 0.8s var(--spring); }
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease), transform 0.8s var(--spring); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.stagger-1 { transition-delay: 0.15s; }
.reveal.stagger-2 { transition-delay: 0.3s; }
.reveal.stagger-3 { transition-delay: 0.45s; }

.anim-watermark {
  opacity: 0; transform: scale(0.9) rotate(-5deg); transition: opacity 1.5s var(--ease), transform 2s var(--ease);
}
body.loaded .anim-watermark { opacity: 0.04; transform: scale(1) rotate(-5deg); }
body.loaded .anim-fade-up { opacity: 1; transform: translateY(0); }

/* --- DESKTOP (BREAKPOINTS) --- */
@media(min-width: 768px){
  .nav__toggle { display: none; }
  .nav__links {
    position: static; flex-direction: row; gap: 32px;
    background: none; backdrop-filter: none; opacity: 1; pointer-events: auto;
  }
  .nav__link { font-size: 0.95rem; }
  .nav__link:hover { transform: translateY(-2px); }
  
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card { padding: 48px 32px; border-radius: 24px; }
  .card__icon { width: 64px; height: 64px; margin-bottom: 24px; border-radius: 20px; }
  .card__content h3 { font-size: 1.3rem; margin-bottom: 16px; }
  .card__content p { font-size: 1.05rem; line-height: 1.6; }
  
  .apps-grid { grid-template-columns: 1fr 1fr; }
  
  .contact-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .contact-row__label { margin-bottom: 0; width: 200px; }
  .contact-row__value { flex: 1; text-align: center; }
  .contact-row__arrow { position: static; opacity: 1; transform: none; background: transparent; color: var(--bg); }
  .contact-row:hover .contact-row__arrow { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; transform: none !important; }
}
