/* dicotomIA -- landing page (home publico, antes del login).
   Paleta y tipografia alineadas al brandbook + a lo que ya usa app.py,
   para que el home se sienta parte del mismo sistema que el login/panel. */

:root {
  --ink: #0A0A0A;
  --paper: #F7F7F4;
  --smoke: #B8B8B8;
  --light: #E3E3E0;
  --accent: #D7FF3E;
  --border-dark: #2A2A2A;
  --border-light: #DEDEDA;
  --text-muted-dark: #9A9A9A;
  --text-muted-light: #6B6B66;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

@media (max-width: 768px) {
  .wrap { padding: 0 1.25rem; }
}

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--border-dark);
}
.header-spacer { display: none; }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand { display: flex; align-items: center; }
.brand img { height: 30px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #E7E7E4;
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--accent); }

.main-nav .nav-login {
  color: var(--text-muted-dark);
  font-size: 0.85rem;
}
.main-nav .nav-login:hover { color: var(--paper); }

/* .main-nav a ya fija color en todos los links (incluido el boton, que
   tambien es un <a>) -- sin este selector mas especifico, el texto del
   boton "Hablemos" queda gris claro sobre fondo lima, casi ilegible. */
.main-nav a.btn-accent { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 2rem;
  padding: 0.65rem 1.3rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { opacity: 0.92; }

.btn-ghost-dark {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--border-dark);
}
.btn-ghost-dark:hover { border-color: var(--paper); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }

  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--border-dark);
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .main-nav.open a {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-dark);
  }
  .main-nav.open .btn { margin-top: 0.9rem; }
}

/* ---------------------------------------------------------------------
   Hero
--------------------------------------------------------------------- */
.hero {
  background: var(--ink);
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero-copy {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease forwards 0.1s;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
}
.hero h1 .muted { color: var(--text-muted-dark); font-weight: 400; }

.hero-body {
  font-size: 1.1rem;
  line-height: 1.55;
  color: #D6D6D3;
  max-width: 34rem;
  margin: 0 0 2.1rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-bottom: 3.2rem;
}

.link-underline {
  text-decoration: none;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--text-muted-dark);
  padding-bottom: 0.2rem;
  transition: border-color 0.15s ease;
}
.link-underline:hover { border-color: var(--paper); }

.hero-micro {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}

/* Panel visual: dos recortes diagonales de la misma imagen -- el motivo
   "/" (slash) del sistema grafico, ver 07_sistema_grafico del brandbook. */
.hero-visual {
  position: relative;
  height: clamp(320px, 42vw, 620px);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.25s;
}

.slash-frame {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
}

.slash-frame.left {
  left: 6%;
  width: 34%;
  clip-path: polygon(35% 0, 100% 0, 65% 100%, 0 100%);
  filter: brightness(1.18) contrast(0.92) saturate(0.9);
  background-position: 30% center;
}

.slash-frame.right {
  left: 34%;
  width: 60%;
  clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
}

.hero-visual-label {
  position: absolute;
  right: 0;
  bottom: 14%;
  text-align: right;
  font-size: 0.85rem;
  line-height: 1.5;
  padding-right: 0.1rem;
  border-right: 2px solid var(--accent);
  padding-right: 0.9rem;
}
.hero-visual-label .l1 { color: var(--paper); font-weight: 500; }
.hero-visual-label .l2 { color: var(--text-muted-dark); }

@media (max-width: 1000px) {
  .hero-visual { margin-top: 1rem; height: clamp(260px, 70vw, 420px); }
}

/* ---------------------------------------------------------------------
   Scroll reveal -- fade/translate discreto al entrar en viewport (ver
   script.js: IntersectionObserver agrega .in-view). El hero no lo usa
   (anima al cargar, ya esta en el viewport de entrada); el resto de
   secciones si, para que la pagina no se sienta estatica al bajar.
--------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------
   Secciones -- bloques genericos reutilizados en todo el home
--------------------------------------------------------------------- */
.section { padding: 5.5rem 0; }
.section-paper { background: var(--paper); color: var(--ink); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-light { background: var(--light); color: var(--ink); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  margin: 0 0 1.1rem;
}
.eyebrow-dark { color: var(--text-muted-light); }

.big-title {
  font-size: clamp(2rem, 4.3vw, 3.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.3rem;
}
.big-title .muted { color: var(--text-muted-dark); font-weight: 400; }

.ink-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
  color: var(--ink);
}
.ink-title .muted-ink { color: var(--text-muted-light); font-weight: 500; }

.split-head {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3.2rem;
}
.split-head .side-text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-muted-light);
  margin-top: 0.6rem;
}
.split-head .side-text strong { color: var(--ink); }

