/* =========================================================
   Estudio Jurídico Dr. Darío Galíndez — hoja de estilos
   Paleta: carbón, marfil, dorado institucional
   ========================================================= */

:root {
  --background: oklch(0.972 0.008 91);
  --foreground: oklch(0.205 0 0);
  --border: oklch(0.84 0.015 85);
  --muted-foreground: oklch(0.47 0.01 80);
  --carbon: oklch(0.205 0 0);
  --gold: oklch(0.75 0.145 88);
  --gold-soft: oklch(0.82 0.12 86);
  --ivory: oklch(0.972 0.008 91);
  --whatsapp: oklch(0.63 0.17 145);
  --email: oklch(0.63 0.2 29);
  --font-sans: "Inter", "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; border-color: var(--border); }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; margin: 0; line-height: 1.15; }
p { margin: 0; }
address { font-style: normal; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- Utilidades ---------- */
.site-container { width: min(100% - 3rem, 80rem); margin-inline: auto; }
.eyebrow { color: var(--gold); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }
.text-gold { color: var(--gold); }
.lead-muted { color: var(--muted-foreground); }

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon-sm { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn-gold { background: var(--gold); color: var(--carbon); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-outline-dark { background: transparent; color: var(--ivory); border-color: oklch(0.972 0.008 91 / 0.3); }
.btn-outline-dark:hover { border-color: var(--gold); background: oklch(0.972 0.008 91 / 0.1); }
.btn-outline-light { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-dark { background: var(--carbon); color: var(--ivory); border-color: var(--carbon); }
.btn-dark:hover { background: oklch(0.28 0 0); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.7rem; }
.btn-block { width: 100%; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.205 0 0 / 0.95);
  border-bottom: 1px solid oklch(0.75 0.145 88 / 0.2);
  color: var(--ivory);
  backdrop-filter: blur(10px);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand-name { display: block; font-family: var(--font-serif); font-size: 1rem; font-weight: 700; }
.brand-sub { display: block; font-size: 0.6rem; text-transform: uppercase; color: oklch(0.972 0.008 91 / 0.5); }
.monogram {
  display: grid; width: 3.25rem; height: 3.25rem; grid-template-columns: 1fr 1fr; place-items: center;
  border: 1px solid var(--gold); color: var(--ivory);
  font-family: var(--font-serif); font-size: 0.8rem; letter-spacing: 0.05em;
}
.monogram svg { width: 1.05rem; height: 1.05rem; color: var(--gold); }
.monogram-footer { color: var(--foreground); }

.main-nav { display: none; align-items: center; gap: 1.8rem; font-size: 0.72rem; font-weight: 500; text-transform: uppercase; }
.nav-link { color: oklch(0.972 0.008 91 / 0.62); transition: color 180ms ease; }
.nav-link:hover { color: var(--gold); }
.menu-toggle { display: inline-flex; background: transparent; border: 0; color: var(--ivory); padding: 0.4rem; }
.menu-toggle:hover { color: var(--gold); }
.mobile-nav { display: block; border-top: 1px solid oklch(0.75 0.145 88 / 0.2); background: var(--carbon); padding: 1.5rem; }
.mobile-nav a { display: block; padding: 0.7rem 0; font-size: 0.85rem; text-transform: uppercase; }
@media (min-width: 768px) { .main-nav { display: flex; } .menu-toggle { display: none; } .mobile-nav { display: none !important; } }

/* ---------- Pie de página ---------- */
.site-footer { border-top: 1px solid oklch(0.75 0.145 88 / 0.2); background: var(--background); padding: 4rem 0; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-title { margin-top: 1.5rem; font-size: 1.25rem; }
.footer-text { margin-top: 0.8rem; max-width: 20rem; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-col p.eyebrow { color: var(--muted-foreground); }
.footer-links { display: grid; gap: 0.8rem; margin-top: 1.2rem; font-size: 0.875rem; }
.footer-link { display: inline-flex; align-items: center; gap: 0.75rem; transition: color 180ms ease; }
.footer-link:hover { color: var(--gold); }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.68rem; text-transform: uppercase; color: var(--muted-foreground); }

/* ---------- Hero cinematográfico ---------- */
.cinematic-hero { position: relative; min-height: calc(100svh - 5rem); overflow: hidden; background: var(--carbon); display: flex; flex-direction: column; justify-content: center; }
.cinematic-hero-image, .section-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinematic-hero-image { transition: transform 1.2s ease; }
.cinematic-hero:hover .cinematic-hero-image { transform: scale(1.025); }
.cinematic-hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, oklch(0.12 0 0 / 0.98) 0%, oklch(0.12 0 0 / 0.86) 47%, oklch(0.12 0 0 / 0.22) 100%),
  linear-gradient(0deg, oklch(0.12 0 0 / 0.82) 0%, transparent 45%); }
.hero-content { position: relative; z-index: 2; padding: 5rem 0; max-width: 56rem; }
.hero-rule { width: 5rem; height: 1px; background: var(--gold); margin-bottom: 2rem; }
.hero-title { font-size: clamp(3rem, 7vw, 6rem); line-height: 1.02; color: var(--ivory); }
.hero-title span { display: block; color: var(--gold); }
.hero-sub { margin-top: 2rem; max-width: 42rem; font-size: 1.1rem; line-height: 1.9; color: oklch(0.972 0.008 91 / 0.7); }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-credentials {
  position: absolute; z-index: 10; bottom: 0; left: 0;
  display: grid; width: 100%; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid oklch(0.75 0.145 88 / 0.22);
  background: oklch(0.12 0 0 / 0.74); color: var(--ivory); backdrop-filter: blur(10px);
}
.hero-credentials > div { padding: 1.2rem 2rem; border-right: 1px solid oklch(0.75 0.145 88 / 0.18); text-align: center; }
.hero-credentials strong { display: block; color: var(--gold); font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; }
.hero-credentials span { display: block; margin-top: 0.3rem; color: oklch(0.972 0.008 91 / 0.5); font-size: 0.62rem; text-transform: uppercase; }

/* ---------- Bandas con fondo ---------- */
.practice-band, .institutional-banner, .consultation-band, .practice-hero { position: relative; overflow: hidden; background: var(--carbon); }
.practice-band > .site-container, .institutional-banner > .site-container,
.consultation-band > .site-container, .practice-hero > .site-container { position: relative; z-index: 2; }
.section-dark-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, oklch(0.12 0 0 / 0.96), oklch(0.12 0 0 / 0.78)),
  linear-gradient(0deg, oklch(0.12 0 0 / 0.92), transparent); }
.practice-band { color: var(--ivory); padding: 6rem 0; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid oklch(0.972 0.008 91 / 0.15); padding-bottom: 2rem; margin-bottom: 3.5rem; }
.band-head h2 { font-size: 2.25rem; }

.practice-grid { display: grid; gap: 1px; background: oklch(0.972 0.008 91 / 0.15); }
@media (min-width: 640px) { .practice-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .practice-grid { grid-template-columns: repeat(4, 1fr); } }
.practice-card { display: block; padding: 2rem; background: oklch(0.16 0 0 / 0.84); backdrop-filter: blur(8px); transition: background-color 280ms ease, transform 280ms ease; }
.practice-card:hover { background: oklch(0.23 0 0 / 0.92); transform: translateY(-4px); }
.practice-card .area-number { display: block; margin-top: 2rem; font-family: var(--font-serif); font-size: 1.1rem; color: var(--gold); }
.practice-card h3 { margin-top: 1rem; font-size: 1.25rem; color: var(--ivory); }
.practice-card p { margin-top: 1rem; min-height: 6rem; font-size: 0.875rem; line-height: 1.6; color: oklch(0.972 0.008 91 / 0.65); }
.practice-card .area-cta { display: flex; align-items: center; gap: 0.5rem; margin-top: 2rem; font-size: 0.72rem; text-transform: uppercase; }
.practice-card:hover .area-cta svg { transform: translateX(4px); }
.practice-card .area-cta svg { transition: transform 280ms ease; }

/* ---------- Sección institucional ---------- */
.profile-section { padding: 6rem 0; }
.profile-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .profile-grid { grid-template-columns: repeat(12, 1fr); align-items: center; } }
.profile-photo-wrap { position: relative; }
@media (min-width: 1024px) { .profile-photo-wrap { grid-column: 1 / 6; } .profile-body { grid-column: 7 / 13; } }
.profile-photo { aspect-ratio: 4 / 5; width: 100%; object-fit: contain; background: var(--background); }
.profile-badge { position: absolute; right: -0.75rem; bottom: -1.25rem; border: 1px solid oklch(0.75 0.145 88 / 0.5); background: var(--carbon); padding: 1.25rem 1.75rem; color: var(--ivory); }
@media (min-width: 768px) { .profile-badge { right: -1.5rem; } }
.profile-badge strong { display: block; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.profile-badge span { display: block; font-size: 0.6rem; text-transform: uppercase; color: var(--gold); }
.profile-body h2 { margin-top: 1.2rem; font-size: clamp(2rem, 4vw, 3rem); }
.profile-body > p.lead { margin-top: 1.6rem; max-width: 36rem; font-size: 1.1rem; line-height: 1.9; color: var(--muted-foreground); }
.profile-quote { margin: 2.2rem 0 0; border-left: 1px solid var(--gold); padding: 0.5rem 0 0.5rem 1.75rem; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.7; }

.institutional-banner { min-height: 34rem; display: flex; align-items: center; color: var(--ivory); padding: 6rem 0; }
.institutional-banner .section-dark-shade { background: linear-gradient(90deg, oklch(0.12 0 0 / 0.93), oklch(0.12 0 0 / 0.48)); }
.institutional-banner h2 { margin-top: 1.2rem; max-width: 48rem; font-size: clamp(2.25rem, 5vw, 3.75rem); }

/* ---------- Página de práctica ---------- */
.practice-hero { color: var(--ivory); border-bottom: 1px solid oklch(0.75 0.145 88 / 0.2); }
.practice-hero-grid { display: grid; gap: 3rem; align-items: end; min-height: 500px; padding: 5rem 0; }
@media (min-width: 1024px) { .practice-hero-grid { grid-template-columns: repeat(12, 1fr); } .practice-number { grid-column: 1 / 4; } .practice-head { grid-column: 4 / 12; } }
.practice-number { font-family: var(--font-serif); font-size: 4.5rem; line-height: 1; color: oklch(0.75 0.145 88 / 0.7); }
.practice-head h1 { margin-top: 1.5rem; font-size: clamp(3rem, 6vw, 4.5rem); }
.practice-head > p { margin-top: 2rem; max-width: 42rem; font-size: 1.1rem; line-height: 1.9; color: oklch(0.972 0.008 91 / 0.7); }

.items-section { padding: 6rem 0; }
.items-grid { display: grid; gap: 1px; border: 1px solid var(--border); background: var(--border); }
@media (min-width: 768px) { .items-grid { grid-template-columns: repeat(2, 1fr); } }
.item-cell { background: var(--background); padding: 2rem; }
@media (min-width: 768px) { .item-cell { padding: 3rem; } }
.item-cell .item-index { font-size: 0.75rem; font-weight: 600; color: var(--gold); }
.item-cell h2 { margin-top: 1.5rem; font-size: 1.5rem; }
.item-cell p { margin-top: 1rem; color: var(--muted-foreground); }

.gold-cta { background: var(--gold); color: var(--carbon); padding: 4rem 0; }
.gold-cta-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2rem; }
@media (min-width: 768px) { .gold-cta-inner { flex-direction: row; align-items: center; } }
.gold-cta .eyebrow { color: oklch(0.205 0 0 / 0.6); }
.gold-cta h2 { margin-top: 0.75rem; font-size: 1.9rem; }

/* ---------- Formulario progresivo ---------- */
.consultation-band { color: var(--ivory); padding: 6rem 0; }
.consultation-shade { position: absolute; inset: 0; background: linear-gradient(90deg, oklch(0.12 0 0 / 0.95), oklch(0.12 0 0 / 0.78)); }
.consultation-grid { display: grid; gap: 3.5rem; }
@media (min-width: 1024px) { .consultation-grid { grid-template-columns: repeat(2, 1fr); } }
.consultation-intro h2 { margin-top: 1.2rem; font-size: clamp(2rem, 4vw, 3rem); }
.consultation-intro > p { margin-top: 1.5rem; max-width: 28rem; color: oklch(0.972 0.008 91 / 0.65); }

.consultation-panel { border: 1px solid oklch(0.75 0.145 88 / 0.3); background: oklch(0.14 0 0 / 0.88); color: var(--ivory); backdrop-filter: blur(14px); padding: 2.5rem; }
.panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; }
.panel-top .panel-step { font-size: 0.72rem; color: oklch(0.972 0.008 91 / 0.5); }
.consultation-panel legend { font-family: var(--font-serif); font-size: 1.25rem; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
.contact-choice {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; height: 3rem;
  border: 1px solid oklch(0.972 0.008 91 / 0.42) !important;
  background: oklch(0.205 0 0 / 0.82) !important;
  color: var(--ivory) !important;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.whatsapp-choice:hover, .whatsapp-choice.is-selected { border-color: var(--whatsapp) !important; background: var(--whatsapp) !important; }
.email-choice:hover, .email-choice.is-selected { border-color: var(--email) !important; background: var(--email) !important; }

.form-field { margin-top: 2rem; animation: reveal 420ms ease-out both; }
.form-field > span.field-label { display: block; margin-bottom: 0.75rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; }
.form-field .field-hint { display: block; margin-top: 0.5rem; font-size: 0.72rem; color: oklch(0.972 0.008 91 / 0.5); }
.legal-input {
  width: 100%; border: 0; border-bottom: 1px solid oklch(0.972 0.008 91 / 0.28);
  background: transparent; color: var(--ivory); padding: 0.75rem 0; outline: none;
  font: inherit; transition: border-color 180ms ease; border-radius: 0;
}
.legal-input:focus { border-color: var(--gold); }
.legal-input::placeholder { color: oklch(0.972 0.008 91 / 0.38); }
textarea.legal-input { resize: none; }

.submit-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  width: 100%; height: 3rem; margin-top: 2rem;
  border: 1px solid transparent; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease;
  animation: reveal 420ms ease-out both;
}
.whatsapp-submit { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--ivory); }
.whatsapp-submit:hover { background: color-mix(in oklab, var(--whatsapp) 84%, black); }
.email-submit { background: var(--email); border-color: var(--email); color: var(--ivory); }
.email-submit:hover { background: color-mix(in oklab, var(--email) 84%, black); }

