/* ============================================================
   BASE — MARCELO MOREIRA CORRETOR
   Aesthetic: Luxury Editorial — Dark Ink + Warm Gold Accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink:       #0d0d0d;
  --ink-soft:  #1a1a1a;
  --paper:     #f5f1eb;
  --paper-alt: #ede9e0;
  --gold:      #c9a84c;
  --gold-lt:   #e8c96a;
  --gold-dk:   #9b7a2e;
  --slate:     #3a3a3a;
  --mist:      #8a8278;
  --white:     #ffffff;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;
  --ff-mono:    'DM Mono', monospace;

  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --header-h-desktop: 72px;
  --header-h-mobile:  56px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--ff-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-h-desktop);
}

.main-content {
  flex: 1;
  width: 100%;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h-desktop);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
  gap: 40px;
}

/* Linha dourada animada no rodapé do header */
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-dk) 20%,
    var(--gold-lt) 50%,
    var(--gold-dk) 80%,
    transparent 100%
  );
  opacity: 0.6;
}

/* ---- LOGO ---- */
.logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  height: clamp(38px, 6vw, 48px);
  width: auto;
  max-width: 180px;
  filter: brightness(1.05);
  transition: opacity 0.2s ease;
  margin-top: 8px;
}

.logo:hover {
  opacity: 0.85;
}

/* ============================================================
   NAVEGAÇÃO
   ============================================================ */
nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 1px;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* Underline dourado animado */
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-smooth);
}

nav ul li a:hover {
  color: var(--white);
}

nav ul li a:hover::after {
  transform: scaleX(1);
}

/* Link ativo */
nav ul li a.active {
  color: var(--gold);
}

nav ul li a.active::after {
  transform: scaleX(1);
  background: var(--gold);
}

/* ---- Botão CTA no nav (Agendar Visita) ---- */
nav ul li a.btn,
nav ul li a.btn-cta {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 1px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

nav ul li a.btn::after,
nav ul li a.btn-cta::after {
  display: none;
}

nav ul li a.btn:hover,
nav ul li a.btn-cta:hover {
  background: var(--gold-lt);
  color: var(--ink);
  transform: translateX(3px);
}

/* ============================================================
   MENU TOGGLE MOBILE
   ============================================================ */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  border-radius: 1px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  z-index: 1001;
}

.menu-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--ink-soft);
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 32px 8vw;
  margin-top: auto;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
}

/* Linha dourada no topo do footer */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8vw;
  right: 8vw;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-dk) 30%,
    var(--gold-lt) 50%,
    var(--gold-dk) 70%,
    transparent 100%
  );
  opacity: 0.4;
}

footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--gold-lt);
}

/* ============================================================
   UTILITÁRIOS GLOBAIS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 1px;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--gold-lt);
  color: var(--ink);
  transform: translateX(3px);
}

.btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 1.5px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-h-mobile);
  }

  header {
    height: var(--header-h-mobile);
    padding: 0 5vw;
  }

  .menu-toggle { display: flex; }

  nav {
    position: absolute;
    top: var(--header-h-mobile);
    left: 0;
    right: 0;
    background: var(--ink-soft);
    border-top: 1px solid rgba(201,168,76,0.15);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-smooth);
    flex: none;
    justify-content: flex-start;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  }

  nav.mobile-open {
    max-height: 400px;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }

  nav ul li { width: 100%; }

  nav ul li a {
    display: block;
    padding: 13px 5vw;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.7rem;
  }

  nav ul li a::after { display: none; }

  nav ul li:last-child a { border-bottom: none; }

  nav ul li a.btn,
  nav ul li a.btn-cta {
    margin: 10px 5vw;
    width: calc(100% - 10vw);
    justify-content: center;
  }

  footer {
    padding: 28px 5vw;
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  header { padding: 0 4vw; }

  .menu-toggle {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}

@media (min-width: 769px) {
  .menu-toggle  { display: none !important; }
  nav           { display: flex !important; max-height: none !important; position: relative !important; background: transparent !important; box-shadow: none !important; border: none !important; }
  nav ul        { flex-direction: row !important; }
}