/* =========================================================
   Fátima del Castillo — Abogada laboralista
   Hoja de estilos única (vanilla CSS, sin frameworks)
   ========================================================= */

:root {
  --radius: 4px;
  --background: #f8f8f8;
  --foreground: #1c1c1c;
  --card: #ffffff;
  --muted-foreground: #6f6f6f;
  --border: #e2e2e2;
  --ink: #171717;
  --sand: #d8d8d8;
  --shadow-soft: 0 1px 2px rgba(23,23,23,0.05), 0 12px 40px -18px rgba(23,23,23,0.3);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--sand);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.container {
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Utilidades ------------------------------------------------ */

.soft-shadow { box-shadow: var(--shadow-soft); }

.link-underline {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline:hover { background-size: 100% 1px; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip link --------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 100;
  font-size: 14px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: all 0.5s ease;
}
.site-header.scrolled {
  border-bottom: 1px solid rgba(226,226,226,0.7);
  background: rgba(248,248,248,0.85);
  backdrop-filter: blur(20px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.brand {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.3s ease;
}
.site-header.scrolled .brand { color: var(--foreground); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}
.nav-desktop a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #fff;
  transition: color 0.3s ease;
}
.site-header.scrolled .nav-desktop a { color: var(--foreground); }

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--foreground);
  color: #fdfdfd;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
}
.whatsapp-btn:hover { transform: translateY(-2px); }
.site-header.scrolled .nav-desktop a.whatsapp-btn,
.nav-mobile a.whatsapp-btn {
  color: #fdfdfd;
}

.menu-toggle {
  display: inline-flex;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 4px;
}
.site-header.scrolled .menu-toggle,
.site-header.menu-open .menu-toggle { color: var(--foreground); }
@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

.nav-mobile {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-top: 1px solid rgba(226,226,226,0.6);
  background: rgba(248,248,248,0.95);
  backdrop-filter: blur(20px);
  transition: max-height 0.5s ease, opacity 0.5s ease;
}
.nav-mobile.open {
  max-height: 300px;
  opacity: 1;
}
.nav-mobile .container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 16px;
}
.nav-mobile a {
  padding-block: 8px;
  font-size: 14px;
  color: var(--foreground);
}
.nav-mobile .whatsapp-btn {
  align-self: flex-start;
  margin-top: 8px;
}
.nav-mobile .legal-link {
  margin-top: 8px;
  color: var(--muted-foreground);
}
@media (min-width: 768px) {
  .nav-mobile { display: none; }
}

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

.hero {
  position: relative;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  height: 120%;
  width: 100%;
  object-fit: cover;
  filter: grayscale(1);
  will-change: transform;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(23,23,23,0.85), rgba(23,23,23,0.65) 55%, rgba(23,23,23,0.9));
}
.hero-content {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 24px;
  text-align: center;
  color: #fdfdfd;
}
.hero-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: rgba(253,253,253,0.7);
}
.hero-title {
  margin-top: 8px;
  font-size: 2.5rem;
  line-height: 1.1;
}
@media (min-width: 640px) { .hero-title { font-size: 4rem; } }
@media (min-width: 768px) { .hero-title { font-size: 4.5rem; } }
.hero-role {
  margin-top: 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  color: rgba(253,253,253,0.7);
}
.hero-desc {
  margin: 32px auto 0;
  max-width: 800px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(253,253,253,0.85);
}
.hero-desc-secondary { margin-top: 8px; }
.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.btn-solid {
  border-radius: 999px;
  background: #fdfdfd;
  color: var(--ink);
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s ease;
}
.btn-solid:hover { transform: translateY(-2px); }
.btn-outline {
  border-radius: 999px;
  border: 1px solid rgba(253,253,253,0.4);
  color: #fdfdfd;
  padding: 12px 28px;
  font-size: 14px;
  transition: background 0.3s ease;
}
.btn-outline:hover { background: rgba(253,253,253,0.1); }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(253,253,253,0.7);
}
.hero-scroll svg { animation: bounce 1.6s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Monograma ------------------------------------------------------ */

.monogram {
  display: block;
  width: min(100%, 32rem);
  height: auto;
  margin: 12px auto 0;
}
.mono-base { fill: rgba(255,255,255,0.34); animation: mono-breathe 14s ease-in-out infinite; }
.mono-light { fill: #ffffff; }
.mono-sweep-rect { animation: mono-sweep 28s linear infinite; }

@keyframes mono-sweep {
  0% { transform: translateX(-190px); }
  35.714%, 50% { transform: translateX(670px); }
  85.714%, 100% { transform: translateX(-190px); }
}
@keyframes mono-breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.42; }
}
@media (prefers-reduced-motion: reduce) {
  .mono-sweep-rect, .mono-base { animation: none; }
}

