/* Garoña Abogados — styles.css
   System: white paper, navy in three strengths, system font.
   Motion rules: transform/opacity only, ease-out for entrances, everything under 300ms,
   hover gated to fine pointers, reduced motion respected. */

:root {
  --ink: #1c1c1e;
  --ink-2: #5c5c62;
  --paper: #ffffff;
  --paper-2: #eef0f8;
  --line: rgba(28, 28, 30, 0.12);
  --navy: #1b2356;
  --navy-deep: #101640;
  --blue: #4354a7;
  --tint: #eef0f8;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font: 100%/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem .75rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.wrap-narrow { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.wrap-narrow > * { max-width: 72ch; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1.5rem; }
.brand img { height: 3rem; width: auto; }
.nav { display: flex; gap: 1.6rem; font-size: 0.9375rem; }
.nav a { color: var(--ink-2); transition: color 150ms ease; padding: .25rem 0; }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 500; }
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; padding: .25rem 0; font: inherit; font-size: 0.9375rem; color: var(--ink-2); cursor: pointer; transition: color 150ms ease; }
.nav-dd-btn.is-current { color: var(--navy); font-weight: 500; }
.nav-dd-btn svg { transition: transform 200ms var(--ease-out); }
.nav-dd-btn[aria-expanded="true"] { color: var(--ink); }
.nav-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dd-panel { position: absolute; top: calc(100% + .9rem); left: -1rem; display: none; grid-template-columns: 1fr 1fr; gap: 0 2rem; min-width: 480px; padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(16, 22, 64, 0.12); z-index: 20;
  opacity: 1; transform: translateY(0); transition: opacity 180ms ease, transform 220ms var(--ease-out); }
.nav-dd-panel.is-open { display: grid; }
@starting-style { .nav-dd-panel.is-open { opacity: 0; transform: translateY(-6px); } }
.nav-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
.nav-dd-col a { display: block; padding: .45rem 0; color: var(--ink); font-size: 0.9375rem; white-space: nowrap; }
.nav-dd-col a[aria-current="page"] { color: var(--navy); font-weight: 500; }
.acc-btn { display: none; }
.header-cta { display: flex; gap: 0.5rem; align-items: center; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 2.5rem; height: 2.5rem; cursor: pointer; align-items: center; justify-content: center; transition: transform 160ms var(--ease-out); }
.menu-btn:active { transform: scale(0.95); }
.nav-dd-btn:focus-visible, .acc-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.mobile-nav { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.625rem 1.125rem; border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 500; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-lg { padding: .875rem 1.5rem; font-size: 1rem; }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--navy); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.display { font-size: clamp(2.25rem, 5.5vw, 4.25rem); line-height: 1.04; letter-spacing: -0.025em; max-width: 18ch; font-optical-sizing: auto; }
.title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 52ch; line-height: 1.55; }
.muted { color: var(--ink-2); }
.label { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); margin-bottom: 1rem; }

/* ---------- Home hero ---------- */
.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .lead { margin-top: 1.5rem; }
.hero-actions { margin-top: 2.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-meta { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; gap: 2.5rem; flex-wrap: wrap; font-size: 0.9375rem; color: var(--ink-2); }
.hero-meta strong { display: block; color: var(--ink); font-weight: 500; }
.reveal { opacity: 0; transform: translateY(10px); animation: reveal 480ms var(--ease-out) forwards; }
.reveal:nth-child(2) { animation-delay: 60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero .lead { margin-top: 1.25rem; }
.crumbs { font-size: .875rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-2); } .crumbs span { margin: 0 .5rem; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--navy); } }

/* ---------- Practice-area list ---------- */
.areas { padding: clamp(2rem, 6vw, 4rem) 0; }
.area {
  display: grid; grid-template-columns: 160px 1fr 1.2fr auto; gap: 2rem; align-items: center;
  padding: 1.5rem 0; border-top: 1px solid var(--line);
  transition: background-color 150ms ease;
}
.area:last-of-type { border-bottom: 1px solid var(--line); }
.area-img { position: relative; width: 100%; height: 0; padding-bottom: 75%; border-radius: var(--radius); background: var(--tint); overflow: hidden; align-self: center; }
.area-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.area-name { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.1; font-weight: 500; color: var(--navy); }
.area-desc { color: var(--ink-2); font-size: 1rem; line-height: 1.5; max-width: 46ch; }
.area-link { color: var(--blue); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }
.areas-compact .area { grid-template-columns: 1fr 1.2fr auto; }

/* ---------- Two-column sections ---------- */
.split { padding: clamp(3rem, 7vw, 5rem) 0; }
.split .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.split.tinted { background: var(--paper-2); }
.split p { color: var(--ink-2); line-height: 1.6; max-width: 56ch; }
.split p + p { margin-top: 1rem; }
.split h2 { max-width: 16ch; }
.offices { list-style: none; margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
.offices li strong { display: block; font-weight: 500; color: var(--ink); }
.offices li span { color: var(--ink-2); font-size: 0.9375rem; }
.photo { border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-caption { font-size: .875rem; color: var(--ink-2); margin-top: .5rem; }
blockquote { border-left: 2px solid var(--navy); padding-left: 1rem; margin-top: 1.5rem; color: var(--navy); font-size: 1.125rem; }
blockquote small { display: block; color: var(--ink-2); font-size: .9375rem; margin-top: .35rem; }

/* ---------- Prose (practice pages, legal) ---------- */
.prose { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: .75rem; }
.prose h3 { font-size: 1.125rem; margin-top: 1.75rem; margin-bottom: .5rem; }
.prose p { color: var(--ink); line-height: 1.65; margin-bottom: 1rem; }
.prose p.muted { color: var(--ink-2); }
.prose ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; line-height: 1.55; }
.prose a:not(.btn) { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; max-width: none; border-collapse: collapse; font-size: .9375rem; margin: 1rem 0 1.5rem; }
.prose th, .prose td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--ink-2); }
.legal-updated { font-size: .875rem; color: var(--ink-2); margin-top: 2rem; }

