/* ==========================================================================
   Coninplag theme — layout & editorial details.
   Tokens live in theme.json; components (tags, courses, forms) in the plugin.
   ========================================================================== */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .wp-block-post-title, .wp-block-site-title { font-stretch: 108%; text-wrap: balance; }
p { text-wrap: pretty; }
img { height: auto; }
::selection { background: var(--wp--preset--color--signal); color: var(--wp--preset--color--ink); }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--signal);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--wp--preset--color--ink);
	border-radius: 4px;
}

.skip-link:focus { background: var(--wp--preset--color--signal); color: var(--wp--preset--color--ink); }

/* ---------- Eyebrow (mono label) ---------- */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 0.9rem !important;
	display: flex; align-items: center; gap: 10px;
	opacity: .9;
}
.is-style-eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; flex: none; }
.has-petrol-background-color .is-style-eyebrow,
.has-ink-background-color .is-style-eyebrow { color: var(--wp--preset--color--signal); }

/* ---------- Header ---------- */
body > .wp-site-blocks > header:first-child,
.wp-site-blocks > .wp-block-template-part:first-child { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > .wp-block-template-part:first-child { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > .wp-block-template-part:first-child { top: 0; } }
.site-header { transition: box-shadow .2s; border-bottom: 1px solid transparent; }
.is-scrolled .site-header { box-shadow: 0 8px 24px -18px rgba(0,0,0,.5); border-bottom-color: var(--wp--preset--color--line); }
.site-brand .wp-block-site-logo img { width: 44px; height: auto; }
.site-brand__name { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; font-stretch: 118%; line-height: 1; }
.site-brand__name a { color: var(--wp--preset--color--petrol); text-decoration: none; }
.site-nav a { text-decoration: none; }
.site-nav .wp-block-navigation-item__content { padding: .5em 0; position: relative; }
.site-nav .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
	background: var(--wp--preset--color--signal); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.site-nav .wp-block-navigation-item__content:hover::after,
.site-nav .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.site-header__cta .wp-block-button__link { padding: .65em 1.15em; font-size: .92rem; }
@media (max-width: 900px) {
	.site-header .site-header__cta { display: none !important; }
}
.wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display); font-size: 1.8rem; font-weight: 700; font-stretch: 112%;
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { padding: 8px; }

