/* Anira home: editorial layer. Every rule is gated by page-home so the
   shared shell can replace body.className when navigating to other pages. */
.page-home {
  --home-ink: #17211d;
  --home-paper: #f5f1e8;
  --home-white: #fcfbf7;
  --home-green: #1d6b57;
  --home-mint: #74d3b5;
  --home-coral: #e7775e;
  --home-line: rgba(23, 33, 29, .15);
  --home-type-display: clamp(3.6rem, 7.2vw, 6.8rem);
  --home-type-h1: clamp(3.05rem, 13vw, 5.25rem);
  --home-type-h2: clamp(2.5rem, 4.5vw, 4.25rem);
  --home-type-h3: clamp(1.45rem, 2.5vw, 2rem);
  --home-type-body: clamp(1.05rem, 1.45vw, 1.25rem);
  --home-type-small: .875rem;
  --home-space-1: .25rem;
  --home-space-2: .5rem;
  --home-space-3: 1rem;
  --home-space-4: 1.5rem;
  --home-space-5: 2.5rem;
  --home-space-6: 4rem;
  --home-space-section: clamp(4.75rem, 9vw, 8rem);
  --home-radius-sm: 4px;
  --home-radius-md: 6px;
  --home-radius-lg: 8px;
  --home-shadow-ui: 0 6px 20px rgba(23,33,29,.05);
  --home-shadow-panel: 0 12px 36px rgba(23,33,29,.08);
  --home-container-max: 1320px;
  --home-header-height: 72px;
  --home-breakpoint-tablet: 991.98px;
  --home-breakpoint-mobile: 767.98px;
  background: var(--home-white);
}

.page-home main { overflow: clip; }
.page-home h1, .page-home h2, .page-home h3, .page-home h4,
.page-home .font-display { font-family: var(--font-display); }
.page-home p { max-width: 68ch; }
.page-home .container { --bs-gutter-x: clamp(1.25rem, 4vw, 3rem); max-width: var(--home-container-max); }
.page-home section[id] { scroll-margin-top: calc(var(--home-header-height) + var(--home-space-2)); }

/* Keep the established palette, remove the decorative page-wide textures. */
.page-home .section-paper,
.page-home .section-white {
  background-image: none !important;
}
.page-home .section-paper { background-color: var(--home-paper); }
.page-home .section-white { background-color: var(--home-white); }
.page-home .section-divider { height: 2rem; background: var(--home-paper); }

/* Header remains the shared Bootstrap offcanvas/navigation component. */
.page-home .navbar-anira {
  padding: var(--home-space-2) 0 !important;
  background: var(--home-ink) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.page-home .navbar-anira.scrolled { padding: var(--home-space-2) 0 !important; }
.page-home .navbar-anira .nav-link { font-size: var(--home-type-small); }

.page-home .btn-anira-primary,
.page-home .btn-anira-secondary {
  border-radius: var(--home-radius-sm) !important;
  min-height: 48px;
}
.page-home #hero .btn { border-radius: var(--home-radius-sm) !important; }
.page-home .btn-anira-primary { box-shadow: none; }
.page-home a { text-underline-offset: .2em; }

/* Hero: left aligned editorial message; existing artwork remains the product
   visual and stays visible on the right instead of becoming a dark backdrop. */
.page-home #hero {
  min-height: min(850px, 100svh);
  min-height: max(690px, min(850px, 100svh));
  padding: clamp(8rem, 13vh, 11rem) 0 clamp(5rem, 9vh, 7rem);
  align-items: center;
  background: var(--home-ink);
}
.page-home #hero::before,
.page-home #hero::after,
.page-home #cta-final::before { display: none !important; }
.page-home #hero .hero-bg-img {
  object-position: 72% center;
  opacity: .9;
}
.page-home #hero .hero-overlay {
  background: linear-gradient(90deg, rgba(18,29,25,.98) 0%, rgba(18,29,25,.93) 36%, rgba(18,29,25,.62) 62%, rgba(18,29,25,.16) 100%);
}
.page-home #hero .container { width: 100%; }
.page-home #hero .container > .row {
  display: block;
  margin: 0;
}
.page-home #hero .hero-content {
  width: min(760px, 64%);
  max-width: none;
  padding: 0;
  text-align: left !important;
}
.page-home #hero .hero-label {
  padding: 0;
  color: var(--home-mint);
  background: transparent !important;
  border: 0 !important;
  letter-spacing: .13em;
  backdrop-filter: none;
}
.page-home #hero .hero-title {
  max-width: 760px;
  margin-bottom: 1.6rem !important;
  font-size: var(--home-type-display) !important;
  font-weight: 500 !important;
  line-height: .98 !important;
  letter-spacing: -.045em;
  text-shadow: none;
}
.page-home #hero .hero-text {
  margin-left: 0 !important;
  margin-bottom: 2rem !important;
  max-width: 560px !important;
  font-size: var(--home-type-body);
  line-height: 1.65;
}
.page-home #hero .hero-content > .d-flex {
  justify-content: flex-start !important;
  margin-bottom: 1.5rem !important;
}
.page-home #hero .hero-trust {
  justify-content: flex-start !important;
  flex-wrap: wrap;
  max-width: 610px;
  line-height: 1.55;
}

