/* ==========================================================================
   David Santos — design tokens
   Structure and type scale follow the Providentia reference
   (DM Serif Text headings, geometric sans body), teal swapped for navy.
   ========================================================================== */
:root {
  /* Navy scale (replaces reference teal #002727 → #00d2d2) */
  --navy-950: #0a1a33;   /* deepest: top bar, footer */
  --navy-900: #13294b;   /* primary: headings, buttons */
  --navy-700: #1f3f73;   /* borders, hover */
  --navy-500: #2f5fa7;   /* links, accents */
  --navy-300: #7fa6e3;   /* bright accent on dark */

  /* Neutrals (from reference) */
  --white: #ffffff;
  --gray-25: #fbfcfc;
  --gray-50: #f2f3f5;
  --gray-100: #e3e4e6;
  --gray-200: #d3d4d6;
  --gray-600: #54595f;
  --text: #0a1a33;

  --font-serif: "DM Serif Text", Georgia, "Times New Roman", serif;
  --font-sans: "Outfit", "Cera Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-pill: 26px;
  --radius: 4px;
  --container: 1140px;
  --shadow: 0 10px 30px rgba(10, 26, 51, .08);
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: .2px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-500); font-weight: 500; text-decoration: none; }
a:hover { color: var(--navy-700); }
h1, h2 { font-family: var(--font-serif); font-weight: 400; color: var(--navy-900); letter-spacing: .8px; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 3.6vw, 2.625rem); line-height: 1.05; }
h3, h4 { font-family: var(--font-sans); color: var(--navy-900); margin: 0 0 .4em; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: 1px; line-height: 1.2; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: 12px 26px;
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-pill);
  background: var(--navy-900);
  color: var(--white);
  font-size: 1.05rem; font-weight: 400;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--navy-500); border-color: var(--navy-500); color: var(--white); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn--ghost { background: transparent; color: var(--navy-900); }
