/* ============================================================
   Lucas M. Barreiro — Abogado penalista
   Tema marrón / café (concordante con las imágenes sepia)
   Tipografía en blanco cálido · Montserrat
   ============================================================ */

:root {
  /* Fondos marrón (café) */
  --bg:        #2b2118;   /* fondo principal */
  --bg-alt:    #32271b;   /* secciones alternas */
  --surface:   #382b1e;   /* tarjetas / superficies elevadas */
  --surface-2: #43331f;   /* íconos / detalles */
  --footer:    #201812;   /* pie, el más oscuro */
  --input:     #241c14;   /* campos de formulario */

  /* Tipografía en blanco cálido */
  --text:      #f7f1e6;
  --text-soft: #e8ddcb;
  --muted:     #c6b498;

  /* Acentos dorado/sepia (uso gráfico) */
  --gold:      #d8b57e;
  --gold-soft: #ecd6ad;
  --gold-dark: #c49a58;

  --line:        rgba(247, 241, 230, 0.14);
  --shadow:      0 22px 50px -24px rgba(0, 0, 0, .65);
  --shadow-soft: 0 14px 34px -20px rgba(0, 0, 0, .5);

  --font-sans: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1140px;
  --radius: 4px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(var(--container), 90%); margin-inline: auto; }

/* ---------- Tipografía base ---------- */
h1, h2, h3 { font-family: var(--font-sans); font-weight: 600; line-height: 1.15; color: var(--text); }

.section-eyebrow {
  font-size: .95rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: .9rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
  letter-spacing: .3px;
}
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 58ch; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.7rem;
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn-primary {
  background: var(--gold);
  color: #241c14;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--text);
}
.btn-ghost:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 1.05rem 2.6rem; font-size: .9rem; letter-spacing: .2em; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
  padding: .5rem 0;
}
.site-header.scrolled {
  background: rgba(32, 24, 18, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; }

.brand { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
}
/* "ABOGADO" del logo: negrita, misma tipografía que el hero-role */
.brand-role {
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 2px;
}

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--text);
  position: relative;
  transition: color .3s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s ease;
}
.main-nav a:hover::after { width: 100%; }
.main-nav a:hover { color: var(--gold-soft); }

.nav-cta {
  padding: .55rem 1.2rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--text) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); color: #241c14 !important; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--text);
  transition: .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("img/fondo-tribunal.jpg") center/cover no-repeat,
              linear-gradient(135deg, #3a2c1d, #6b5238);
  filter: sepia(.5) blur(3px) brightness(.7) contrast(1.05);
  transform: scale(1.08);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(30, 22, 14, .38), rgba(24, 18, 12, .74)),
    linear-gradient(to bottom, rgba(38, 28, 18, .5), rgba(24, 18, 12, .8));
}
.hero-content { position: relative; z-index: 2; padding: 7rem 0 4rem; }
.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.9rem, 8.5vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.02;
  color: var(--text);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .45);
}
.hero-role {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 6px;
  line-height: 1.05;
  color: var(--gold-soft);
  margin-top: .35rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .4);
}
.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(247, 241, 230, .92);
  margin: 1.8rem auto 2.6rem;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 2px solid rgba(247, 241, 230, .5);
  border-radius: 20px;
}
.hero-scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--gold-soft);
  border-radius: 2px;
  animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section-head { margin-bottom: 3.2rem; }

/* ---------- Degradé de fondo (centro más claro, extremos oscuros) ---------- */
.page-gradient {
  background: linear-gradient(#221a12, #3a2d20 50%, #221a12);
}
/* Las 4 secciones se vuelven transparentes para que el degradé sea continuo */
.page-gradient .about,
.page-gradient .areas,
.page-gradient .jurisdicciones,
.page-gradient .contacto { background: transparent; }

/* ---------- Sobre mí ---------- */
.about { background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about-photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.about-photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24, 18, 12, .32), transparent 55%);
  pointer-events: none;
}
.about-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(.22) contrast(1.02);
}
.about-text p { margin-bottom: 1.1rem; color: var(--text-soft); }
.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  margin: 2rem 0;
  border-top: 1px solid var(--line);
}
.about-highlights li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
}
.hl-key {
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  padding-top: 3px;
}
.hl-val { text-align: right; color: var(--text); font-weight: 400; }