/* ---------- Cases ---------- */
.cases { padding: clamp(3rem, 7vw, 5rem) 0; }
.case { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.case:last-of-type { border-bottom: 1px solid var(--line); }
.case h3 { font-size: 1.375rem; font-weight: 500; }
.case p { color: var(--ink-2); max-width: 60ch; line-height: 1.55; }

/* ---------- CTA band ---------- */
.cta { background: var(--navy); color: #fff; padding: clamp(3rem, 7vw, 5rem) 0; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.75); margin-top: 1rem; max-width: 52ch; }
.cta-actions { margin-top: 2rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.cta .btn-primary { background: #fff; color: var(--navy); }
.cta .btn-secondary { color: #fff; border-color: rgba(255,255,255,.35); }
@media (hover: hover) and (pointer: fine) {
  .cta .btn-primary:hover { background: var(--paper-2); }
  .cta .btn-secondary:hover { border-color: #fff; }
}

/* ---------- Contact ---------- */
.contact { padding: clamp(3rem, 7vw, 5rem) 0; }
.contact .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; }
.contact-lines { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.contact-lines a { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; transition: color 150ms ease; }
.contact-lines small { display: block; color: var(--ink-2); font-size: 0.9375rem; }
.contact-detail { display: grid; gap: 1.25rem; align-content: start; padding-top: 0.5rem; }
.contact-detail div strong { display: block; font-weight: 500; }
.contact-detail div span { color: var(--ink-2); }
.contact-detail a { color: var(--blue); }
.map { margin-top: 2.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 7; background: var(--tint); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: 0.875rem; color: var(--ink-2); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: .5rem; }
.footer nav a, .footer address a { display: block; padding: .15rem 0; }
.footer address { font-style: normal; line-height: 1.6; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 20;
  max-width: 560px; margin-inline: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.125rem; box-shadow: 0 8px 30px rgba(16, 22, 64, 0.12);
  display: none; gap: 1rem; align-items: center; flex-wrap: wrap;
  opacity: 1; transform: translateY(0);
  transition: opacity 200ms ease, transform 250ms var(--ease-out);
}
@starting-style { .cookie.is-visible { opacity: 0; transform: translateY(12px); } }
.cookie.is-visible { display: flex; }
.cookie p { flex: 1 1 260px; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.cookie p a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hover (fine pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .nav-dd-btn:hover { color: var(--ink); }
  .nav-dd-col a:hover { color: var(--blue); }
  .btn-primary:hover { background: var(--navy-deep); }
  .btn-secondary:hover { border-color: var(--ink-2); }
  .area:hover { background: var(--paper-2); }
  .area:hover .area-link { text-decoration: underline; text-underline-offset: 3px; }
  .contact-lines a:hover, .footer a:hover { color: var(--blue); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-cta .btn-secondary { display: none; }
  .mobile-nav { display: block; position: fixed; inset: 4rem 0 0; background: #fff; z-index: 9; padding: 1.5rem; overflow: auto;
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease-out); }
  .mobile-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-nav a { display: block; font-size: 1.375rem; padding: .75rem 0; border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 500; }
  .mobile-nav a.btn { margin-top: 1.5rem; border-bottom: 0; font-size: 1rem; color: #fff; }
  .acc-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .75rem 0; font: inherit; font-size: 1.375rem; font-weight: 500; color: var(--navy); cursor: pointer; text-align: left; }
  .acc-btn svg { transition: transform 200ms var(--ease-out); }
  .acc-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .acc-panel { display: none; padding: .25rem 0 .5rem 1rem; border-bottom: 1px solid var(--line); }
  .acc-panel.is-open { display: block; }
  .acc-panel a { font-size: 1.125rem; font-weight: 400; color: var(--ink); border-bottom: 0; padding: .55rem 0; }
  .area { grid-template-columns: 1fr; gap: 0.75rem; }
  .area-img { max-width: 240px; }
  .areas-compact .area { grid-template-columns: 1fr; }
  .split .wrap, .contact .wrap, .footer .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .case { grid-template-columns: 1fr; gap: .5rem; }
}
@media (max-width: 480px) { .offices { grid-template-columns: 1fr; } .brand img { height: 2.5rem; } }

/* ---------- Reduced motion / transparency ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: fade 200ms ease forwards; transform: none; }
  @keyframes fade { to { opacity: 1; } }
  .btn:active, .menu-btn:active { transform: none; }
  .mobile-nav, .cookie { transition: opacity 200ms ease; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media print { .header, .footer, .cookie, .cta, .mobile-nav { display: none !important; } }

/* ---------- Utilities (replace inline styles so CSP can drop unsafe-inline) ---------- */
.mt-1 { margin-top: 1rem; } .mt-15 { margin-top: 1.5rem; } .mt-2 { margin-top: 2rem; }
.pt-0 { padding-top: 0; }
.photo-wide { margin-top: 2rem; aspect-ratio: 16 / 10; }
.photo-portrait { aspect-ratio: 3 / 4; max-width: 420px; }
.small { font-size: .9375rem; } .smaller { font-size: .875rem; margin-top: .5rem; }
.note { max-width: 46ch; }
.link { color: var(--blue); }

/* ---------- Page banner photo (practice pages) ---------- */
.page-hero.with-photo .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.page-photo { position: relative; height: 0; padding-bottom: 75%; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.page-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .page-hero.with-photo .wrap { grid-template-columns: 1fr; gap: 2rem; } .page-photo { max-width: 360px; } }
