/* ==========================================================================
   Fernandes & Tomie — sistema de design (Master Plan v6.0)
   Branco predominante · verde só como acento · Cormorant Garamond + Inter.
   ========================================================================== */

/* ---------- Fontes auto-hospedadas (variáveis, subset latin) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/CormorantGaramond.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/Inter.woff2") format("woff2");
}

:root {
  --verde-escuro: #21402e;
  --verde: #33573e;
  --sage: #5f8257;
  --sage-claro: #9fbf95;
  --tinta: #2a2f36;          /* texto — cinza muito escuro, nunca preto */
  --tinta-suave: #5c646e;    /* texto secundário */
  --linha: #e7e9e6;          /* bordas sutis */
  --fundo-suave: #f5f8f5;    /* faixas discretas (verde quase imperceptível) */
  --branco: #ffffff;
  --whatsapp: #25d366;
  --max: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--tinta); line-height: 1.7; background: var(--branco); -webkit-font-smoothing: antialiased; font-size: 1.02rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sage); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--verde-escuro); line-height: 1.12; font-weight: 600; }

.container { width: 90%; max-width: var(--max); margin: 0 auto; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .2em; font-size: .76rem; font-weight: 600; color: #4f6f48; }

/* Acessibilidade */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--verde-escuro); color: #fff; padding: .6rem 1rem; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
.ico { width: 30px; height: 30px; }

