/* ==========================================================================
   ESTUDIO JURÍDICO IVAN GIACOMAZZI & ASOC.
   Estética: Premium, Editorial, Parallax Overlap, Sobria y Responsiva
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hedvig+Letters+Serif:opsz@12..24&family=Inter:wght@300;400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&display=swap');

:root {
  --bg-primary: #F7F7F5;
  --bg-surface: #FFFFFF;
  --bg-dark: #0F0F0F;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --border-subtle: #DCDCD8;
  --border-dark: #262626;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif-hero: 'Hedvig Letters Serif', 'Newsreader', Georgia, serif;
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #0A0A0A;
  color: var(--text-primary);
  font-family: var(--font-inter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: clip;
}

/* --------------------------------------------------------------------------
   PUNTO 4: LOADER FULLSCREEN CON FADE-OUT
   -------------------------------------------------------------------------- */
#loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Tipografía Serif Editorial
   -------------------------------------------------------------------------- */
.font-hero-serif {
  font-family: var(--font-serif-hero);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.font-editorial-h1 {
  font-family: var(--font-inter);
  font-size: clamp(2.8rem, 6.5vw, 6.2rem);
  font-weight: 450;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--text-primary);
}

.font-editorial-h2 {
  font-family: var(--font-inter);
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.font-editorial-h3 {
  font-family: var(--font-inter);
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.font-editorial-lead {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-secondary);
}

.font-editorial-body {
  font-size: 1.02rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-secondary);
}

.font-editorial-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.font-editorial-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   HERO FULLSCREEN & SLIDES
   -------------------------------------------------------------------------- */
.hero-fullscreen {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  background-color: #0A0A0A;
  z-index: 1;
}

.hero-slides-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease-cinematic), transform 6s var(--ease-cinematic);
  will-change: opacity, transform;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.05) brightness(0.9);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      rgba(8, 8, 8, 0.94) 0%,
      rgba(8, 8, 8, 0.82) 30%,
      rgba(8, 8, 8, 0.5) 55%,
      rgba(8, 8, 8, 0.15) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(8, 8, 8, 0.5) 0%,
      rgba(8, 8, 8, 0.0) 25%,
      rgba(8, 8, 8, 0.8) 100%
    );
}

/* --------------------------------------------------------------------------
   NAVBAR
   -------------------------------------------------------------------------- */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 60;
  transition: background-color 0.4s var(--ease-editorial), border-color 0.4s var(--ease-editorial), box-shadow 0.4s var(--ease-editorial);
  background-color: transparent;
}

#main-header.nav-hero-mode .nav-logo-text { color: #FFFFFF; }
#main-header.nav-hero-mode .nav-logo-sub { color: rgba(255, 255, 255, 0.6); }
#main-header.nav-hero-mode .link-nav { color: rgba(255, 255, 255, 0.85); position: relative; }
#main-header.nav-hero-mode .link-nav:hover { color: #FFFFFF; }
#main-header.nav-hero-mode .nav-cta-btn {
  background-color: #0F0F0F;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
#main-header.nav-hero-mode .nav-mobile-btn { color: #FFFFFF; }

#main-header.nav-scrolled-mode {
  background-color: rgba(247, 247, 245, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px -6px rgba(0, 0, 0, 0.04);
}

#main-header.nav-scrolled-mode .nav-logo-text { color: var(--text-primary); }
#main-header.nav-scrolled-mode .nav-logo-sub { color: var(--text-tertiary); }
#main-header.nav-scrolled-mode .link-nav { color: var(--text-secondary); position: relative; }
#main-header.nav-scrolled-mode .link-nav:hover { color: var(--text-primary); }
#main-header.nav-scrolled-mode .nav-cta-btn {
  background-color: #0F0F0F;
  color: #FFFFFF;
  border: 1px solid #0F0F0F;
}
#main-header.nav-scrolled-mode .nav-mobile-btn { color: var(--text-primary); }

.link-nav::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-editorial);
}