.btn--ghost:hover { background: var(--navy-900); border-color: var(--navy-900); }
.btn--light { background: var(--white); color: var(--navy-900); border-color: var(--white); }
.btn--light:hover { background: var(--gray-50); color: var(--navy-900); border-color: var(--gray-50); }
.btn--whatsapp { background: transparent; border-color: rgba(255,255,255,.5); }
.btn--whatsapp:hover { background: #25d366; border-color: #25d366; }

/* Top bar ---------------------------------------------------------------- */
.topbar { background: var(--navy-950); color: var(--gray-200); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 16px; }
.topbar__contact { display: flex; gap: 32px; flex-wrap: wrap; }
.topbar a { color: var(--gray-200); font-weight: 400; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: var(--white); }
.topbar svg { width: 14px; height: 14px; fill: var(--navy-300); }
.topbar__meta { display: flex; align-items: center; gap: 18px; color: var(--gray-200); }
.topbar__meta span { opacity: .8; }
.topbar__meta svg { width: 15px; height: 15px; }

/* Header / nav ----------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--gray-100);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-900); }
.brand:hover { color: var(--navy-900); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--navy-900); color: var(--white);
  font-family: var(--font-serif); font-size: 17px; letter-spacing: .5px;
}
.brand__name { font-family: var(--font-serif); font-size: 1.6rem; letter-spacing: .4px; white-space: nowrap; }
.brand--light, .brand--light:hover { color: var(--white); }
.brand--light .brand__mark { background: var(--white); color: var(--navy-900); }

.nav { display: flex; align-items: center; }
.nav a {
  color: var(--navy-950);
  font-size: 14px; font-weight: 500;
  padding: 4px 14px;
  position: relative;
}
.nav a + a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1px; height: 14px; transform: translateY(-50%);
  background: var(--navy-950); opacity: .5;
}
.nav a:hover { color: var(--navy-500); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-900); margin: 4px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0;
  background:
    radial-gradient(120% 90% at 18% 10%, rgba(255,255,255,1) 0 38%, rgba(255,255,255,0) 60%),
    radial-gradient(90% 120% at 95% 110%, rgba(196,203,214,.55) 0 30%, rgba(196,203,214,0) 62%),
    linear-gradient(160deg, #fbfcfc 0%, #eef0f3 55%, #dfe3e9 100%);
}
/* Sweeping curves + halftone, echoing the reference background */
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none; border-radius: 50%;
}
.hero::before {
  width: 140%; height: 160%; left: -30%; top: -95%;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 40px 80px rgba(19,41,75,.05), inset 0 -30px 60px rgba(255,255,255,.8);
}
.hero::after {
  width: 120%; height: 120%; right: -55%; bottom: -70%;
  background: radial-gradient(circle, rgba(19,41,75,.13) 1.1px, transparent 1.4px) 0 0 / 9px 9px;
  -webkit-mask-image: radial-gradient(closest-side, transparent 55%, #000 70%, transparent 100%);
          mask-image: radial-gradient(closest-side, transparent 55%, #000 70%, transparent 100%);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero__eyebrow { display: block; margin-bottom: 18px; font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--navy-500); line-height: 1.5; width: max-content; max-width: min(calc(100vw - 40px), 640px); }
.lead { font-size: 1rem; max-width: 60ch; color: var(--navy-950); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero__media { position: relative; justify-self: center; width: min(360px, 100%); }
.hero__circle {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: var(--navy-900);
  border: 10px solid var(--navy-900);
  box-shadow: 0 30px 60px rgba(10,26,51,.25);
}
.hero__circle img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero__badge {
  position: absolute; left: -18px; bottom: 22px;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
}
.hero__badge strong { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 400; color: var(--navy-900); line-height: 1; }
.hero__badge span { font-size: 13px; line-height: 1.2; color: var(--gray-600); max-width: 8ch; }

/* Sections --------------------------------------------------------------- */
.section { padding: 88px 0; }
.section--alt { background: var(--gray-25); border-top: 1px solid var(--gray-50); border-bottom: 1px solid var(--gray-50); }
.section__head { text-align: center; max-width: 820px; margin: 0 auto 48px; }
.section__head p { color: var(--navy-950); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--navy-500); margin-bottom: .6em; }

/* Practice cards (teal-gradient cards from reference, in navy) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 60%);
  border-top: 6px solid var(--navy-900);
  padding: 36px 30px 30px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: background .35s, color .35s, transform .35s;
}
.card h3 { text-transform: uppercase; letter-spacing: 2px; font-size: 1.15rem; margin-top: 18px; }
.card p { flex: 1; color: var(--navy-950); }
.card .card__kicker { flex: none; margin: -2px 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy-500); }
.card:hover .card__kicker { color: var(--navy-300); }
.card__icon { width: 72px; height: 72px; color: var(--navy-900); }
.card__icon svg { width: 100%; height: 100%; }
.card__link { font-weight: 500; }
.card--featured, .card:hover {
  background: linear-gradient(180deg, var(--navy-500) 0%, var(--navy-900) 54%);
  border-top-color: var(--navy-950);
}
.card--featured h3, .card--featured p, .card--featured .card__icon,
.card:hover h3, .card:hover p, .card:hover .card__icon { color: var(--white); }
.card--featured .card__link, .card:hover .card__link { color: var(--navy-300); }
.cards:hover .card--featured:not(:hover) { background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 60%); border-top-color: var(--navy-900); }
.cards:hover .card--featured:not(:hover) h3,
.cards:hover .card--featured:not(:hover) p,
.cards:hover .card--featured:not(:hover) .card__icon { color: var(--navy-900); }
.cards:hover .card--featured:not(:hover) p { color: var(--navy-950); }
.cards:hover .card--featured:not(:hover) .card__link { color: var(--navy-500); }

/* Definition band (reference "Prov·i·den·ti·a") */
.definition { background: var(--navy-900); color: var(--white); padding: 72px 0; }
.definition__inner { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; }
.definition__term { font-family: var(--font-serif); font-size: clamp(2.4rem, 4vw, 3.2rem); line-height: 1; margin: 0 0 8px; }
.definition__pos { font-style: italic; font-family: var(--font-serif); color: var(--navy-300); margin: 0; font-size: 1.2rem; }
.definition__ipa { margin: 0; opacity: .75; }
.definition__body { margin: 0; font-size: 1.1rem; line-height: 1.7; border-left: 1px solid rgba(255,255,255,.25); padding-left: 40px; }

/* Stats */
.stats { padding: 64px 0; border-bottom: 1px solid var(--gray-100); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 0 12px; }
.stat + .stat { border-left: 1px solid var(--gray-100); }
.stat strong { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 3.2rem; line-height: 1.1; color: var(--navy-900); }
.stat span { display: block; font-size: 14px; color: var(--gray-600); max-width: 22ch; margin: 6px auto 0; }

/* About */
.about { display: grid; grid-template-columns: 0.75fr 1.4fr; gap: 64px; align-items: center; }
.about__photo { position: relative; padding: 0 20px 20px 0; }
.about__photo::before {
  content: ""; position: absolute; inset: 20px 0 0 20px;
  background: var(--navy-900); border-radius: 6px; z-index: 0;
}
.about__photo img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 16px; height: 9px;
  border-left: 2px solid var(--navy-500); border-bottom: 2px solid var(--navy-500);
  transform: rotate(-45deg);
}

/* Ventures */
.ventures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.venture {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 32px 28px;
  color: var(--navy-950); font-weight: 400;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.venture:hover { color: var(--navy-950); border-color: var(--navy-500); box-shadow: var(--shadow); transform: translateY(-3px); }
.venture img { height: 56px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; margin-bottom: 24px; }
.venture h3 { font-size: 1.1rem; }
.venture p { flex: 1; font-size: 15px; }
.venture__url { color: var(--navy-500); font-weight: 500; font-size: 14px; }

/* Experience timeline */
.timeline-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--gray-200); }
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -35px; top: 4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--navy-500);
}
.timeline h3 { font-size: 1.1rem; letter-spacing: .5px; margin-top: 4px; }
.timeline p { margin: 0 0 .3em; font-size: 15px; }
.timeline__date { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy-500); }
.timeline__org { color: var(--gray-600); }

