/* IALAIA: «Laia te lo explica». Azul del logo, amarillo de los subtítulos, letra Figtree como en las miniaturas. */

@font-face {
	font-family: "Figtree";
	src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Figtree";
	src: url("fonts/figtree-latin-wght-italic.woff2") format("woff2");
	font-weight: 300 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--ial-navy: #0b1f38;
	--ial-navy-2: #12305a;
	--ial-bg: #f3f6fa;
	--ial-surface: #ffffff;
	--ial-ink: #0f1c2e;
	--ial-muted: #4b5b70;
	--ial-line: #dce3ec;
	--ial-blue: #2f7fd6;
	--ial-blue-dark: #1d5fa8;
	--ial-yellow: #ffe234;
	--ial-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ial-r: 16px;
	--ial-w: 1200px;
	--ial-gap: clamp(20px, 3vw, 32px);
	--ial-sec: clamp(56px, 8vw, 104px);
}

/* Base. Este archivo solo se carga con el diseño encendido y va después de los estilos de Kava,
   así que los selectores de elemento ganan a los suyos (h1, a, a:hover del personalizador). */
body.ial {
	margin: 0;
	background: var(--ial-bg);
	color: var(--ial-ink);
	font-family: var(--ial-font);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--ial-font); color: inherit; letter-spacing: -0.01em; text-align: inherit; font-style: normal; }
p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a, a:hover, h1 a:hover, h2 a:hover, h3 a:hover { color: inherit; text-decoration: none; }
body.ial svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
body.ial :focus-visible { outline: 3px solid var(--ial-blue); outline-offset: 3px; border-radius: 6px; }

.ial-wrap { width: 100%; max-width: var(--ial-w); margin-inline: auto; padding-inline: 20px; box-sizing: border-box; }
.ial-narrow { max-width: 760px; }
.ial-section { padding-block: var(--ial-sec); }
.ial-h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.1; margin-bottom: 32px; }
.ial-meta { color: var(--ial-muted); font-size: 14px; line-height: 1.4; }
.ial-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ial-yellow); color: var(--ial-navy); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.ial-skip:focus { left: 8px; }
.ial-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ial-navy) 0%, var(--ial-navy-2) 60%, var(--ial-blue) 140%); }

