/* ==========================================================================
   Sanguino & Sanguino — Sociedade de Advogados
   Direction: "Quiet Authority" — ink navy + aged brass, editorial serif/sans
   ========================================================================== */

:root {
  --ink-900: #0c1210;
  --ink-800: #10231e;
  --ink-700: #142e27;
  --ink-600: #1b3a31;
  --paper: #f3efe6;
  --paper-dim: #e8e2d4;
  --brass: #b98c4a;
  --brass-light: #d9b479;
  --brass-dim: #8a6a3c;
  --ink-text: #1c211f;
  --muted: #5c6864;
  --line: rgba(28, 33, 31, 0.12);
  --line-light: rgba(243, 239, 230, 0.16);

  --serif: "Fraunces", "Iowan Old Style", serif;
  --sans: "Manrope", -apple-system, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brass); color: var(--ink-900); }

/* Texture overlay */
.grain-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress-rail {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1000;
  background: transparent;
}
.progress-rail span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brass-dim), var(--brass-light));
  transition: width 0.1s linear;
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 22px 0;
  transition: background var(--ease) .4s, padding var(--ease) .4s, box-shadow var(--ease) .4s;
}
.site-header.scrolled {
  padding: 12px 0;
  background: rgba(12, 18, 16, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -20px rgba(0,0,0,0.6);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.08em;
  border: 1px solid var(--brass); color: var(--brass);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.site-header.scrolled .brand-mark,
.hero-figure .brand-mark { color: var(--brass-light); }
.brand-name {
  font-family: var(--serif); font-size: 1.02rem; color: var(--ink-900);
  transition: color var(--ease) .4s;
}
.site-header.scrolled .brand-name { color: var(--paper); }
.brand-name em { font-style: italic; color: var(--brass); margin: 0 2px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-900); position: relative; padding: 4px 0;
  transition: color var(--ease) .3s;
}
.site-header.scrolled .main-nav a { color: var(--paper-dim); }
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--brass); transition: width var(--ease) .35s;
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  border: 1px solid currentColor; padding: 9px 18px; border-radius: 100px;
  color: var(--ink-900) !important;
}
.site-header.scrolled .nav-cta { color: var(--paper) !important; border-color: var(--brass); }
.nav-cta:hover { background: var(--brass); border-color: var(--brass); color: var(--ink-900) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink-900); transition: all var(--ease) .3s; }
.site-header.scrolled .nav-toggle span { background: var(--paper); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  padding: 140px 32px 80px;
  max-width: var(--container); margin: 0 auto;
  gap: 40px;
}
.hero-figure {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 480px; opacity: 0.9; z-index: 0; pointer-events: none;
}
.hero-num {
  position: absolute; top: -60px; right: 40px;
  font-family: var(--serif); font-size: 8rem; color: var(--ink-900);
  opacity: 0.05; font-style: italic;
}
.hero-scales .ss-line { stroke: var(--ink-900); stroke-width: 1.4; opacity: 0.5; }
.hero-scales .ss-pan { fill: none; stroke: var(--brass); stroke-width: 1.6; opacity: 0.65; }
.hero-scales .ss-dot { fill: var(--brass); }
.hero-scales .ss-base { fill: var(--ink-900); opacity: 0.55; }

.hero-content { position: relative; z-index: 2; grid-column: 1; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass-dim); font-weight: 600; margin-bottom: 22px; display: block;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem); line-height: 1.06; color: var(--ink-900);
  max-width: 12ch;
}
.italic-accent { font-style: italic; color: var(--brass-dim); }
.dot-brass { color: var(--brass); }
.hero-lede {
  margin-top: 28px; font-size: 1.08rem; color: var(--muted); max-width: 46ch; line-height: 1.7;
}
.hero-actions { margin-top: 40px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

.hero-side { grid-column: 2; position: relative; z-index: 2; justify-self: end; }

.glass-card, .contact-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 18px;
  padding: 30px 32px;
  box-shadow: 0 30px 60px -30px rgba(12,18,16,0.35);
  display: flex; flex-direction: column; gap: 6px;
  min-width: 240px;
}
.glass-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass-dim); font-weight: 700; }
.glass-card strong, .contact-card strong { font-family: var(--serif); font-size: 1.5rem; color: var(--ink-900); }
.glass-sub { font-size: 0.85rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 100px; font-size: 0.92rem; font-weight: 600;
  transition: transform var(--ease) .35s, box-shadow var(--ease) .35s, background var(--ease) .3s, color var(--ease) .3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink-900); color: var(--paper);
  box-shadow: 0 12px 30px -14px rgba(12,18,16,0.6);
}
.btn-primary svg { transition: transform var(--ease) .35s; }
.btn-primary:hover { background: var(--brass-dim); transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(138,106,60,0.55); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { color: var(--ink-900); border-bottom: 1px solid var(--ink-900); border-radius: 0; padding: 15px 4px; }
.btn-ghost:hover { color: var(--brass-dim); border-color: var(--brass-dim); }
.btn-outline { border: 1px solid var(--ink-900); }
.btn-outline:hover { background: var(--ink-900); color: var(--paper); transform: translateY(-2px); }

/* ---------------- Reveal animation ---------------- */
.reveal-up {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.09s);
}
.reveal-up.in-view { opacity: 1; transform: translateY(0); }

