/*
Theme Name: Parter Provisional
Theme URI: https://parterstudios.com/
Author: Parter Studios
Description: Tema provisional de Parter Studios. Hijo de Twenty Twenty-Five: negro con grano, tipografía Switzer, cabecera fija y estilos para los bloques nativos que publica myParter.
Template: twentytwentyfive
Version: 0.3.4
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parter-provisional
*/

/* ==================================================================
   Base
   Colores, tipo y tamaños: theme.json. Aquí, lo que no cabe allí.
   ================================================================== */

:root {
	--pt-pad: clamp(1rem, 1.6vw, 1.5rem);
	--pt-bar-h: 3.5rem;
	--pt-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; scrollbar-color: var(--wp--preset--color--faint) var(--wp--preset--color--base); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
input, textarea { caret-color: var(--wp--preset--color--tint); }
::selection { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
:where(a) { text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
:focus-visible { outline: 1px solid var(--wp--preset--color--contrast); outline-offset: 4px; }

/* Grano de película por encima de todo (SVG en línea, sin peticiones) */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 90;
	pointer-events: none;
	opacity: 0.07;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Saltar al contenido: invisible hasta que recibe el foco */
.pt-skip {
	position: fixed;
	top: 0.75rem; left: var(--pt-pad);
	z-index: 100;
	padding: 0.6em 0.9em;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	border-radius: 4px;
	transform: translateY(-200%);
	transition: transform 0.2s var(--pt-ease);
}
.pt-skip:focus { transform: none; color: var(--wp--preset--color--base); }

/* Utilidades de texto */
.pt-small,
.pt-small a {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: -0.005em;
	line-height: 1.4;
}
.pt-muted, .pt-muted a { color: var(--wp--preset--color--muted); }
.pt-muted a:hover { color: var(--wp--preset--color--contrast); }

/* ==================================================================
   Cabecera fija y esquinas (reloj, ©)
   ================================================================== */

.pt-chrome {
	position: fixed;
	inset: 0;
	z-index: 80;
	pointer-events: none;
	color: var(--wp--preset--color--contrast);
}
/* Velo oscuro arriba y abajo: el texto blanco se lee sobre cualquier plano del vídeo o foto clara */
.pt-chrome::before,
.pt-chrome::after {
	content: "";
	position: absolute;
	left: 0; right: 0;
	pointer-events: none;
	z-index: -1;
}
.pt-chrome::before {
	top: 0;
	height: calc(var(--pt-bar-h) + 2.5rem);
	background: linear-gradient(to bottom, rgba(11, 11, 10, 0.72), rgba(11, 11, 10, 0.38) 55%, rgba(11, 11, 10, 0));
}
.pt-chrome::after {
	bottom: 0;
	height: 3.75rem;
	background: linear-gradient(to top, rgba(11, 11, 10, 0.6), rgba(11, 11, 10, 0));
}
.pt-chrome a, .pt-chrome p {
	color: var(--wp--preset--color--contrast);
	pointer-events: auto;
	text-shadow: 0 1px 14px rgba(11, 11, 10, 0.45);
}
.pt-chrome a:hover { color: var(--wp--preset--color--tint); }
@media (max-width: 781px) {
	.pt-chrome::after { display: none; }
}
.pt-chrome p { margin: 0; }

.pt-bar {
	position: absolute;
	top: 0; left: 0; right: 0;
	height: var(--pt-bar-h);
	padding: 0 var(--pt-pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 !important;
}
.pt-logo {
	font-size: 1rem;
	font-weight: 650;
	letter-spacing: -0.035em;
	line-height: 1;
}

.pt-nav { display: flex; gap: 1.5rem; }
.pt-nav a {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	position: relative;
}
.pt-nav a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.45s var(--pt-ease);
}
.pt-nav a:hover::after,
.pt-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.pt-corner {
	position: absolute;
	bottom: 0.9rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.pt-corner--left { left: var(--pt-pad); }
.pt-corner--right { right: var(--pt-pad); }

@media (max-width: 781px) {
	.pt-corner { display: none; }
}

/* ==================================================================
   Portada: imagen a pantalla completa
   ================================================================== */

.pt-hero.wp-block-cover {
	min-height: 100vh !important;
	min-height: 100svh !important;
	padding: var(--pt-pad) var(--pt-pad) 3.25rem;
	align-items: flex-end;
	margin-top: 0 !important;
	overflow: hidden;
}
.pt-hero :is(.wp-block-cover__image-background, .wp-block-cover__video-background) {
	object-position: 50% 45%;
	transform: scale(1.04);
	animation: pt-hero-in 2.4s var(--pt-ease) both;
}
@keyframes pt-hero-in { from { transform: scale(1.12); opacity: 0.35; } to { transform: scale(1.04); opacity: 1; } }
.pt-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to top, rgba(11, 11, 10, 0.92) 0%, rgba(11, 11, 10, 0.62) 28%, rgba(11, 11, 10, 0.12) 52%, rgba(11, 11, 10, 0) 66%, rgba(11, 11, 10, 0) 82%, rgba(11, 11, 10, 0.55) 100%);
}
.pt-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 3 !important;
	width: 100% !important;
	max-width: none !important;
	color: var(--wp--preset--color--contrast);
}
.pt-hero .wp-block-cover__inner-container > * { margin-block: 0; }
.pt-hero h1 {
	color: var(--wp--preset--color--tint);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 0.95;
	margin: 0 0 0.25em !important;
}
.pt-hero .pt-small { color: rgba(241, 239, 234, 0.88); }
.pt-scrollcue {
	position: absolute;
	z-index: 3 !important;
	left: 50%;
	bottom: 0.9rem;
	transform: translateX(-50%);
	margin: 0 !important;
	z-index: 2;
	color: rgba(241, 239, 234, 0.88);
	white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
	.pt-hero .pt-in { animation: pt-up 1.1s var(--pt-ease) both; animation-delay: 0.35s; }
	.pt-hero .pt-in + .pt-in { animation-delay: 0.45s; }
	.pt-hero .pt-in + .pt-in + .pt-in { animation-delay: 0.55s; }
	.pt-hero .pt-in + .pt-in + .pt-in + .pt-in { animation-delay: 0.65s; }
	@keyframes pt-up { from { opacity: 0; transform: translateY(0.6em); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
	.pt-hero :is(.wp-block-cover__image-background, .wp-block-cover__video-background) { animation: none; }
}

/* ==================================================================
   Secciones de la home
   ================================================================== */

.pt-section { padding-top: var(--wp--preset--spacing--60); }

/* Etiqueta a la izquierda + frase grande con sangría (en escritorio) */
.pt-intro { position: relative; }
.pt-label {
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--muted);
}
.pt-statement,
h2.pt-statement {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	letter-spacing: -0.032em;
	line-height: 1.06;
	margin: 0;
	text-wrap: pretty;
}
@media (min-width: 782px) {
	.pt-intro > .pt-label { position: absolute; left: 0; top: 0.75em; margin: 0; }
	.pt-section.pt-intro > .pt-label { top: calc(var(--wp--preset--spacing--60) + 0.75em); }
	.pt-statement { text-indent: 25%; max-width: 75%; }
}

/* Palabras que se encienden con el scroll (las parte parter.js) */
.pt-reveal .pt-w { transition: color 0.35s ease; }
.pt-reveal.is-ready .pt-w { color: #67665F; }
.pt-reveal.is-ready .pt-w.is-on { color: var(--wp--preset--color--contrast); }

/* Retícula de tres columnas (25 / 42 / 33) */
.pt-grid { margin-top: var(--wp--preset--spacing--50) !important; }
.pt-grid > .wp-block-column > p { max-width: 34ch; }
.pt-grid .wp-block-image { margin: 0; }
.pt-grid .wp-block-image img { width: 100%; height: auto; display: block; }

/* Lista numerada (formatos) */
.pt-rows { margin-top: var(--wp--preset--spacing--50) !important; }
.pt-rowline {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 1.1rem;
	margin: 0 !important;
	padding-bottom: var(--wp--preset--spacing--40);
}

.pt-rowline h3 { font-size: var(--wp--preset--font-size--large); font-weight: 550; letter-spacing: -0.02em; margin: 0; }
.pt-rowline p { margin: 0; }
.pt-rowline ul { list-style: none; padding: 0 !important; margin: 0; }
.pt-rowline li { line-height: 1.9; }
.pt-rowline li::marker { content: none; }

/* Llamada final */
.pt-cta-mail { margin-top: var(--wp--preset--spacing--40) !important; }
.pt-cta-mail a {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size 0.6s var(--pt-ease), color 0.2s ease;
	overflow-wrap: anywhere;
}
.pt-cta-mail a, .pt-link a { text-decoration: none !important; }
.pt-cta-mail a:hover { background-size: 100% 2px; color: var(--wp--preset--color--tint); }

/* Botones: respuesta al pulsar (criterio Emil Kowalski: 160 ms, ease-out) */
.wp-element-button,
.wp-block-button__link,
.fluentform .ff-btn-submit {
	transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.wp-element-button:active,
.wp-block-button__link:active,
.fluentform .ff-btn-submit:active { transform: scale(0.97); }

/* Enlace de texto con subrayado que se dibuja */
.pt-link a {
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	padding-bottom: 2px;
	transition: background-size 0.45s var(--pt-ease), color 0.2s ease;
}
.pt-link a:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--wp--preset--color--contrast); }

/* Misión: otra escala y otro color para romper la serie de frases */
.pt-mission-wrap { padding-top: var(--wp--preset--spacing--60); }
.pt-mission {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 550;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--wp--preset--color--tint);
	margin: 0;
	max-width: 18ch;
	text-wrap: balance;
}
.pt-mission-cite { margin: 1.5rem 0 0 !important; }
@media (min-width: 782px) {
	.pt-mission-wrap { padding-left: 25%; }
}

/* ==================================================================
   Pie
   ================================================================== */

.pt-footer {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: 3.25rem;
	container-type: inline-size;
	margin-top: 0 !important;
}
.pt-footer .pt-cols {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 1.1rem;
}
.pt-footer .pt-cols p { margin: 0; }
.pt-legal a { display: block; }
.pt-legal:not(:has(a)) { display: none; }
.pt-footer .pt-cols .pt-muted { margin-bottom: 0.35rem; }
.pt-footer .pt-cols a:hover { color: var(--wp--preset--color--tint); }
.pt-wordmark {
	margin: var(--wp--preset--spacing--40) 0 0 !important;
	font-size: min(calc(100cqw / 6.35), calc(1600px / 6.35));
	font-weight: 650;
	letter-spacing: -0.04em;
	line-height: 0.8;
	white-space: nowrap;
	color: #1C1C1A;
	user-select: none;
}

/* ==================================================================
   Páginas normales (lo que publica myParter)
   ================================================================== */

.pt-page { padding-top: calc(var(--pt-bar-h) + var(--wp--preset--spacing--50)); }
.wp-block-post-title { text-wrap: balance; }
.wp-block-post-content > * + h2 { margin-top: var(--wp--preset--spacing--40); }
.wp-block-post-content p { text-wrap: pretty; }
.wp-block-post-content :where(p, li) a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: var(--wp--preset--color--faint);
}
.wp-block-post-content :where(p, li) a:hover { text-decoration-color: currentColor; }