/* ---------- Áreas de práctica ---------- */
.areas { background: var(--bg); overflow: hidden; }
.areas .section-bg {
  position: absolute; inset: 0;
  background: url("img/fondo-biblioteca.jpg") center/cover no-repeat;
  filter: sepia(.5) blur(6px) brightness(.9);
  opacity: .16;
}
.areas .container { position: relative; z-index: 1; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 1.9rem;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--gold);
  transition: height .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold); }
.card:hover::before { height: 100%; }
.card h3 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .6rem;
}
.card p { color: var(--muted); font-size: .96rem; }

/* ---------- Jurisdicciones ---------- */
.jurisdicciones { background: var(--bg-alt); }
/* Las etiquetas de sección actúan como título (formato grande) */
.jurisdicciones .section-eyebrow,
.areas .section-eyebrow,
.contacto .section-eyebrow,
.about .section-eyebrow {
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.jurisdicciones .section-eyebrow,
.areas .section-eyebrow,
.contacto .section-eyebrow {
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
}
/* "Sobre mí": mismo formato pero más chico que el resto */
.about .section-eyebrow {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}
.juris-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}
.juris-card {
  padding: 2.4rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.juris-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); border-color: var(--gold); }
.juris-card h3 {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .7rem;
}
.juris-card p { color: var(--muted); font-size: .95rem; }

/* ---------- Frase / quote band ---------- */
.quote-band {
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) 0;
  text-align: center;
  color: var(--text);
  overflow: hidden;
}
.quote-bg {
  position: absolute; inset: 0;
  background: url("img/fondo-escritorio.jpg") center/cover no-repeat,
              linear-gradient(135deg, #4a3520, #2c241d);
  filter: sepia(.5) blur(2px) brightness(.55);
  transform: scale(1.06);
}
.quote-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(24, 18, 12, .82), rgba(24, 18, 12, .58));
}
.quote-inner { position: relative; z-index: 2; max-width: 820px; }
.quote-band blockquote {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.4;
  font-style: italic;
}
.quote-band cite {
  display: block;
  margin-top: 1.6rem;
  font-style: normal;
  font-size: .85rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Contacto ---------- */
.contacto { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-list { margin: 2rem 0; }
.contact-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.ci-label {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
}
.contact-list a { font-size: 1.15rem; color: var(--text); transition: color .25s ease; }
.contact-list a:hover { color: var(--gold-soft); }
.contact-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.contact-form {
  background: var(--surface);
  padding: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .45rem;
}
.field input, .field textarea {
  width: 100%;
  padding: .8rem 1rem;
  font-family: var(--font-sans);
  font-size: .98rem;
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 181, 126, .22);
}
.field textarea { resize: vertical; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: .9rem; text-align: center; }
.hidden-field { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--footer); color: var(--text-soft); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  padding: 3.2rem 0;
}
.footer-brand { display: flex; flex-direction: column; }
.footer-brand .brand-name { color: var(--text); font-size: 1.4rem; }
.footer-brand .brand-role { color: var(--muted); }
.footer-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer-nav a { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); transition: color .25s ease; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-contact { display: flex; flex-direction: column; gap: .3rem; text-align: right; }
.footer-contact a { color: var(--text-soft); font-size: .95rem; transition: color .25s ease; }
.footer-contact a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.3rem 0; }
.footer-bottom p { font-size: .82rem; color: rgba(247, 241, 230, .55); text-align: center; }

/* ============================================================
   BOTONES FLOTANTES
   ============================================================ */
.floating-actions {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform .25s ease;
}
.fab:hover { transform: scale(1.08) translateY(-2px); }
.fab-wa { background: #25d366; }
.fab-tel { background: var(--gold); color: #241c14; }

/* ============================================================
   ANIMACIONES (reveal on scroll)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll span { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  /* En móvil, el backdrop-filter del header rompe el position:fixed del menú
     desplegable (queda atrapado dentro del header al scrollear). Lo desactivamos
     acá; el fondo del header ya es casi opaco, así que no se nota. */
  .site-header.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.8rem;
    padding: 3rem 2.2rem;
    background: var(--bg-alt);
    box-shadow: -10px 0 40px -20px rgba(0, 0, 0, .6);
    transform: translateX(100%);
    transition: transform .35s ease;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { color: var(--text); font-size: 1rem; }
  .nav-cta { color: var(--text) !important; border-color: var(--gold); }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; align-items: center; }
  .footer-contact { text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .contact-cta { flex-direction: column; }
  .contact-cta .btn { justify-content: center; }
}
