/* La página informativa de tinticoapp.com (TINTO-186). Los tokens son los del portal (packages/ui/src/estilos/tokens.css)
 * y las fuentes, las mismas (Geist y Newsreader, servidas desde aquí). La guía está en packages/ui/DISENO.md. */

@font-face {
	font-family: "Geist Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/fuentes/geist-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Newsreader Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("/fuentes/newsreader-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	color-scheme: light;
	--fuente: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--fuente-titulo: "Newsreader Variable", ui-serif, Georgia, serif;
	--radio-md: 12px;
	--radio-lg: 16px;
	--radio-xl: 22px;
	--ancho-pagina: 1180px;

	--fondo: oklch(0.958 0.012 250);
	--superficie: oklch(1 0 0);
	--superficie-2: oklch(0.972 0.008 250);
	--superficie-3: oklch(0.945 0.012 250);
	--borde: oklch(0.918 0.012 250);
	--texto: oklch(0.23 0.03 262);
	--texto-2: oklch(0.47 0.03 258);
	--texto-3: oklch(0.62 0.025 256);
	--primario: oklch(0.57 0.135 166);
	--primario-suave: oklch(0.952 0.045 166);
	--primario-texto: oklch(0.42 0.11 166);
	--primario-contraste: oklch(0.99 0.01 166);
	--primario-degradado: linear-gradient(135deg, oklch(0.63 0.135 174) 0%, oklch(0.54 0.135 160) 100%);
	--brillo-primario: 0 8px 20px -6px oklch(0.57 0.135 166 / 0.55);
	--info: oklch(0.58 0.13 245);
	--info-suave: oklch(0.955 0.03 245);
	--violeta: oklch(0.58 0.15 300);
	--violeta-suave: oklch(0.955 0.03 300);
	--cian: oklch(0.56 0.1 210);
	--cian-suave: oklch(0.955 0.03 210);
	--burbuja-mia: oklch(0.955 0.07 145);
	--burbuja-otra: var(--superficie);
	--sombra-tarjeta: 0 1px 2px oklch(0.25 0.03 260 / 0.04), 0 8px 24px -10px oklch(0.25 0.03 260 / 0.1);
	--sombra-flotante: 0 12px 32px -8px oklch(0.25 0.03 260 / 0.2), 0 2px 6px oklch(0.25 0.03 260 / 0.06);
	--sombra-lg: 0 24px 64px -16px oklch(0.25 0.03 260 / 0.22), 0 4px 12px oklch(0.25 0.03 260 / 0.06);
	--anillo: color-mix(in oklab, var(--primario) 45%, transparent);
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--fondo: oklch(0.158 0.014 258);
		--superficie: oklch(0.205 0.013 258);
		--superficie-2: oklch(0.24 0.014 258);
		--superficie-3: oklch(0.28 0.016 258);
		--borde: oklch(0.29 0.014 258);
		--texto: oklch(0.95 0.008 250);
		--texto-2: oklch(0.76 0.018 252);
		--texto-3: oklch(0.6 0.02 254);
		--primario: oklch(0.74 0.13 166);
		--primario-suave: oklch(0.3 0.05 166);
		--primario-texto: oklch(0.82 0.11 166);
		--primario-contraste: oklch(0.2 0.03 166);
		--primario-degradado: linear-gradient(135deg, oklch(0.78 0.13 174) 0%, oklch(0.68 0.13 160) 100%);
		--brillo-primario: 0 8px 20px -6px oklch(0.74 0.13 166 / 0.4);
		--info: oklch(0.72 0.12 245);
		--info-suave: oklch(0.3 0.05 245);
		--violeta: oklch(0.74 0.13 300);
		--violeta-suave: oklch(0.31 0.05 300);
		--cian: oklch(0.76 0.1 210);
		--cian-suave: oklch(0.3 0.045 210);
		--burbuja-mia: oklch(0.4 0.075 168);
		--burbuja-otra: var(--superficie-3);
		--sombra-tarjeta: 0 1px 2px oklch(0 0 0 / 0.2), 0 8px 24px -10px oklch(0 0 0 / 0.35);
		--sombra-flotante: 0 12px 32px -8px oklch(0 0 0 / 0.5), 0 2px 6px oklch(0 0 0 / 0.3);
		--sombra-lg: 0 16px 48px oklch(0 0 0 / 0.45);
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--fondo);
	color: var(--texto);
	font-family: var(--fuente);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: color-mix(in oklab, var(--primario) 28%, transparent);
}

