/* ============ Tokens — Carrasco Abogados ============ */
:root {
  /* Brand from logo */
  --navy-950: #0a1322;
  --navy-900: #0f1a2e;
  --navy-800: #16223a;
  --navy-700: #1f2e4a;
  --navy-600: #2a3a59;
  --navy-500: #3a4a6b;

  --gold-500: #b59867;
  --gold-400: #c8ad7c;
  --gold-300: #dcc59a;
  --gold-200: #ecdbb8;

  --cream-50: #f7f3ea;
  --cream-100: #efe8d7;
  --cream-200: #e3d8bf;

  --ink: #0e1626;
  --ink-soft: #2c3950;
  --muted: #6a7691;

  --bg: var(--navy-900);
  --bg-2: var(--navy-950);
  --fg: #eee6d3;
  --fg-muted: #b3b8c4;

  --accent: var(--gold-500);
  --accent-2: var(--gold-300);

  --radius: 4px;
  --radius-lg: 10px;

  --maxw: 1280px;

  --font-display: "Playfair Display", "Bodoni Moda", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-palette="charcoal"] {
  --navy-950: #0c0c0d;
  --navy-900: #131316;
  --navy-800: #1c1c20;
  --navy-700: #27272d;
  --navy-600: #34343c;
  --navy-500: #44444f;
  --gold-500: #c0392b;
  --gold-400: #d04638;
  --gold-300: #e26a5e;
  --cream-50: #f3eee7;
  --bg: var(--navy-900);
  --bg-2: var(--navy-950);
  --accent: var(--gold-500);
  --accent-2: var(--gold-300);
}

[data-palette="ivory"] {
  --navy-950: #f1ece1;
  --navy-900: #f7f3ea;
  --navy-800: #efe8d7;
  --navy-700: #e3d8bf;
  --navy-600: #1a2740;
  --navy-500: #2a3a59;
  --gold-500: #1a2740;
  --gold-400: #2a3a59;
  --gold-300: #b59867;
  --cream-50: #ffffff;
  --bg: var(--navy-900);
  --bg-2: var(--navy-950);
  --fg: #0f1a2e;
  --fg-muted: #4a5570;
  --accent: #b59867;
  --accent-2: #1a2740;
}

[data-palette="forest"] {
  --navy-950: #07120e;
  --navy-900: #0d1d17;
  --navy-800: #142a22;
  --navy-700: #1c3a30;
  --navy-600: #2b4b40;
  --gold-500: #c8a36b;
  --gold-400: #d6b683;
  --gold-300: #e0c89c;
  --bg: var(--navy-900);
  --bg-2: var(--navy-950);
}

/* fonts variants */
[data-fonts="dm"] {
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}
[data-fonts="cormorant"] {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

.serif { font-family: var(--font-display); font-weight: 500; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
  display: inline-block;
}

/* ============ Reveal animations ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-x { opacity: 0; transform: translateX(-30px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal-x.in { opacity: 1; transform: translateX(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .55s; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0;
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0);
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 20%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  padding: 12px 0;
}
.nav .row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--navy-800);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-radius: 6px;
  overflow: hidden;
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: 0.01em; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  position: relative;
  font-size: 13.5px;
  color: var(--fg-muted);
  transition: color .2s ease;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent);
  transition: right .3s ease;
}
.nav-links a:hover::after { right: 0; }
@media (max-width: 900px) { .nav-links { display: none; } }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--navy-950);
  font-weight: 600;
  font-size: 13px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: none;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--accent) 50%, transparent); }
.cta.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid color-mix(in oklab, var(--fg) 30%, transparent);
}
.cta.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 18px 0 24px;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero p.lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 0 36px;
  line-height: 1.6;
}
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
  border-top: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  padding-top: 28px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  font-weight: 500;
}
.hero-stat .lab {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* hero visual — animated scales */
.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
}
.hero-frame {
  position: absolute; inset: 0;
  border: 1px solid color-mix(in oklab, var(--accent) 24%, transparent);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 65%),
    linear-gradient(180deg, color-mix(in oklab, var(--navy-800) 60%, transparent), color-mix(in oklab, var(--navy-950) 80%, transparent));
}
.hero-frame::before, .hero-frame::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.hero-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.scales-svg { width: 78%; height: 78%; }
.scales-arm { transform-origin: 200px 80px; animation: sway 6s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}
.scales-pan-l { transform-origin: 100px 100px; animation: bobL 6s ease-in-out infinite; }
.scales-pan-r { transform-origin: 300px 100px; animation: bobR 6s ease-in-out infinite; }
@keyframes bobL { 0%,100% { transform: translateY(8px); } 50% { transform: translateY(-2px); } }
@keyframes bobR { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(8px); } }