/* ---------- Botões ---------- */
.btn { font-family: var(--sans); font-weight: 600; font-size: .95rem; display: inline-block; padding: .9rem 1.7rem; border-radius: 8px; background: var(--verde); color: #fff; border: 1px solid var(--verde); transition: background .2s, border-color .2s, transform .1s; }
.btn:hover { background: var(--verde-escuro); border-color: var(--verde-escuro); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--verde); }
.btn-ghost:hover { background: var(--verde); color: #fff; }

/* ---------- Cabeçalho minimalista ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linha); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .85rem 0; }
.brand img, .brand .custom-logo { height: 52px; width: auto; }
.brand a { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--verde-escuro); }
.header-right { display: flex; align-items: center; gap: 1rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 1.6rem; color: var(--verde-escuro); line-height: 1; }

.main-nav .menu { list-style: none; display: flex; align-items: center; gap: .1rem; }
.main-nav .menu > li > a { font-family: var(--sans); font-weight: 500; font-size: .95rem; color: var(--tinta); padding: .5rem .85rem; border-radius: 6px; display: block; }
.main-nav .menu > li > a:hover { color: var(--verde); background: var(--fundo-suave); }
.main-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 14px 40px rgba(20,30,25,.10); list-style: none; padding: .4rem; display: none; }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .menu-item-has-children:hover > .sub-menu, .main-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; padding: .5rem .7rem; border-radius: 6px; color: var(--tinta); font-size: .92rem; }
.main-nav .sub-menu a:hover { background: var(--fundo-suave); color: var(--verde); }

/* ---------- Seções (muito respiro) ---------- */
section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-head { max-width: 620px; margin: 0 auto clamp(2.6rem, 5vw, 4rem); text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: .9rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section-head p { color: var(--tinta-suave); margin-top: .7rem; font-size: 1.08rem; }
.bg-suave { background: var(--fundo-suave); }

/* ---------- Hero (foto-first) ---------- */
.hero { display: grid; place-items: center; text-align: center; min-height: 74vh; padding: clamp(4rem, 10vh, 7rem) 0; }
.hero-inner { max-width: 760px; }
.hero-eyebrow { margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); line-height: 1.06; letter-spacing: -.01em; margin-bottom: 1.2rem; }
.hero-sub { font-size: 1.2rem; color: var(--tinta-suave); max-width: 42ch; margin: 0 auto 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
/* Com fotografia: protagonista, ocupando a primeira dobra */
.hero.has-photo { position: relative; color: #fff; min-height: 88vh; background-image: var(--hero-img); background-size: cover; background-position: center; }
.hero.has-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,30,22,.32), rgba(18,30,22,.66)); }
.hero.has-photo .hero-inner { position: relative; z-index: 1; }
.hero.has-photo h1 { color: #fff; }
.hero.has-photo .hero-eyebrow { color: #cfe0d3; }
.hero.has-photo .hero-sub { color: #edf2ed; }
.hero.has-photo .btn-ghost { border-color: rgba(255,255,255,.85); color: #fff; }
.hero.has-photo .btn-ghost:hover { background: #fff; color: var(--verde-escuro); }

/* ---------- Como podemos ajudar ---------- */
.help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.help-card { padding: 2.2rem 1.7rem; border: 1px solid var(--linha); border-radius: 16px; background: #fff; transition: box-shadow .2s, transform .2s, border-color .2s; }
.help-card:hover { border-color: var(--sage-claro); box-shadow: 0 18px 44px rgba(33,64,46,.08); transform: translateY(-3px); }
.help-card .ico { color: var(--sage); margin-bottom: 1.2rem; }
.help-card h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.help-card p { color: var(--tinta-suave); font-size: .93rem; }
.areas-mais { text-align: center; color: var(--tinta-suave); margin-top: 2.2rem; font-size: .95rem; }
.center-cta { text-align: center; margin-top: .7rem; }
.center-cta a, .team-link { font-family: var(--sans); font-weight: 600; font-size: .92rem; color: var(--verde); }
.center-cta a:hover, .team-link:hover { color: var(--sage); }

/* ---------- Blocos divididos (Escritório) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-photo { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--linha); background: linear-gradient(160deg, #eef4ee, #e0eae1); display: grid; place-items: center; }
.split-photo img { width: 100%; height: 100%; object-fit: cover; }
.split h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
.split p { color: var(--tinta-suave); margin-bottom: 1.4rem; }

/* ---------- Profissionais ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.2rem; }
.team-card .photo { aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; margin-bottom: 1.2rem; background: #eef4ee; }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.team-card h3 { font-size: 1.35rem; }
.team-card .oab { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: #4f6f48; margin: .25rem 0 .5rem; }
.team-card p { color: var(--tinta-suave); font-size: .92rem; }
.team-link { display: inline-block; margin-top: .8rem; }

/* ---------- Centro de Conhecimento ---------- */
.know-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.know-card { border: 1px solid var(--linha); border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.know-card:hover { box-shadow: 0 18px 44px rgba(33,64,46,.08); transform: translateY(-3px); }
.know-cover { aspect-ratio: 3 / 2; display: flex; align-items: flex-end; padding: 1.1rem; }
.know-cover--1 { background: linear-gradient(150deg, #2f5138, #4a7255); }
.know-cover--2 { background: linear-gradient(150deg, #21402e, #3a5f43); }
.know-cover--3 { background: linear-gradient(150deg, #4a7255, #6f9068); }
.know-cat { color: #fff; font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; background: rgba(255,255,255,.18); padding: .3rem .6rem; border-radius: 6px; }
.know-body { padding: 1.3rem 1.5rem 1.7rem; }
.know-body .tag { font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: #4f6f48; }
.know-body h3 { font-size: 1.3rem; margin-top: .4rem; line-height: 1.2; }

/* ---------- Faixa de chamada (discreta, não chapada) ---------- */
.cta-band { background: var(--fundo-suave); border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: .8rem; }
.cta-band p { color: var(--tinta-suave); max-width: 40em; margin: 0 auto 1.8rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--linha); }
.faq summary { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--verde-escuro); cursor: pointer; padding: 1.5rem 2.2rem 1.5rem 0; list-style: none; position: relative; transition: color .2s; }
.faq summary:hover { color: var(--verde); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: 1.35rem; color: var(--sage); font-size: 1.5rem; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { color: var(--tinta-suave); padding: 0 0 1.6rem; max-width: 64ch; line-height: 1.8; }

/* ---------- Contato ---------- */
.contato-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contato-lista { list-style: none; display: grid; gap: 1rem; margin-bottom: 1.6rem; }
.contato-lista li { display: flex; gap: .7rem; align-items: flex-start; color: var(--tinta); }
.contato-lista .ico { color: var(--sage); flex: 0 0 auto; width: 22px; height: 22px; margin-top: .2rem; }
.contato-mapa iframe { border-radius: 16px; border: 1px solid var(--linha); }
.contato-info h2, .contato-form h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }

/* ---------- Formulário ---------- */
.ft-form { display: grid; gap: 1.1rem; }
.ft-form label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 500; color: var(--tinta); }
.ft-form label > span { font-family: var(--sans); }
.ft-form input, .ft-form select, .ft-form textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--tinta); width: 100%;
  padding: .75rem .85rem; border: 1px solid var(--linha); border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.ft-form input:focus, .ft-form select:focus, .ft-form textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(95,130,87,.15); }
.ft-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.ft-form .consent { grid-template-columns: auto 1fr; align-items: start; gap: .6rem; font-weight: 400; color: var(--tinta-suave); font-size: .86rem; }
.ft-form .consent input { width: auto; margin-top: .2rem; }
.ft-form button { justify-self: start; margin-top: .3rem; cursor: pointer; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { background: #eef6ee; border: 1px solid var(--sage-claro); color: var(--verde-escuro); padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; }
.form-erro { background: #fbeceb; border: 1px solid #e5b4b0; color: #8a2a24; padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Rodapé (mantido verde, refinado) ---------- */
.site-footer { background: var(--verde-escuro); color: #c4d3c8; padding: clamp(3rem, 6vw, 4.5rem) 0 1.6rem; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.site-footer h4 { font-family: var(--serif); font-weight: 600; color: #fff; margin-bottom: 1.1rem; font-size: 1.2rem; }
.site-footer p { color: #a9bdae; max-width: 34ch; }
.site-footer img, .site-footer .custom-logo { height: 50px; margin-bottom: 1.2rem; background: #fff; padding: 7px 11px; border-radius: 8px; }
.site-footer ul, .site-footer .menu-footer { list-style: none; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: #c4d3c8; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { text-align: center; border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.6rem; padding-top: 1.4rem; font-size: .85rem; color: #9fb4a4; }

/* ---------- Página interna (hero claro) ---------- */
.page-hero { background: #fff; border-bottom: 1px solid var(--linha); text-align: center; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.6rem, 3vw, 2.2rem); }
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.page-hero p { color: var(--tinta-suave); max-width: 44em; margin: .8rem auto 0; }
.conteudo-pagina { max-width: 760px; }
.conteudo-pagina p { margin-bottom: 1.1rem; }

/* ---------- WhatsApp flutuante ---------- */
.whats-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.22); transition: transform .2s; color: #fff; }
.whats-float:hover { transform: scale(1.08); color: #fff; }
.whats-float svg { width: 30px; height: 30px; }

.center { text-align: center; margin-top: clamp(1.8rem, 3vw, 2.6rem); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .contato-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 460px; margin: 0 auto; }
  .help-grid, .know-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--linha); box-shadow: 0 14px 30px rgba(20,30,25,.08); display: none; }
  .main-nav.open { display: block; }
  .main-nav .menu { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem; }
  .main-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; border-left: 2px solid var(--linha); margin-left: 1rem; }
  .header-cta-btn { display: none; }
  .help-grid, .know-grid, .team-grid, .site-footer .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