/* Botones: píldora; amarillo es la acción, azul es YouTube y lo secundario */
.ial-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 17px; line-height: 1; white-space: nowrap; transition: transform .15s ease, background-color .15s ease, color .15s ease; border: 2px solid transparent; }
.ial-btn:active { transform: translateY(1px); }
.ial-btn svg { font-size: 1.25em; }
.ial-btn--primary { background: var(--ial-yellow); color: var(--ial-navy); }
.ial-btn--primary:hover { background: #fff07a; }
.ial-btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.ial-btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.ial-btn--yt { background: var(--ial-blue); color: #fff; }
.ial-btn--yt:hover { background: var(--ial-blue-dark); }
.ial-btn--dark { background: var(--ial-navy); color: #fff; }
.ial-btn--dark:hover { background: var(--ial-navy-2); }
.ial-btn--sm { padding: 10px 18px; font-size: 15px; }
.ial-more { display: inline-flex; gap: 6px; font-weight: 700; color: var(--ial-blue-dark); }
.ial-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.ial-tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ial-blue-dark); }
.ial-tag:hover { text-decoration: underline; }

/* Cabecera */
.ial-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ial-line); }
.admin-bar .ial-header { top: 32px; }
.ial-header__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.ial-brand { display: inline-flex; align-items: center; gap: 12px; }
.ial-brand img { width: 40px; height: 40px; border-radius: 50%; }
.ial-brand__name { font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.ial-nav__btn { display: none; }
.ial-nav__t { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ial-nav nav { display: flex; align-items: center; gap: 32px; }
.ial-menu { display: flex; gap: 28px; }
.ial-menu a { font-weight: 600; font-size: 16px; color: var(--ial-ink); padding-block: 6px; border-bottom: 2px solid transparent; }
.ial-menu a:hover, .ial-menu .current-menu-item a, .ial-menu .current-cat a { border-color: var(--ial-yellow); }

/* Portada: el último vídeo */
.ial-hero { background: radial-gradient(1200px 520px at 85% 10%, var(--ial-navy-2) 0%, rgba(18,48,90,0) 70%), var(--ial-navy); color: #fff; padding-block: clamp(48px, 7vw, 96px) 0; }
.ial-hero__in { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--ial-gap); align-items: center; }
.ial-hero__text { padding-bottom: clamp(48px, 7vw, 96px); }
.ial-hero h1 { font-size: clamp(40px, 5.4vw, 72px); font-weight: 800; line-height: 1.04; letter-spacing: -0.025em; max-width: 13em; }
.ial-hero h1 em { font-style: normal; color: var(--ial-yellow); }
.ial-hero__lead { margin-top: 24px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: #cfdcef; max-width: 34em; }
.ial-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.ial-hero__video { position: relative; justify-self: center; width: min(100%, 330px); margin-bottom: -96px; transform: rotate(3deg); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(11,31,56,.55), 0 0 0 6px rgba(255,255,255,.08); transition: transform .3s ease; z-index: 2; }
.ial-hero__video:hover { transform: rotate(1deg) translateY(-4px); }
.ial-hero__video img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.ial-hero__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--ial-yellow); color: var(--ial-navy); font-size: 34px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ial-hero__play svg { margin-left: 4px; }
.ial-hero__caption { position: absolute; inset: auto 0 0 0; padding: 48px 18px 18px; background: linear-gradient(to top, rgba(11,31,56,.92), rgba(11,31,56,0)); font-weight: 700; font-size: 16px; line-height: 1.3; }

/* Lo último */
.ial-latest { padding-top: calc(var(--ial-sec) + 40px); }
.ial-latest__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--ial-gap); align-items: start; }
.ial-feature { background: var(--ial-surface); border-radius: var(--ial-r); overflow: hidden; box-shadow: 0 1px 0 var(--ial-line), 0 18px 40px -28px rgba(15,28,46,.35); }
.ial-feature__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ial-navy); }
.ial-feature__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ial-feature:hover .ial-feature__img img { transform: scale(1.03); }
.ial-feature__body { padding: clamp(22px, 3vw, 32px); display: grid; gap: 12px; }
.ial-feature h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.15; }
.ial-feature h3 a:hover { color: var(--ial-blue-dark); }
.ial-feature p { color: var(--ial-muted); }
.ial-list { display: grid; }
.ial-list li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; padding-block: 16px; border-bottom: 1px solid var(--ial-line); }
.ial-list li:first-child { padding-top: 0; }
.ial-list__img { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.ial-list__img img { width: 100%; height: 100%; object-fit: cover; }
.ial-list h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ial-list h3 a:hover { color: var(--ial-blue-dark); }

/* Temas: un mosaico desigual */
.ial-temas { padding-top: 0; }
.ial-temas__grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: var(--ial-gap); }
.ial-tema { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 40px); border-radius: var(--ial-r); min-height: 200px; transition: transform .2s ease; }
.ial-tema:hover { transform: translateY(-3px); }
.ial-tema h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; line-height: 1.1; }
.ial-tema p { max-width: 28em; }
.ial-tema .ial-more { margin-top: auto; }
.ial-tema--tecnologia { grid-row: span 2; background: var(--ial-blue); color: #fff; justify-content: flex-end; min-height: 420px; position: relative; overflow: hidden; }
.ial-tema--tecnologia::before { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; border: 36px solid rgba(255,255,255,.12); }
.ial-tema--tecnologia h3 { font-size: clamp(32px, 3.6vw, 48px); }
.ial-tema--tecnologia .ial-more, .ial-tema--ia .ial-more { color: var(--ial-yellow); margin-top: 8px; }
.ial-tema--ciencia { background: var(--ial-surface); box-shadow: inset 0 0 0 1px var(--ial-line); }
.ial-tema--ciencia p { color: var(--ial-muted); }
.ial-tema--ia { background: var(--ial-navy); color: #fff; }
.ial-tema--ia p { color: #cfdcef; }

/* La pregunta para el próximo vídeo */
.ial-ask { background: var(--ial-yellow); color: var(--ial-navy); padding-block: clamp(40px, 6vw, 64px); }
.ial-ask__in { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.ial-ask h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; line-height: 1.1; }
.ial-ask p { margin-top: 8px; font-size: 18px; }

/* Archivo de noticias */
.ial-archive__list { columns: 2; column-gap: var(--ial-gap); margin-bottom: 28px; }
.ial-archive__list li { break-inside: avoid; border-top: 1px solid var(--ial-line); }
.ial-archive__list a { display: flex; justify-content: space-between; gap: 16px; padding-block: 16px; font-weight: 600; line-height: 1.35; }
.ial-archive__list a:hover span { color: var(--ial-blue-dark); }
.ial-archive__list time { flex: none; color: var(--ial-muted); font-weight: 400; font-size: 14px; padding-top: 2px; }

/* Tarjetas y rejillas de los listados */
.ial-grid { display: grid; gap: var(--ial-gap); }
.ial-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ial-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ial-card { display: flex; flex-direction: column; background: var(--ial-surface); border-radius: var(--ial-r); overflow: hidden; box-shadow: 0 1px 0 var(--ial-line), 0 14px 30px -24px rgba(15,28,46,.35); }
.ial-card__img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ial-navy); }
.ial-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ial-card:hover .ial-card__img img { transform: scale(1.04); }
.ial-card__play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ial-yellow); color: var(--ial-navy); font-size: 20px; }
.ial-card__body { display: grid; gap: 8px; padding: 18px 20px 22px; }
.ial-card__title { font-size: 19px; font-weight: 700; line-height: 1.25; }
.ial-card__title a:hover { color: var(--ial-blue-dark); }