@media (max-width: 900px) {
  .split-head { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* "Como funciona" necesita mas ancho para el proceso 01-05 que el resto
   de los .split-head (que reparten 1.3fr/0.9fr) -- con solo 0.9fr las 5
   columnas quedan demasiado angostas y el texto se parte en 4 lineas. */
#como-funciona .split-head { grid-template-columns: 0.85fr 1.3fr; }

/* Filas de 4-5 columnas con icono + titulo + texto (secciones 2, 4, 7).
   Solo "El contexto" y "Qué hacemos" (.feature-row-divided) llevan
   divisores en la referencia -- y son VERTICALES, entre columnas, no una
   regla horizontal arriba del icono -- "Resultados" va sin ninguna
   linea, solo con el espaciado del grid. */
.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
}
.feature-row-5 { grid-template-columns: repeat(5, 1fr); }

#contexto .feature-col,
.feature-row-divided .feature-col {
  padding-left: 2.2rem;
  border-left: 1px solid var(--border-light);
}
#contexto .feature-col:first-child,
.feature-row-divided .feature-col:first-child { padding-left: 0; border-left: none; }

.feature-row .icon { width: 30px; height: 30px; margin-bottom: 1.4rem; color: var(--ink); }
.feature-row h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.4rem; }
.feature-row p { font-size: 0.92rem; line-height: 1.45; color: var(--text-muted-light); margin: 0; }

/* "Qué hacemos": el tick va DESPUES de la descripcion (acento de cierre
   por columna, ver referencia), no antes como en el resto del sitio. */
.feature-row-divided .tick { margin-bottom: 0; margin-top: 1rem; }

.results-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
}
.results-row .icon { width: 28px; height: 28px; margin-bottom: 1.1rem; color: var(--ink); }
.results-row h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 0.35rem; }
.results-row p { font-size: 0.9rem; line-height: 1.45; color: var(--text-muted-light); margin: 0; }

@media (max-width: 900px) {
  .feature-row, .feature-row-5, .results-row { grid-template-columns: repeat(2, 1fr); row-gap: 2.2rem; }
  /* Divisor vertical entre 4-5 columnas no tiene sentido apiladas de a 2 --
     se cambia a un divisor horizontal arriba de cada tarjeta. */
  #contexto .feature-col,
  .feature-row-divided .feature-col { padding-left: 0; border-left: none; padding-top: 1.6rem; border-top: 1px solid var(--border-light); }
}
@media (max-width: 560px) {
  .feature-row, .feature-row-5, .results-row { grid-template-columns: 1fr; }
}

.tick {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 0.9rem;
}

/* ---------------------------------------------------------------------
   3. Nuestra filosofia
--------------------------------------------------------------------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.pair-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 1.05rem;
}
.philosophy-visual { position: relative; height: 320px; }
.blur-slash {
  position: absolute;
  inset: 0;
  background-image: var(--slash-img);
  background-size: 200% 200%;
  background-position: 60% 30%;
  clip-path: polygon(45% 0, 62% 0, 30% 100%, 13% 100%);
  filter: blur(6px) brightness(1.3) saturate(0);
}
.philosophy-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--paper);
}

@media (max-width: 1000px) {
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-visual { height: 220px; }
}

/* ---------------------------------------------------------------------
   5. Como funciona
--------------------------------------------------------------------- */
.btn-ink { background: var(--ink); color: var(--paper); margin-top: 1.6rem; }
.btn-ink:hover { opacity: 0.85; }

.process-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.6rem;
}
.process-list .step-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted-light);
  margin-bottom: 0.5rem;
}
.process-list h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.35rem; }
.process-list p { font-size: 0.87rem; line-height: 1.4; color: var(--text-muted-light); margin: 0; }

.flow-line {
  border-top: 1px solid var(--border-light);
  padding-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted-light);
}

@media (max-width: 900px) {
  .process-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   6. La IA, con criterio
--------------------------------------------------------------------- */
.ia-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr 0.5fr;
  gap: 2.5rem;
  align-items: center;
}
.ia-visual img { border-radius: 0.25rem; }
.quote-line {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 1.8rem;
}
.ia-side { font-size: 0.92rem; line-height: 1.5; color: var(--paper); }
.ia-side .tick:last-child { margin-top: 0.9rem; margin-bottom: 0; }

@media (max-width: 1000px) {
  .ia-grid { grid-template-columns: 1fr; }
  .ia-side { display: flex; align-items: center; gap: 1rem; }
  .ia-side .tick { margin: 0; }
}

/* ---------------------------------------------------------------------
   9. CTA final
--------------------------------------------------------------------- */
.cta-final { padding-bottom: 4rem; }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.6fr;
  gap: 2.5rem;
  align-items: center;
}
.cta-mid .btn { margin-top: 1.5rem; }
.cta-side { font-size: 0.92rem; line-height: 1.5; color: var(--paper); text-align: right; }
.cta-side .tick { margin-left: auto; }

@media (max-width: 900px) {
  .cta-grid { grid-template-columns: 1fr; text-align: left; }
  .cta-side { text-align: left; }
  .cta-side .tick { margin-left: 0; }
}

/* ---------------------------------------------------------------------
   10. Footer
--------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: 3.5rem; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--border-dark);
}
.footer-top .brand img { height: 34px; }
.footer-nav { display: flex; gap: 1.8rem; }
.footer-nav a { text-decoration: none; font-size: 0.9rem; color: #D6D6D3; }
.footer-nav a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--paper);
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.6rem 0 2.2rem;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}
.footer-legal { display: flex; gap: 1.4rem; }
.footer-legal a { text-decoration: none; color: var(--text-muted-dark); }
.footer-legal a:hover { color: var(--paper); }