/* Recognition is a quiet index of everyday questions, not a badge carousel. */
.page-home #reconocimiento { padding: 1.35rem 0 !important; }
.page-home #reconocimiento .container { text-align: left !important; }
.page-home #reconocimiento .container > .d-flex {
  gap: 0 !important;
  padding: 0 0 .7rem !important;
  flex-wrap: wrap;
  overflow: visible !important;
  white-space: normal;
}
.page-home #reconocimiento .badge {
  padding: .3rem .85rem !important;
  color: var(--home-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--home-line) !important;
  border-radius: 0 !important;
  font-size: .92rem !important;
}
.page-home #reconocimiento .badge:first-child { padding-left: 0 !important; }
.page-home #reconocimiento .badge:last-child { border-right: 0 !important; }
.page-home #reconocimiento p {
  margin: .35rem auto 0 !important;
  text-align: center;
}

/* Shared chapter rhythm and editorial headings. */
.page-home #antes-despues,
.page-home #demo-interactiva,
.page-home #como-funciona,
.page-home #control-humano,
.page-home #canales-section,
.page-home #administracion,
.page-home #casos-uso,
.page-home #codepapa,
.page-home #piloto,
.page-home #faq { padding-block: var(--home-space-section) !important; }
.page-home #antes-despues .container,
.page-home #demo-interactiva .container,
.page-home #como-funciona .container,
.page-home #canales-section .container,
.page-home #administracion .container,
.page-home #casos-uso .container,
.page-home #codepapa .container,
.page-home #piloto .container,
.page-home #faq .container { padding-block: 0 !important; }
.page-home #antes-despues .container > .text-center,
.page-home #demo-interactiva .container > .text-center,
.page-home #como-funciona .container > .text-center,
.page-home #control-humano .container > .text-center,
.page-home #canales-section .container > .text-center,
.page-home #administracion .container > .text-center,
.page-home #casos-uso .container > .text-center,
.page-home #codepapa .container > .text-center,
.page-home #faq .container > .text-center {
  max-width: 790px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem) !important;
  text-align: center !important;
}
.page-home #antes-despues .container > .text-center p,
.page-home #demo-interactiva .container > .text-center p,
.page-home #como-funciona .container > .text-center p,
.page-home #control-humano .container > .text-center p,
.page-home #canales-section .container > .text-center p,
.page-home #administracion .container > .text-center p,
.page-home #casos-uso .container > .text-center p,
.page-home #codepapa .container > .text-center p,
.page-home #faq .container > .text-center p {
  margin-inline: auto !important;
}
.page-home section[id] h2 {
  margin-bottom: .8rem;
  font-size: var(--home-type-h2) !important;
  font-weight: 500 !important;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.page-home section[id] h3,
.page-home section[id] h4 { letter-spacing: -.015em; }

/* Before / after: retain the comparison details but give them clear contrast. */
.page-home #antes-despues > .container > .mb-5:has(> img) { margin-bottom: clamp(2rem, 5vw, 4rem) !important; }
.page-home #antes-despues img,
.page-home #codepapa > .container img {
  border-radius: var(--home-radius-sm) !important;
  box-shadow: none !important;
}
.page-home #antes-despues .panel-antes,
.page-home #antes-despues .panel-despues {
  padding: clamp(1.5rem, 3vw, 2.5rem) !important;
  border: 0 !important;
  border-top: 1px solid var(--home-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.page-home #antes-despues .panel-antes { background: rgba(231,119,94,.07) !important; }
.page-home #antes-despues .panel-despues { background: rgba(116,211,181,.12) !important; }
.page-home #antes-despues .panel-antes .badge,
.page-home #antes-despues .panel-despues .badge { border-radius: 3px !important; }

/* Interactive demo and administration remain recognizable software surfaces. */
.page-home #demo-interactiva .demo-panel {
  padding: clamp(1rem, 2.5vw, 2rem) !important;
  border: 1px solid var(--home-line) !important;
  border-radius: var(--home-radius-lg) !important;
  background: var(--home-paper) !important;
  box-shadow: var(--home-shadow-panel) !important;
}
.page-home #demo-interactiva .demo-scenario {
  border-radius: 4px !important;
  font-size: .9rem;
}
.page-home #demo-interactiva #demo-result,
.page-home #demo-interactiva .demo-result { border-radius: 5px !important; }
.page-home #demo-interactiva .demo-evidence { border-radius: 4px !important; }
.page-home #demo-interactiva .demo-response { border-radius: 4px !important; }
.page-home #demo-interactiva .demo-escalation {
  padding: 1rem;
  border-left: 3px solid var(--home-coral);
  background: rgba(231,119,94,.09);
}
.page-home #administracion .mockup-window {
  border-radius: var(--home-radius-md) !important;
  box-shadow: var(--home-shadow-panel) !important;
}
.page-home #administracion .mockup-window:hover { transform: none; }

