/* ==========================================================================
   Ribeiro de Souza Advocacia — Design System & Performance-First Stylesheet
   Palette: Navy (#181B32 / #0D1022) & Gold (#C59B47 / #E5C87B)
   ========================================================================== */

:root {
  --navy-950: #090c1a;
  --navy-900: #11152b;
  --navy-800: #181b32;
  --navy-700: #232847;
  --navy-600: #333a61;

  --gold-300: #ebd494;
  --gold-400: #d9b563;
  --gold-500: #c59b47;
  --gold-600: #9f7a30;
  --gold-gradient: linear-gradient(135deg, #e5c87b 0%, #c59b47 50%, #9a742b 100%);

  --bg-light: #f7f6f2;
  --bg-white: #ffffff;
  --bg-muted: #efede6;
  --border-light: rgba(24, 27, 50, 0.1);
  --border-gold: rgba(197, 155, 71, 0.35);

  --text-dark: #181b32;
  --text-body: #3d4259;
  --text-muted: #5d637d;
  --text-on-dark: #f4f3ee;
  --text-on-dark-muted: #c2c6d9;

  --font-serif: 'Abhaya Libre', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 4px 16px rgba(9, 12, 26, 0.06);
  --shadow-md: 0 12px 32px rgba(9, 12, 26, 0.1);
  --shadow-lg: 0 24px 56px rgba(9, 12, 26, 0.18);
  --shadow-gold: 0 10px 30px rgba(197, 155, 71, 0.22);

  --container: 1200px;
  --header-h: 82px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-body);
  background-color: var(--bg-light);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.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: absolute; top: -48px; left: 16px; z-index: 9999;
  background: var(--gold-500); color: var(--navy-950);
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 700; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

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

/* Typography */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  color: var(--text-dark);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-on-dark);
}
h1 { font-size: clamp(2.25rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2.1vw, 1.7rem); }
p { margin: 0 0 1.15em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-600);
  margin-bottom: 14px;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--gold-400); }
.eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--gold-gradient);
}

.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), background 0.28s, border-color 0.28s, color 0.28s;
}
.btn-primary {
  background: var(--gold-gradient);
  color: var(--navy-950);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(197, 155, 71, 0.35);
}
.btn-outline-light {
  border-color: rgba(229, 200, 123, 0.55);
  color: var(--gold-300);
  background: rgba(24, 27, 50, 0.4);
}
.btn-outline-light:hover {
  background: rgba(197, 155, 71, 0.14);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}
