:root {
  --navy: #102a3c;
  --navy-deep: #0a1e2c;
  --slate: #244454;
  --gold: #c99752;
  --gold-deep: #a87535;
  --cream: #f4f0e7;
  --paper: #fbfaf6;
  --ink: #16232b;
  --muted: #63727a;
  --line: #d9d4ca;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(10, 30, 44, 0.16);
  --shell: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; left: 16px; top: 12px; padding: 10px 14px;
  background: var(--white); color: var(--navy); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.93);
  border-bottom: 1px solid rgba(16, 42, 60, 0.1);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; grid-template-columns: repeat(2, 1fr);
  place-items: center; padding: 7px; background: var(--navy); color: var(--gold);
  font-family: Georgia, serif; font-size: 0.62rem; line-height: 1;
}
.brand-mark i { font-style: normal; }
.brand-name { color: var(--navy); font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-name small { display: block; margin-top: -4px; font-family: "DM Sans", Arial, sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a { position: relative; text-decoration: none; font-size: 0.91rem; font-weight: 600; color: #344750; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--gold); transition: right 180ms ease; }
.main-nav a:hover::after { right: 0; }
.header-cta { min-height: 44px; display: inline-flex; align-items: center; padding: 0 19px; background: var(--navy); color: var(--white); text-decoration: none; font-size: 0.88rem; font-weight: 700; transition: background 180ms ease, transform 180ms ease; }
.header-cta:hover { background: var(--slate); transform: translateY(-1px); }
.menu-button { display: none; width: 44px; height: 44px; margin-left: auto; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.menu-button span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--navy); transition: transform 180ms ease, opacity 180ms ease; }

.hero { position: relative; overflow: hidden; padding: 72px 0 88px; background: var(--cream); }
.hero::before { content: ""; position: absolute; width: 430px; height: 430px; top: -250px; left: -170px; border: 1px solid rgba(201, 151, 82, 0.42); border-radius: 50%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr); gap: 76px; align-items: center; }
.eyebrow { margin: 0 0 20px; color: var(--gold-deep); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.hero h1, .section h2, .contact h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; }
.hero h1 { max-width: 700px; color: var(--navy); font-size: clamp(3.1rem, 5.1vw, 5.4rem); }
.hero-lead { max-width: 580px; margin: 28px 0 0; color: #53636b; font-size: 1.12rem; line-height: 1.72; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 24px; border: 1px solid transparent; text-decoration: none; font-size: 0.95rem; font-weight: 700; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.button-primary { background: var(--navy); color: var(--white); }
.button-primary:hover { background: var(--slate); transform: translateY(-2px); }
.text-link { font-size: 0.93rem; font-weight: 700; text-underline-offset: 6px; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 44px; color: #506069; font-size: 0.86rem; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-deep); stroke-width: 1.7; }
.hero-visual { position: relative; padding: 0 24px 28px 0; }
.hero-visual::before { content: ""; position: absolute; z-index: 0; right: 0; bottom: 0; width: 55%; height: 62%; background: var(--gold); }
.photo-frame { position: relative; z-index: 1; min-height: 520px; overflow: hidden; box-shadow: var(--shadow); }
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 65%, rgba(8, 24, 36, 0.48)); pointer-events: none; }
.photo-frame img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; object-position: 50% center; filter: saturate(0.82) contrast(1.04); }
.hero-note { position: absolute; z-index: 2; left: -30px; bottom: 0; min-width: 270px; padding: 21px 24px; background: var(--navy-deep); color: var(--white); box-shadow: 0 14px 40px rgba(10, 30, 44, 0.25); }
.hero-note strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.12rem; }
.hero-note span { color: #c9d1d4; font-size: 0.72rem; letter-spacing: 0.05em; }

.intro-strip { border-top: 1px solid #dfd8cd; border-bottom: 1px solid #dfd8cd; background: var(--paper); }
.strip-grid { min-height: 98px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.strip-grid p { margin: 0; padding: 18px 34px; border-right: 1px solid var(--line); color: var(--navy); font-family: "Fraunces", Georgia, serif; font-size: 1.02rem; }
.strip-grid p:first-child { padding-left: 0; }
.strip-grid p:last-child { border: 0; }
.strip-grid span { margin-right: 14px; color: var(--gold-deep); font-family: "DM Sans", Arial, sans-serif; font-size: 0.68rem; font-weight: 700; }

.section { padding: 118px 0; }
.section-heading { margin-bottom: 58px; }
.section-heading h2, .contact h2 { max-width: 760px; color: var(--navy); font-size: clamp(2.55rem, 4vw, 4.35rem); }
.split-heading { display: grid; grid-template-columns: 1.05fr 0.75fr; gap: 90px; align-items: end; }
.split-heading > p { max-width: 520px; margin: 0 0 6px; color: var(--muted); font-size: 1.02rem; }
.practice { background: var(--paper); }
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.practice-card { position: relative; min-height: 510px; display: flex; flex-direction: column; padding: 34px 32px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.practice-card:hover { z-index: 2; transform: translateY(-6px); box-shadow: 0 18px 50px rgba(16, 42, 60, 0.12); background: var(--white); }
.practice-card.featured { background: var(--navy); color: #d9e0e3; }
.practice-card.featured:hover { background: var(--slate); }
.card-number { align-self: flex-end; color: #9d9890; font-size: 0.69rem; font-weight: 700; letter-spacing: 0.12em; }
.featured .card-number { color: #90a2ab; }
.practice-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 18px 0 34px;
  overflow: hidden;
  border: 1px solid rgba(201, 151, 82, 0.72);
  background-image: linear-gradient(rgba(10, 30, 44, 0.08), rgba(10, 30, 44, 0.08)), url("assets/areas-crcm.webp");
  background-repeat: no-repeat;
  background-size: 300% auto;
  background-position-y: center;
  box-shadow: 0 12px 30px rgba(10, 30, 44, 0.1);
  filter: saturate(0.78) contrast(1.04);
  transition: filter 260ms ease, transform 260ms ease;
}
.practice-card:hover .practice-image { filter: saturate(0.92) contrast(1.04); transform: scale(1.012); }
.practice-image-previdenciario { background-position: left 22%; }
.practice-image-familia { background-position: center 50%; }
.practice-image-sucessoes { background-position: right 44%; }
.practice-card h3 { margin: 0 0 18px; color: var(--navy); font-family: "Fraunces", Georgia, serif; font-size: 1.58rem; font-weight: 600; line-height: 1.15; }
.practice-card.featured h3 { color: var(--white); }
.practice-card p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.7; }
.practice-card.featured p { color: #c6d0d4; }
.practice-card a { align-self: flex-start; margin-top: auto; padding-top: 28px; color: var(--gold-deep); font-size: 0.84rem; font-weight: 700; text-decoration: none; }
.practice-card.featured a { color: #e1bb85; }
.practice-card a span { margin-left: 5px; }

.office { position: relative; overflow: hidden; background: var(--navy-deep); color: #cbd5d9; }
.office::after { content: "CRCM"; position: absolute; right: -45px; bottom: -90px; color: rgba(255,255,255,0.025); font-family: "Fraunces", Georgia, serif; font-size: 19rem; font-weight: 600; line-height: 1; }
.office-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 110px; }
.eyebrow-light { color: #d4ab72; }
.office h2 { max-width: 570px; color: var(--white); font-size: clamp(2.75rem, 4.2vw, 4.7rem); }
.office-copy > p:not(.eyebrow) { max-width: 570px; margin: 26px 0 0; color: #b7c3c8; }
.approach-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,0.16); }
.approach-list li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 29px 0; border-bottom: 1px solid rgba(255,255,255,0.16); }
.approach-list li > span { color: var(--gold); font-size: 0.69rem; font-weight: 700; letter-spacing: 0.12em; }
.approach-list strong { color: var(--white); font-family: "Fraunces", Georgia, serif; font-size: 1.17rem; }
.approach-list p { max-width: 500px; margin: 7px 0 0; color: #adbbc1; font-size: 0.9rem; }

.partners { background: var(--cream); }
.partners-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.partner-card { min-height: 515px; display: grid; grid-template-columns: 1.05fr 0.95fr; overflow: hidden; background: var(--white); box-shadow: 0 14px 44px rgba(16, 42, 60, 0.08); }
.partner-card.reverse { grid-template-columns: 0.95fr 1.05fr; }
.partner-card.reverse .partner-photo { order: 2; }
.partner-photo { min-width: 0; overflow: hidden; background: #313440; }
.partner-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) contrast(1.03); transition: transform 500ms ease; }
.partner-card:hover img { transform: scale(1.025); }
.anderson-photo img { object-position: 50% 28%; }
.itamara-photo img { object-position: 50% 18%; }
.partner-card:hover .itamara-photo img { transform: scale(1.025); transform-origin: center; }
.partner-info { display: flex; flex-direction: column; justify-content: flex-end; padding: 38px 30px; }
.partner-info p { margin: 0 0 auto; color: var(--gold-deep); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.partner-info h3 { margin: 0 0 18px; color: var(--navy); font-family: "Fraunces", Georgia, serif; font-size: clamp(1.75rem, 2.4vw, 2.5rem); font-weight: 600; line-height: 1.04; }
.partner-info span { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; }

.contact { padding: 110px 0; background: var(--slate); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 0.75fr; gap: 110px; }
.contact h2 { color: var(--white); }
.button-gold { margin-top: 36px; background: var(--gold); color: var(--navy-deep); }
.button-gold:hover { background: #ddb67e; transform: translateY(-2px); }
.contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 36px; padding-top: 6px; font-style: normal; }
.contact-details > div { padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.22); }
.contact-details > div:first-child { grid-column: 1 / -1; }
.contact-details span { display: block; margin-bottom: 8px; color: #d6ad75; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.contact-details p, .contact-details a { margin: 0; color: #e0e7e9; font-size: 0.94rem; line-height: 1.7; text-decoration: none; }
.contact-details > div:first-child a { color: var(--white); font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; }
.map-link { grid-column: 1 / -1; justify-self: start; padding-bottom: 3px; border-bottom: 1px solid var(--gold); font-weight: 700; }

.site-footer { padding: 48px 0 24px; background: var(--navy-deep); color: #afbcc1; }
.footer-main { display: grid; grid-template-columns: auto 1fr auto; gap: 44px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.brand-footer .brand-name { color: var(--white); }
.footer-main > p { margin: 0; font-size: 0.82rem; }
.footer-main nav { display: flex; gap: 24px; }
.footer-main nav a { color: #dce4e7; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; }
.footer-bottom p { margin: 0; color: #7f929b; font-size: 0.72rem; }

.whatsapp-float { position: fixed; z-index: 40; right: 22px; bottom: 22px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #25d366; color: var(--white); box-shadow: 0 10px 30px rgba(0,0,0,0.22); transition: transform 180ms ease; }
.whatsapp-float:hover { transform: translateY(-3px) scale(1.03); }
.whatsapp-float svg { width: 29px; height: 29px; }

@media (max-width: 1020px) {
  :root { --shell: min(100% - 40px, 900px); }
  .main-nav { gap: 19px; }
  .header-cta { display: none; }
  .hero-grid { grid-template-columns: 1fr 0.95fr; gap: 44px; }
  .hero h1 { font-size: clamp(3rem, 6.2vw, 4.4rem); }
  .photo-frame, .photo-frame img { min-height: 450px; }
  .practice-grid { grid-template-columns: 1fr; border-left: 0; }
  .practice-card { min-height: 430px; border-left: 1px solid var(--line); }
  .practice-image { aspect-ratio: 2.15 / 1; background-position-y: 48%; }
  .office-grid, .contact-grid { gap: 64px; }
  .partner-card { min-height: 450px; grid-template-columns: 1fr; grid-template-rows: 285px 1fr; }
  .partner-card.reverse { grid-template-columns: 1fr; }
  .partner-card.reverse .partner-photo { order: 0; }
  .partner-info { padding: 28px; }
  .partner-info p { margin-bottom: 36px; }
  .itamara-photo img { object-position: 50% 18%; }
}

@media (max-width: 760px) {
  :root { --shell: calc(100% - 32px); }
  html { scroll-padding-top: 72px; }
  .header-inner { min-height: 70px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.12rem; }
  .menu-button { display: block; }
  .menu-button[aria-expanded="true"] span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
  .menu-button[aria-expanded="true"] span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 70px 0 auto; display: grid; gap: 0; padding: 10px 16px 22px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(10,30,44,0.12); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease; }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav a { padding: 15px 8px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a:last-child { border: 0; }
  .main-nav a::after { display: none; }
  .hero { padding: 52px 0 58px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-lead { font-size: 1.03rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .trust-row { display: grid; gap: 10px; margin-top: 34px; }
  .hero-visual { margin-top: 10px; padding: 0 15px 20px 0; }
  .photo-frame, .photo-frame img { min-height: 390px; }
  .photo-frame img { object-position: 50% center; }
  .hero-note { left: 14px; bottom: 0; min-width: 0; width: calc(100% - 56px); }
  .strip-grid { grid-template-columns: 1fr; padding: 12px 0; }
  .strip-grid p, .strip-grid p:first-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .strip-grid p:last-child { border-bottom: 0; }
  .section { padding: 84px 0; }
  .split-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading { margin-bottom: 40px; }
  .section-heading h2, .contact h2 { font-size: clamp(2.45rem, 11vw, 3.4rem); }
  .practice-card { min-height: 430px; padding: 28px 25px; }
  .practice-image { aspect-ratio: 16 / 9; margin: 16px 0 28px; }
  .office-grid, .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .office::after { font-size: 9rem; right: -25px; bottom: -25px; }
  .partners-grid { grid-template-columns: 1fr; }
  .partner-card { min-height: 520px; grid-template-rows: 330px 1fr; }
  .partner-info p { margin-bottom: 28px; }
  .contact { padding: 84px 0; }
  .contact-details { grid-template-columns: 1fr; gap: 28px; }
  .contact-details > div:first-child, .map-link { grid-column: auto; }
  .footer-main { grid-template-columns: 1fr; gap: 22px; }
  .footer-main nav { flex-direction: column; gap: 10px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .whatsapp-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