/* Cabecera de archivos y páginas */
.ial-band { background: var(--ial-navy); color: #fff; padding-block: clamp(48px, 7vw, 80px); }
.ial-band h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.ial-band p { margin-top: 14px; font-size: 20px; color: #cfdcef; max-width: 36em; }
.ial-pages { margin-top: 48px; display: flex; justify-content: center; }
.ial-pages .page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding-inline: 14px; margin: 0 4px; border-radius: 999px; font-weight: 700; background: var(--ial-surface); box-shadow: inset 0 0 0 1px var(--ial-line); }
.ial-pages .page-numbers.current { background: var(--ial-navy); color: #fff; box-shadow: none; }
.ial-empty { text-align: center; padding-block: 24px; display: grid; gap: 16px; justify-items: center; }
.ial-empty h1, .ial-empty h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.1; }
.ial-empty p { color: var(--ial-muted); max-width: 32em; }

/* Un post */
.ial-post__head { padding-block: clamp(40px, 6vw, 72px) 32px; }
.ial-post__head h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin-top: 12px; }
.ial-post__lead { margin-top: 18px; font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; color: var(--ial-muted); }
.ial-post__head .ial-meta { margin-top: 18px; }
.ial-post__img { margin-bottom: 40px; }
.ial-post__img img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--ial-r); }

.ial-content { font-size: 19px; line-height: 1.7; padding-bottom: 24px; }
.ial-content > * + *, .ial-content article > * + * { margin-top: 1.1em; }
.ial-content :where(h1, h2) { font-size: clamp(26px, 2.6vw, 32px); font-weight: 800; line-height: 1.15; margin-top: 1.8em; }
.ial-content h3 { font-size: 23px; font-weight: 800; line-height: 1.2; margin-top: 1.6em; }
.ial-content a { color: var(--ial-blue-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ial-content a:hover { color: var(--ial-navy); }
.ial-content strong { font-weight: 700; }
.ial-content ul, .ial-content ol { padding-left: 1.3em; }
.ial-content ul { list-style: none; padding-left: 0; }
.ial-content ul li { position: relative; padding-left: 28px; }
.ial-content ul li + li { margin-top: .5em; }
.ial-content ul li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--ial-yellow); box-shadow: inset 0 0 0 2px var(--ial-navy); }
.ial-content ol { list-style: decimal; }
.ial-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--ial-yellow); font-size: 1.1em; font-weight: 600; }
.ial-content img { border-radius: 12px; }
.ial-content iframe { max-width: 100%; }
.ial-content em { font-style: italic; }

