/* ============================================================
   GESTIONES LABORALES — app.gestioneslaborales.es
   Landing estática premium — Variante A (split screen)
   CSS puro · sin framework · sin CDN · sin Google Fonts
   ============================================================ */

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
  /* Paleta principal */
  --cream:          #F5F0E8;
  --cream-light:    #FAF8F4;
  --cream-mid:      #EDE5D8;
  --copper:         #926556;
  --copper-light:   #B88878;
  --copper-lighter: #D4B4AC;
  --copper-dark:    #6B4438;
  --copper-deep:    #4A2E24;
  --gold:           #C9A96E;
  --dusty-rose:     #D4A5A0;
  --rose-soft:      #C89080;
  --warm-gray:      #9B8E82;
  --warm-gray-mid:  #8A7E74;
  --warm-brown:     #7A6258;
  --text-dark:      #2E1E14;
  --text-mid:       #6B5040;
  --text-light:     #9B8070;
  --header-h:       116px;
  --intro-h:        0px;
  --footer-h:       42px;

  /* Gradientes de panel */
  --panel-left-grad:  linear-gradient(145deg,
                        #FAF8F4 0%,
                        #F5EDE0 30%,
                        #EEE0D0 65%,
                        #E8D4C4 100%);
  --panel-right-grad: linear-gradient(145deg,
                        #FAF8F4 0%,
                        #F2EDEA 30%,
                        #E8E4E0 65%,
                        #DDD8D2 100%);

  /* Tipografía */
  --font-serif: Georgia, 'Palatino Linotype', Palatino, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
                Arial, sans-serif;

  /* Animaciones */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --dur-panel:  0.55s;
  --dur-fast:   0.25s;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin:  0;
  padding: 0;
}

html {
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

img, svg { display: block; }

ul { list-style: none; }

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

/* ── STRUCTURE ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.header-logo-mark {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.85;
  margin-bottom: 3px;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 0.60rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.60rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-light);
  line-height: 1;
}

/* ── HERO INTRO TEXT ────────────────────────────────────────── */
.hero-intro {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--intro-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  line-height: 1.2;
  text-align: center;
}

.hero-subtitle {
  font-size: clamp(0.70rem, 1.1vw, 0.80rem);
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-align: center;
  text-transform: uppercase;
}

/* ── HERO SPLIT SCREEN ──────────────────────────────────────── */
main {
  min-height: 100vh;
  min-height: 100dvh;
}

.hero-split {
  flex: 1;
  display: flex;
  position: relative;
  height: calc(100vh - var(--header-h) - var(--intro-h) - var(--footer-h));
  height: calc(100dvh - var(--header-h) - var(--intro-h) - var(--footer-h));
  min-height: 0;
  margin-top: calc(var(--header-h) + var(--intro-h));
  margin-bottom: 0;
  overflow: hidden;
}

/* ── PANELS ─────────────────────────────────────────────────── */
.panel {
  position: relative;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: width var(--dur-panel) var(--ease),
              opacity var(--dur-panel) var(--ease);
}

/* Panel states driven by JS classes on .hero-split */
.hero-split.hover-left  .panel-left  { width: 62%; }
.hero-split.hover-left  .panel-right { width: 38%; }
.hero-split.hover-right .panel-right { width: 62%; }
.hero-split.hover-right .panel-left  { width: 38%; }

/* Subtle dim on inactive panel */
.hero-split.hover-left  .panel-right { opacity: 0.82; }
.hero-split.hover-right .panel-left  { opacity: 0.82; }

/* Focus ring (keyboard navigation) */
.panel:focus-visible {
  box-shadow: inset 0 0 0 3px var(--copper);
}

/* ── PANEL LEFT — Portal del Trabajador ─────────────────────── */
.panel-left {
  background: var(--panel-left-grad);
}

/* ── PANEL RIGHT — Portal de Facturación ────────────────────── */
.panel-right {
  background: var(--panel-right-grad);
}

/* ── GEOMETRIC DECORATIVE SHAPES ────────────────────────────── */
.panel-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Left panel shapes */
.panel-left .shape-a {
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(212, 149, 106, 0.13);
  border-radius: 8px;
  top: -120px;
  right: -80px;
  transform: rotate(22deg);
  background: rgba(232, 192, 144, 0.05);
}
.panel-left .shape-b {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(212, 149, 106, 0.08);
  border-radius: 6px;
  top: -40px;
  right: 60px;
  transform: rotate(10deg);
  background: rgba(212, 165, 160, 0.04);
}
.panel-left .shape-c {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(212, 149, 106, 0.05);
  bottom: -80px;
  left: -100px;
}
.panel-left .shape-d {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(146, 101, 86, 0.08);
  border-radius: 4px;
  bottom: 60px;
  right: 30px;
  transform: rotate(-8deg);
}
.panel-left .shape-e {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(146,101,86,0.10) 40%, transparent 100%);
  top: 38%;
  transform: rotate(-8deg);
}

/* Right panel shapes */
.panel-right .shape-a {
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(155, 142, 130, 0.12);
  border-radius: 8px;
  bottom: -100px;
  left: -60px;
  transform: rotate(-18deg);
  background: rgba(155, 142, 130, 0.04);
}
.panel-right .shape-b {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(155, 142, 130, 0.08);
  border-radius: 6px;
  bottom: 20px;
  left: 80px;
  transform: rotate(-6deg);
  background: rgba(200, 192, 184, 0.03);
}
.panel-right .shape-c {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(155, 142, 130, 0.05);
  top: -70px;
  right: -90px;
}
.panel-right .shape-d {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(122, 98, 88, 0.08);
  border-radius: 4px;
  top: 60px;
  left: 30px;
  transform: rotate(12deg);
}
.panel-right .shape-e {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(122,98,88,0.08) 40%, transparent 100%);
  top: 62%;
  transform: rotate(-8deg);
}

