/* ===========================================================
   Ana Carolyne — Advocacia · v2
   Direção: advocacia editorial, sóbria, humana e premium.
   Base bege quente · ação em vinho escuro · texto espresso.
   Tipografia: Cormorant Garamond (títulos) + Inter (corpo)
   =========================================================== */

:root {
  --bg: #e6dcd3;
  --bg-deep: #ded2c8;
  --surface: #faf7f3;
  --surface-2: #f2ebe3;

  --text: #25211e;
  --muted: #5f5650;
  --subtle: #7a7069;

  --accent: #6f2f2f;
  --accent-hover: #582525;
  --accent-soft: rgba(111, 47, 47, 0.10);
  --gold: #b8946a;

  --line: #d4c8be;
  --line-soft: rgba(37, 33, 30, 0.08);
  --dark: #2b2927;

  --shadow-sm: 0 14px 40px -26px rgba(37, 33, 30, 0.5);
  --shadow-md: 0 24px 60px -30px rgba(37, 33, 30, 0.45);
  --shadow-card: 0 20px 50px rgba(37, 33, 30, 0.06);
  --shadow-card-hover: 0 28px 70px rgba(37, 33, 30, 0.12);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --container: 1160px;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

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

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--text); }

h1 {
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }

p { font-size: clamp(1rem, 1.2vw, 1.075rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow.light { color: var(--gold); }

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Ícones ---------- */
.ico {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.ico-wa { fill: currentColor; stroke: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px rgba(111, 47, 47, 0.7); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(111, 47, 47, 0.8); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-light { background: var(--surface); color: var(--accent); }
.btn-light:hover { background: #fff; transform: translateY(-2px); }
.btn-lg { padding: 1.05rem 2.1rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(230, 220, 211, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line-soft); background: rgba(230, 220, 211, 0.94); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 92px;
  transition: height 0.25s ease;
}
.site-header.scrolled .header-inner { height: 76px; }

.brand { display: flex; align-items: center; margin-right: auto; }
.brand-logo { height: 56px; width: auto; display: block; transition: height 0.25s ease; }
.site-header.scrolled .brand-logo { height: 46px; }
/* brand-name / brand-sub seguem em uso no rodapé */
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; color: var(--text); }
.brand-sub { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; gap: 1.9rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--text); position: relative; padding: 0.2rem 0; transition: color 0.2s ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--accent); }

.header-cta { padding: 0.62rem 1.15rem; font-size: 0.9rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 28px; background: none; border: none; cursor: pointer; }
.nav-toggle span { height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.2rem, 7vw, 6.5rem) 0 clamp(3.5rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 82% 18%, rgba(111, 47, 47, 0.10), transparent 34%),
    radial-gradient(circle at 8% 90%, rgba(184, 148, 106, 0.10), transparent 40%),
    linear-gradient(180deg, #e9e0d8 0%, var(--bg-deep) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-text h1 { margin: 0.5rem 0 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.trust {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-top: 2.4rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.trust li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.92rem; font-weight: 500; color: var(--text); }
.trust .ico { width: 20px; height: 20px; color: var(--accent); }
.trust-mobile { display: none; }

/* Hero photo */
.hero-photo { position: relative; display: flex; justify-content: center; }
.hero-photo::before {
  content: "";
  position: absolute;
  width: 78%;
  height: 86%;
  right: -4%;
  top: 8%;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 22px;
  opacity: 0.16;
  z-index: 0;
}
.photo-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--bg-deep);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.photo-tag {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.photo-tag strong { font-size: 0.95rem; color: var(--text); }
.photo-tag span { font-size: 0.78rem; color: var(--muted); }

/* ---------- Seções ---------- */
.section { position: relative; padding: clamp(3.8rem, 8vw, 7rem) 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { margin-bottom: 3rem; max-width: 640px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { margin-top: 0.4rem; }
.section-intro { color: var(--muted); margin-top: 1rem; }

/* ---------- Sobre ---------- */
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(111, 47, 47, 0.25); }
.about-card h3 { margin-bottom: 0.5rem; }
.about-card p { color: var(--muted); font-size: 0.97rem; }

.card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  margin-bottom: 1.3rem;
}
.card-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Áreas ---------- */
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(111, 47, 47, 0.25); box-shadow: var(--shadow-card-hover); }
.card h3 { margin-bottom: 0.4rem; }
.card > p { color: var(--muted); font-size: 0.97rem; margin-bottom: 1.1rem; }
.card ul { list-style: none; display: grid; gap: 0.5rem; margin-bottom: 1.4rem; }
.card ul li { position: relative; padding-left: 1.1rem; font-size: 0.9rem; color: #4a423a; }
.card ul li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link .ico { width: 16px; height: 16px; transition: transform 0.2s ease; }
.card-link:hover .ico { transform: translateX(4px); }

.card-cta {
  grid-column: 1 / -1;
  background: var(--dark);
  color: #fff;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2.5rem;
  flex-wrap: wrap;
  padding: 2.2rem 2.6rem;
  box-shadow: var(--shadow-md);
}
.card-cta-text { display: grid; gap: 0.4rem; }
.card-cta h3 { color: #fff; }
.card-cta p { color: rgba(255, 255, 255, 0.78); font-size: 0.97rem; margin: 0; max-width: 56ch; }
.card-cta .btn { white-space: nowrap; flex-shrink: 0; }
.card-cta:hover { transform: none; border-color: transparent; }

/* ---------- Como funciona (stepper) ---------- */
.stepper {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  position: relative;
}
.stepper::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 14%;
  right: 14%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.step { position: relative; z-index: 1; padding-top: 0; }
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  box-shadow: 0 12px 26px -12px rgba(111, 47, 47, 0.7);
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.97rem; max-width: 30ch; }

/* ---------- Contato ---------- */
.section-dark {
  background:
    radial-gradient(circle at 80% 10%, rgba(111, 47, 47, 0.35), transparent 45%),
    var(--dark);
  color: #fff;
  text-align: center;
}
.section-dark h2 { color: #fff; margin-bottom: 1rem; }
.contato-inner { max-width: 640px; margin: 0 auto; }
.contato-lead { color: rgba(255, 255, 255, 0.74); margin-bottom: 2.2rem; }
.section-dark .btn-primary { background: var(--surface); color: var(--accent); box-shadow: 0 14px 30px -14px rgba(0,0,0,0.6); }
.section-dark .btn-primary:hover { background: #fff; }
.contato-info { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 2.5rem; margin-top: 2.6rem; }
.contato-info li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); overflow-wrap: anywhere; }
.contato-info .ico { color: var(--gold); }
.contato-info a { transition: color 0.2s ease; }
.contato-info a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); padding: 3rem 0 2.6rem; border-top: 1px solid var(--line); }
.footer-inner { text-align: center; display: grid; gap: 0.8rem; }
.footer-brand { display: flex; flex-direction: column; align-items: center; line-height: 1.18; }
.footer-oab { font-size: 0.9rem; color: var(--text); font-weight: 600; }
.footer-legal { font-size: 0.8rem; color: var(--muted); max-width: 62ch; margin: 0.4rem auto 0; line-height: 1.6; }
.footer-copy { font-size: 0.82rem; color: var(--subtle); margin-top: 0.6rem; }

/* ---------- CTA fixo mobile ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: min(240px, calc(100vw - 48px));
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 14px 36px -12px rgba(111, 47, 47, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-cta.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.mobile-cta .ico-wa { width: 19px; height: 19px; }

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }
}

/* ---------- Foco acessível ---------- */
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .trust { justify-items: center; }
  .trust li { justify-content: center; }
  .hero-photo { order: -1; margin-bottom: 1.5rem; }
  .hero-photo::before { display: none; }
  .photo-frame { max-width: 320px; }
  .about-cards { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .stepper { grid-template-columns: 1fr; gap: 1.2rem; }
  .stepper::before { display: none; }
  .step { display: grid; grid-template-columns: 54px 1fr; column-gap: 1.1rem; align-items: start; }
  .step-badge { margin-bottom: 0; }
  .step h3, .step p { grid-column: 2; }
  .step h3 { margin-top: 0.4rem; }
}

@media (max-width: 720px) {
  /* Header compacto */
  .header-inner { height: 70px; }
  .site-header.scrolled .header-inner { height: 62px; }
  .brand-logo { height: 50px; max-width: 70vw; }
  .site-header.scrolled .brand-logo { height: 44px; }

  .nav {
    position: absolute;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 340px; border-bottom: 1px solid var(--line); }
  .nav a { padding: 1rem 24px; border-top: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  /* Hero copy-first, mais compacto */
  .hero { padding: 2rem 0 1.5rem; }
  .hero .eyebrow { margin-bottom: 0.8rem; }
  .eyebrow-oab { display: none; }
  .hero-text { order: 0; }
  .hero-text h1 { margin: 0.2rem 0 0.85rem; }
  .hero-actions { margin-top: 1.4rem; flex-direction: column; align-items: center; gap: 0.6rem; }

  /* CTA primário cheio, secundário vira link leve */
  .hero-actions .btn-primary { width: 100%; max-width: 300px; }
  .hero-actions .btn-ghost {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
  }
  .hero-actions .btn-ghost:hover { background: none; border: none; transform: none; }
  .hero-actions .btn-ghost::after { content: "\2193"; font-weight: 700; margin-left: 4px; }

  /* Foto compacta, margens enxutas */
  .hero-photo { order: 1; margin: 1.1rem auto 0; flex-direction: column; align-items: center; }
  .hero { padding-bottom: 1.25rem; }
  .photo-frame { max-width: 230px; width: 100%; }
  .photo-frame img { aspect-ratio: auto; height: clamp(190px, 32svh, 230px); object-position: center 14%; }
  .photo-tag { display: none; }

  /* Badges: ocultos acima e reposicionados abaixo da foto no mobile */
  .hero-text .trust { display: none; }
  .trust-mobile {
    display: grid;
    margin-top: 1.3rem;
    padding-top: 0;
    border-top: none;
  }
  .trust li:nth-child(3) { display: none; }

  /* CTA flutuante */
  .mobile-cta { display: inline-flex; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 540px) {
  .areas-grid { grid-template-columns: 1fr; }
  .card-cta { flex-direction: column; align-items: flex-start; gap: 1.1rem; padding: 1.9rem 1.7rem; }
}
