/* ============================================================
   LEIRICONSULTE — Folha de estilos principal
   Identidade: Preto · Dourado · Creme
   Tipografia: Cormorant Garamond (serif) + Inter Tight (sans)
   ============================================================ */

/* ---------- 1. Variáveis ---------- */
:root {
  /* Cores da marca */
  --gold:        #d4a437;
  --gold-light:  #e8c366;
  --gold-dark:   #a87c20;
  --black:       #141416;
  --dark:        #26262a;
  --grey-700:    #4a4a52;
  --grey-500:    #7a7a82;
  --grey-300:    #c8c8ce;
  --grey-100:    #ececec;
  --cream:       #faf7f2;
  --cream-warm:  #f5f0e8;
  --white:       #ffffff;
  --whatsapp:    #25d366;
  --whatsapp-dark: #128c7e;

  /* Tipografia */
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Sombras */
  --shadow-sm:   0 2px 8px rgba(20, 20, 22, 0.06);
  --shadow-md:   0 12px 32px rgba(20, 20, 22, 0.08);
  --shadow-lg:   0 24px 60px rgba(20, 20, 22, 0.14);
  --shadow-gold: 0 12px 32px rgba(212, 164, 55, 0.28);

  /* Raios */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 28px;

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

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--black);
}

::selection { background: var(--gold); color: var(--black); }

/* Destaque dourado tipo highlighter (usado em headlines) */
.gold-mark {
  position: relative;
  display: inline;
  color: var(--black);
  padding: 0 0.05em;
  background: linear-gradient(180deg, transparent 62%, var(--gold) 62%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Helper genérico para pré-títulos */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-700);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

/* ---------- 3. Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all .3s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--black); color: var(--cream); }
.btn-primary:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.btn-ghost {
  color: var(--black);
  background: transparent;
  border: 1px solid var(--black);
}
.btn-ghost:hover { background: var(--black); color: var(--cream); }

.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover {
  background: var(--gold-dark);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn svg { width: 16px; height: 16px; }

/* ---------- 4. Top bar (informação de contacto) ---------- */
.top-bar {
  background: var(--black);
  color: var(--cream);
  padding: 0.6rem 0;
  font-size: 0.825rem;
  letter-spacing: 0.02em;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.top-bar a {
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.top-bar a:hover { color: var(--gold); }
.top-bar .top-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.top-bar svg { width: 14px; height: 14px; flex-shrink: 0; }

@media (max-width: 640px) {
  .top-bar { display: none; }
}

/* ---------- 5. Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}

/* Em mobile (≤640px) onde a top-bar está oculta, navbar fica fixa no topo.
   Mais fiável que sticky no Safari iOS com overflow-x: hidden. */
@media (max-width: 640px) {
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  body {
    padding-top: var(--navbar-h, 72px);
  }
  :root { --navbar-h: 72px; }
}
@media (max-width: 480px) {
  :root { --navbar-h: 66px; }
}
@media (max-width: 380px) {
  :root { --navbar-h: 60px; }
}
.navbar.scrolled {
  border-bottom-color: rgba(20, 20, 22, 0.08);
  box-shadow: var(--shadow-sm);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
  min-width: 0;
}
.navbar .logo {
  min-width: 0;
  flex: 0 1 auto;
}

@media (max-width: 720px) {
  .navbar .container {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    gap: 0.6rem;
  }
}

/* CTA inline visível só em mobile (mantém-se hambúrguer para navegação) */
.navbar-cta-mobile {
  display: none;
  align-items: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--black);
  color: var(--cream);
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.navbar-cta-mobile:hover,
.navbar-cta-mobile:focus-visible {
  background: var(--gold);
  color: var(--black);
  outline: none;
}

@media (max-width: 960px) {
  .navbar-cta-mobile { display: inline-flex; }
}

@media (max-width: 380px) {
  .navbar-cta-mobile {
    font-size: 12px;
    padding: 0.5rem 0.75rem;
  }
}

/* Padding inferior em mobile para a barra fixa de acções não tapar conteúdo */
@media (max-width: 720px) {
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
}

/* Logotipo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: opacity .3s var(--ease);
}
.logo:hover {
  opacity: 0.82;
}
.logo-img {
  display: block;
  height: 50px;
  width: auto;
  max-width: 240px;
  max-height: 50px;
  object-fit: contain;
}
.logo-img-footer {
  height: 56px !important;
  max-height: 56px !important;
  width: auto !important;
  max-width: 220px;
}

@media (max-width: 720px) {
  .logo-img {
    height: 44px;
    max-height: 44px;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 38px;
    max-height: 38px;
    max-width: 170px;
  }
}

@media (max-width: 360px) {
  .logo-img {
    height: 34px;
    max-height: 34px;
    max-width: 150px;
  }
}

/* Estilos legacy mantidos por compatibilidade caso seja necessário voltar ao SVG inline */
.logo-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.logo-mark .sq {
  position: absolute;
  border-radius: 1px;
  transition: transform .4s var(--ease);
}
.logo-mark .sq-1 { top: 0; left: 0; width: 22px; height: 22px; background: var(--gold); }
.logo-mark .sq-2 { top: 0; right: 0; width: 14px; height: 14px; background: var(--black); }
.logo-mark .sq-3 { bottom: 0; right: 4px; width: 10px; height: 10px; background: var(--gold); }
.logo:hover .sq-1 { transform: translate(-2px, -2px); }
.logo:hover .sq-2 { transform: translate(2px, -2px); }
.logo:hover .sq-3 { transform: translate(2px, 2px); }

.logo-text-wrap { display: flex; flex-direction: column; line-height: 1; }
.logo-text {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1;
}
.logo-text .accent { color: var(--gold); }
.logo-tagline {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-top: 4px;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a:hover { color: var(--black); }

.nav-cta {
  background: var(--black) !important;
  color: var(--cream) !important;
  padding: 0.75rem 1.25rem 0.75rem 1.5rem !important;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
  transition: all .35s var(--ease);
  border: 1px solid var(--black);
  position: relative;
  overflow: hidden;
}
.nav-cta::after { display: none !important; } /* desativa o sublinhado dos outros nav links */
.nav-cta .arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-grid;
  place-items: center;
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.nav-cta .arrow svg {
  width: 12px;
  height: 12px;
  color: var(--black);
  transition: transform .35s var(--ease);
}
.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--black) !important;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(212, 164, 55, 0.35);
}
.nav-cta:hover .arrow {
  background: var(--black);
}
.nav-cta:hover .arrow svg {
  color: var(--gold);
  transform: translateX(2px);
}

/* Menu mobile (hambúrguer) */
.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  z-index: 101;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--black);
  transition: transform .3s var(--ease), opacity .3s;
  transform-origin: center;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(85vw, 340px);
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    align-items: flex-start;
    transition: right .4s var(--ease);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; width: 100%; }
  .nav-cta { width: 100%; text-align: center; margin-top: 1rem; }
  body.menu-open { overflow: hidden; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -250px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(212, 164, 55, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 164, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 540px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-dark);
  font-weight: 500;
}