a {
	color: inherit;
}

a:focus-visible {
	outline: 3px solid var(--anillo);
	outline-offset: 3px;
}

h1,
h2,
h3,
p {
	margin: 0;
}

.envoltura {
	width: 100%;
	max-width: calc(var(--ancho-pagina) + 2 * clamp(16px, 4vw, 32px));
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

/* Íconos (Lucide, ISC) */
.ico {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icono {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: var(--radio-md);
	background: var(--primario-suave);
	color: var(--primario-texto);
}

.icono .ico {
	width: 22px;
	height: 22px;
}

.icono.info {
	background: var(--info-suave);
	color: var(--info);
}

.icono.violeta {
	background: var(--violeta-suave);
	color: var(--violeta);
}

.icono.cian {
	background: var(--cian-suave);
	color: var(--cian);
}

/* Cabecera */
.cabecera {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
}

.marca {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.25rem;
	font-weight: 650;
	letter-spacing: -0.02em;
	text-decoration: none;
	border-radius: var(--radio-md);
}

.marca img {
	display: block;
	border-radius: 10px;
}

.enlace-cabecera {
	padding: 9px 18px;
	border-radius: 999px;
	background: var(--superficie);
	box-shadow: var(--sombra-tarjeta);
	font-size: 0.9375rem;
	font-weight: 550;
	text-decoration: none;
	transition:
		transform 160ms ease,
		box-shadow 160ms ease;
}

.enlace-cabecera:hover {
	transform: translateY(-1px);
	box-shadow: var(--sombra-flotante);
}

/* Portada */
.portada {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: 56px;
	padding-block: 48px 88px;
}

.etiqueta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--primario-suave);
	color: var(--primario-texto);
	font-size: 0.8125rem;
	font-weight: 600;
}

.etiqueta::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--primario);
}

h1 {
	margin-block: 20px 18px;
	font-family: var(--fuente-titulo);
	font-size: clamp(2.5rem, 5.4vw, 4rem);
	font-weight: 560;
	line-height: 1.04;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.entrada {
	max-width: 34em;
	color: var(--texto-2);
	font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
	text-wrap: pretty;
}

.acciones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 22px;
	margin-top: 32px;
}

.boton {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 24px;
	border-radius: var(--radio-md);
	background: var(--primario-degradado);
	box-shadow: var(--brillo-primario);
	color: var(--primario-contraste);
	font-weight: 600;
	text-decoration: none;
	transition:
		transform 160ms ease,
		box-shadow 160ms ease;
}

.boton:hover {
	transform: translateY(-1px);
}

.boton:active {
	transform: scale(0.98);
}

.nota {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--texto-2);
	font-size: 0.9375rem;
}

.nota .ico {
	width: 17px;
	height: 17px;
	color: var(--texto-3);
}

/* Ilustración de la portada: un lienzo con una conversación, una llamada y una tarea (decorativa) */
.ilustracion {
	position: relative;
	padding: 34px 0 46px 28px;
}

.ilustracion::before {
	content: "";
	position: absolute;
	inset: 6% -6% 2% 4%;
	z-index: 0;
	background:
		radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--primario) 26%, transparent), transparent 62%),
		radial-gradient(circle at 78% 72%, color-mix(in oklab, var(--info) 20%, transparent), transparent 60%);
	filter: blur(28px);
}