/* The process is an open timeline; channel cards are compact information rows. */
.page-home #como-funciona .row { --bs-gutter-y: 2.5rem; }
.page-home #como-funciona .step-item { padding-top: 1rem; }
.page-home #como-funciona .step-number {
  position: static;
  width: 40px;
  height: 40px;
  margin-bottom: 1.35rem;
  border-radius: 3px;
  background: transparent;
  color: var(--home-green);
  border-bottom: 1px solid var(--home-green);
  font-size: 1.6rem;
}
.page-home #como-funciona .step-line { display: none !important; }
.page-home #canales-section .card {
  border: 0 !important;
  border-top: 1px solid var(--home-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 1.5rem .5rem !important;
}
.page-home #canales-section .badge,
.page-home #canales-section .badge-disponible,
.page-home #canales-section .badge-proximo,
.page-home #canales-section .badge-roadmap { border-radius: 3px !important; }
.page-home #canales-section .badge { white-space: normal; }

/* Human handoff uses solid, readable surfaces rather than glass. */
.page-home #control-humano .control-humano-overlay {
  background: linear-gradient(90deg, rgba(252,251,247,.9), rgba(252,251,247,.97) 38%, rgba(252,251,247,.92));
  backdrop-filter: none;
}
.page-home #control-humano .control-card-glass {
  background: var(--home-white) !important;
  border: 1px solid var(--home-line) !important;
  border-radius: var(--home-radius-md) !important;
  box-shadow: var(--home-shadow-ui) !important;
  backdrop-filter: none !important;
}
.page-home #control-humano .control-card-glass:hover { transform: none !important; }
.page-home #control-humano .fork-branch { border-radius: 5px; box-shadow: none; }

/* Sector imagery keeps its role; text sits on a simple editorial caption. */
.page-home #casos-uso .row { --bs-gutter-y: 2rem; }
.page-home #casos-uso .card-editorial {
  border-radius: 4px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--home-line) !important;
  box-shadow: none !important;
  background: transparent !important;
}
.page-home #casos-uso .card-editorial:hover { transform: none !important; box-shadow: none !important; }
.page-home #casos-uso .card-editorial-img { height: 240px !important; }
.page-home #casos-uso .card-body { padding: 1.25rem 0 !important; background: transparent !important; }
.page-home #casos-uso .card-editorial-img img { transition: transform 350ms ease; }
.page-home #casos-uso a:hover .card-editorial-img img { transform: scale(1.025); }

/* Implementation story and pilot form retain their real service details. */
.page-home #codepapa .d-flex.flex-column.gap-3 > div {
  border: 0 !important;
  border-bottom: 1px solid var(--home-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 1rem 0 !important;
}
.page-home #piloto .form-piloto {
  border-radius: 6px !important;
  box-shadow: 0 12px 36px rgba(23,33,29,.06) !important;
}
.page-home #piloto .form-piloto .bg-light { background: var(--home-paper) !important; border-radius: 4px !important; }
.page-home #piloto .form-piloto .btn { white-space: normal; }
.page-home #piloto .row.align-items-center > .col-lg-6 { text-align: center; }
.page-home #piloto .row.align-items-center > .col-lg-6 p { margin-inline: auto; }
.page-home #faq .accordion-faq .accordion-button { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.page-home #faq .accordion-faq .accordion-item { border-color: var(--home-line); }

