/* Tetrada — "Cinta de piso". Tokens live in theme.json; this file holds the tape system and synthetic product UI. */

:root {
	--tape: var(--wp--preset--color--tape);
	--floor: var(--wp--preset--color--base);
	--floor-2: var(--wp--preset--color--floor-2);
	--bone: var(--wp--preset--color--contrast);
	--steel: var(--wp--preset--color--steel);
	--line: var(--wp--preset--color--line);
	--stencil: var(--wp--preset--font-family--stencil);
	--tape-w: 4px;
	--corner: 30px;
	--hair: color-mix(in srgb, var(--bone) 14%, transparent);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Browser surfaces */
::selection { background: var(--tape); color: var(--floor); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--tape);
	outline-offset: 3px;
}
html { scrollbar-color: var(--line) var(--floor); }
input, textarea, select { caret-color: var(--tape); accent-color: var(--tape); }
table, .tabular { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 0.2em; }
.wp-block-post-content, main { overflow-x: clip; }

/* Header and footer */
.tt-header {
	border-bottom: var(--tape-w) solid var(--tape);
	background: var(--floor);
}
.tt-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--floor); }
.tt-footer {
	border-top: var(--tape-w) solid var(--tape);
	background: var(--floor);
}
.tt-footer a { color: var(--bone); text-decoration: none; }
.tt-footer a:hover { color: var(--tape); }
.tt-footer .tt-legal { color: var(--steel); }

/* Tape corners: four L-brackets in tape yellow over a hairline box */
.zone {
	position: relative;
	border: 1px solid var(--hair);
	padding: clamp(1.5rem, 3.5vw, 3rem);
	background:
		linear-gradient(var(--tape), var(--tape)) top left / var(--corner) var(--tape-w) no-repeat,
		linear-gradient(var(--tape), var(--tape)) top left / var(--tape-w) var(--corner) no-repeat,
		linear-gradient(var(--tape), var(--tape)) top right / var(--corner) var(--tape-w) no-repeat,
		linear-gradient(var(--tape), var(--tape)) top right / var(--tape-w) var(--corner) no-repeat,
		linear-gradient(var(--tape), var(--tape)) bottom left / var(--corner) var(--tape-w) no-repeat,
		linear-gradient(var(--tape), var(--tape)) bottom left / var(--tape-w) var(--corner) no-repeat,
		linear-gradient(var(--tape), var(--tape)) bottom right / var(--corner) var(--tape-w) no-repeat,
		linear-gradient(var(--tape), var(--tape)) bottom right / var(--tape-w) var(--corner) no-repeat;
}
/* Fully taped zone: the featured plan and the exit zone */
.zone.is-taped {
	border: var(--tape-w) solid var(--tape);
	background: var(--floor-2);
}
.zone.is-flush { padding: 0; }

/* Floor plan grid for the home hero */
.floor-plan {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.floor-plan > * { margin: 0 !important; min-width: 0; }
.floor-plan .zone-headline { grid-column: 1 / span 7; grid-row: 1; }
.floor-plan .zone-console { grid-column: 8 / span 5; grid-row: 1 / span 2; }
.floor-plan .zone-exit { grid-column: 1 / span 7; grid-row: 2; align-self: stretch; }
.floor-plan .zone-entrena { grid-column: 1 / span 7; }
.floor-plan .zone-protege { grid-column: 8 / span 5; }
.floor-plan .zone-evoluciona { grid-column: 1 / -1; display: grid; grid-template-columns: 5fr 7fr; gap: 0 clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.floor-plan .zone-evoluciona > .wp-block-heading, .floor-plan .zone-evoluciona > p:not(.plate) { grid-column: 1; }
.floor-plan .zone-evoluciona > .plate, .floor-plan .zone-evoluciona > .mock { grid-column: 2; }
.floor-plan .zone-evoluciona > .plate { grid-row: 1; }
.floor-plan .zone-evoluciona > .mock { grid-row: 2 / span 3; }
@media (max-width: 900px) {
	.floor-plan .zone-headline,
	.floor-plan .zone-console,
	.floor-plan .zone-exit,
	.floor-plan .zone-entrena,
	.floor-plan .zone-protege { grid-column: 1 / -1; grid-row: auto; }
	.floor-plan .zone-evoluciona { display: block; }
}

/* Stencil labels and hazard tape */
.stencil { font-family: var(--stencil); font-weight: 900; text-transform: uppercase; line-height: 0.95; }
.tape-rule {
	height: 14px;
	border: 0;
	margin: 0;
	background: repeating-linear-gradient(-45deg, var(--tape) 0 14px, var(--floor) 14px 28px);
	opacity: 1;
}
.plate {
	display: inline-block;
	font: 700 0.75rem/1 var(--wp--preset--font-family--barlow);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--floor);
	background: var(--tape);
	padding: 0.35em 0.6em;
	border-radius: 2px;
}
.plate.is-outline { background: transparent; color: var(--tape); outline: 1px solid var(--tape); }
.placeholder-note { color: var(--steel); font-size: var(--wp--preset--font-size--xs); }

/* Tape-square lists */
.tape-list { list-style: none; margin: 0; padding: 0; }
.tape-list li { position: relative; padding: 0.45em 0 0.45em 1.6em; border-bottom: 1px solid var(--hair); }
.tape-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.95em;
	width: 0.6em;
	height: 0.6em;
	background: var(--tape);
}