.lienzo {
	position: relative;
	z-index: 1;
	max-width: 440px;
	margin-left: auto;
	padding: 16px;
	border: 1px solid var(--borde);
	border-radius: var(--radio-xl);
	background: var(--superficie);
	box-shadow: var(--sombra-lg);
}

.lienzo-barra {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 2px 4px 14px;
}

.lienzo-barra .icono {
	width: 38px;
	height: 38px;
	border-radius: 11px;
}

.lienzo-barra .ico {
	width: 19px;
	height: 19px;
}

.lienzo-barra strong {
	display: block;
	font-size: 0.9375rem;
	font-weight: 650;
}

.lienzo-barra small {
	display: block;
	color: var(--texto-3);
	font-size: 0.8125rem;
}

.conversacion {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 14px 18px;
	border-radius: var(--radio-lg);
	background: var(--superficie-2);
}

.burbuja {
	position: relative;
	max-width: 84%;
	padding: 7px 11px 6px;
	border-radius: 12px;
	font-size: 0.9375rem;
	line-height: 1.4;
	box-shadow: 0 1px 1px oklch(0.25 0.03 260 / 0.08);
}

.burbuja time {
	float: right;
	margin: 7px 0 0 10px;
	color: var(--texto-3);
	font-size: 0.6875rem;
	line-height: 1;
}

.burbuja.otra {
	align-self: flex-start;
	border-top-left-radius: 0;
	background: var(--burbuja-otra);
}

.burbuja.mia {
	align-self: flex-end;
	border-top-right-radius: 0;
	background: var(--burbuja-mia);
}

.burbuja.otra::before,
.burbuja.mia::before {
	content: "";
	position: absolute;
	top: 0;
	width: 0;
	height: 0;
	border-bottom: 9px solid transparent;
}

.burbuja.otra::before {
	left: -7px;
	border-right: 8px solid var(--burbuja-otra);
}

.burbuja.mia::before {
	right: -7px;
	border-left: 8px solid var(--burbuja-mia);
}

.flotante {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid var(--borde);
	border-radius: var(--radio-lg);
	background: var(--superficie);
	box-shadow: var(--sombra-flotante);
}

.llamada {
	top: 4px;
	right: 22px;
	gap: 9px;
	padding: 9px 15px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 550;
}

.punto {
	position: relative;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--primario);
}

.punto::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	background: var(--primario);
	opacity: 0.35;
	animation: latido 1.8s ease-out infinite;
}

@keyframes latido {
	from {
		transform: scale(0.6);
		opacity: 0.45;
	}
	to {
		transform: scale(1.6);
		opacity: 0;
	}
}

/* La tarjeta tapa solo el margen inferior del lienzo: el título va en una línea, así su alto no cambia */
.tarea {
	bottom: 0;
	left: 0;
	width: min(380px, 90%);
	padding: 12px 14px;
}

.tarea > div {
	min-width: 0;
}

.tarea .icono {
	width: 36px;
	height: 36px;
	border-radius: 10px;
}

.tarea .ico {
	width: 18px;
	height: 18px;
}