.hero-badge {
  position: absolute;
  background: color-mix(in oklab, var(--navy-800) 92%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 10px;
  animation: float 5s ease-in-out infinite;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 99px; background: #29c267; box-shadow: 0 0 0 3px color-mix(in oklab, #29c267 25%, transparent); }
.hero-badge.top { top: 22px; right: -10px; animation-delay: 0s; }
.hero-badge.bot { bottom: 28px; left: -12px; animation-delay: 1.5s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============ Section frame ============ */
.section { padding: 110px 0; position: relative; }
.section.tight { padding: 80px 0; }
.section.alt { background: var(--bg-2); }
.section.cream {
  background: var(--cream-50);
  color: var(--ink);
}
.section.cream .eyebrow { color: var(--navy-700); }
.section.cream .eyebrow::before { background: var(--navy-700); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
  align-items: end;
}
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: 24px; } }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-head p { margin: 0; color: var(--fg-muted); font-size: 17px; max-width: 480px; }
.section.cream .section-head p { color: var(--ink-soft); }

/* ============ Services ============ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

.svc {
  background: var(--bg);
  padding: 36px 30px 32px;
  position: relative;
  cursor: pointer;
  transition: background .35s ease;
  overflow: hidden;
  min-height: 280px;
  display: flex; flex-direction: column;
}
.svc::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, color-mix(in oklab, var(--accent) 14%, transparent));
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.svc:hover::before { opacity: 1; }
.svc:hover .svc-arrow { transform: translate(6px, -6px); color: var(--accent); }

.svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
}
.svc-icon {
  width: 44px; height: 44px;
  margin: 18px 0 18px;
  color: var(--accent);
}
.svc-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.4; }
.svc h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.svc p {
  font-size: 14.5px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.svc-arrow {
  position: absolute; top: 28px; right: 28px;
  color: var(--fg-muted);
  transition: transform .3s ease, color .3s ease;
}
.svc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.svc-cta {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 12%, var(--bg)), var(--bg));
}
.svc-cta h3 { color: var(--accent); }
.svc-tags span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border: 1px solid color-mix(in oklab, var(--fg) 14%, transparent);
  border-radius: 3px;
  color: var(--fg-muted);
}

/* ============ Approach (process) ============ */
.approach {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .approach { grid-template-columns: repeat(2, 1fr); } }
.approach-card {
  padding: 30px 24px 28px;
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--navy-800) 60%, transparent);
  position: relative;
  transition: transform .3s ease, border-color .3s ease;
}
.approach-card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.approach-card .step {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 12px;
}
.approach-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 8px;
  line-height: 1.2;
}
.approach-card p { color: var(--fg-muted); font-size: 14px; margin: 0; line-height: 1.55; }

/* ============ Lawyers ============ */
.lawyers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 820px) { .lawyers { grid-template-columns: 1fr; } }
.lawyer {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  background: var(--navy-800);
  transition: transform .4s ease;
}
.lawyer:hover { transform: translateY(-6px); }
.lawyer-photo {
  aspect-ratio: 4/5;
  width: 100%;
  background: var(--navy-700);
  overflow: hidden;
  position: relative;
}
.lawyer-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease;
  filter: saturate(.85) contrast(1.05);
}
.lawyer:hover .lawyer-photo img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.lawyer-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in oklab, var(--navy-950) 80%, transparent));
}
.lawyer-meta {
  padding: 26px 28px 28px;
  position: relative;
}
.lawyer-meta .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.lawyer-meta h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin: 8px 0 6px;
}
.lawyer-meta p { color: var(--fg-muted); font-size: 14.5px; margin: 0 0 16px; line-height: 1.55; }
.lawyer-contact {
  display: flex; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  padding-top: 16px;
  font-size: 13px;
  color: var(--fg-muted);
}
.lawyer-contact a { display: inline-flex; align-items: center; gap: 8px; transition: color .2s ease; }
.lawyer-contact a:hover { color: var(--accent); }

