/* ============================================================
   VISTORIA.AI — Estilos comuns a todas as páginas
   Variáveis · Base · Menu · Footer · Eyebrow
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --daintree:      #012a36;
  --daintree-2:    #053848;
  --daintree-3:    #0a4858;
  --romesco:       #f58a04;
  --romesco-soft:  #ffae47;
  --silver:        #f1f1f1;
  --green-1:       #425c0c;
  --green-2:       #84b818;
  --green-3:       #a2c951;
  --vistoria-blue: #2b3a8f;
  --paper:         #f7f6f3;
  --paper-card:    #ffffff;
  --ink:           #0e2c37;
  --ink-soft:      #3d5660;
  --ink-faint:     #6b7e86;
  --rule:          #e2e0da;
  --rule-soft:     #ecebe6;
  --pad-x:         clamp(1.25rem, 5vw, 3rem);
}
html[data-theme="dark"] {
  --paper:      #0d1b21;
  --paper-card: #132028;
  --ink:        #e2e0da;
  --ink-soft:   #96adb6;
  --ink-faint:  #5e7880;
  --rule:       #1d3340;
  --rule-soft:  #162b35;
}

/* ---- Base reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
:target { scroll-margin-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
::selection { background: var(--romesco); color: #1a0f00; }

/* ---- Eyebrow label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.68rem, 1.5vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--romesco);
  margin: 0 0 1.3rem;
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--romesco);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   MENU — partilhado por landing (.nav) e páginas legais (.topbar)
   ============================================================ */

/* ---- Container ---- */
.nav,
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e2e0da;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
html[data-theme="dark"] .nav,
html[data-theme="dark"] .topbar {
  background: #132028;
  border-bottom-color: #1d3340;
}

/* ---- Inner ---- */
.nav__inner,
.topbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ---- Logo ---- */
.nav__logo,
.topbar__logo { display: flex; align-items: center; }
.nav__logo img,
.topbar__logo img { height: clamp(20px, 4vw, 26px); width: auto; display: block; }

/* ---- Nav wrap ---- */
.nav__wrap,
.docnav-wrap { position: relative; }

/* ---- Hamburger ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle:hover { background: rgba(1,42,54,0.07); color: var(--ink); }
html[data-theme="dark"] .nav-toggle       { color: rgba(241,241,241,0.6); }
html[data-theme="dark"] .nav-toggle:hover { background: rgba(255,255,255,0.08); color: var(--silver); }

/* ---- Nav links / pill ---- */
.nav__links,
.docnav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(1, 42, 54, 0.06);
  border-radius: 999px;
}
html[data-theme="dark"] .nav__links,
html[data-theme="dark"] .docnav { background: rgba(255,255,255,0.06); }

.nav__links a,
.docnav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.62rem, 1.3vw, 0.72rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav__links a:hover,
.docnav a:hover { color: var(--ink); background: rgba(1,42,54,0.06); }
html[data-theme="dark"] .nav__links a,
html[data-theme="dark"] .docnav a { color: rgba(241,241,241,0.55); }
html[data-theme="dark"] .nav__links a:hover,
html[data-theme="dark"] .docnav a:hover { color: var(--silver); background: rgba(255,255,255,0.08); }

.nav__links a[aria-current="page"],
.docnav a[aria-current="page"] { background: var(--daintree); color: var(--silver); }
html[data-theme="dark"] .nav__links a[aria-current="page"],
html[data-theme="dark"] .docnav a[aria-current="page"] { background: rgba(255,255,255,0.14); color: var(--silver); }

/* ---- Theme toggle ---- */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover { background: rgba(1,42,54,0.07); color: var(--ink); }
html[data-theme="dark"] .theme-toggle       { color: rgba(241,241,241,0.55); }
html[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.1); color: var(--silver); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---- Mobile: hamburger + dropdown ---- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav__links,
  .docnav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 0.4rem;
    min-width: 180px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    z-index: 9999;
    transform: translateZ(0);
    isolation: isolate;
  }
  .nav__links.open,
  .docnav.open { display: flex; }
  .nav__links a,
  .docnav a { color: var(--ink-soft); border-radius: 10px; font-size: 0.76rem; padding: 0.52rem 0.9rem; position: relative; z-index: 1; }
  .nav__links a[aria-current="page"],
  .docnav a[aria-current="page"] { background: var(--daintree); color: var(--silver); }
  /* dark mode — regra dentro do @media sobrepõe a global */
  html[data-theme="dark"] .nav__links,
  html[data-theme="dark"] .docnav { background: var(--paper-card); border-color: var(--rule); }
  html[data-theme="dark"] .nav__links a,
  html[data-theme="dark"] .docnav a { color: rgba(241,241,241,0.75); }
  .theme-toggle { width: 28px; height: 28px; }
  .theme-toggle svg { width: 14px; height: 14px; }
}

/* ============================================================
   FOOTER — idêntico em todas as páginas
   ============================================================ */
.foot {
  background: var(--daintree);
  color: var(--silver);
  position: relative;
  overflow: hidden;
}
.foot::before {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  left: -180px; top: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132,184,24,0.18) 0%, rgba(132,184,24,0) 65%);
  filter: blur(16px);
}
.foot__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.8rem, 7vw, 4rem) var(--pad-x) clamp(2rem, 5vw, 3rem);
  position: relative;
  z-index: 1;
}
.foot__brand img { height: clamp(34px, 7vw, 44px); width: auto; display: block; }
.foot__desc {
  margin: 1.2rem 0 0;
  max-width: 46ch;
  color: rgba(241,241,241,0.72);
  font-size: clamp(0.84rem, 1.3vw, 0.92rem);
  line-height: 1.6;
}
.foot__grid {
  margin: 2.2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.6rem 2rem;
}
.foot__col h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.66rem, 1.4vw, 0.8rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--romesco);
  margin: 0 0 0.7rem;
  font-weight: 500;
}
.foot__col p, .foot__col a {
  margin: 0 0 0.35rem;
  font-size: clamp(0.84rem, 1.3vw, 0.92rem);
  color: rgba(241,241,241,0.78);
  line-height: 1.55;
  text-decoration: none;
  display: block;
}
.foot__col a:hover { color: var(--romesco-soft); }
.foot__bottom {
  margin: 2.4rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(241,241,241,0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.7rem, 1.4vw, 0.78rem);
  color: rgba(241,241,241,0.5);
  letter-spacing: 0.03em;
}
.foot__bottom a { color: rgba(241,241,241,0.7); text-decoration: none; }
.foot__bottom a:hover { color: var(--romesco-soft); }