/* Count-up numeral (one authored motion moment) */
@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }
.count { --n: var(--to, 0); counter-reset: n var(--n); }
.count::before { content: counter(n); }
@media (prefers-reduced-motion: no-preference) {
	.count { animation: count-up 1.8s var(--ease-out) 0.2s backwards; }
	@keyframes count-up { from { --n: 0; } }
}

/* Jersey number: member level */
.jersey {
	font-family: var(--stencil);
	font-weight: 900;
	font-size: clamp(6rem, 16vw, 11rem);
	line-height: 0.85;
	color: var(--bone);
	-webkit-text-stroke: 3px var(--tape);
	paint-order: stroke fill;
}

/* Synthetic product UI (decorative, labelled as example) */
.mock {
	font-size: 0.8125rem;
	color: var(--bone);
	background: var(--floor-2);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
}
.mock * { margin: 0; }
.mock-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); color: var(--steel); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mock-live { color: var(--tape); font-weight: 700; }
.mock-body { padding: 1rem; display: grid; gap: 1rem; }
.mock-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--hair); }
.mock-row:last-child { border-bottom: 0; }
.mock-row b { font-variant-numeric: tabular-nums; }
.mock-big { font-family: var(--stencil); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--tape); font-variant-numeric: tabular-nums; }
.mock-label { color: var(--steel); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mock-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 120px; align-items: end; }
.mock-bars div { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; text-align: center; }
.mock-bars i { display: block; background: var(--line); border-radius: 1px 1px 0 0; height: var(--h); }
.mock-bars i.is-now { background: var(--tape); }
.mock-bars span { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); }
.mock-alert { padding: 0.7rem 0.85rem; background: var(--floor); outline: 1px solid var(--tape); }
.mock-alert strong { color: var(--tape); }
.mock-phone { max-width: 260px; margin-inline: auto; border-radius: 22px; border: 2px solid var(--line); padding: 1.1rem 1rem; background: var(--floor); display: grid; gap: 0.8rem; }
.mock-progress { height: 8px; background: var(--line); border-radius: 1px; overflow: hidden; }
.mock-progress span { display: block; height: 100%; width: var(--w); background: var(--tape); }
.mock-medals { display: flex; gap: 0.5rem; }
.mock-medals span { flex: 1; text-align: center; padding: 0.5rem 0; border: 1px solid var(--line); font: 900 1.1rem/1 var(--stencil); color: var(--tape); }
.mock-medals span.is-locked { color: var(--line); border-style: dashed; }

/* Pricing: CSS-only monthly/annual toggle */
.billing-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; }
.billing-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.billing-toggle label {
	padding: 0.7em 1.3em;
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	color: var(--steel);
}
.billing-toggle input:checked + label { background: var(--tape); color: var(--floor); }
.billing-toggle input:focus-visible + label { outline: 3px solid var(--bone); outline-offset: 2px; }
.pricing .price-a { display: none; }
.pricing:has(#billing-annual:checked) .price-a { display: inline; }
.pricing:has(#billing-annual:checked) .price-m { display: none; }
.price { font-family: var(--stencil); font-weight: 900; font-size: clamp(3.25rem, 6vw, 4.75rem); line-height: 1; font-variant-numeric: tabular-nums; margin: 0; }
.price small { font: 500 0.9375rem/1 var(--wp--preset--font-family--barlow); color: var(--steel); margin-left: 0.4em; }
.plans { align-items: stretch; }
.plans > .wp-block-column { display: flex; flex-direction: column; }
.plans .zone { flex: 1; }
.plans .is-featured { transform: translateY(-1rem); }
@media (max-width: 781px) { .plans .is-featured { transform: none; } }

/* Contact form (markup only) */
.tt-form { display: grid; gap: 1.1rem; }
.tt-form .field { display: grid; gap: 0.4rem; }
.tt-form label { font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; }
.tt-form .req { color: var(--tape); }
.tt-form input, .tt-form select, .tt-form textarea {
	width: 100%;
	font: inherit;
	color: var(--bone);
	background: var(--floor);
	border: 1px solid var(--line);
	border-radius: 2px;
	padding: 0.85em 0.9em;
	min-height: 3rem;
}
.tt-form input::placeholder, .tt-form textarea::placeholder { color: var(--steel); opacity: 1; }
.tt-form input:hover, .tt-form select:hover, .tt-form textarea:hover { border-color: var(--steel); }
.tt-form input:disabled, .tt-form select:disabled, .tt-form textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.tt-form .is-invalid { border-color: #ff7a59; }
.tt-form .error-msg { display: none; color: #ff9a80; font-size: 0.875rem; }
.tt-form .is-invalid ~ .error-msg { display: block; }
.tt-form .form-status { display: none; padding: 0.8rem 1rem; outline: 1px solid var(--tape); }
.tt-form .form-status.is-visible { display: block; }
.tt-submit {
	font: 700 0.9375rem/1 var(--wp--preset--font-family--barlow);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: var(--tape);
	color: var(--floor);
	border: 0;
	border-radius: 2px;
	padding: 1.1em 1.8em;
	cursor: pointer;
	justify-self: start;
	transition: background 0.2s var(--ease-out);
}
.tt-submit:hover { background: var(--bone); }
.tt-submit:disabled { opacity: 0.5; cursor: progress; }

/* Steps with taped numerals (sequence carries information) */
.tt-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.tt-steps li { counter-increment: step; position: relative; padding: 1rem 0 1rem 3.4rem; border-bottom: 1px solid var(--hair); }
.tt-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0.75rem;
	font: 900 2rem/1 var(--stencil);
	color: var(--floor);
	background: var(--tape);
	width: 2.4rem;
	height: 2.4rem;
	display: grid;
	place-items: center;
}
.tt-steps strong { display: block; }

/* Buttons: outlined secondary */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--bone);
	border: 1px solid var(--bone);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--tape); color: var(--tape); }

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}