/* Imágenes y galería: sin esquinas */
.wp-block-image img, .wp-block-gallery img { border-radius: 0; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
	font-size: var(--wp--preset--font-size--x-small);
}

/* Tabla (planes) */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1em 1em 1em 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead { border-bottom: 0; }
.wp-block-table thead th {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	color: var(--wp--preset--color--muted);
	border-bottom: 1px solid var(--wp--preset--color--faint);
}
.wp-block-table tfoot td { border-top: 1px solid var(--wp--preset--color--faint); font-weight: 600; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--wp--preset--color--surface); }
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table figcaption { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
@media (max-width: 640px) {
	.wp-block-table { overflow-x: auto; }
	.wp-block-table table { min-width: 34rem; }
}

/* Preguntas frecuentes (bloque Detalles) */
.wp-block-details {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 1.25em 0;
}
.wp-block-details + .wp-block-details { margin-top: 0; }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-weight: 550;
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.02em;
	line-height: 1.25;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	font-weight: 400;
	flex: none;
	color: var(--wp--preset--color--muted);
	transition: transform 0.35s var(--pt-ease);
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-top: 0.8em; max-width: 65ch; color: var(--wp--preset--color--muted); }

/* Citas y separador */
.wp-block-quote { border-left: 1px solid var(--wp--preset--color--faint); padding-left: 1.25em; margin-left: 0; }
.wp-block-quote cite { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); font-style: normal; }
.wp-block-pullquote { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); letter-spacing: -0.03em; }
.wp-block-separator { border: 0; border-top: 1px solid var(--wp--preset--color--line); opacity: 1; }

