@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Lato:wght@300;400;700;900&display=swap");

:root {
  --black: #090807;
  --soft-black: #15120f;
  --gold: #c7a057;
  --gold-light: #e5c579;
  --cream: #f4ead7;
  --white: #ffffff;
  --text: #2d2923;
  --muted: #746b5f;
  --radius: 8px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: "Lato", sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

main {
  padding-top: var(--header-height);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

h2,
h3,
p {
  overflow-wrap: break-word;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(244, 234, 215, 0.9), rgba(244, 234, 215, 0.95)),
    url("imagenes/fondo-principal.jpeg") center / cover;
  filter: saturate(0.95) brightness(1.08);
  opacity: 0.28;
  pointer-events: none;
  z-index: -2;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  background: rgba(9, 8, 7, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(199, 160, 87, 0.35);
}

.brand {
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  color: var(--gold-light);
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--white);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav a:hover {
  color: var(--gold-light);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height) - 36px);
  min-height: calc(100svh - var(--header-height) - 36px);
  padding: 0;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(244, 234, 215, 0.08), rgba(244, 234, 215, 0.02)),
    url("imagenes/inicio-lomval.jpeg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 8, 7, 0.16), rgba(9, 8, 7, 0) 28%, rgba(9, 8, 7, 0.08));
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 850px;
  margin-bottom: 18px;
  text-align: center;
  color: var(--white);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
}

.hero h1 {
  font-size: 4rem;
  line-height: 0.95;
  color: var(--white);
}

.hero p {
  max-width: 760px;
  margin: 24px auto 0;
  font-size: 1.25rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn,
button {
  min-height: 48px;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-weight: 900;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-gold,
button {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--black);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.section {
  padding: 96px 7vw;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-heading h2,
.section-text h2,
.contact h2 {
  font-size: 3rem;
  line-height: 1.15;
  color: var(--black);
}

.contact h2 {
  font-size: 2.25rem;
}

.section-heading p,
.section-text p,
.contact p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  min-height: 620px;
}

.about-images {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.about-images img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(199, 160, 87, 0.45);
  box-shadow: 0 24px 70px rgba(9, 8, 7, 0.22);
  background: var(--cream);
}

.orbit-section {
  background:
    linear-gradient(rgba(28, 20, 12, 0.6), rgba(28, 20, 12, 0.64)),
    linear-gradient(rgba(255, 250, 240, 0.12), rgba(255, 255, 255, 0.1)),
    url("imagenes/balanza-libros.jpeg") center 46% / cover no-repeat;
  color: var(--text);
  padding-top: 88px;
  padding-bottom: 90px;
  overflow: hidden;
}

.orbit-section .section-heading h2 {
  color: var(--white);
  text-shadow: 0 8px 22px rgba(9, 8, 7, 0.42);
}

.orbit-section .section-heading p {
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 6px 18px rgba(9, 8, 7, 0.34);
}

.orbit {
  position: relative;
  width: min(1320px, 100%);
  height: 820px;
  margin: 18px auto 0;
}

.orbit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 170px);
  height: 560px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(199, 160, 87, 0.58);
  border-radius: 50%;
}

.orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 235px;
  height: 235px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(199, 160, 87, 0.7);
  box-shadow: 0 0 80px rgba(90, 69, 32, 0.16);
  overflow: hidden;
}

.orbit-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: none;
}

.orbit-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 245px;
  min-height: 158px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(231, 215, 182, 0.94));
  color: var(--black);
  border: 1px solid rgba(229, 197, 121, 0.9);
  box-shadow: 0 18px 42px rgba(45, 41, 35, 0.18);
  transform:
    translate(-50%, -50%)
    translate(var(--x, 0px), var(--y, 0px));
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.orbit-card:hover {
  background: linear-gradient(135deg, #ffffff, #ead7aa);
  box-shadow: 0 22px 58px rgba(90, 69, 32, 0.24);
}

.orbit-card h3 {
  font-size: 1.14rem;
  color: var(--black);
  margin-bottom: 10px;
}

.orbit-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: #4b4237;
}

.practice {
  background: linear-gradient(180deg, #fffaf0, var(--cream));
}

.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
}

.practice-card {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(199, 160, 87, 0.45);
  box-shadow: 0 24px 65px rgba(9, 8, 7, 0.18);
  isolation: isolate;
  --content-enter-x: 0px;
  --image-reveal-shift: 0px;
  --image-scale: 1.04;
}

.motion-ready .practice-card:not(.visible) {
  --content-enter-x: -52px;
  --image-reveal-shift: 38px;
  --image-scale: 1.1;
}

.motion-ready .practice-card:nth-child(even):not(.visible) {
  --content-enter-x: 52px;
}

.practice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 8, 7, 0.82), rgba(9, 8, 7, 0.44) 48%, rgba(9, 8, 7, 0.08)),
    linear-gradient(0deg, rgba(9, 8, 7, 0.36), rgba(9, 8, 7, 0.04));
}

.practice-card:nth-child(even)::after {
  background:
    linear-gradient(270deg, rgba(9, 8, 7, 0.82), rgba(9, 8, 7, 0.44) 48%, rgba(9, 8, 7, 0.08)),
    linear-gradient(0deg, rgba(9, 8, 7, 0.36), rgba(9, 8, 7, 0.04));
}

.practice-card img {
  position: absolute;
  inset: -8% 0 auto;
  z-index: -2;
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.08) brightness(0.82);
  opacity: 1;
  transform: translateY(calc(var(--image-shift, 0px) + var(--image-reveal-shift))) scale(var(--image-scale));
  transition: opacity 0.9s ease, transform 0.18s linear;
  will-change: opacity, transform;
}