/* ---------- Page band ---------- */
.page-band { position: relative; overflow: hidden; }
.page-band::after {
	/* monitoring grid: the plan view technicians draw bait stations on */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.page-band > * { position: relative; z-index: 1; }
.page-band h1 { margin: 0; font-size: var(--wp--preset--font-size--xx-large); }
.page-band__lead { margin-top: 1rem; font-size: var(--wp--preset--font-size--large); max-width: 60ch; opacity: .9; }
.page-band .wp-block-post-excerpt__more-text { display: none; }
.page-band .wp-block-search__input { border-radius: 999px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at 80% 40%, #000 0%, transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero__title { margin: 0; font-weight: 800; line-height: .98; letter-spacing: -.025em; font-stretch: 112%; }
.hero__title mark { background: none; color: var(--wp--preset--color--signal); }
.hero__lead { max-width: 52ch; opacity: .9; margin: 1.25rem 0 2rem; }
.hero .cnp-finder__note { color: #cfe3e0; }

/* Hero: three member tags, fanned like cards clipped to a board */
.hero__stack .cnp-grid { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 360px; margin-inline: auto; }
.hero__stack .cnp-tag { box-shadow: inset 0 0 0 1px var(--wp--preset--color--line), 0 30px 60px -30px rgba(0,0,0,.6); }
.hero__stack .cnp-tag:nth-child(1) { transform: rotate(-4deg) translateX(-18px); z-index: 1; }
.hero__stack .cnp-tag:nth-child(2) { transform: rotate(2.5deg) translateX(22px); margin-top: -10px; z-index: 2; }
.hero__stack .cnp-tag:nth-child(3) { transform: rotate(-1.5deg); margin-top: -10px; z-index: 3; }
.hero__stack .cnp-tag:hover { transform: rotate(0) translateY(-6px); z-index: 4; }
.hero__stack .cnp-tag__actions { display: none; }
.hero__stack .cnp-tag__strip { background: var(--wp--preset--color--signal); color: var(--wp--preset--color--ink); }
.hero__stack .cnp-tag__code { color: var(--wp--preset--color--ink); }
.hero__stack .cnp-tag__hole { background: var(--wp--preset--color--petrol); box-shadow: none; }
@media (max-width: 781px) {
	.hero__stack { display: none; }
}
.hero__stack:not(:has(.cnp-tag)) { display: none; }
.hero .wp-block-columns:not(:has(.cnp-tag)) > .wp-block-column { flex-basis: 100% !important; }
@media (prefers-reduced-motion: no-preference) {
	.hero__stack .cnp-tag { animation: tag-in .7s cubic-bezier(.2,.8,.2,1) both; }
	.hero__stack .cnp-tag:nth-child(2) { animation-delay: .12s; }
	.hero__stack .cnp-tag:nth-child(3) { animation-delay: .24s; }
	@keyframes tag-in { from { opacity: 0; translate: 0 40px; } }
}

/* ---------- Buttons: styles ---------- */
.wp-block-button.is-style-signal .wp-block-button__link { background: var(--wp--preset--color--signal); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-signal .wp-block-button__link:hover { background: color-mix(in srgb, var(--wp--preset--color--signal) 82%, #fff); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: currentColor; box-shadow: inset 0 0 0 2px currentColor; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--petrol); color: #fff; box-shadow: inset 0 0 0 2px var(--wp--preset--color--petrol); }
.wp-block-button__link { transition: background-color .15s, color .15s, box-shadow .15s; text-decoration: none; }

/* ---------- Card group ---------- */
.is-style-card {
	background: var(--wp--preset--color--white);
	border-radius: 14px;
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--line);
	padding: clamp(20px, 3vw, 36px);
}

/* ---------- Lists ---------- */
.is-style-checks { list-style: none; padding-left: 0; }
.is-style-checks li { position: relative; padding-left: 34px; margin-bottom: .7rem; }
.is-style-checks li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%;
	background: var(--wp--preset--color--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-9' fill='none' stroke='%23101b1c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.steps { list-style: none; padding: 0; counter-reset: step; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.steps li::before {
	content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
	display: grid; place-items: center; background: var(--wp--preset--color--petrol); color: var(--wp--preset--color--signal);
	font: 500 .9rem/1 var(--wp--preset--font-family--mono);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 2px; background: var(--wp--preset--color--line); }
.steps strong { display: block; font-family: var(--wp--preset--font-family--display); font-stretch: 106%; }

/* ---------- Home sections ---------- */
.roles { border-top: 2px solid var(--wp--preset--color--ink); padding-top: var(--wp--preset--spacing--40); }
.roles__item h3 { margin-top: 0; font-size: 1.35rem; }
.roles__item p:last-child { color: var(--wp--preset--color--muted); }
.cta-band h2 { margin-top: 0; }
.cta-band p { margin-bottom: 0; }

/* ---------- Nosotros ---------- */
.lead { font-weight: 500; }
.mission p.has-large-font-size { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-stretch: 104%; line-height: 1.3; margin: 0; }
.board { gap: 1px !important; background: var(--wp--preset--color--line); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--wp--preset--color--line); }
.board__item { background: var(--wp--preset--color--white); padding: 18px 20px; }
.board__item .is-style-eyebrow { margin-bottom: .4rem !important; color: var(--wp--preset--color--muted); }
.board__item .is-style-eyebrow::before { display: none; }
.board__name { margin: 0; font-weight: 600; }

/* ---------- Contacto ---------- */
.contact-panel { border-radius: 16px; position: sticky; top: 100px; }
.contact-panel .cnp-social { margin-top: 20px; }

/* ---------- Single capacitación ---------- */
.course-layout__aside { position: sticky; top: 100px; align-self: flex-start; }
.course-layout__aside > .is-style-eyebrow { margin-top: var(--wp--preset--spacing--50) !important; }
.course-body { margin-block: var(--wp--preset--spacing--50) !important; }
@media (max-width: 781px) { .course-layout__aside, .contact-panel { position: static; } }

/* ---------- Credencial ---------- */
.cred-main__eyebrow { justify-content: center; color: var(--wp--preset--color--muted); }

/* ---------- Blog ---------- */
.post-grid { gap: clamp(20px, 3vw, 32px) !important; }
.post-card { height: 100%; }
.post-card .wp-block-post-featured-image { margin: 0 0 .5rem; border-radius: 10px; overflow: hidden; background: var(--wp--preset--color--mist); }
.post-card .wp-block-post-featured-image img { transition: transform .4s; }
.post-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.post-card .wp-block-post-title { margin: 0; }
.post-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.post-card .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-card .wp-block-post-excerpt { color: var(--wp--preset--color--muted); }
.post-card .wp-block-post-excerpt__more-text { display: none; }
.wp-block-post-terms a { text-decoration: none; color: var(--wp--preset--color--petrol-2); }
.single-tags { margin-top: var(--wp--preset--spacing--50); }

/* ---------- Footer ---------- */
.site-footer .cnp-brand { margin-bottom: 1.1rem; }
.site-footer a { color: inherit; }
.site-footer__name { margin: 0 0 1rem; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.6rem; font-stretch: 118%; }
.site-footer__name a { text-decoration: none; }
.site-footer__lead { opacity: .75; max-width: 40ch; }
.site-footer__links { list-style: none; padding: 0; margin: 0; }
.site-footer__links li { margin-bottom: .55rem; }
.site-footer__links a { text-decoration: none; opacity: .85; }
.site-footer__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.site-footer .cnp-datos li { padding: 10px 0; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); opacity: .7; }
.site-footer__bottom p { margin: 0; }

/* ---------- Search form ---------- */
.wp-block-search__input { min-height: 48px; border: 1.5px solid var(--wp--preset--color--line); border-radius: 8px; padding: 0 14px; font: inherit; }
.wp-block-search__button { border-radius: 8px; margin-left: 8px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