/* Botón contorno */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--faint);
	background: transparent;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* ==================================================================
   Formularios (Fluent Forms y formularios básicos)
   ================================================================== */

.fluentform .ff-el-form-control,
.wp-block-post-content form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea) {
	width: 100%;
	font: inherit;
	font-size: var(--wp--preset--font-size--large) !important;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--contrast) !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--faint) !important;
	border-radius: 0 !important;
	padding: 0.35em 0 0.5em !important;
	box-shadow: none !important;
	transition: border-color 0.3s ease;
}
.fluentform textarea.ff-el-form-control { min-height: 6.5em; resize: vertical; }
.fluentform .ff-el-form-control:focus,
.wp-block-post-content form :is(input, textarea, select):focus {
	outline: none;
	border-bottom-color: var(--wp--preset--color--contrast) !important;
}
.fluentform .ff-el-input--label label,
.wp-block-post-content form label {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 500 !important;
	color: var(--wp--preset--color--muted) !important;
}
.fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { color: var(--wp--preset--color--muted) !important; }
.fluentform .ff-el-group { margin-bottom: 2rem !important; }
.fluentform .ff-el-tc label,
.fluentform .ff_t_c,
.fluentform .ff-el-form-check-label { font-size: var(--wp--preset--font-size--small) !important; color: var(--wp--preset--color--muted) !important; }
.fluentform .ff_t_c a { color: var(--wp--preset--color--contrast); text-decoration: underline; text-underline-offset: 0.2em; }
.fluentform input[type="checkbox"] { accent-color: var(--wp--preset--color--contrast); }
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:not(.ff_btn_no_style),
.wp-block-post-content form :is(button[type="submit"], input[type="submit"]) {
	font: inherit;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 500 !important;
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
	border: 0 !important;
	border-radius: 4px !important;
	padding: 0.8em 1.3em !important;
	cursor: pointer;
	transition: background 0.2s ease;
}
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--tint) !important; opacity: 1 !important; }
.fluentform .ff-message-success {
	border: 1px solid var(--wp--preset--color--line) !important;
	box-shadow: none !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.02em;
	padding: 1.5rem !important;
}
.fluentform .error.text-danger { color: var(--wp--preset--color--tint) !important; font-size: var(--wp--preset--font-size--x-small); }