/* Secciones genéricas --------------------------------------------- */

section { padding-block: 112px; }
.section-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted-foreground);
}
.section-title {
  margin-top: 20px;
  font-size: 2.25rem;
}
@media (min-width: 640px) { .section-title { font-size: 3rem; } }

/* Sobre mí ---------------------------------------------------------- */

.about {
  display: grid;
  gap: 56px;
}
@media (min-width: 768px) {
  .about { grid-template-columns: 0.8fr 1.2fr; }
}
.about-portrait {
  margin-top: 24px;
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  object-fit: cover;
  filter: grayscale(1);
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.about-text .highlight {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--foreground);
}
.stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats dt {
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--foreground);
}
.stats dd {
  margin: 4px 0 0;
  font-size: 0.875rem;
}

/* Servicios ------------------------------------------------------- */

.services {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fdfdfd;
}
.services-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: grayscale(1);
}
.services .container { position: relative; }
.services .section-eyebrow { color: rgba(253,253,253,0.7); }
.services .section-title { color: #fdfdfd; max-width: 640px; }

.service-grid {
  margin-top: 56px;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(253,253,253,0.15);
}
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: rgba(23,23,23,0.85);
  padding: 32px;
  backdrop-filter: blur(4px);
  transition: background 0.5s ease;
}
.service-card:hover { background: rgba(23,23,23,0.6); }
.service-card svg { color: rgba(253,253,253,0.7); }
.service-card h3 {
  margin-top: 20px;
  font-size: 1.25rem;
  color: #fdfdfd;
}
.service-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(253,253,253,0.75);
}
.service-card li { display: flex; gap: 8px; }
.service-card li::before { content: "—"; color: rgba(253,253,253,0.7); }

/* Contacto ---------------------------------------------------------- */

.contact-grid {
  display: grid;
  gap: 56px;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-desc {
  margin-top: 20px;
  max-width: 420px;
  color: var(--muted-foreground);
}
.contact-list {
  margin-top: 40px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 0.9rem;
}
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list svg { color: rgba(23,23,23,0.5); flex-shrink: 0; }

.contact-form {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 32px;
}
.contact-form h3 { font-size: 1.5rem; }
.form-field { margin-top: 20px; }
.form-field label { font-size: 14px; font-weight: 500; }
.form-field input,
.form-field textarea {
  margin-top: 8px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--foreground);
}
.form-check {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.form-check input { margin-top: 2px; accent-color: var(--ink); }
.btn-submit {
  margin-top: 20px;
  width: 100%;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--ink);
  color: #fdfdfd;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.btn-submit:hover { transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Toast ------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fdfdfd;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 90;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--background);
}
.footer-grid {
  display: grid;
  gap: 32px;
  padding-block: 56px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.5rem; }
.footer-role { margin-top: 8px; font-size: 14px; color: var(--muted-foreground); }
.footer-address { margin-top: 16px; font-size: 14px; color: var(--muted-foreground); }
.footer-link { margin-top: 4px; display: inline-block; font-size: 14px; }
.footer-legal {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
}
@media (min-width: 640px) { .footer-legal { justify-self: end; } }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Cookie banner ---------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 60;
  margin-inline: auto;
  max-width: 640px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { margin: 0; font-size: 14px; color: var(--muted-foreground); }
.cookie-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-actions button {
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}
.cookie-accept { border: none; background: var(--ink); color: #fdfdfd; }
.cookie-accept:hover { transform: translateY(-2px); }
.cookie-essential { border: 1px solid var(--border); background: transparent; }
.cookie-essential:hover { background: var(--sand); }

/* Páginas legales ---------------------------------------------------- */

.legal-hero {
  position: relative;
  display: flex;
  height: 46vh;
  min-height: 288px;
  align-items: flex-end;
  overflow: hidden;
}
.legal-hero img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.legal-hero-overlay { position: absolute; inset: 0; background: rgba(23,23,23,0.7); }
.legal-hero .container { position: relative; padding-bottom: 40px; }
.legal-hero h1 { font-size: 2.5rem; color: #fdfdfd; }
@media (min-width: 640px) { .legal-hero h1 { font-size: 3rem; } }

.legal-body {
  max-width: 720px;
  margin: 56px auto 0;
  padding-inline: 24px;
  padding-bottom: 40px;
}
.legal-body h2 { margin-top: 40px; font-size: 1.5rem; }
.legal-body p { margin-top: 16px; line-height: 1.7; color: var(--muted-foreground); }
.legal-body ul { margin-top: 16px; padding-left: 20px; color: var(--muted-foreground); }
.legal-body li { margin-top: 4px; }
.legal-body a { text-decoration: underline; }