/* ============ Blog ============ */
.blog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .blog { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog { grid-template-columns: 1fr; } }

.post {
  background: var(--cream-50);
  color: var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease;
  cursor: pointer;
  position: relative;
}
.post:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); }

.post-img {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: var(--navy-700);
}
.post-img .ph {
  width: 100%; height: 100%;
  background-image:
    repeating-linear-gradient(45deg,
      color-mix(in oklab, var(--accent) 22%, transparent) 0 10px,
      transparent 10px 22px),
    linear-gradient(135deg, var(--navy-700), var(--navy-900));
  display: grid; place-items: center;
}
.post-img .ph span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  background: color-mix(in oklab, var(--navy-950) 60%, transparent);
  padding: 6px 10px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.post-cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--navy-950); color: var(--accent);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  padding: 6px 10px; border-radius: 3px;
  text-transform: uppercase;
}
.post-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.post-date {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em;
}
.post h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 10px 0 8px;
  color: var(--ink);
}
.post p { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.55; flex: 1; }
.post .read {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-700);
  display: inline-flex; align-items: center; gap: 8px;
}
.post .read::after {
  content: "→"; transition: transform .25s ease;
}
.post:hover .read::after { transform: translateX(6px); }

/* admin badge on posts */
.post .admin-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 6px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 2;
}
body.admin .post .admin-actions { opacity: 1; transform: translateY(0); }
.post .admin-actions button {
  width: 30px; height: 30px;
  border-radius: 4px;
  border: 0;
  background: var(--navy-950);
  color: var(--accent);
  display: grid; place-items: center;
}
.post .admin-actions button:hover { background: var(--accent); color: var(--navy-950); }

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
  background: color-mix(in oklab, var(--navy-800) 60%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 22%, transparent);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 0 12px;
  outline: none;
  transition: border-color .2s ease;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-bottom-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 80px; }
.contact-form .field { margin-bottom: 22px; }
.contact-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .contact-form .grid2 { grid-template-columns: 1fr; } }

.contact-info {
  display: grid; gap: 22px;
}
.contact-info .item {
  border-left: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  padding: 4px 0 4px 18px;
}
.contact-info .item h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.contact-info .item p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.contact-info .item small { color: var(--fg-muted); font-family: var(--font-body); font-size: 13px; }

/* ============ Footer ============ */
.footer {
  background: var(--bg-2);
  padding: 70px 0 28px;
  border-top: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--fg-muted); font-size: 14px; transition: color .2s ease; }
.footer ul a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in oklab, var(--fg) 8%, transparent);
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ============ Marquee strip ============ */
.marquee {
  border-top: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  overflow: hidden;
  padding: 20px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 50px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 50px;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "✦"; color: color-mix(in oklab, var(--accent) 60%, transparent);
  font-style: normal; font-size: 14px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ Admin / CMS panel ============ */
.admin-fab {
  position: fixed; bottom: 22px; left: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--navy-800);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  color: var(--fg);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  transition: transform .2s ease, background .2s ease;
}
.admin-fab:hover { transform: translateY(-2px); background: var(--navy-700); }
.admin-fab .pulse {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 80%, transparent);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 80%, transparent); }
  70% { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}

.admin-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in oklab, var(--navy-950) 80%, transparent);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 30px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.admin-panel {
  width: 100%; max-width: 1080px;
  background: var(--navy-900);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 230px 1fr;
  max-height: 86vh;
  animation: slide-up .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) { .admin-panel { grid-template-columns: 1fr; max-height: 92vh; } }

.admin-side {
  background: var(--navy-950);
  padding: 24px 16px;
  border-right: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
}
.admin-side .who {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  margin-bottom: 12px;
}
.admin-side .who .av {
  width: 34px; height: 34px; border-radius: 99px;
  background: var(--accent); color: var(--navy-950);
  display: grid; place-items: center;
  font-weight: 700; font-family: var(--font-display);
}
.admin-side .who .name { font-size: 13px; }
.admin-side .who .role { font-size: 11px; color: var(--fg-muted); font-family: var(--font-mono); letter-spacing: 0.04em; }

.admin-side nav { display: grid; gap: 4px; margin-top: 4px; }
.admin-side nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent; border: 0;
  color: var(--fg-muted);
  font-size: 13px;
  border-radius: 6px;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.admin-side nav button:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); color: var(--fg); }