.page-home #cta-final {
  padding-block: clamp(4rem, 9vw, 7.5rem) !important;
  text-align: left;
}
.page-home #cta-final .container { padding-block: 0 !important; }
.page-home #cta-final .row { text-align: center !important; }
.page-home #cta-final .row > div { width: min(900px, 100%); }
.page-home #cta-final h2 {
  max-width: 900px;
  margin: 0 auto 2rem !important;
  font-size: var(--home-type-h2) !important;
  font-style: normal;
  line-height: 1.04 !important;
  letter-spacing: -.035em;
}
.page-home #cta-final .btn { border-radius: 4px !important; }
.page-home footer { padding-top: 3rem; }

@media (max-width: 991.98px) {
  .page-home #hero { min-height: 760px; min-height: max(680px, 92svh); }
  .page-home #hero .hero-content { width: min(690px, 78%); }
  .page-home #hero .hero-overlay {
    background: linear-gradient(90deg, rgba(18,29,25,.97), rgba(18,29,25,.86) 58%, rgba(18,29,25,.42));
  }
  .page-home #control-humano .control-humano-overlay { background: rgba(252,251,247,.9); }
  /* Keep Bootstrap's drawer viewport fixed on smaller screens. */
  .page-home .navbar-anira .offcanvas { max-height: 100vh; max-height: 100dvh; }
}

@media (max-width: 767.98px) {
  .page-home { --home-space-section: 4.5rem; }
  .page-home .navbar-anira .navbar-brand {
    min-width: 0;
    max-width: calc(100% - 3.5rem);
    gap: .3rem !important;
    flex-wrap: nowrap;
  }
  .page-home .navbar-anira .brand-anira,
  .page-home .navbar-anira .brand-support { font-size: 1.25rem !important; }
  .page-home .navbar-anira .brand-by { display: none; }
  .page-home .navbar-anira .navbar-toggler {
    display: inline-flex !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .page-home .navbar-anira .navbar-toggler-icon { width: 1.35rem; height: 1.35rem; }
  .page-home #hero {
    min-height: 730px;
    min-height: max(680px, 94svh);
    padding: 7.75rem 0 4.5rem;
    align-items: flex-start;
  }
  .page-home #hero .hero-bg-img {
    object-position: 65% center;
    opacity: .62;
  }
  .page-home #hero .hero-overlay {
    background: linear-gradient(90deg, rgba(18,29,25,.96), rgba(18,29,25,.82) 76%, rgba(18,29,25,.6));
  }
  .page-home #hero .hero-content { width: 100%; max-width: 100%; min-width: 0; }
  .page-home #hero .hero-title { font-size: var(--home-type-h1) !important; }
  .page-home #hero .hero-content > .d-flex { align-items: stretch; }
  .page-home #hero .hero-text {
    width: 100%;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }
  .page-home #hero .hero-content > .d-flex .btn {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding-inline: .75rem !important;
    white-space: normal;
    line-height: 1.3;
  }
  .page-home #hero .hero-trust { font-size: .8rem !important; }
  .page-home #reconocimiento .container > .d-flex { gap: .1rem .25rem !important; }
  .page-home #reconocimiento .badge {
    padding: .25rem .5rem !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--home-line) !important;
  }
  .page-home #antes-despues .panel-antes,
  .page-home #antes-despues .panel-despues { padding: 1.5rem !important; }
  .page-home #demo-interactiva .demo-panel { padding: .75rem !important; }
  .page-home #demo-interactiva .demo-result { padding: 1.15rem !important; }
  .page-home #demo-interactiva .demo-question,
  .page-home #demo-interactiva .demo-response { width: 100% !important; }
  .page-home #administracion .mockup-content { padding: 1rem; }
  .page-home #casos-uso .card-editorial-img { height: 220px !important; }
  .page-home #piloto .row.align-items-center > div { margin-bottom: 0 !important; }
  .page-home #cta-final .btn { width: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home *, .page-home *::before, .page-home *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .page-home .fade-in { transform: none !important; }
}