/* ── PANEL CONTENT ───────────────────────────────────────────── */
.panel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
  gap: 1.25rem;
  transition: transform var(--dur-panel) var(--ease);
}

/* Shift content inward on hover */
.hero-split.hover-left  .panel-left  .panel-content { transform: translateX(-14px); }
.hero-split.hover-right .panel-right .panel-content { transform: translateX(14px); }

/* Panel icon */
.panel-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.panel-left .panel-icon {
  background: rgba(146, 101, 86, 0.09);
  border: 1px solid rgba(146, 101, 86, 0.16);
}
.panel-right .panel-icon {
  background: rgba(146, 101, 86, 0.09);
  border: 1px solid rgba(146, 101, 86, 0.16);
}
.panel:hover .panel-icon,
.panel:focus-visible .panel-icon {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 18px rgba(146, 101, 86, 0.22);
}
.panel-icon svg {
  width: 26px;
  height: 26px;
}
.panel-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  opacity: 0.88;
}

/* Panel title */
.panel-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-dark);
}
.panel-right .panel-title { color: var(--text-mid); }

/* Panel description — max-width estable, sin transición de ancho (evita reflow/baile) */
.panel-description {
  font-size: clamp(0.78rem, 1.15vw, 0.88rem);
  line-height: 1.65;
  color: var(--text-light);
  max-width: 26ch;
  opacity: 0.82;
  transition: opacity var(--dur-fast) var(--ease),
              color   var(--dur-fast) var(--ease);
}
.panel:hover .panel-description,
.panel:focus-visible .panel-description {
  opacity: 1;
  color: var(--text-mid);
}

/* Feature list */
.panel-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.panel-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.72rem, 1.0vw, 0.80rem);
  letter-spacing: 0.03em;
  color: var(--text-mid);
  transition: color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.panel:hover .panel-features li,
.panel:focus-visible .panel-features li {
  color: var(--text-dark);
}
.panel-features li::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--copper-light);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease),
              transform  var(--dur-fast) var(--ease);
}
.panel:hover .panel-features li::before {
  background: var(--copper);
  transform: scale(1.4);
}