.admin-side nav button.active { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.admin-side nav button svg { width: 16px; height: 16px; }

.admin-main { padding: 22px 26px; overflow: auto; }
.admin-main h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 24px; margin: 0 0 4px;
}
.admin-main .sub { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: 0.06em; margin-bottom: 22px; text-transform: uppercase; }

.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.admin-search {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  background: var(--navy-950);
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  border-radius: 6px;
  padding: 8px 12px;
}
.admin-search input {
  border: 0; background: transparent; color: var(--fg);
  font-family: inherit; font-size: 13px; outline: none; flex: 1;
}

.admin-btn {
  padding: 9px 14px;
  background: var(--accent); color: var(--navy-950);
  border: 0; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.admin-btn.ghost {
  background: transparent; color: var(--fg);
  border: 1px solid color-mix(in oklab, var(--fg) 16%, transparent);
}

.admin-table {
  background: var(--navy-950);
  border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  border-radius: 8px;
  overflow: hidden;
}
.admin-row {
  display: grid;
  grid-template-columns: 1fr 130px 90px 80px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 6%, transparent);
  font-size: 13.5px;
}
.admin-row.head {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-muted);
  background: color-mix(in oklab, var(--fg) 4%, transparent);
}
.admin-row:last-child { border-bottom: 0; }
.admin-row .title { font-weight: 500; }
.admin-row .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted); }
.pill {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 99px;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent);
}
.pill.draft { background: color-mix(in oklab, var(--fg) 8%, transparent); color: var(--fg-muted); }
.admin-row .actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-row .actions button {
  width: 28px; height: 28px;
  background: transparent; border: 1px solid color-mix(in oklab, var(--fg) 14%, transparent);
  border-radius: 5px; color: var(--fg-muted);
  display: grid; place-items: center;
}
.admin-row .actions button:hover { color: var(--accent); border-color: var(--accent); }

.editor {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.editor input, .editor textarea, .editor select {
  width: 100%;
  background: var(--navy-950);
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  color: var(--fg);
  font-family: inherit;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.editor input:focus, .editor textarea:focus { border-color: var(--accent); }
.editor textarea { resize: vertical; min-height: 200px; line-height: 1.6; }
.editor .editor-tools {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--navy-950);
  padding: 8px;
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.editor .editor-tools button {
  background: transparent; border: 1px solid transparent;
  color: var(--fg-muted); padding: 6px 10px;
  border-radius: 4px; font-size: 13px;
  font-family: inherit;
}
.editor .editor-tools button:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); color: var(--fg); }
.editor .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor .field-row { display: grid; gap: 6px; }
.editor .field-row label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }

.editor .toolbar-bottom {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding-top: 6px;
}
.editor .saved {
  font-family: var(--font-mono); font-size: 11px; color: #29c267;
  display: inline-flex; gap: 8px; align-items: center;
}

/* ============ Tweaks panel branding ============ */
[data-tweak="palette"] .ts-row { grid-template-columns: 1fr 1fr; }

/* =====================================================================
   Refinamiento visual — capa de pulido
   Mantiene paleta, tipografías y contenido; ajusta jerarquía,
   etiquetas, ritmo, formularios, accesibilidad y versión móvil.
   ===================================================================== */