.education { background: var(--white); border: 1px solid var(--gray-100); border-top: 6px solid var(--navy-900); padding: 32px 28px; }
.education__title { text-transform: uppercase; letter-spacing: 2px; font-size: 1rem; margin-bottom: 18px; }
.education__title:not(:first-child) { margin-top: 32px; }
.edu { padding: 12px 0; border-bottom: 1px solid var(--gray-50); }
.edu:last-child { border-bottom: 0; }
.edu h4 { font-size: 1rem; font-weight: 600; margin: 2px 0; }
.edu p { margin: 0; font-size: 14px; color: var(--gray-600); }

/* Reviews */
.rating {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  margin-top: 4px; padding: 10px 20px;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-pill);
  color: var(--navy-950); font-weight: 400;
  transition: border-color .25s, box-shadow .25s;
}
.rating:hover { border-color: var(--navy-500); box-shadow: var(--shadow); }
.g-logo { width: 22px; height: 22px; flex: none; }
.rating__score { font-weight: 600; font-size: 1.1rem; }
.rating__count { font-size: 14px; color: var(--gray-600); text-decoration: underline; text-underline-offset: 3px; }
.rating:hover { color: var(--navy-500); }
.rating__stars, .review__stars { color: #f4b400; letter-spacing: 2px; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  margin: 0; padding: 30px;
  background: var(--gray-25); border: 1px solid var(--gray-100); border-radius: 8px;
  display: flex; flex-direction: column;
}
.review blockquote { margin: 14px 0 20px; flex: 1; font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.4; color: var(--navy-900); }
.review figcaption strong { display: block; color: var(--navy-950); }
.review figcaption span { font-size: 14px; color: var(--gray-600); }
.reviews__note { text-align: center; font-size: 13px; color: var(--gray-600); margin: 24px 0 0; }