.ial-content .ial-video { position: relative; display: block; width: min(100%, 340px); margin: 32px auto; border-radius: 24px; overflow: hidden; text-decoration: none; color: #fff; box-shadow: 0 24px 48px -24px rgba(11,31,56,.55); }
.ial-content .ial-video img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 0; }
.ial-video__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--ial-yellow); color: var(--ial-navy); font-size: 36px; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .2s ease; }
.ial-video__play svg { margin-left: 4px; }
.ial-video:hover .ial-video__play { transform: scale(1.06); }
.ial-video__txt { position: absolute; inset: auto 0 0 0; padding: 44px 16px 16px; text-align: center; font-weight: 700; font-size: 16px; background: linear-gradient(to top, rgba(11,31,56,.9), rgba(11,31,56,0)); }

/* Laia, al final de cada post */
.ial-author { display: grid; grid-template-columns: 64px 1fr; gap: 20px; margin-block: 24px 0; padding: 28px; border-radius: var(--ial-r); background: var(--ial-surface); box-shadow: inset 0 0 0 1px var(--ial-line); }
.ial-author img { width: 64px; height: 64px; border-radius: 50%; }
.ial-author__name { font-weight: 800; font-size: 20px; }
.ial-author p + p { margin-top: 4px; color: var(--ial-muted); }
.ial-author__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; }
.ial-author .ial-redes a { color: var(--ial-navy); background: var(--ial-bg); }
.ial-related { padding-top: calc(var(--ial-sec) * .7); }

/* Redes */
.ial-redes { display: flex; gap: 10px; }
.ial-redes a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; transition: background-color .15s ease, color .15s ease; }
.ial-redes a:hover { background: var(--ial-yellow); color: var(--ial-navy); }

/* Pie */
.ial-footer { background: var(--ial-navy); color: #cfdcef; padding-top: 64px; font-size: 16px; }
.ial-footer__in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.ial-footer .ial-brand { color: #fff; }
.ial-footer__brand p { margin-block: 16px 20px; max-width: 30em; }
.ial-footer h2 { color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.ial-footer__col li + li { margin-top: 8px; }
.ial-footer__col a:hover { color: var(--ial-yellow); }
.ial-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px; font-size: 14px; color: #93a6c0; }

/* Móvil y tableta */
@media (max-width: 980px) {
	.ial-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.ial-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.ial-latest__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.ial-nav__btn { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; cursor: pointer; }
	.ial-nav__btn span { display: block; height: 2px; width: 22px; margin-inline: auto; background: var(--ial-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
	.ial-nav__t:checked + .ial-nav__btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.ial-nav__t:checked + .ial-nav__btn span:nth-child(2) { opacity: 0; }
	.ial-nav__t:checked + .ial-nav__btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.ial-nav__t:focus-visible + .ial-nav__btn { outline: 3px solid var(--ial-blue); outline-offset: 2px; border-radius: 8px; }
	.ial-nav nav { position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; gap: 20px; padding: 20px 20px 28px; background: #fff; border-bottom: 1px solid var(--ial-line); box-shadow: 0 20px 30px -20px rgba(15,28,46,.3); }
	.ial-nav__t:not(:checked) ~ nav { display: none; }
	.ial-menu { flex-direction: column; gap: 4px; }
	.ial-menu a { display: block; font-size: 19px; padding-block: 10px; border: 0; }
	.ial-nav .ial-btn { justify-content: center; }
	.ial-hero__in { grid-template-columns: 1fr; }
	.ial-hero__text { padding-bottom: 8px; }
	.ial-hero__video { width: min(72%, 280px); margin-bottom: -72px; }
	.ial-latest { padding-top: calc(var(--ial-sec) + 24px); }
	.ial-temas__grid { grid-template-columns: 1fr; }
	.ial-tema--tecnologia { grid-row: auto; min-height: 300px; }
	.ial-archive__list { columns: 1; }
	.ial-footer__in { grid-template-columns: 1fr 1fr; }
	.ial-footer__brand { grid-column: 1 / -1; }
	.admin-bar .ial-header { top: 46px; }
}
@media (max-width: 560px) {
	body.ial { font-size: 17px; }
	.ial-grid--3, .ial-grid--4 { grid-template-columns: 1fr; }
	.ial-hero__cta .ial-btn { width: 100%; justify-content: center; }
	.ial-list li { grid-template-columns: 88px 1fr; }
	.ial-author { grid-template-columns: 1fr; }
	.ial-content { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	body.ial * { transition: none !important; }
	.ial-hero__video, .ial-hero__video:hover { transform: none; }
}