/* ---- Base ---- */
:root { --muted: #55607a; } /* fecha de posts: pasa contraste 4.5:1 sobre crema */
body {
  --font-mono: var(--font-body); /* etiquetas en la sans de marca, no monoespaciada */
  color-scheme: dark;
}
body[data-palette="ivory"] { color-scheme: light; }
p, .lede { text-wrap: pretty; }
::selection { background: color-mix(in oklab, var(--accent) 45%, transparent); color: var(--fg); }

/* Foco visible para teclado */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Etiquetas: sin mayúsculas forzadas ni tracking de máquina ---- */
.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  gap: 14px;
}
.eyebrow::before { width: 32px; }
.brand-sub { font-size: 12px; letter-spacing: 0.02em; text-transform: none; }
.nav-links a { font-size: 14.5px; }
.hero-stat .lab { font-size: 14px; letter-spacing: 0; }
.hero-badge { font-size: 13px; letter-spacing: 0; animation: none; }
.lawyer-meta .role { font-size: 13.5px; letter-spacing: 0.01em; text-transform: none; font-weight: 500; }
.post-cat { font-size: 12px; letter-spacing: 0.01em; text-transform: none; font-weight: 500; }
.post-date { font-size: 13px; letter-spacing: 0; }
.post .read { font-size: 13.5px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.post-img .ph span { font-size: 12px; letter-spacing: 0; }
.contact-form label { font-size: 13.5px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.contact-info .item h5 { font-size: 13.5px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.footer h6 { font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.footer-bottom { font-size: 13px; letter-spacing: 0; }
.footer ul a { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Titulares: el acento dorado queda solo en el hero ---- */
.section-head h2 em { color: inherit; }
.section-head p { line-height: 1.65; }

/* ---- Botones principales con más presencia ---- */
.hero-cta-row .cta,
.contact-form .cta { padding: 15px 24px; font-size: 14.5px; }
.contact-form .cta { margin-top: 6px; }
.cta:disabled { opacity: .7; cursor: default; transform: none; box-shadow: none; }

/* ---- Áreas de práctica ----
   La numeración 01/08 sugería una secuencia que no existe: se retira. */
.svc-num { display: none; }
.svc-icon { margin: 0 0 22px; }
.svc p { font-size: 15px; line-height: 1.6; }
.svc-tags { margin-top: 18px; }
.svc-tags span { font-size: 12px; letter-spacing: 0; border-radius: 999px; padding: 4px 11px; }
/* Con 2 columnas sobraba una celda vacía teñida: la tarjeta final ocupa la fila */
@media (min-width: 601px) and (max-width: 900px) {
  .svc-cta { grid-column: 1 / -1; min-height: 0; }
}

/* ---- Cómo trabajamos: línea de tiempo en vez de tarjetas ---- */
.approach { gap: 36px; }
.approach-card {
  background: none;
  border: 0;
  border-top: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  border-radius: 0;
  padding: 30px 0 0;
}
.approach-card::before {
  content: "";
  position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg-2);
}
.approach-card:hover { transform: none; border-color: var(--accent); }
.approach-card .step { font-size: 16px; margin-bottom: 10px; }
.approach-card h4 { font-size: 24px; }
.approach-card p { font-size: 15px; line-height: 1.6; max-width: 32ch; }
@media (max-width: 560px) { .approach { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Abogados y blog: movimiento más sobrio ---- */
.lawyer:hover { transform: none; }
.lawyer-meta p { font-size: 15px; line-height: 1.6; }
.lawyer-contact { gap: 18px; font-size: 13.5px; }
.post:hover { transform: translateY(-3px); }

/* ---- Formulario de contacto ---- */
.contact-form ::placeholder { color: color-mix(in oklab, var(--fg) 42%, transparent); }
.contact-form select {
  appearance: none; -webkit-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23b59867' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}
.contact-form select option { background: var(--bg); color: var(--fg); }
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible { outline: none; border-bottom-color: var(--accent); }

/* ---- Marquee más pausado ---- */
.marquee-track { animation-duration: 60s; }

/* ---- Móvil ---- */
@media (max-width: 980px) {
  .hero-visual { max-width: 440px; width: 100%; margin: 0 auto; }
  .hero-badge.top { right: 10px; }
  .hero-badge.bot { left: 10px; }
}
@media (max-width: 720px) {
  .hero { padding: 120px 0 72px; }
  .section { padding: 76px 0; }
  .section.tight { padding: 60px 0; }
  .section-head { margin-bottom: 40px; }
  .hero-stats { margin-top: 44px; }
  .contact-form { padding: 26px 22px; }
}
@media (max-width: 520px) {
  .hero-stats { gap: 16px; }
  .hero-stat .num { font-size: 30px; }
  .hero-stat .num span { font-size: 18px !important; }
  .hero-stat .lab { font-size: 12.5px; }
  .brand-sub { display: none; }
  .nav .cta { padding: 10px 14px; }
  .lawyer-meta { padding: 22px 20px 24px; }
  .lawyer-meta h3 { font-size: 28px; }
}

/* ---- Movimiento reducido ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-x, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ============ Blog conectado al panel ============ */
a.post { text-decoration: none; }
.post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-more { display: flex; justify-content: center; margin-top: 40px; }

/* La balanza va sobre el marco (antes el marco la velaba) */
.scales-svg { position: relative; z-index: 1; }