/* Bloco de destaque do diferencial */
.hero-highlight {
  margin: 2rem 0 1.75rem;
  padding: 1.5rem 1.75rem;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
  position: relative;
  max-width: 580px;
}
.hero-highlight .quote-mark {
  position: absolute;
  top: -10px;
  left: -2px;
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--black);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.hero-highlight p {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.4;
  color: var(--dark);
  font-style: italic;
  font-weight: 500;
}
.hero-highlight p strong {
  color: var(--black);
  font-weight: 700;
  font-style: normal;
}

.hero p.lead {
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  line-height: 1.7;
  color: var(--grey-700);
  margin-bottom: 2.25rem;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Lado visual do hero */
.hero-visual {
  position: relative;
  max-width: 560px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.hero-visual .trajectory-card {
  width: 100%;
}

/* Cards flutuantes sobre a imagem */
.floating-card {
  position: absolute;
  background: var(--white);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 4s ease-in-out infinite;
}
.floating-card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream-warm);
  color: var(--gold-dark);
  flex-shrink: 0;
}
.floating-card .card-icon svg { width: 20px; height: 20px; }
.floating-card .card-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--grey-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.floating-card .card-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--black);
  font-weight: 600;
  white-space: nowrap;
}
.fc-1 {
  top: 8%;
  left: -8%;
  animation-delay: 0s;
}
.fc-2 {
  bottom: 12%;
  right: -5%;
  animation-delay: 1.5s;
}

/* Indicador de scroll subtil */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-500);
  opacity: 0.7;
  pointer-events: none;
}
.scroll-hint .line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.scroll-hint .line::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--gold-dark);
  animation: scroll-down 2s ease-in-out infinite;
}
@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(180px); opacity: 0; }
}
@media (max-width: 960px) {
  .scroll-hint { display: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Hero responsivo */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { margin: 0 auto; max-width: 460px; }
  .fc-1 { left: 0; }
  .fc-2 { right: 0; }
}
@media (max-width: 480px) {
  .hero-highlight { padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
  .floating-card { padding: 0.7rem 0.9rem; }
  .floating-card .card-icon { width: 36px; height: 36px; }
  .floating-card .card-text strong { font-size: 0.85rem; }
}