.form-done h3 { margin-top: 1rem; font-size: 1.5rem; }
.form-done .btn { margin-top: 2rem; }

/* ---------- Página institucional / contacto ---------- */
.page-profile { padding: 4rem 0; }
.page-profile .profile-body { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .page-profile .profile-photo-wrap { grid-column: 1 / 6; }
  .page-profile .profile-body { grid-column: 7 / 13; }
}
.page-profile h1 { margin-top: 1.5rem; font-size: clamp(3rem, 5vw, 3.75rem); }
.page-profile .profile-lede { margin-top: 2rem; font-size: 1.25rem; line-height: 1.8; }
.page-profile .profile-text p { margin-top: 1.5rem; color: var(--muted-foreground); line-height: 1.9; }

.contact-hero { background: var(--carbon); color: var(--ivory); padding: 5rem 0; }
.contact-hero h1 { margin-top: 1.5rem; font-size: clamp(3rem, 6vw, 4.5rem); }
.contact-section { padding: 5rem 0; }
.contact-grid { display: grid; gap: 3.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-list { display: grid; gap: 1.5rem; margin-top: 2.25rem; font-size: 1.1rem; }
.contact-list a { display: flex; align-items: center; gap: 1rem; transition: color 180ms ease; }
.contact-list a:hover { color: var(--gold); }
.map-frame { margin-top: 2.5rem; border: 1px solid var(--border); overflow: hidden; }
.map-frame iframe { width: 100%; height: 20rem; border: 0; display: block; }
.map-note { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
#consulta { scroll-margin-top: 6rem; }

/* ---------- Animación ---------- */
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-reveal { animation: reveal 420ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .animate-reveal, .form-field, .submit-btn { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  .hero-credentials { position: relative; grid-template-columns: 1fr; }
  .hero-credentials > div { padding: 1rem 1.5rem; border-right: 0; border-bottom: 1px solid oklch(0.75 0.145 88 / 0.14); }
  .cinematic-hero-image { object-position: 64% center; }
  .cinematic-hero-shade { background:
    linear-gradient(90deg, oklch(0.12 0 0 / 0.96), oklch(0.12 0 0 / 0.58)),
    linear-gradient(0deg, oklch(0.12 0 0 / 0.9), transparent); }
  .consultation-panel { padding: 1.75rem; }
}
