/*
Theme Name: Proyecto iO soi
Theme URI: https://www.proyectoiosoi.com
Author: Xeito Studio
Description: Tema a medida para Proyecto iO soi (v08). Escala tipográfica fija aprobada: nada por debajo de 18 px.
Version: 1.0.5
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: iosoi
*/

:root {
  --color-bg: #FAFCFF;
  --color-bg-alt: #EFF6FC;
  --color-text: #16212B;
  --color-text-muted: #45525C;
  --color-line: #D9E8F5;
  --color-card: #FFFFFF;
  --blue: #2E90E5;
  --blue-deep: #0B4A8C;
  --blue-mid: #1D6FD1;
  --blue-cyan: #0EA5C7;
  --blue-ink: #E9F3FD;
  --ink: #12202C;
  --color-dim: rgba(22, 33, 43, 0.2);

  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* Escala tipográfica — escritorio (≥ 760 px) */
  --fs-display: 56px;   /* Titular del bloque azul */
  --fs-h1: 52px;        /* "Una mirada integrativa…" */
  --fs-h2: 44px;        /* "Hay preguntas…", "Tres miradas…" */
  --fs-tagline: 46px;   /* "exploradores de universos" */
  --fs-h3: 34px;        /* Nombres de autores y de áreas */
  --fs-questions: 32px; /* Preguntas */
  --fs-lead: 28px;      /* "Proyecto iO soi nace…" */
  --fs-sublead: 24px;   /* Párrafos destacados */
  --fs-text-lg: 24px;   /* Texto de autores */
  --fs-text: 20px;      /* Texto de áreas */
  --fs-label: 20px;     /* "Área iO soi", "Proyecto iO soi" */
  --fs-body: 18px;      /* Mínimo: menú, botones, pie */

  --radius-tile: 26px;
  --radius-pill: 980px;
  --nav-h: 78px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-space: clamp(72px, 12vw, 136px);
  --wrap: 1120px;
  --wrap-narrow: 860px;
}

/* Escala tipográfica — móvil (< 760 px) */
@media (max-width: 759px) {
  :root {
    --fs-display: 34px;
    --fs-h1: 32px;
    --fs-h2: 30px;
    --fs-tagline: 30px;
    --fs-h3: 26px;
    --fs-questions: 23px;
    --fs-lead: 22px;
    --fs-sublead: 20px;
    --fs-text-lg: 20px;
    --fs-text: 18px;
    --fs-label: 18px;
    --fs-body: 18px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-family: var(--font-sans); font-style: normal; font-weight: 500; color: var(--blue-deep); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* Franja de niebla ---------------------------------------------------------*/
.glow-band {
  position: relative;
  overflow: hidden;
  line-height: 0;
  background: var(--color-bg);
}
.glow-band__net {
  display: block;
  width: 100%;
  height: auto;
}

/* Layout ------------------------------------------------------------------*/
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}
.wrap--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section-space); position: relative; }
.section--alt { background: var(--color-bg-alt); }

.hero__logo {
  margin: 0 auto 22px;
  width: clamp(128px, 15vw, 190px);
  height: auto;
}