.practice-card.visible {
  --content-enter-x: 0px;
  --image-reveal-shift: 0px;
  --image-scale: 1.04;
}

.motion-ready .practice-card:not(.visible) img,
.motion-ready .practice-card:not(.visible) .practice-card-content {
  opacity: 0;
}

.practice-card-content {
  width: min(520px, calc(100% - 48px));
  margin: 0 0 42px 42px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(9, 8, 7, 0.68);
  border: 1px solid rgba(229, 197, 121, 0.52);
  box-shadow: 0 18px 45px rgba(9, 8, 7, 0.24);
  opacity: 1;
  transform: translate3d(var(--content-enter-x), var(--text-shift, 0px), 0);
  transition: opacity 0.75s ease, transform 0.12s linear;
  will-change: opacity, transform;
}

.practice-card.visible .practice-card-content {
  opacity: 1;
}

.practice-card:nth-child(even) .practice-card-content {
  margin-left: auto;
  margin-right: 42px;
}

.practice-card h3 {
  font-size: 3rem;
  line-height: 1.15;
  color: var(--white);
}

.practice-card p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.7;
}

.contact {
  background: linear-gradient(135deg, var(--black), #241d15);
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  max-width: 1050px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 197, 121, 0.55);
  border-radius: var(--radius);
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.qr-link {
  display: block;
  width: min(230px, 100%);
  margin-top: 20px;
}

.qr {
  width: 230px;
  height: auto;
  aspect-ratio: 1;
  background: var(--white);
  border-radius: var(--radius);
  border: 8px solid var(--white);
  box-shadow: 0 16px 35px rgba(9, 8, 7, 0.16);
}

form {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field label {
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(199, 160, 87, 0.55);
  border-radius: var(--radius);
  padding: 15px 16px;
  font: inherit;
  font-size: 1rem;
  min-width: 0;
  background: var(--cream);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(199, 160, 87, 0.35);
}

.map-section {
  background: var(--black);
  padding: 0 7vw 90px;
}

.map-section iframe {
  width: 100%;
  height: 430px;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(0.15) contrast(1.05);
}

.whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 45px rgba(37, 211, 102, 0.35);
}

.whatsapp svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  padding: 28px 7vw;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.motion-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .about,
  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .practice-card {
    min-height: 560px;
  }

  .section-heading h2,
  .section-text h2,
  .practice-card h3 {
    font-size: 2.5rem;
  }

  .orbit {
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
  }

  .orbit::before {
    display: none;
  }

  .orbit-center {
    position: static;
    grid-column: 1 / -1;
    justify-self: center;
    width: 190px;
    height: 190px;
    margin-bottom: 12px;
    transform: none;
  }

  .orbit-card {
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 22px;
    transform: none;
  }

  .motion-ready .orbit-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .motion-ready .orbit-card.visible {
    opacity: 1;
    transform: none;
  }

  .orbit-card h3 {
    font-size: 1.25rem;
  }

  .orbit-card p {
    font-size: 1rem;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 104px;
  }

  .header {
    padding: 10px 16px;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
  }

  .brand {
    font-size: 1.25rem;
    line-height: 32px;
    text-align: center;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .nav a {
    font-size: 0.75rem;
  }

  .section {
    padding: 52px 20px;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading h2,
  .section-text h2 {
    font-size: 2rem;
  }

  .contact h2 {
    font-size: 1.75rem;
  }

  .section-text p,
  .contact p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .about-images,
  .practice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about {
    min-height: auto;
    gap: 28px;
  }

  .about-images img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .practice-card {
    min-height: 480px;
    min-height: clamp(460px, 76svh, 620px);
  }

  .practice-card::after,
  .practice-card:nth-child(even)::after {
    background:
      linear-gradient(0deg, rgba(9, 8, 7, 0.82), rgba(9, 8, 7, 0.18)),
      linear-gradient(90deg, rgba(9, 8, 7, 0.58), rgba(9, 8, 7, 0.18));
  }

  .practice-card-content,
  .practice-card:nth-child(even) .practice-card-content {
    width: calc(100% - 32px);
    margin: 0 16px 40px;
    padding: 18px;
  }

  .practice-card h3 {
    font-size: 1.75rem;
  }

  .practice-card p {
    font-size: 1rem;
  }

  .contact-card {
    padding: 22px;
    gap: 28px;
  }

  .map-section {
    padding: 0 20px 48px;
  }

  .map-section iframe {
    height: 320px;
  }

  .whatsapp {
    width: 54px;
    height: 54px;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .whatsapp svg {
    width: 29px;
    height: 29px;
  }

  footer {
    padding: 24px 20px 92px;
    line-height: 1.6;
  }
}

@media (max-width: 600px) {
  .orbit {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .orbit-center {
    width: 170px;
    height: 170px;
  }
}

@media (max-width: 360px) {
  .section {
    padding-inline: 16px;
  }

  .contact-card {
    padding: 18px;
  }

  .practice-card-content,
  .practice-card:nth-child(even) .practice-card-content {
    width: calc(100% - 24px);
    margin-inline: 12px;
    padding: 14px;
  }

  .practice-card h3 {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .motion-ready .reveal,
  .motion-ready .practice-card:not(.visible) img,
  .motion-ready .practice-card:not(.visible) .practice-card-content,
  .practice-card img,
  .practice-card-content {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1100px) and (prefers-reduced-motion: reduce) {
  .motion-ready .orbit-card {
    opacity: 1;
    transform: none;
  }
}