/* ---------------- Section tags ---------------- */
.section-tag {
  display: inline-block; font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass-dim); font-weight: 700; margin-bottom: 18px;
}
.section-tag.light { color: var(--brass-light); }

section { padding: 130px 32px; max-width: var(--container); margin: 0 auto; position: relative; }

/* ---------------- About ---------------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; }
.about-heading h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.25; color: var(--ink-900); position: sticky; top: 140px; }
.about-copy p { color: var(--muted); font-size: 1.04rem; max-width: 58ch; margin-bottom: 20px; }
.about-pillars { display: grid; gap: 22px; margin-top: 36px; }
.pillar {
  border-left: 2px solid var(--brass); padding: 4px 0 4px 20px;
  font-size: 0.98rem; color: var(--muted);
}
.pillar span { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--ink-900); margin-bottom: 4px; }

/* ---------------- Areas (horizontal scroll track) ---------------- */
.areas h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); color: var(--ink-900); margin-bottom: 40px; max-width: 20ch; }
.areas-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr);
  gap: 24px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x proximity;
  margin: 0 -32px; padding-left: 32px; padding-right: 32px;
}
.areas-track::-webkit-scrollbar { height: 5px; }
.areas-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }

.area-card {
  scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 30px; position: relative; overflow: hidden;
  transition: transform var(--ease) .4s, box-shadow var(--ease) .4s, border-color var(--ease) .4s;
}
.area-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(160deg, rgba(185,140,74,0.08), transparent 60%);
  transition: opacity var(--ease) .4s;
}
.area-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 50px -30px rgba(12,18,16,0.35);
  border-color: var(--brass);
}
.area-card:hover::before { opacity: 1; }
.area-icon { color: var(--brass-dim); width: 42px; height: 42px; margin-bottom: 24px; transition: transform var(--ease) .4s; }
.area-card:hover .area-icon { transform: scale(1.08) rotate(-3deg); }
.area-card h3 { font-size: 1.28rem; color: var(--ink-900); margin-bottom: 10px; }
.area-card p { font-size: 0.94rem; color: var(--muted); line-height: 1.6; }

/* ---------------- Diferenciais (dark band) ---------------- */
.diff {
  background: var(--ink-900);
  position: relative;
  padding: 0;
  max-width: none;
  clip-path: polygon(0 4%, 100% 0%, 100% 96%, 0% 100%);
  margin: 60px 0;
}
.diff-inner { max-width: var(--container); margin: 0 auto; padding: 150px 32px; }
.light-h { color: var(--paper); max-width: 22ch; font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 60px; }
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); border-radius: 18px; overflow: hidden; }
.diff-item { background: var(--ink-900); padding: 40px 34px; transition: background var(--ease) .4s; }
.diff-item:hover { background: var(--ink-700); }
.diff-index { font-family: var(--serif); font-style: italic; color: var(--brass); font-size: 1.6rem; display: block; margin-bottom: 18px; }
.diff-item h3 { color: var(--paper); font-size: 1.15rem; margin-bottom: 10px; }
.diff-item p { color: rgba(243,239,230,0.62); font-size: 0.92rem; line-height: 1.6; }

