/* Del Castillo, Pardo de Retes & Asociados — site styles */
:root {
  --blue: #2c4ba0;
  --blue-600: #23408d;
  --navy: #14204a;
  --navy-2: #1b2a5e;
  --ink: #1d2330;
  --text: #444b57;
  --muted: #6b7280;
  --line: #e4e7ee;
  --tint: #f5f6f9;
  --white: #fff;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 32, 74, .05), 0 8px 24px rgba(20, 32, 74, .06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--sans); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }
h1, h2, h3 { color: var(--ink); margin: 0 0 .6em; line-height: 1.15; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .9rem 1.5rem; border-radius: 3px; background: var(--blue); color: #fff; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: background .2s, box-shadow .2s; font-family: inherit; letter-spacing: .02em; }
.btn:hover { background: var(--blue-600); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; height: var(--header-h); z-index: 50; transition: background .25s, box-shadow .25s; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand img { width: 270px; height: auto; }
.brand-dark { display: none !important; }
.site-header.scrolled, .site-header.open { background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 1px 0 var(--line); }
.site-header.scrolled .brand-dark, .site-header.open .brand-dark { display: block !important; }
.site-header.scrolled .brand-light, .site-header.open .brand-light { display: none; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { color: rgba(255, 255, 255, .9); font-size: .93rem; font-weight: 500; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: currentColor; transform: scaleX(0); transition: transform .2s; transform-origin: left; }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.site-header.scrolled .nav a:not(.btn), .site-header.open .nav a:not(.btn) { color: var(--ink); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .25s, background .25s; }
.site-header.scrolled .nav-toggle span, .site-header.open .nav-toggle span { background: var(--ink); }
.site-header.open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.site-header.open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: min(100svh, 860px); display: flex; flex-direction: column; justify-content: flex-end; color: #fff; isolation: isolate; overflow: hidden; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(14, 22, 52, .92) 0%, rgba(14, 22, 52, .78) 45%, rgba(14, 22, 52, .35) 100%), linear-gradient(0deg, rgba(14, 22, 52, .6), transparent 40%); }
.hero-content { padding: calc(var(--header-h) + 4rem) 0 4rem; max-width: 1180px; }
.hero-content > * { max-width: 720px; }
.hero .eyebrow { color: #b9c7f0; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); margin-bottom: 1.25rem; line-height: 1.12; }
.hero .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: rgba(255, 255, 255, .85); margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-strip { margin: 0 auto; padding: 1.4rem 0 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .95rem; color: rgba(255, 255, 255, .8); letter-spacing: .02em; }
.hero-strip .sep { width: 1px; height: 1em; background: rgba(255, 255, 255, .35); }
.section-sub { font-size: 1.1rem; color: var(--muted); margin: -.2rem 0 0; }

/* Sections */
.section { padding: clamp(4.5rem, 3rem + 6vw, 8rem) 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.group-title { font-family: var(--sans); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 2.5rem 0 1.25rem; }
.group-title.center { text-align: center; margin-top: 4.5rem; }


/* Practice areas */
.practice { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.practice-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.practice-head .section-sub { margin-bottom: 1.75rem; }
.link-arrow { font-weight: 600; font-size: .95rem; letter-spacing: .02em; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow span { display: inline-block; transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }
.practice-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.practice-list li { display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; padding: 1.9rem 0; border-bottom: 1px solid var(--line); }
.practice-list .num { grid-row: span 2; font-family: var(--serif); font-size: 1rem; color: var(--blue); padding-top: .3rem; font-variant-numeric: lining-nums; }
.practice-list h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); margin: 0 0 .45rem; }
.practice-list p { margin: 0; max-width: 46ch; }

/* People */
.people { display: grid; gap: 1rem; }
.people-2 { grid-template-columns: repeat(2, 1fr); }
.people-3 { grid-template-columns: repeat(3, 1fr); }
.person { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.person strong { display: block; color: var(--ink); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.person span:not(.avatar) { font-size: .88rem; color: var(--muted); }
.people-2 .person { padding: 1.8rem; }
.people-2 .person strong { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 600; letter-spacing: .04em; font-size: .95rem; }
.people-2 .avatar { width: 68px; height: 68px; font-size: 1.1rem; }
.avatar.alt { background: rgba(44, 75, 160, .1); color: var(--blue); }

/* Logos */
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.logos li a { display: grid; place-items: center; height: 110px; padding: 1.25rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); transition: box-shadow .25s; }
.logos img { max-height: 54px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .25s, opacity .25s; }
.logos li a:hover { box-shadow: var(--shadow); }
.logos li a:hover img { filter: none; opacity: 1; }
.logos-sm { display: flex; flex-wrap: wrap; justify-content: center; }
.logos-sm li { flex: 0 0 calc((100% - 5rem) / 6); }
.logos-sm li a { height: 96px; }
.logos-sm img { max-height: 44px; }

/* Contact */
.section-dark { background: var(--navy); color: rgba(255, 255, 255, .8); }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: #9fb2ec; }
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.muted { color: rgba(255, 255, 255, .7); font-size: 1.05rem; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1.2rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list svg { flex: none; width: 22px; height: 22px; margin-top: .15em; fill: none; stroke: #9fb2ec; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a { color: #fff; }
.contact-list a:hover { color: #c9d4f5; }
.map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--navy-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); }

.form { background: #fff; color: var(--text); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-size: .87rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); padding: .8rem .95rem; border: 1px solid #d5d9e2; border-radius: 4px; background: #fbfbfd; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(44, 75, 160, .12); }
.field.invalid input, .field.invalid textarea { border-color: #c0392b; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 1rem 0 0; font-size: .92rem; min-height: 1.4em; text-align: center; }
.form-status.ok { color: #1e7a46; }
.form-status.err { color: #c0392b; }

/* Footer */
.site-footer { background: #0e1634; color: rgba(255, 255, 255, .6); font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-inner img { width: 200px; opacity: .9; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer a { color: rgba(255, 255, 255, .75); }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 0 1.5rem; font-size: .82rem; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .logos { grid-template-columns: repeat(4, 1fr); }
  .logos-sm li { flex-basis: calc((100% - 3rem) / 4); }
}
@media (max-width: 880px) {
  :root { --header-h: 66px; }
  .brand img { width: 190px; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.5rem; background: #fff; box-shadow: 0 12px 24px rgba(20, 32, 74, .08); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .site-header.open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { color: var(--ink) !important; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.25rem; padding: .9rem; }
  .contact, .practice { grid-template-columns: 1fr; }
  .practice-head { position: static; }
  .people-3 { grid-template-columns: 1fr 1fr; }
  .practice-list li { grid-template-columns: 2.5rem 1fr; padding: 1.5rem 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .people-2, .people-3, .field-row { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .logos-sm { gap: .75rem; }
  .logos-sm li { flex-basis: calc((100% - .75rem) / 2); }
  .logos li a { height: 92px; }
  .hero-strip .sep { display: none; }
  .hero-strip { flex-direction: column; align-items: flex-start; }
  .hero-content { padding-bottom: 2.5rem; }
}
