/* MILANI — Apoio e Representação
   Tokens baseados em 05_agent_brief/design_tokens.css */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Paleta da marca */
  --milani-ink: #141618;
  --milani-steel: #536273;
  --milani-navy: #0B1D2D;
  --milani-blue: #496785;
  --milani-off-white: #F5F6F7;
  --milani-white: #FFFFFF;
  --milani-border: #D9E0E6;
  --milani-text-muted: #667788;

  --font-sans: "Manrope", "Inter", Arial, sans-serif;
  --max-width: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --space-section: clamp(72px, 8vw, 128px);
  --header-h: 76px;
}

/* Tema claro (padrão) */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--milani-white);
  --surface: var(--milani-off-white);
  --text: var(--milani-ink);
  --text-soft: var(--milani-steel);
  --text-muted: var(--milani-text-muted);
  --accent: var(--milani-blue);
  --line: var(--milani-border);
  --line-strong: var(--milani-ink);
  --header-bg: rgba(255, 255, 255, 0.94);
  --btn-bg: var(--milani-navy);
  --btn-fg: var(--milani-white);
  --btn-bg-hover: #17324A;
  --band-bg: var(--milani-navy);
  --band-heading: var(--milani-white);
  --band-text: #E9EEF2;
  --band-muted: #9FB1C2;
  --band-line: rgba(159, 177, 194, 0.22);
}

/* Tema escuro — navy profundo, texto off-white e o azul claro
   da versão do logo para fundos escuros. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08121C;
  --surface: #0D1A27;
  --text: #EDF1F4;
  --text-soft: #A9B8C7;
  --text-muted: #8394A6;
  --accent: #7FA6CC;
  --line: rgba(159, 177, 194, 0.16);
  --line-strong: rgba(237, 241, 244, 0.55);
  --header-bg: rgba(8, 18, 28, 0.9);
  --btn-bg: #EDF1F4;
  --btn-fg: var(--milani-navy);
  --btn-bg-hover: #FFFFFF;
  --band-bg: var(--milani-navy);
  --band-heading: #FFFFFF;
  --band-text: #E2E9EF;
  --band-muted: #9FB1C2;
  --band-line: rgba(159, 177, 194, 0.18);
}

/* Troca de logo conforme o tema */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure, address { margin: 0; }
ol, ul { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Tipografia ---------- */

/* O espaçamento largo ecoa a linha "APOIO E REPRESENTAÇÃO" do logo. */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.eyebrow-light { color: var(--band-muted); }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.875rem); max-width: 18ch; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; }

.h1-muted { color: var(--text-soft); }

.lede {
  margin-top: 28px;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.65;
  color: var(--text-soft);
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.875rem; }

.btn-link {
  padding: 0 4px;
  color: var(--text);
}
.btn-link span { transition: transform .2s ease; }
.btn-link:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand img { width: auto; height: 52px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.site-nav ul {
  display: flex;
  gap: 32px;
}
.site-nav ul a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 0;
  transition: color .2s ease;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav ul a:hover { color: var(--text); }
.site-nav ul a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .brand img { height: 44px; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle-icon,
  .nav-toggle-icon::before {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform .25s ease;
  }
  .nav-toggle-icon { position: relative; transform: translateY(-3px); }
  .nav-toggle-icon::before { content: ""; position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { transform: translateY(0) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(-7px) rotate(-90deg); }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 16px var(--gutter) 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    display: block;
    padding: 14px 0;
    font-size: 1.125rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .site-nav ul a::after { display: none; }
  .site-nav .btn { justify-content: center; min-height: 48px; }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 9vw, 128px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 40px;
}

/* Monograma em destaque, sem fundo. */
.hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-mark img {
  width: 100%;
  max-width: 520px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { justify-content: flex-start; }
  .hero-mark img { max-width: 360px; }
}

/* ---------- Seções ---------- */

.section { padding: var(--space-section) 0; }

.section-head {
  margin-bottom: clamp(40px, 5vw, 72px);
}

/* Atuação — lista editorial em vez de cards */
#atuacao { border-top: 1px solid var(--line); }

.services { border-top: 1px solid var(--line-strong); }

.service {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px 40px;
  align-items: baseline;
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
.service-index {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.service h3 { font-size: clamp(1.25rem, 2vw, 1.625rem); }
.service p {
  max-width: 34rem;
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .service {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .service p { grid-column: 2; }
}

/* Sobre + processo */
.section-dark {
  background: var(--band-bg);
  color: var(--band-text);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}

.about-statement {
  max-width: 22ch;
  font-size: clamp(1.625rem, 3vw, 2.375rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--band-heading);
}

.process-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--band-muted);
  margin-bottom: 20px;
}

.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--band-line);
}
.steps li:last-child { border-bottom: 1px solid var(--band-line); }
.step-index {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--band-muted);
  font-variant-numeric: tabular-nums;
}
.steps p { font-size: 1.0625rem; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Contato */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.contact h2 { max-width: 16ch; }

.contact-list { border-top: 1px solid var(--line-strong); }

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-value {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  transition: color .2s ease;
}
.contact-item:hover .contact-value { color: var(--accent); }


@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  text-align: center;
}

/* Botão circular sobre a linha do rodapé, centralizado. */
.footer-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  text-decoration: none;
}
.footer-top-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color .3s ease, color .3s ease, background-color .3s ease;
}
.footer-top-icon svg {
  width: 18px;
  height: 18px;
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}
.footer-top-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .3s ease;
}
.footer-top:hover .footer-top-icon {
  border-color: var(--accent);
  color: var(--accent);
}
.footer-top:hover .footer-top-icon svg { transform: translateY(-3px); }
.footer-top:hover .footer-top-label { color: var(--text); }
.footer-top:focus-visible { outline: none; }
.footer-top:focus-visible .footer-top-icon {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
}
.footer-logo { width: auto; height: 56px; }
.footer-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- Movimento discreto ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