.btn-outline-dark {
  border-color: var(--navy-800);
  color: var(--navy-800);
  background: transparent;
}
.btn-outline-dark:hover {
  background: var(--navy-800);
  color: var(--gold-300);
  transform: translateY(-2px);
}
.btn-navy {
  background: var(--navy-800);
  color: var(--gold-300);
  border-color: var(--navy-800);
}
.btn-navy:hover {
  background: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(17, 21, 43, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 155, 71, 0.2);
  transition: box-shadow 0.3s, background 0.3s;
}
.site-header.scrolled {
  background: rgba(11, 14, 31, 0.98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand-mark {
  width: 44px;
  height: 44px;
  transition: transform 0.35s var(--ease-out);
}
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.brand-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--gold-300);
  margin-top: 2px;
}
.brand-sub::before,
.brand-sub::after {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--gold-gradient);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  padding: 8px 13px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.25s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 4px;
  height: 1.5px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--ease-out);
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-300);
}
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}
.nav-cta {
  margin-left: 10px;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(197, 155, 71, 0.35);
  color: var(--gold-300);
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Mobile Nav Drawer */
.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--navy-950);
  z-index: 999;
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  overflow-y: auto;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a {
  padding: 14px 16px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-mobile a.active { color: var(--gold-400); }
.nav-mobile .btn { margin-top: 16px; border-bottom: none; }

/* Hero Section */
.hero {
  position: relative;
  background: radial-gradient(circle at 78% 24%, rgba(197, 155, 71, 0.14), transparent 52%),
              linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 60%, #1d2240 100%);
  color: var(--text-on-dark);
  padding: clamp(64px, 9vw, 118px) 0 clamp(72px, 10vw, 124px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(197, 155, 71, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 155, 71, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  color: var(--text-on-dark);
  font-size: clamp(2.35rem, 4.6vw, 3.8rem);
  margin-bottom: 22px;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  color: var(--text-on-dark-muted);
  max-width: 60ch;
  margin-bottom: 34px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-card {
  background: rgba(17, 21, 43, 0.72);
  border: 1px solid rgba(197, 155, 71, 0.32);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: floatGentle 6s ease-in-out infinite;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold-gradient);
}
.hero-portrait-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(197, 155, 71, 0.25);
  margin-bottom: 18px;
  aspect-ratio: 682 / 820;
}
.hero-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-card-meta h3 {
  color: var(--gold-300);
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.hero-card-meta p {
  font-size: 0.88rem;
  color: var(--text-on-dark-muted);
  margin: 0;
}

/* Page Banner (Subpages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: var(--text-on-dark);
  padding: 64px 0 56px;
  border-bottom: 2px solid rgba(197, 155, 71, 0.35);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 155, 71, 0.14), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { color: var(--text-on-dark); margin-bottom: 12px; }
.page-hero p { color: var(--text-on-dark-muted); max-width: 68ch; font-size: 1.08rem; margin: 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gold-400);
  margin-bottom: 14px;
}
.breadcrumb a:hover { text-decoration: underline; }

/* Sections */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-white { background: var(--bg-white); }
.section-muted { background: var(--bg-muted); }
.section-dark {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--text-on-dark-muted);
}

.section-header {
  max-width: 720px;
  margin-bottom: 44px;
}
.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header.center .eyebrow { justify-content: center; }

/* Grids & Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
  position: relative;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-500);
}
.section-dark .card {
  background: rgba(24, 27, 50, 0.72);
  border-color: rgba(197, 155, 71, 0.22);
  color: var(--text-on-dark-muted);
}
.section-dark .card h3 { color: var(--gold-300); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(197, 155, 71, 0.14);
  border: 1px solid rgba(197, 155, 71, 0.35);
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.section-dark .card-icon { color: var(--gold-400); }
.card:hover .card-icon {
  transform: scale(1.08);
  background: var(--gold-gradient);
  color: var(--navy-950);
}

.area-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.area-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-top: 12px;
}
.area-link:hover { color: var(--gold-600); }

/* Stats Band */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 155, 71, 0.28);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.95rem;
  color: var(--text-on-dark-muted);
}

/* Quote Band */
.quote-band {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
  color: var(--text-on-dark);
  border-top: 1px solid rgba(197, 155, 71, 0.3);
  border-bottom: 1px solid rgba(197, 155, 71, 0.3);
  text-align: center;
  padding: 72px 0;
}
.quote-band blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-style: italic;
  color: var(--gold-300);
  max-width: 860px;
  margin: 0 auto 28px;
  line-height: 1.35;
}

/* Split Layout (About / Lawyer) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(197, 155, 71, 0.45);
  box-shadow: var(--shadow-lg);
  background: var(--navy-900);
}
.portrait-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.styled-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.styled-list li {
  position: relative;
  padding-left: 26px;
}
.styled-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 10px; height: 10px;
  border: 2px solid var(--gold-500);
  transform: rotate(45deg);
}

/* Timeline / Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.step-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: 12px;
}

/* Contact Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(24, 27, 50, 0.18);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-size: 0.96rem;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(197, 155, 71, 0.2);
}
.lgpd-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-body);
}
.lgpd-check input { margin-top: 4px; accent-color: var(--navy-800); }
.form-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #edf7ed;
  border: 1px solid #81c784;
  color: #1b5e20;
  font-weight: 600;
  display: none;
}
.form-feedback.visible { display: block; }

.map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  margin-top: 28px;
}
.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: var(--text-on-dark-muted);
  padding: 64px 0 32px;
  border-top: 2px solid rgba(197, 155, 71, 0.35);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-title {
  font-family: var(--font-serif);
  color: var(--gold-300);
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--gold-300); }
.footer-bottom {
  padding-top: 24px;
  font-size: 0.84rem;
  display: grid;
  gap: 10px;
}
.footer-legal {
  color: #9ba1bd;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1ea851;
  color: #ffffff;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(30, 168, 81, 0.38);
  transition: transform 0.28s var(--ease-out), background 0.28s;
}
.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(30, 168, 81, 0.55);
  animation: pulseRing 2.4s ease-out infinite;
  pointer-events: none;
}
.whatsapp-float:hover {
  background: #178e43;
  transform: translateY(-3px) scale(1.03);
}
.whatsapp-float svg { width: 24px; height: 24px; flex-shrink: 0; }

/* Scroll Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(1.22); opacity: 0; }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .grid-4, .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .stats-grid, .steps-grid, .form-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 15px; right: 18px; bottom: 18px; }
}

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