/* rodriguezcasanova.com
   Layout: quiet, Apple-like editorial page. One signature element (the three circles: people, law, business).
   Type: Geist (variable, 400–700), self-hosted, SIL Open Font License. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f2;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: #e3e4e0;
  --accent: #1f5c45;
  --accent-hover: #174a37;
  --accent-soft: #e6efe9;
  --band: #16382b;
  --band-ink: #f2f4f1;
  --band-muted: #a9bdb2;

  /* the three circles */
  --c-people: #2e7d5b;
  --c-law: #b38b3a;
  --c-business: #4f6474;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 11vw, 144px);
  --radius: 22px;
  --radius-sm: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "ss01";
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Type ---------- */

.eyebrow {
  display: block;
  margin: 0 0 16px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.h-xl, .h-l, .h-m, .h-s { margin: 0; font-weight: 600; text-wrap: balance; }
.h-xl {
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 650;
}
.h-l {
  font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.h-m {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.h-s {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.quiet { color: var(--muted); }

.lead {
  margin: 0;
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  max-width: 36em;
  text-wrap: pretty;
}

.prose p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.btn--light { background: #fff; color: var(--band); }
.btn--light:hover { background: var(--accent-soft); }

.more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.more::after { content: "›"; font-size: 1.25em; line-height: 1; transform: translateY(-1px); transition: transform 0.2s ease; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.more:hover::after { transform: translate(2px, -1px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark { width: 26px; height: 26px; flex: none; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav-link {
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }

.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 0.8125rem;
  font-weight: 600;
}
.lang-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.32s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.lang[data-active="en"] .lang-thumb { transform: translateX(100%); }
.lang > a,
.lang > span[aria-current] {
  position: relative;
  min-width: 36px;
  padding: 5px 9px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  line-height: 1.2;
  transition: color 0.25s ease;
}
.lang > a:hover,
.lang[data-active="es"] > :nth-child(2),
.lang[data-active="en"] > :nth-child(3) { color: var(--ink); }
.lang[data-active="en"] > :nth-child(2),
.lang[data-active="es"] > :nth-child(3) { color: var(--muted); }

.nav .btn { min-height: 36px; padding: 7px 16px; font-size: 0.9375rem; }

/* Labels that hold the width of their other-language version, so the header doesn't shift. */
.dual { display: inline-grid; justify-items: center; }
.dual > span { grid-area: 1 / 1; }
.dual-ghost { visibility: hidden; }

/* Language switch without reload: a short crossfade. The header stays put. */
.site-header { view-transition-name: site-header; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.28s; animation-timing-function: ease; }
::view-transition-group(site-header) { animation-duration: 0.28s; }
.swapping main, .swapping .site-footer { opacity: 0; }
main, .site-footer { transition: opacity 0.18s ease; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0 0; }
.hero .h-xl { max-width: 13em; }
.hero .h-xl .quiet { display: block; }
.hero .lead { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.hero-media { margin-top: clamp(48px, 7vw, 88px); }

.track {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 36px;
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.track ul { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0; padding: 0; list-style: none; }
.track li { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }

/* ---------- Photo placeholders ----------
   A rounded panel that says which photo goes there. An <img> placed inside .ph-frame covers it. */

.ph { margin: 0; }
.ph-frame {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 5);
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(46, 125, 91, 0.10), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, rgba(179, 139, 58, 0.10), transparent 60%),
    var(--bg-alt);
  display: grid;
  place-items: center;
}
.ph-label { display: grid; justify-items: center; gap: 6px; padding: 24px; text-align: center; }
.ph-icon { width: 28px; height: 28px; color: var(--muted); margin-bottom: 6px; }
.ph-desc { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }
.ph-spec { font-size: 0.8125rem; color: var(--muted); }
.ph-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section--alt { background: var(--bg-alt); }
.section-intro { max-width: 40rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-intro .lead { margin-top: 20px; }

/* ---------- The three circles ---------- */

.venn-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.venn-grid .lead { margin-top: 20px; }

.venn { width: 100%; max-width: 560px; margin-inline: auto; display: block; overflow: visible; }
.venn circle { mix-blend-mode: multiply; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease; }
.venn .c-people { fill: var(--c-people); }
.venn .c-law { fill: var(--c-law); }
.venn .c-business { fill: var(--c-business); }
.venn text { font-family: var(--font); fill: var(--ink); }
.venn .v-label { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; fill: #fff; }
.venn .v-sub { font-size: 13px; font-weight: 500; fill: rgba(255, 255, 255, 0.82); }
.venn .v-center { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; fill: #fff; }
.js .venn:not(.is-in) .c-people { transform: translate(28px, 18px); opacity: 0; }
.js .venn:not(.is-in) .c-law { transform: translate(-28px, 18px); opacity: 0; }
.js .venn:not(.is-in) .c-business { transform: translate(0, -30px); opacity: 0; }

.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}
.legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 14px; }
.legend .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 6px; }
.legend h3 { margin: 0 0 6px; }
.legend p { margin: 0; color: var(--ink-2); grid-column: 2; text-wrap: pretty; }

.dot--people { background: var(--c-people); }
.dot--law { background: var(--c-law); }
.dot--business { background: var(--c-business); }

/* ---------- Services: one list, each row shows which circles it draws on ---------- */

.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: 12px clamp(24px, 4vw, 56px);
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.service .for { display: block; margin-top: 10px; font-size: 0.9375rem; color: var(--muted); }
.mix { display: flex; gap: 6px; padding-top: 8px; }
.mix .dot { width: 12px; height: 12px; border-radius: 50%; display: block; }
.mix .off { background: var(--line); }

/* ---------- Band ---------- */

.band { background: var(--band); color: var(--band-ink); padding: var(--section) 0; }
.band .eyebrow { color: #c9a961; }
.band .h-l { max-width: 15em; }
.band .h-l .quiet { color: var(--band-muted); }
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(24px, 4vw, 56px);
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}
.pillars h3 { margin: 0 0 8px; }
.pillars p { margin: 0; color: var(--band-muted); text-wrap: pretty; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 1.0625rem;
}
.steps h3 { margin: 0 0 8px; }
.steps p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.about-grid .h-l { margin-bottom: 24px; }
.creds { margin: 32px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.creds div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.creds dt { color: var(--muted); font-size: 0.9375rem; }
.creds dd { margin: 0; font-weight: 500; }

/* ---------- Articles ---------- */

.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-row a {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) auto;
  gap: 8px clamp(24px, 4vw, 56px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: baseline;
}
.post-meta { font-size: 0.9375rem; color: var(--muted); }
.post-row p { margin: 8px 0 0; color: var(--ink-2); text-wrap: pretty; }
.post-row .more { white-space: nowrap; }
.post-row a:hover .h-s { color: var(--accent); }
.section-foot { margin-top: 32px; }

/* ---------- FAQ ---------- */

.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
}
.faq summary:hover::after { background: var(--accent); color: #fff; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { overflow: hidden; }
.faq-a p { margin: 0 0 24px; max-width: 44em; color: var(--ink-2); }

/* ---------- Contact ---------- */

.contact { padding: var(--section) 0; background: var(--bg-alt); }
.contact .h-xl { max-width: 10em; }
.contact .lead { margin-top: 24px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 36px; }
.contact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: clamp(48px, 7vw, 72px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact-list dt { font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }
.contact-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer { padding: 28px 0 40px; font-size: 0.8125rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Article pages ---------- */

.article-head { padding: clamp(40px, 7vw, 88px) 0 0; }
.crumbs { font-size: 0.9375rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article-head .h-l { max-width: 18em; }
.article-head .lead { margin-top: 24px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; font-size: 0.9375rem; color: var(--muted); }
.byline strong { color: var(--ink); font-weight: 600; }
.article-media { margin-top: clamp(40px, 6vw, 64px); }

.article-body { max-width: 42rem; margin: 0 auto; padding: clamp(48px, 7vw, 80px) 0 var(--section); }
.article-body h2 { margin: 2em 0 0.6em; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.article-body p, .article-body li { color: var(--ink-2); font-size: 1.1875rem; line-height: 1.6; text-wrap: pretty; }
.article-body p { margin: 0 0 1.1em; }
.article-body ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: 0.5em; }
.article-body li::marker { color: var(--accent); }
.article-body strong { color: var(--ink); font-weight: 600; }
.note { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: 0.9375rem !important; color: var(--muted) !important; }

.author {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 48px;
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.author-photo { width: 64px; height: 64px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 600; color: var(--muted); overflow: hidden; }
.author p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.author strong { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 2px; }

.blog-head { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 64px); }
.blog-head .lead { margin-top: 20px; }

/* ---------- 404 ---------- */

.notfound { padding: clamp(80px, 14vw, 180px) 0; }
.notfound .lead { margin: 20px 0 32px; }

/* ---------- Motion: short and light ---------- */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .venn circle { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav-link { display: none; }
  .venn-grid, .about-grid { grid-template-columns: 1fr; }
  .venn { max-width: 480px; }
  .service { grid-template-columns: minmax(0, 1fr) auto; }
  .service > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .mix { grid-row: 1; grid-column: 2; }
  .post-row a { grid-template-columns: minmax(0, 1fr); }
  .post-row .more { display: none; }
}

@media (max-width: 720px) {
  .legend, .pillars, .steps, .contact-list { grid-template-columns: 1fr; }
  .about-grid .ph { max-width: 420px; }
}

@media (max-width: 520px) {
  .brand-name { display: none; }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }
  .creds div { grid-template-columns: 1fr; gap: 2px; }
  .hero-media .ph-frame { --ratio: 4 / 3 !important; }
}
