/* ==========================================================================
   Defensor Privado RB — tema personalizado sobre Bootstrap 5.3.3
   ========================================================================== */

:root,
[data-bs-theme="dark"] {
  --void: #1b2023;
  --surface: #212a35;
  --surface-deep: #101316;
  --ink: #edebe4;
  --ink-muted: #b7bbc0;
  --ink-faint: #7d848c;
  --line: #2c333b;
  --line-strong: #3d4750;
  --accent: #919191;
  --accent-bright: #b3b3b3;
  --accent-soft: rgba(145, 145, 145, 0.14);
  --accent-ink: #17191b;
  --topbar-height: 40px;
  --navbar-height: 76px;
  --header-height: calc(var(--topbar-height) + var(--navbar-height));

  color-scheme: dark;

  --bs-body-bg: var(--void);
  --bs-body-color: var(--ink);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-tertiary-color: var(--ink-faint);
  --bs-border-color: var(--line);
  --bs-link-color: var(--accent-bright);
  --bs-link-hover-color: var(--accent);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 145, 145, 145;
  --bs-font-sans-serif: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-font-monospace: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", Georgia, "Iowan Old Style", serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void);
  background-image: radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(145, 145, 145, 0.07), transparent 60%);
  background-repeat: no-repeat;
  font-family: var(--bs-font-sans-serif);
  padding-top: var(--header-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Utility background/text helpers ---------- */
.bg-void { background-color: var(--void) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-surface-deep { background-color: var(--surface-deep) !important; }
.text-ink { color: var(--ink) !important; }
.text-ink-muted { color: var(--ink-muted) !important; }
.text-ink-faint { color: var(--ink-faint) !important; }
.text-gold { color: var(--accent-bright) !important; }
.border-line { border-color: var(--line) !important; }

.eyebrow {
  font-family: var(--bs-font-monospace);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.section-kicker {
  font-family: var(--bs-font-monospace);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Topbar (fixed, auto-hides on scroll down) ---------- */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1041;
  height: var(--topbar-height);
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}
.site-topbar.topbar-hidden {
  transform: translateY(-100%);
}
.site-topbar a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: rgba(23, 25, 27, 0.45);
}
.site-topbar a:hover {
  color: var(--accent-ink);
  opacity: 0.75;
}
.site-topbar .topbar-sep {
  opacity: 0.45;
}
.site-topbar .topbar-social {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent-ink);
  text-decoration: none !important;
  background: rgba(23, 25, 27, 0.08);
  transition: background 0.2s;
  flex-shrink: 0;
}
.site-topbar .topbar-social:hover {
  background: rgba(23, 25, 27, 0.18);
  opacity: 1;
}

/* ---------- Navbar (fixed below topbar, blurred, brand + links) ---------- */
.site-navbar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  z-index: 1040;
  height: var(--navbar-height);
  background: rgba(16, 19, 22, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s ease, box-shadow 0.35s ease, top 0.3s ease, border-color 0.35s ease;
}
.site-navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(145, 145, 145, 0.5) 45%, rgba(179, 179, 179, 0.35) 65%, transparent 100%);
  pointer-events: none;
}
.site-navbar.scrolled {
  background: rgba(12, 15, 17, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.site-navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-brand-mark {
  height: 42px;
  width: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(145, 145, 145, 0.35);
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--ink) 25%, var(--accent-bright) 105%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.brand-name strong {
  font-weight: 800;
}
.brand-sub {
  font-family: var(--bs-font-monospace);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-navbar .nav-link {
  color: rgba(237, 235, 228, 0.72) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  position: relative;
  transition: color 0.2s ease;
}
.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--ink) !important;
}
.site-navbar .nav-link:hover::after,
.site-navbar .nav-link.active::after {
  transform: scaleX(1);
}

.btn-nav-contact {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
  color: var(--accent-ink) !important;
  padding: 0.5rem 1.3rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  align-items: center;
  gap: 0.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.25s ease, transform 0.18s ease;
  white-space: nowrap;
  border: none;
}
.btn-nav-contact:hover {
  box-shadow: 0 0 16px rgba(145, 145, 145, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  color: var(--accent-ink) !important;
}

/* Custom animated hamburger (replaces Bootstrap's default SVG) */
.navbar-toggler {
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.navbar-toggler:hover {
  background: var(--accent-soft);
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.navbar-toggler-icon {
  background-image: none !important;
  background-color: var(--ink);
  width: 22px;
  height: 2px;
  border-radius: 2px;
  display: block;
  position: relative;
  transition: background-color 0.3s;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}
.navbar-toggler-icon::before { top: -7px; }
.navbar-toggler-icon::after { bottom: -7px; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background-color: transparent;
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  top: 0;
  transform: rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* ---------- Offcanvas mobile menu ---------- */
.offcanvas {
  background-color: var(--surface-deep) !important;
  color: var(--ink) !important;
  border-left: 1px solid var(--line) !important;
  width: min(86vw, 360px) !important;
}
.offcanvas-header {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.25rem;
}
.offcanvas-body {
  padding: 1.25rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
}
.offcanvas .navbar-nav {
  gap: 0;
}
.offcanvas .nav-link {
  color: var(--ink-muted) !important;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.9rem 0.15rem !important;
  border-bottom: 1px solid var(--line);
}
.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
  color: var(--accent-bright) !important;
}

/* ---------- Buttons ---------- */
.btn-gold {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: box-shadow 0.25s ease, transform 0.18s ease, border-color 0.25s ease;
}
.btn-gold:hover,
.btn-gold:focus {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent-bright) 100%);
  border-color: var(--accent-bright);
  color: var(--accent-ink);
  box-shadow: 0 0 16px rgba(145, 145, 145, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}
.btn-outline-ink {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  font-weight: 500;
}
.btn-outline-ink:hover,
.btn-outline-ink:focus {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--void);
}
.btn-gold,
.btn-outline-ink {
  --bs-btn-focus-box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

/* ---------- Cards / sections ---------- */
.section-divider {
  border-top: 1px solid var(--line);
}
.card-brand {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card-brand:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}
.card-well {
  background-color: var(--void);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dot-gold {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Callout ---------- */
.callout {
  border-left: 3px solid var(--accent);
  background-color: var(--accent-soft);
  padding: 0.9rem 1.1rem;
  border-radius: 0 4px 4px 0;
}
.callout .callout-label {
  font-family: var(--bs-font-monospace);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Tables ---------- */
.table-brand {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  font-size: 0.88rem;
}
.table-brand thead th {
  font-family: var(--bs-font-monospace);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background-color: var(--surface-deep);
  border-bottom: 2px solid var(--accent) !important;
  white-space: nowrap;
}
.table-brand td {
  vertical-align: top;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion-brand {
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%237d848c'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23b3b3b3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.accordion-brand .accordion-item {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.accordion-brand .accordion-button {
  background-color: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding-left: 0;
  padding-right: 0;
  box-shadow: none !important;
}
.accordion-brand .accordion-button:not(.collapsed) {
  color: var(--accent-bright);
}
.accordion-brand .accordion-body {
  padding-left: 0;
  padding-right: 2rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- Glossary ---------- */
.glossary-term {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
.glossary-term dt { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.glossary-term dd { color: var(--ink-muted); font-size: 0.9rem; margin-top: 0.35rem; }

/* ---------- Floating mobile CTA bar ---------- */
.floating-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}
.floating-cta a {
  flex: 1 1 0;
  text-align: center;
  padding: 0.9rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}
.floating-cta .fc-call {
  background: var(--accent);
  color: var(--accent-ink);
}
.floating-cta .fc-whatsapp {
  background: var(--surface-deep);
  color: var(--ink);
  border-left: 1px solid var(--line);
}
@media (min-width: 992px) {
  .floating-cta { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--surface-deep);
  border-top: 1px solid var(--line);
}
.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.86rem;
}
.site-footer a:hover {
  color: var(--accent-bright);
}
.footer-heading {
  font-family: var(--bs-font-monospace);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  background-color: var(--void);
  border-color: var(--line-strong);
  color: var(--ink);
}
.form-control:focus,
.form-select:focus {
  background-color: var(--void);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 0.2rem var(--accent-soft);
}
.form-control::placeholder {
  color: var(--ink-faint);
}
.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
}
.hero-section > .container {
  position: relative;
  z-index: 1;
}
.hero-watermark {
  position: absolute;
  top: 50%;
  right: -8%;
  width: 640px;
  max-width: 52vw;
  height: auto;
  transform: translateY(-50%);
  opacity: 0.05;
  filter: grayscale(1);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  position: relative;
  z-index: 1;
  border-radius: 10px;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.45));
}

/* ---------- Misc ---------- */
.max-prose { max-width: 68ch; }
.placeholder-photo {
  aspect-ratio: 4 / 5;
  background-color: var(--surface-deep);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-faint);
}
.pill-badge {
  font-family: var(--bs-font-monospace);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  white-space: nowrap;
}
.pill-badge.high {
  border-color: var(--accent);
  color: var(--accent-bright);
}

main { padding-bottom: 4.5rem; }
@media (min-width: 992px) {
  main { padding-bottom: 0; }
}