/* FAQ */
.faq { max-width: 860px; }
.faq details { background: var(--white); border: 1px solid var(--gray-100); border-radius: 8px; margin-bottom: 12px; }
.faq details[open] { border-color: var(--navy-500); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 20px 56px 20px 24px;
  font-weight: 600; color: var(--navy-900); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--navy-500); border-bottom: 2px solid var(--navy-500);
  transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 20px; margin: 0; }

/* Clients: white silhouettes on a navy band */
.clients { padding: 64px 0 72px; background: var(--navy-950); }
.clients__title { text-align: center; margin-bottom: 40px; color: var(--white); }
/* Flex rows so an incomplete last row stays centered (7 logos: 7 / 4+3 / 2+2+2+1).
   Each logo's --h (set inline) equalizes visual area: h = sqrt(area / aspect ratio). */
.clients__logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 40px; }
.clients__logos img { flex: 0 0 auto; box-sizing: content-box; padding: 0 14px; width: calc(100% / 7 - 28px); }
.clients__logos img { height: var(--h); object-fit: contain; filter: brightness(0) invert(1); opacity: .8; transition: opacity .25s; }
/* Logos with a filled background can't become silhouettes; show them in grayscale */
.clients__logos img.is-solid { filter: grayscale(1) contrast(1.1); }
.clients__logos img:hover { opacity: 1; }

/* Contact */
.contact { background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-950) 100%); color: var(--white); padding: 88px 0; }
.contact__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.contact h2 { color: var(--white); }
.contact p { color: var(--gray-200); font-size: 1.05rem; max-width: 52ch; }
.contact__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact__note { font-size: 14px !important; margin: 6px 0 0; opacity: .8; }

/* Footer */
.footer { background: var(--navy-950); color: var(--gray-200); padding: 56px 0 24px; font-size: 14px; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__tag { margin: 10px 0 0; opacity: .8; }
.footer__social { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; }
.footer__social svg { width: 16px; height: 16px; fill: currentColor; }
.footer__nav, .footer__ventures { display: flex; flex-direction: column; gap: 8px; }
.footer a:not(.brand) { color: var(--gray-200); font-weight: 400; }
.footer a:not(.brand):hover { color: var(--white); }
.footer__legal { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 20px; font-size: 12px; opacity: .7; }
.footer__legal p { margin: 0; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .nav a { padding: 4px 10px; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .clients__logos { row-gap: 44px; }
  .clients__logos img { width: calc(25% - 28px); }
  .card { padding: 32px 22px 26px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stat:nth-child(3) { border-left: 0; }
}

@media (max-width: 860px) {
  .topbar__meta span { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
    padding: 8px 0;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 20px; font-size: 16px; }
  .nav a + a::before { display: none; }

  .hero { padding: 48px 0 56px; }
  .hero__inner, .about, .timeline-wrap, .contact__inner, .definition__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; width: min(260px, 70%); }
  .hero__badge { left: -10px; bottom: 8px; }
  .definition__inner { gap: 28px; }
  .definition__body { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.25); padding-top: 28px; }
  .cards, .ventures { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .about { gap: 48px; }
  .about__photo { width: min(340px, 100%); margin: 0 auto; }
  .section { padding: 64px 0; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__inner > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .topbar__contact { gap: 16px; }
  .topbar__contact a:last-child { display: none; }
  .brand__name { font-size: 1.35rem; }
  .reviews { grid-template-columns: 1fr; }
  .clients__logos { row-gap: 36px; }
  .clients__logos img { width: calc(50% - 28px); }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 32px 8px; }
  .stat strong { font-size: 2.4rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .contact__actions .btn { width: 100%; justify-content: center; font-size: .95rem; }
}

@media (max-width: 360px) {
  .brand { gap: 10px; }
  .brand__name { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