/* ==================================================================
   Móvil
   ================================================================== */

@media (max-width: 781px) {
	.pt-grid > .wp-block-column.pt-spacer,
	.pt-rowline > .wp-block-column.pt-spacer { display: none; }
	.pt-rowline { padding-bottom: var(--wp--preset--spacing--30); }
	.pt-hero h1 { font-size: clamp(3rem, 15vw, 5rem); }
	.pt-intro > .pt-label { display: none; }
	.pt-hero.wp-block-cover { padding-bottom: 1.5rem; }
	.pt-scrollcue { display: none; }
	.pt-rowline { gap: 0.4rem !important; }
	.pt-rowline h3 { margin-bottom: 0.6rem; }
	.pt-cta-mail a { font-size: calc((100vw - 3rem) / 11); }
}

/* Columnas del pie */
.pt-cols {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem var(--pt-pad);
}
@media (max-width: 781px) {
	.pt-cols { grid-template-columns: repeat(2, 1fr); }
}

/* Contacto */
.pt-contact { margin-top: var(--wp--preset--spacing--50) !important; }
.pt-contact-info p { margin: 0; }
.pt-contact-info p.pt-muted { margin-top: 1.5rem; }
.pt-contact-info p.pt-muted:first-child { margin-top: 0; }
.pt-contact-info a:hover { color: var(--wp--preset--color--tint); }
.pt-lead-form {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.25;
	margin: 0 0 var(--wp--preset--spacing--30) !important;
}
@media (min-width: 782px) {
	.pt-intro h1.pt-statement { text-indent: 25%; max-width: none; }
}