/* CTA button */
.panel-cta {
  margin-top: 0.25rem;
  pointer-events: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: clamp(0.72rem, 1.05vw, 0.80rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--cream-light);
  background: linear-gradient(135deg, var(--copper-dark) 0%, var(--copper) 50%, var(--copper-light) 100%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  box-shadow:
    0 4px 16px rgba(146, 101, 86, 0.28),
    0 1px 4px rgba(146, 101, 86, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition:
    transform      var(--dur-fast) var(--ease),
    box-shadow     var(--dur-fast) var(--ease),
    background-position 0.45s var(--ease);
}
.panel:hover .btn-primary,
.panel:focus-visible .btn-primary {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 32px rgba(146, 101, 86, 0.36),
    0 3px 8px  rgba(146, 101, 86, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.18);
  background-position: 100% 100%;
}

.btn-arrow {
  display: flex;
  align-items: center;
  transition: transform var(--dur-fast) var(--ease);
}
.panel:hover .btn-arrow,
.panel:focus-visible .btn-arrow {
  transform: translateX(4px);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.footer-main,
.footer-sub {
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  color: var(--text-light);
  text-transform: uppercase;
  opacity: 0.65;
}

.footer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-light);
  opacity: 0.35;
  flex-shrink: 0;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.panel-content {
  animation: fade-up 0.7s var(--ease) both;
}
.panel-left  .panel-content { animation-delay: 0.15s; }
.panel-right .panel-content { animation-delay: 0.30s; }
.hero-intro  { animation: fade-up 0.6s var(--ease) 0s both;    }
.site-header { animation: fade-up 0.6s var(--ease) 0s both;    }

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
}

/* ── TABLET (≤ 900px) ────────────────────────────────────────── */
@media (max-width: 900px) {
  html {
    overflow: auto;
  }

  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
  }

  main {
    min-height: auto;
  }

  .site-header {
    position: relative;
    height: auto;
    padding: 1.25rem 1.5rem;
  }

  .hero-intro {
    position: relative;
    top: auto;
    height: auto;
    padding: 0.75rem 1.5rem 0;
    margin-top: 0;
  }

  .hero-title   { font-size: 1.25rem; }
  .hero-subtitle{ font-size: 0.68rem; }

  .hero-split {
    flex-direction: column;
    height: auto;
    min-height: auto;
    margin-top: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  .panel {
    width: 100% !important;
    min-height: 52vh;
    opacity: 1 !important;
  }

  .panel-content {
    transform: none !important;
    padding: 3rem 2rem;
  }

  .hero-split.hover-left  .panel-left  .panel-content,
  .hero-split.hover-right .panel-right .panel-content {
    transform: none !important;
  }

  .site-footer {
    position: relative;
    height: auto;
    padding: 1rem 1.5rem;
  }
}

/* ── MOBILE (≤ 600px) ────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 1rem 1.25rem; }

  .header-logo-mark { height: 36px; width: auto; }
  .brand-name { font-size: 0.88rem; }
  .brand-tagline { font-size: 0.56rem; }

  .hero-intro { padding: 0.5rem 1.25rem 0; }
  .hero-title  { font-size: 1.10rem; }
  .hero-subtitle { font-size: 0.65rem; letter-spacing: 0.05em; }

  .panel {
    min-height: auto;
    padding: 2.5rem 1.25rem;
  }

  /* Safe area for iPhone notch */
  @supports (padding: max(0px)) {
    .panel:first-child {
      padding-top: max(2.5rem, env(safe-area-inset-top));
    }
    .site-footer {
      padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
  }

  .panel-content {
    padding: 2rem 1.25rem;
    gap: 1rem;
  }

  .panel-icon { width: 42px; height: 42px; border-radius: 12px; }
  .panel-icon svg { width: 22px; height: 22px; }

  .panel-title { font-size: 1.35rem; }

  .panel-description { font-size: 0.82rem; max-width: none; }

  .panel-features { gap: 0.45rem; }
  .panel-features li { font-size: 0.78rem; }

  .btn-primary {
    padding: 0.80rem 1.50rem;
    font-size: 0.78rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1.25rem 1rem;
    height: auto;
  }
  .footer-sep { display: none; }
}

/* ── HOVER ONLY ON POINTER DEVICES ──────────────────────────── */
@media (hover: none) {
  /* Touch devices: no shrink/expand */
  .hero-split.hover-left  .panel-right,
  .hero-split.hover-right .panel-left {
    width: 50%;
    opacity: 1;
  }
  .hero-split.hover-left  .panel-left,
  .hero-split.hover-right .panel-right {
    width: 50%;
  }
}

/* ── FOCUS STYLES (accessibility) ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.panel:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(146, 101, 86, 0.70);
}