/* Exit zone: headline on top, actions lower right */
.zone-exit { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.zone-exit .wp-block-buttons { justify-content: flex-end; }
.zone-headline h1 { margin-top: 0; text-wrap: balance; }
.ledger-row { border-top: var(--tape-w) solid var(--tape); padding-block: clamp(1.5rem, 3vw, 2.5rem); }

/* Inspection fixes: mock spacing, hero console fill, left-aligned page intros */
.mock-phone *, .tube, .tube * { margin: 0; }
.mock-phone .jersey { margin-block: 0.25rem; }
.zone-console { display: flex; flex-direction: column; gap: 0.75rem; }
.zone-console .plate { align-self: flex-start; margin: 0; }
.zone-console .mock { flex: 1; display: flex; flex-direction: column; }
.zone-console .mock-body { flex: 1; align-content: space-between; }
.zone .plate { margin-bottom: 0.75rem; }
.zone-console .plate { margin-bottom: 0; }
.intro, .intro-zone > * { max-width: 46rem; margin-inline: 0 !important; }
.intro > * { margin-inline: 0 !important; }
.intro-zone > * { margin-inline: 0 !important; }
.zone-console .mock-body { align-content: normal; grid-template-rows: auto 1fr auto auto; }
.zone-console .mock-bars { height: auto; min-height: 96px; }
.tt-form input, .tt-form select, .tt-form textarea { box-sizing: border-box; }

/* Review batch */
.zone-console > * { margin-inline: 0 !important; max-width: none !important; width: 100%; }
.zone-console > .plate { width: auto; align-self: flex-start; }
.zone-entrena > .mock, .zone-entrena > .plate, .zone-protege > .plate, .zone-protege > .mock-phone { margin-top: 1.5rem; }
.zone-protege > .plate { margin-top: 1.5rem; }
.zone-entrena > .plate, .zone-evoluciona > .plate { margin-top: 1.5rem; }
.zone-evoluciona > .plate { margin-top: 0; }
.mock-body .mock-progress { margin: -0.25rem 0 0.4rem; }

/* Angled and crossing tape as divider */
.tape-cross {
	position: relative;
	height: 64px;
	margin-block: 0.5rem;
	background:
		linear-gradient(var(--tape), var(--tape)) left 0 top 38% / 100% var(--tape-w) no-repeat,
		linear-gradient(to top right, transparent calc(50% - 2px), var(--tape) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) 62% 0 / 96px 100% no-repeat;
}
/* Intro alignment: beat the layout engine's centering */
.zone.intro-zone > * { margin-inline: 0 !important; max-width: 46rem; }
.pricing > .intro.wp-block-group { margin-inline: 0 !important; max-width: 46rem; margin-bottom: 2.5rem; }
.pricing .billing-toggle { margin-top: 1.5rem; }
.pricing .plans { margin-top: 1.5rem; }

/* Pricing alignment */
.plans .zone { display: flex; flex-direction: column; }
.plans .zone .wp-block-buttons { margin-top: auto; padding-top: 1.75rem; }
.price.is-text { font-size: clamp(2.25rem, 4vw, 3.25rem); text-transform: uppercase; padding-block: 0.4rem; }
.price { text-transform: uppercase; }

/* Contact hierarchy */
.tt-steps li { color: var(--steel); }
.tt-steps strong { color: var(--bone); font-size: 1.0625rem; margin-bottom: 0.2rem; }
.wp-block-column h2.has-xl-font-size { margin-top: 2.75rem; margin-bottom: 0.9rem; }
.zone h2.has-xl-font-size:first-child { margin-top: 0; }
.wp-block-buttons.jump-form { display: none; }
@media (max-width: 781px) { .wp-block-buttons.jump-form { display: flex; } }

/* Small screens: keep the display headline inside its frame */
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 480px) {
	.zone-headline h1 { font-size: 2.6rem; }
	.wp-block-heading { hyphens: manual; }
}
.plans .zone > .plate, .zone-evoluciona > .plate { align-self: flex-start; justify-self: start; width: auto; }
.plans .is-featured { transform: none; }