/* Nav ---------------------------------------------------------------------*/
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 252, 255, 0.9);
  border-bottom: 1px solid var(--color-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-nav__inner {
  height: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.site-nav__brand img { height: 32px; width: auto; }
.site-nav__links { display: flex; gap: 22px; margin-inline: auto; }
.site-nav__links a { font-size: var(--fs-body); font-weight: 500; color: var(--color-text-muted); transition: color 0.2s ease; }
.site-nav__links a:hover { color: var(--blue-deep); }

/* Botones -----------------------------------------------------------------*/
.button {
  display: inline-block;
  padding: 13px 26px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: var(--fs-body);
  border-radius: var(--radius-pill);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.button:hover { background: var(--blue-deep); transform: translateY(-1px); }
.button--sm { padding: 10px 20px; font-size: var(--fs-body); flex: none; }
.button--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.button--outline:hover { background: var(--ink); color: #fff; }

/* Hero --------------------------------------------------------------------*/
.hero {
  position: relative;
  text-align: center;
  padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 84px));
  padding-bottom: clamp(28px, 5vw, 48px);
  background: var(--color-bg);
}
.hero__title {
  max-width: 15em; margin-inline: auto;
  text-wrap: balance;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.hero__actions {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: center; justify-content: center;
}

/* Preguntas (punto 1) — vuelven los tamaños de la v07 -----------------------
   Título 44 > preguntas 32 > párrafo 28. Solo "Proyecto iO soi" en azul. */
.statement { padding-block: clamp(48px, 10vw, 120px) var(--section-space); }
.statement__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.statement__questions {
  margin-top: clamp(28px, 4vw, 48px);
  font-weight: 400;
  font-size: var(--fs-questions);
  line-height: 1.32;
  color: var(--color-text);
}
.statement__title .word, .statement__questions .word { color: var(--color-dim); transition: color 0.35s ease; }
.statement__title .word.is-lit, .statement__questions .word.is-lit { color: var(--color-text); }
.statement__questions .word.is-lit { color: var(--blue-deep); }
.statement__lead {
  margin-top: clamp(32px, 5vw, 56px);
  max-width: 34em;
  text-wrap: pretty;
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--color-text);
}

/* Referentes (punto 2) — nombres claramente por encima del texto ------------*/
.authors { display: grid; grid-template-columns: 1fr; gap: 0 clamp(40px, 6vw, 88px); }
.author {
  position: relative; padding: 36px 0 36px 68px;
  border-top: 1px solid var(--color-line);
  color: var(--color-text-muted); font-size: var(--fs-text-lg); line-height: 1.55;
}
/* La insignia (o, en el editor, el bloque que la envuelve) va fija a la izquierda de la ficha */
.author > :first-child { position: absolute; left: 0; top: 36px; margin: 0; }
.author__badge {
  position: static;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--blue-ink);
  color: var(--blue-deep);
  font-weight: 600;
  font-size: 18px;
}
.author:nth-child(2) .author__badge { background: #E1F5FA; color: var(--blue-cyan); }
.author:nth-child(3) .author__badge { background: #E7F0FD; color: var(--blue-mid); }
.author:nth-child(4) .author__badge { background: var(--blue-ink); color: var(--blue-deep); }
.author__name {
  margin-bottom: 12px;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* Áreas (puntos 3 y 4) ------------------------------------------------------*/
.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.section__lead {
  text-wrap: pretty;
  font-weight: 500;
  font-size: var(--fs-sublead);
  line-height: 1.45;
  color: var(--color-text);
}
.areas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--color-line);
}
.area__eyebrow {
  margin-bottom: 10px;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
}
.area__name {
  margin-bottom: 14px;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.area--a .area__name { color: var(--blue-mid); }
.area--b .area__name { color: var(--blue-cyan); }
.area--c .area__name { color: var(--blue-deep); }
.area__kind { margin-bottom: 10px; font-size: var(--fs-text); font-weight: 600; color: var(--color-text); }
.area__text { font-size: var(--fs-text); line-height: 1.6; color: var(--color-text-muted); }

/* Cierre (punto 5) ----------------------------------------------------------*/
.closing {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: var(--section-space);
  background: linear-gradient(120deg, #0B4A8C 0%, #1D6FD1 55%, #2E90E5 100%);
  color: #fff;
}
.closing__title {
  position: relative;
  text-wrap: balance;
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.closing__title em { color: #DCEEFF; }
.closing__text {
  position: relative;
  margin: 28px auto 0;
  max-width: 30em;
  font-size: var(--fs-sublead);
  line-height: 1.5;
}

/* Contacto (punto 6) --------------------------------------------------------*/
.contact { text-align: center; }
.contact__brand {
  margin-bottom: 16px;
  font-size: var(--fs-sublead);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text);
}
.contact__tagline {
  margin-bottom: clamp(28px, 4vw, 44px);
  text-wrap: balance;
  font-weight: 500;
  font-size: var(--fs-tagline);
  line-height: 1.2;
  color: var(--blue-deep);
}

/* Footer ------------------------------------------------------------------*/
.site-footer { background: var(--color-bg-alt); border-top: 1px solid var(--color-line); font-size: var(--fs-body); color: var(--color-text-muted); }
.site-footer__inner {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 20px var(--gutter);
  display: flex; justify-content: space-between; gap: 16px;
}

/* Revelado al hacer scroll ------------------------------------------------*/
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal.is-visible:nth-child(1) { transition-delay: 0s; }
.hero .reveal.is-visible:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal.is-visible:nth-child(3) { transition-delay: 0.16s; }

/* Responsive --------------------------------------------------------------*/
@media (min-width: 760px) { .authors { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) {
  .section__head { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 56px; }
}
@media (min-width: 980px) { .areas { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
@media (max-width: 640px) {
  .site-nav__links { display: none; }
  .site-nav__inner > .button { margin-left: auto; }
  .author { padding-left: 62px; }
  .author__badge { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .statement__title .word, .statement__questions .word { color: var(--color-text); transition: none; }
  .statement__questions .word { color: var(--blue-deep); }
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* Ajustes para WordPress ---------------------------------------------------*/
.wp-site-blocks { padding: 0; }
.wp-block-group { box-sizing: border-box; }
.admin-bar .site-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-nav { top: 46px; } }
/* En el editor no se ejecuta la animación: mostrar todo */
.editor-styles-wrapper .reveal { opacity: 1; transform: none; }
.editor-styles-wrapper .site-nav { position: relative; }

/* Márgenes: WordPress añade margin-block-start: 24px a todos los bloques
   (":root :where(.is-layout-flow) > *"). Se anula y se vuelven a fijar
   los espacios del diseño con más prioridad. ----------------------------*/
:root .is-layout-flow > *,
:root .wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
:root .hero__logo { margin: 0 auto 22px; }
:root .hero__actions { margin-top: clamp(28px, 4vw, 44px); }
:root .statement__questions { margin-top: clamp(28px, 4vw, 48px); }
:root .statement__lead { margin-top: clamp(32px, 5vw, 56px); }
:root .author__name { margin-bottom: 12px; }
:root .section__head { margin-bottom: clamp(48px, 7vw, 88px); }
:root .area__eyebrow { margin-bottom: 10px; }
:root .area__name { margin-bottom: 14px; }
:root .area__kind { margin-bottom: 10px; }
:root .closing__text { margin: 28px auto 0; }
:root .contact__brand { margin-bottom: 16px; }
:root .contact__tagline { margin-bottom: clamp(28px, 4vw, 44px); }