.link-nav:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   HERO BOTÓN Y NAVEGACIÓN
   -------------------------------------------------------------------------- */
.hero-content-wrapper {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 90px;
}

.hero-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0F0F0F;
  color: #FFFFFF;
  padding: 14px 24px;
  border-radius: 2px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease-editorial), transform 0.2s var(--ease-editorial);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-btn-cta:hover {
  background-color: #000000;
  border-color: #FFFFFF;
  transform: translateY(-1px);
}

.hero-bottom-nav {
  position: absolute;
  bottom: clamp(28px, 4.5vh, 46px);
  left: 0;
  width: 100%;
  z-index: 25;
}

.slide-nav-item {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.slide-nav-line {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.85rem;
  transition: background-color 0.4s var(--ease-editorial);
}

.slide-nav-item.active .slide-nav-line {
  background-color: #FFFFFF;
}

.slide-nav-text {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.35s var(--ease-editorial);
}

.slide-nav-item.active .slide-nav-text {
  color: #FFFFFF;
}

.slide-nav-subtext {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   EFECTO DE CORTINA / STACKING SECTIONS
   La sección siguiente se superpone suavemente sobre el hero sin bordes
   redondeados ni sombra, manteniendo una lectura limpia.
   -------------------------------------------------------------------------- */
.overlapping-section {
  position: relative;
  z-index: 20;
  margin-top: -1.5rem;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

@media (min-width: 768px) {
  .overlapping-section {
    margin-top: -2rem;
  }
}

/* --------------------------------------------------------------------------
   PUNTO 6: EFECTO DE REVELADO LENTO (SLOW REVEAL EN TRAYECTORIA)
   -------------------------------------------------------------------------- */
.slow-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1.4s var(--ease-cinematic), transform 1.4s var(--ease-cinematic);
  will-change: opacity, transform;
}

.slow-reveal.slow-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   ACORDEÓN
   -------------------------------------------------------------------------- */
.practice-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease-cinematic), opacity 0.5s var(--ease-cinematic);
  opacity: 0;
}

.practice-row.is-open .practice-content {
  max-height: 2500px;
  opacity: 1;
}

.practice-row .arrow-icon {
  transition: transform 0.4s var(--ease-editorial);
}

.practice-row.is-open .arrow-icon {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   ANIMACIONES DE SCROLL REVEAL ESTÁNDAR
   -------------------------------------------------------------------------- */
.reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-editorial), transform 0.8s var(--ease-editorial);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }

/* Enlaces y botones principales */
.btn-editorial-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0F0F0F;
  color: #FFFFFF;
  padding: 0.85rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-editorial), transform 0.25s var(--ease-editorial);
  border: 1px solid #0F0F0F;
}

.btn-editorial-primary:hover {
  background-color: #262626;
  transform: translateY(-1px);
}

.btn-editorial-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.85rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background-color 0.25s var(--ease-editorial), border-color 0.25s var(--ease-editorial);
}

.btn-editorial-secondary:hover {
  background-color: var(--bg-surface);
  border-color: var(--text-primary);
}

.border-subtle {
  border-color: var(--border-subtle);
}

/* 1. HERO CON POSICIONAMIENTO PEGAJOSO / FIJO */
.hero {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 650px;
    z-index: 1; /* Permite que quede guardado al fondo */
    
    /* Garantiza que el contenido respire y no quede apretado al fondo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 80px; /* Margen de seguridad para textos o botones inferiores */
}

/* 2. SECCIÓN SIGUIENTE (CORTINA QUE SUBE) */
.sobre-nosotros {
    position: relative;
    z-index: 2; /* Sube y se superpone por encima del Hero */
    background-color: var(--bg-white-off, #ffffff); /* Fondo totalmente opaco */
    
    /* REMOVIENDO BORDES Y SOMBRAS */
    border-radius: 0 !important;
    box-shadow: none !important;
    
    /* Espaciado interno limpio */
    padding-top: 100px;
    padding-bottom: 100px;
}