/* ---------------- Process timeline ---------------- */
.process h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); color: var(--ink-900); margin-bottom: 60px; max-width: 22ch; }
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline-step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 30px; padding-bottom: 60px; }
.timeline-step:last-child { padding-bottom: 0; }
.tl-marker {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.9rem; color: var(--brass-dim);
  transition: background var(--ease) .4s, color var(--ease) .4s;
}
.timeline-step:hover .tl-marker { background: var(--brass); color: var(--ink-900); }
.tl-body h3 { font-size: 1.3rem; color: var(--ink-900); margin-bottom: 8px; }
.tl-body p { color: var(--muted); max-width: 52ch; }

/* ---------------- Contact ---------------- */
.contact-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.contact h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); color: var(--ink-900); margin: 18px 0 20px; }
.contact p { color: var(--muted); max-width: 48ch; font-size: 1.02rem; margin-bottom: 34px; }
.contact-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.contact-card { justify-self: end; }

/* ---------------- Location ---------------- */
.location-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.location h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); color: var(--ink-900); margin-bottom: 30px; }
.address-list { display: grid; gap: 18px; }
.address-list li {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
  font-size: 1rem; color: var(--ink-900); font-weight: 500;
}
.address-list li span { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass-dim); font-weight: 700; padding-top: 2px; }

.map-placeholder {
  position: relative; border-radius: 20px; overflow: hidden;
  background: linear-gradient(155deg, var(--ink-800), var(--ink-700));
  min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; border: 1px solid var(--line-light);
}
.map-grid {
  position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(rgba(243,239,230,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,239,230,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}
.map-pin { color: var(--brass); position: relative; z-index: 1; animation: floaty 3.2s ease-in-out infinite; }
.map-placeholder p { position: relative; z-index: 1; color: rgba(243,239,230,0.55); font-size: 0.86rem; max-width: 30ch; text-align: center; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------------- Legal strip ---------------- */
.legal-strip { max-width: none; padding: 40px 32px; text-align: center; border-top: 1px solid var(--line); }
.legal-strip p { color: var(--muted); font-size: 0.84rem; letter-spacing: 0.01em; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink-900); color: var(--paper); padding: 90px 32px 30px; }
.footer-grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr; gap: 40px;
  padding-bottom: 50px; border-bottom: 1px solid var(--line-light);
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .brand-mark { color: var(--brass-light); border-color: var(--brass-light); }
.footer-brand p { font-family: var(--serif); color: var(--paper); font-size: 1.05rem; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass-light); margin-bottom: 18px; }
.footer-col a, .footer-col p { display: block; color: rgba(243,239,230,0.68); font-size: 0.92rem; margin-bottom: 10px; line-height: 1.6; }
.footer-col a:hover { color: var(--brass-light); }
.footer-bottom {
  max-width: var(--container); margin: 0 auto; padding-top: 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: rgba(243,239,230,0.45); font-size: 0.8rem;
}

/* ---------------- Floating CTA ---------------- */
.float-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--ink-900); color: var(--brass-light);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 34px -14px rgba(12,18,16,0.7);
  transition: transform var(--ease) .35s, background var(--ease) .35s;
}
.float-cta:hover { background: var(--brass); color: var(--ink-900); transform: translateY(-4px) scale(1.04); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { justify-self: start; margin-top: 20px; }
  .hero-figure { display: none; }
  .about-grid, .location-grid, .contact-inner { grid-template-columns: 1fr; }
  .about-heading h2 { position: static; }
  .contact-card { justify-self: start; }
  .diff-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  section { padding: 90px 24px; }
  .header-inner { padding: 0 20px; }
  .main-nav {
    position: fixed; top: 0; right: -100%; height: 100svh; width: min(320px, 82vw);
    background: var(--ink-900); flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 40px; gap: 26px; transition: right var(--ease) .45s; z-index: 950;
  }
  .main-nav.open { right: 0; box-shadow: -20px 0 60px -20px rgba(0,0,0,0.6); }
  .main-nav a { color: var(--paper); font-size: 1.05rem; }
  .nav-cta { align-self: flex-start; }
  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 130px 24px 60px; min-height: auto; }
  .hero h1 { max-width: none; }
  .diff-grid { grid-template-columns: 1fr; }
  .diff { clip-path: polygon(0 2%, 100% 0%, 100% 98%, 0% 100%); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
  .timeline { padding-left: 24px; }
  .timeline-step { grid-template-columns: 36px 1fr; gap: 18px; }
  .tl-marker { width: 36px; height: 36px; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