.tarea small {
	display: block;
	color: var(--texto-3);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.tarea strong {
	display: block;
	overflow: hidden;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.estado {
	margin-left: auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--info-suave);
	color: var(--info);
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}

/* Módulos */
.modulos {
	padding-block: 24px 80px;
	text-align: center;
}

.modulos h2,
.contacto h2 {
	font-family: var(--fuente-titulo);
	font-size: clamp(1.9rem, 3.6vw, 2.6rem);
	font-weight: 560;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.subtitulo {
	margin-top: 12px;
	color: var(--texto-2);
	font-size: 1.0625rem;
}

.rejilla {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.tarjeta {
	padding: 24px;
	border: 1px solid var(--borde);
	border-radius: var(--radio-lg);
	background: var(--superficie);
	box-shadow: var(--sombra-tarjeta);
	transition:
		transform 180ms ease,
		box-shadow 180ms ease;
}

.tarjeta:hover {
	transform: translateY(-1px);
	box-shadow: var(--sombra-flotante);
}

.tarjeta h3 {
	margin-block: 18px 6px;
	font-size: 1.125rem;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.tarjeta p {
	color: var(--texto-2);
	font-size: 0.96875rem;
}

/* Privado por diseño */
.privado {
	padding-bottom: 80px;
}

.privado-caja {
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: 900px;
	margin-inline: auto;
	padding: 30px 32px;
	border: 1px solid var(--borde);
	border-radius: var(--radio-xl);
	background: linear-gradient(135deg, var(--primario-suave) 0%, var(--superficie) 62%);
	box-shadow: var(--sombra-tarjeta);
}

.icono.grande {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--superficie);
	box-shadow: var(--sombra-tarjeta);
}

.icono.grande .ico {
	width: 26px;
	height: 26px;
}

.privado h2 {
	font-size: 1.375rem;
	font-weight: 650;
	letter-spacing: -0.015em;
}

.privado p {
	margin-top: 6px;
	color: var(--texto-2);
}

/* Contacto */
.contacto {
	padding-bottom: 96px;
	text-align: center;
}

.contacto p {
	margin-top: 12px;
	color: var(--texto-2);
	font-size: 1.0625rem;
}

.correo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	margin-top: 26px;
	padding: 10px 24px 10px 10px;
	border: 1px solid var(--borde);
	border-radius: 999px;
	background: var(--superficie);
	box-shadow: var(--sombra-tarjeta);
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition:
		transform 160ms ease,
		box-shadow 160ms ease;
}

.correo:hover {
	transform: translateY(-1px);
	box-shadow: var(--sombra-flotante);
}

.correo .icono {
	width: 40px;
	height: 40px;
	border-radius: 999px;
}

.correo .ico {
	width: 19px;
	height: 19px;
}

/* Pie */
.pie {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	position: relative;
	padding-block: 26px 34px;
	color: var(--texto-3);
	font-size: 0.875rem;
}

/* La línea del pie, del ancho del contenido */
.pie::before {
	content: "";
	position: absolute;
	top: 0;
	inset-inline: clamp(16px, 4vw, 32px);
	border-top: 1px solid var(--borde);
}

.pie a {
	color: var(--texto-2);
	text-decoration: none;
}

.pie a:hover {
	text-decoration: underline;
}

/* Página no encontrada */
.no-encontrada {
	display: grid;
	place-items: center;
	min-height: 60vh;
	padding-block: 48px;
	text-align: center;
}

.no-encontrada h1 {
	font-size: clamp(2rem, 4.4vw, 3rem);
}

.no-encontrada p {
	margin-bottom: 28px;
	color: var(--texto-2);
}

/* Tableta */
@media (max-width: 1000px) {
	.rejilla {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Celular */
@media (max-width: 899px) {
	.portada {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		padding-block: 24px 56px;
	}

	.ilustracion {
		padding: 30px 0 46px;
	}

	.lienzo {
		margin-inline: auto;
	}

	.llamada {
		right: 8px;
	}

	.modulos {
		padding-bottom: 56px;
	}

	.privado {
		padding-bottom: 56px;
	}

	.contacto {
		padding-bottom: 64px;
	}
}

@media (max-width: 600px) {
	.rejilla {
		grid-template-columns: minmax(0, 1fr);
	}

	.privado-caja {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px;
	}

	/* En el celular la tarjeta de la tarea va debajo del lienzo, montada solo en su borde, para no tapar los mensajes */
	.ilustracion {
		padding-bottom: 0;
	}

	.tarea {
		position: relative;
		bottom: auto;
		left: auto;
		width: 92%;
		margin: -12px auto 0;
	}

	.tarea strong {
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.punto::after {
		animation: none;
	}

	.enlace-cabecera,
	.boton,
	.tarjeta,
	.correo {
		transition: none;
	}
}
