/*
Theme Name: Haz Marca Elementor
Theme URI: https://hazmarcacomunicacion.com/
Description: Tema hijo de Hello Elementor para Haz Marca Comunicación. Contiene las fuentes, los efectos visuales (degradados, tarjetas, collage, cinta) y las animaciones de scroll; el contenido, colores y tipografías se editan desde Elementor.
Author: Haz Marca Comunicación
Template: hello-elementor
Version: 1.0.0
Requires at least: 6.7
Text Domain: hazmarca-elementor
*/

/* ---------- Fonts (self-hosted; Google Fonts are disabled in Elementor) ---------- */
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/urbanist.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("assets/fonts/urbanist-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter.woff2") format("woff2"); }

/* Same tokens as the Elementor global colors, for effects that controls cannot express. */
:root {
	--hm-bg: var(--e-global-color-hmbg, #F6F9F7);
	--hm-surface: var(--e-global-color-hmsurface, #FFFFFF);
	--hm-mist: var(--e-global-color-hmmist, #E4F3EE);
	--hm-ink: var(--e-global-color-secondary, #151620);
	--hm-ink-soft: var(--e-global-color-hminksoft, #4A4D5A);
	--hm-accent: var(--e-global-color-primary, #2AAB96);
	--hm-accent-deep: var(--e-global-color-accent, #1E7F70);
	--hm-leaf: var(--e-global-color-hmleaf, #52B154);
	--hm-sun: var(--e-global-color-hmsun, #FAB94C);
	--hm-line: var(--e-global-color-hmline, #DCE5E1);
	--hm-brand: linear-gradient(120deg, var(--hm-accent) 0%, var(--hm-leaf) 60%, var(--hm-sun) 100%);
	--hm-radius: 28px;
	--hm-ease: cubic-bezier(.2, .7, .2, 1);
}

::selection { background: var(--hm-accent); color: #fff; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
p { text-wrap: pretty; }
h1, h2, h3, .elementor-heading-title { text-wrap: balance; }
.elementor-widget-text-editor p:last-child, .elementor-widget-text-editor ul:last-child { margin-bottom: 0; }
.elementor-widget-text-editor a { text-underline-offset: .15em; }
/* The long email address shrinks on narrow phones instead of running off the edge. */
.elementor-widget-text-editor a[href^="mailto:"] { font-size: min(1em, 5.6vw); }
/* Two columns plus their gap must fit the row: let them shrink instead of overflowing. */
.hm-row > .e-con { flex-shrink: 1; min-width: 0; }

/* Mark highlight in headings: brand underline stroke */
.elementor-heading-title mark {
	background: linear-gradient(transparent 68%, color-mix(in srgb, var(--hm-sun) 70%, transparent) 68%, color-mix(in srgb, var(--hm-sun) 70%, transparent) 92%, transparent 92%);
	color: inherit;
	padding: 0 .06em;
}
.hm-ink .elementor-heading-title mark { background: none; color: var(--hm-accent); }

/* ---------- Buttons ---------- */
.elementor-button { transition: transform .25s var(--hm-ease), background-color .25s, color .25s, border-color .25s; white-space: nowrap; }
.elementor-button:hover { transform: translateY(-2px); }
.hm-btn-outline .elementor-button { background: transparent; color: currentColor; border: 1.5px solid currentColor; }
.hm-btn-outline .elementor-button:hover { background: var(--hm-ink); color: #fff; border-color: var(--hm-ink); }
.hm-ink .elementor-widget-button:not(.hm-btn-outline) .elementor-button:hover { background: #fff; color: var(--hm-ink); }
.hm-ink .hm-btn-outline .elementor-button:hover { background: #fff; color: var(--hm-ink); border-color: #fff; }

/* ---------- Header ---------- */
.elementor-location-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .elementor-location-header { top: var(--wp-admin--admin-bar--height, 32px); }
.hm-header {
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	background: color-mix(in srgb, var(--hm-bg) 82%, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--hm-line) 70%, transparent);
}
.hm-header .hm-logo img { width: 100%; max-height: 46px; object-fit: contain; object-position: left center; }
.hm-header .hm-nav .elementor-nav-menu--main { justify-content: center; }
.hm-header .elementor-nav-menu--dropdown { border-radius: 0 0 var(--hm-radius) var(--hm-radius); box-shadow: 0 24px 48px -24px rgba(21, 22, 32, .22); }

/* ---------- Section styles ---------- */
.hm-mesh { position: relative; isolation: isolate; overflow: hidden; }
.hm-mesh::before {
	content: "";
	position: absolute;
	inset: -20%;
	z-index: -1;
	background:
		radial-gradient(38% 42% at 12% 22%, color-mix(in srgb, var(--hm-accent) 45%, transparent), transparent 70%),
		radial-gradient(34% 40% at 88% 18%, color-mix(in srgb, var(--hm-sun) 50%, transparent), transparent 70%),
		radial-gradient(40% 45% at 70% 92%, color-mix(in srgb, var(--hm-leaf) 38%, transparent), transparent 70%);
	filter: blur(30px);
	animation: hm-drift 22s ease-in-out infinite alternate;
	pointer-events: none;
}
@keyframes hm-drift {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}

.hm-ink { position: relative; isolation: isolate; overflow: hidden; color: var(--hm-bg); }
.hm-ink::before {
	content: "";
	position: absolute;
	width: 60vmax; height: 60vmax;
	right: -22vmax; top: -30vmax;
	z-index: -1;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--hm-accent) 34%, transparent), transparent);
	pointer-events: none;
}
.hm-ink :where(p, li, .elementor-icon-list-text) { color: color-mix(in srgb, #fff 78%, var(--hm-ink)); }
.hm-ink :where(h1, h2, h3, h4, h5, h6, strong, .elementor-heading-title) { color: #fff; }
.hm-ink .elementor-widget-text-editor a { color: var(--hm-accent); }

.hm-card { transition: transform .35s var(--hm-ease), box-shadow .35s var(--hm-ease), border-color .35s; }
.hm-card:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--hm-accent) 45%, var(--hm-line)) !important;
	box-shadow: 0 24px 48px -28px rgba(21, 22, 32, .28);
}
.hm-ink .hm-card { background-color: color-mix(in srgb, #fff 6%, var(--hm-ink)) !important; border-color: color-mix(in srgb, #fff 12%, transparent) !important; }
.hm-ink .hm-card :where(p, li) { color: color-mix(in srgb, #fff 72%, var(--hm-ink)); }

/* Accent card (call to action tile) */
.hm-accent { color: var(--hm-ink); transition: transform .35s var(--hm-ease); }
.hm-accent:hover { transform: translateY(-4px) rotate(-.6deg); }
.hm-accent a, .hm-accent .elementor-heading-title { color: inherit; }

/* ---------- Service cards ---------- */
.hm-service { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--hm-radius); color: #fff; text-decoration: none; }
.hm-service > .hm-service__img { position: absolute !important; inset: 0; z-index: -2; margin: 0; width: 100% !important; max-width: none !important; }
.hm-service > .hm-service__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .8s var(--hm-ease); }
.hm-service::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(21, 22, 32, 0) 25%, rgba(21, 22, 32, .88) 100%);
}
.hm-service:hover > .hm-service__img img { transform: scale(1.06); }
.hm-service :where(.elementor-heading-title, p) { color: #fff; }
.hm-service .elementor-widget-heading .elementor-heading-title::before {
	content: "↗"; float: right; margin-left: .5rem;
	display: inline-grid; place-items: center;
	width: 2.4rem; height: 2.4rem; border-radius: 999px;
	background: var(--hm-accent); color: var(--hm-ink);
	font-size: 1.1rem; line-height: 1; transition: transform .35s var(--hm-ease);
}
.hm-service:hover .elementor-heading-title::before { transform: rotate(45deg); }

/* ---------- Images ---------- */
.hm-tilt-left img, .hm-tilt-right img { box-shadow: 0 30px 60px -30px rgba(21, 22, 32, .45); transition: transform .6s var(--hm-ease); }
.hm-tilt-left { transform: rotate(-3deg); }
.hm-tilt-right { transform: rotate(3deg); }
.hm-tilt-left:hover img, .hm-tilt-right:hover img { transform: scale(1.02); }
.hm-spin img { border-radius: 999px; animation: hm-spin 26s linear infinite; }
@keyframes hm-spin { to { transform: rotate(360deg); } }

/* Hero collage: two overlapping photos plus the badge */
.hm-collage { display: block !important; position: relative; min-height: 460px; }
.hm-collage > .elementor-widget-image { margin: 0; }
.hm-collage > .elementor-widget-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hm-collage > .elementor-widget-image:nth-child(1) { width: 78%; margin-left: auto; position: relative; z-index: 1; }
.hm-collage > .elementor-widget-image:nth-child(2) { width: 54%; position: absolute; left: 0; bottom: -4%; z-index: 2; }
.hm-collage > .elementor-widget-image:nth-child(2) img { aspect-ratio: 1; border: 6px solid var(--hm-bg); }
.hm-collage > .elementor-widget-image:nth-child(3) { width: 132px; position: absolute; right: -10px; bottom: 6%; z-index: 3; }
.hm-collage > .elementor-widget-image:nth-child(3) img { aspect-ratio: 1; }
@media (max-width: 767px) {
	.hm-collage { min-height: 0; margin-top: 1.5rem; padding-bottom: 2.5rem; }
	.hm-collage > .elementor-widget-image:nth-child(1) { width: 82%; }
	.hm-collage > .elementor-widget-image:nth-child(2) { width: 50%; }
	.hm-collage > .elementor-widget-image:nth-child(3) { width: 96px; right: 0; }
}

/* ---------- Lists ---------- */
.hm-checks .elementor-icon-list-item { align-items: flex-start !important; }
/* Elementor puts the text indent inside the icon box; keep the circle square and the gap on the text instead. */
.hm-checks .elementor-icon-list-icon {
	flex: none; display: inline-grid !important; place-items: center;
	box-sizing: border-box; width: 1.25rem; height: 1.25rem; padding: 0 !important;
	margin-top: calc((1lh - 1.25rem) / 2); border-radius: 999px;
	background: var(--hm-accent);
}
.hm-checks .elementor-icon-list-icon svg { display: block; width: .7rem !important; height: .7rem !important; margin: 0 !important; fill: var(--hm-ink); }
.hm-checks .elementor-icon-list-text { padding-inline-start: .7rem !important; }
.hm-links a { text-decoration: none; }
.hm-links .elementor-icon-list-icon { display: none; }

/* ---------- Marquee ---------- */
.hm-marquee { overflow: hidden; color: var(--hm-surface); }
.hm-marquee > .hm-marquee__track { width: max-content !important; max-width: none; animation: hm-marquee 38s linear infinite; }
.hm-marquee:hover > .hm-marquee__track { animation-play-state: paused; }
.hm-marquee__track > .elementor-widget-heading .elementor-heading-title {
	white-space: nowrap; color: var(--hm-surface);
	font-family: "Urbanist", sans-serif; font-weight: 700;
	font-size: clamp(1.75rem, 4vw, 3.25rem); letter-spacing: -.02em; line-height: 1;
	padding-right: 1.25em;
}
.hm-marquee__track .elementor-heading-title::after { content: "✦"; color: var(--hm-accent); padding-left: 1.25em; }
@keyframes hm-marquee { to { transform: translateX(-50%); } }

/* ---------- Big numbers ---------- */
.hm-num { flex-shrink: 0; max-width: 100%; }
.hm-num .elementor-heading-title {
	font-family: "Urbanist", sans-serif;
	font-weight: 800; line-height: .9; letter-spacing: -.04em;
	background: var(--hm-brand);
	-webkit-background-clip: text; background-clip: text; color: transparent !important;
	/* Never split "02" or "12.000 €" across lines; inline-block so the gradient spans the digits, not the column. */
	white-space: nowrap; display: inline-block;
	/* Tight tracking pulls the box in past the last glyph; pad it so the clipped gradient keeps the whole digit. */
	padding: .04em .12em .06em .02em; margin-right: -.12em;
}

/* ---------- FAQ (toggle) ---------- */
.hm-faq .elementor-toggle-item { border-bottom: 1px solid var(--hm-line); padding: 1.25rem 0; }
.hm-faq .elementor-toggle-item + .elementor-toggle-item { margin-top: 0; }
.hm-faq .elementor-tab-title {
	display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 1rem;
	padding: 0; border: 0;
	font-family: "Urbanist", sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.25; color: var(--hm-ink);
}
.hm-faq .elementor-tab-title a { color: inherit; outline: none; }
.hm-faq .elementor-tab-title:focus, .hm-faq .elementor-toggle-title:focus { outline: none; }
.hm-faq .elementor-tab-title:has(.elementor-toggle-title:focus-visible) { outline: 2px solid var(--hm-accent); outline-offset: 6px; border-radius: 10px; }
.hm-faq .elementor-toggle-icon {
	flex: none; display: grid !important; place-items: center; float: none !important;
	width: 2rem !important; height: 2rem; margin: 0 !important; border-radius: 999px;
	background: var(--hm-surface); box-shadow: inset 0 0 0 1px var(--hm-line); transition: background-color .3s, box-shadow .3s;
	line-height: 0; font-size: 0;
}
.hm-faq .elementor-toggle-icon :is(.elementor-toggle-icon-closed, .elementor-toggle-icon-opened) { width: auto; line-height: 0; }
.hm-faq .elementor-toggle-icon svg { display: block; width: .75rem !important; height: .75rem !important; margin: 0 !important; fill: var(--hm-accent-deep); }
.hm-faq .elementor-active .elementor-toggle-icon { background: var(--hm-accent); box-shadow: none; }
.hm-faq .elementor-active .elementor-toggle-icon svg { fill: var(--hm-ink); }
.hm-faq .elementor-tab-content { padding: .75rem 0 0; border: 0; color: var(--hm-ink-soft); max-width: 62ch; }

/* ---------- Legal text ---------- */
.hm-legal :where(h2, h3, h4, h5, h6) { font-family: "Urbanist", sans-serif; }
.hm-legal ul, .hm-legal ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.hm-legal :where(p, li) { overflow-wrap: anywhere; }
.hm-table { overflow-x: auto; margin: 0 0 1.25rem; }
.hm-table table { min-width: 640px; border-collapse: collapse; font-size: .875rem; }
.hm-table :where(th, td) { border: 1px solid var(--hm-line); padding: .6rem .75rem; vertical-align: top; text-align: left; }

/* ---------- Pricing card (Kit Digital) ---------- */
.hm-plan > .elementor-widget-button { margin-top: auto; padding-top: 1rem; }
.hm-plan--featured { transform: translateY(-12px); }
@media (max-width: 767px) { .hm-plan--featured { transform: none; } }

/* ---------- Contact Form 7 ---------- */
.hm-form { color: var(--hm-ink); }
.hm-ink .hm-form :where(p, li, label, h2, h3, .elementor-heading-title) { color: var(--hm-ink); }
.hm-ink .hm-form a { color: var(--hm-accent-deep); }
.hm-form .wpcf7-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hm-form .wpcf7-form > p { margin: 0; }
.hm-form .hm-f-full, .hm-form .wpcf7-form > .wpcf7-response-output, .hm-form .wpcf7-form > p:has(textarea), .hm-form .wpcf7-form > p:has(.wpcf7-submit), .hm-form .wpcf7-form > p:has(.wpcf7-acceptance) { grid-column: 1 / -1; }
.hm-form label { display: block; font-size: .875rem; font-weight: 600; color: var(--hm-ink); }
.hm-form .wpcf7-form-control-wrap { display: block; margin-top: .35rem; }
.hm-form :is(input[type=text], input[type=email], input[type=tel], textarea) {
	width: 100%; box-sizing: border-box;
	font: inherit; color: var(--hm-ink);
	background: var(--hm-bg);
	border: 1px solid var(--hm-line);
	border-radius: 14px; padding: .85rem 1rem;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.hm-form textarea { min-height: 140px; resize: vertical; }
.hm-form :is(input, textarea):focus {
	outline: none; background: #fff; border-color: var(--hm-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--hm-accent) 22%, transparent);
}
.hm-form .wpcf7-acceptance label { font-weight: 400; color: var(--hm-ink-soft); display: flex; gap: .5rem; align-items: flex-start; }
.hm-form .wpcf7-list-item { margin: 0; }
.hm-form input[type=checkbox] { accent-color: var(--hm-accent-deep); width: 1.1rem; height: 1.1rem; margin-top: .2rem; }
.hm-form .wpcf7-submit {
	appearance: none; border: 0; cursor: pointer;
	background: var(--hm-ink); color: #fff;
	font-family: "Urbanist", sans-serif; font-weight: 700; font-size: 1.0625rem;
	border-radius: 999px; padding: 1rem 2rem;
	transition: transform .25s var(--hm-ease), background-color .25s;
}
.hm-form .wpcf7-submit:hover, .hm-form .wpcf7-submit:focus { background: var(--hm-accent-deep); color: #fff; transform: translateY(-2px); }
.hm-form .wpcf7-spinner { vertical-align: middle; }
.hm-form .wpcf7-not-valid-tip { font-size: .8rem; color: #B42318; margin-top: .25rem; }
.hm-form .wpcf7-response-output { margin: 0 !important; border-radius: 14px; padding: .75rem 1rem !important; font-size: .9rem; }
@media (max-width: 600px) { .hm-form .wpcf7-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.hm-footer a { color: inherit; text-decoration: none; }
.hm-footer a:hover { color: var(--hm-accent); }
.hm-footer__rule { opacity: .14; }
/* The big CTA sizes to its own column so "¿Hablamos?" always fits on one line. */
.hm-footer__cta-col { container-type: inline-size; }
.hm-footer__big .elementor-heading-title {
	font-family: "Urbanist", sans-serif;
	font-weight: 800; letter-spacing: -.04em; line-height: .95;
	white-space: nowrap; font-size: min(18cqi, 7.5rem);
}
.hm-footer__big .elementor-heading-title a { background: var(--hm-brand); -webkit-background-clip: text; background-clip: text; color: transparent !important; }

/* ---------- Scroll motion ----------
 * assets/motion.js tags elements with .hm-r (+ a variant) and adds .is-in when they enter the viewport.
 * Everything is hidden only under html.hm-js, so the page stays fully visible if the script never runs
 * (and in the Elementor editor, where the script is not loaded). */
.hm-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 100;
	background: var(--hm-brand);
	transform-origin: 0 50%; transform: scaleX(var(--hm-progress, 0));
	pointer-events: none;
}
.admin-bar .hm-progress { top: var(--wp-admin--admin-bar--height, 32px); }

.hm-js .hm-r {
	--d: calc(var(--i, 0) * 110ms);
	transition: opacity .9s var(--hm-ease) var(--d), translate 1.1s var(--hm-ease) var(--d), scale 1.1s var(--hm-ease) var(--d), rotate 1.1s var(--hm-ease) var(--d), clip-path 1.2s var(--hm-ease) var(--d), filter 1s var(--hm-ease) var(--d);
}
.hm-js .hm-r--up:not(.is-in) { opacity: 0; translate: 0 70px; }
.hm-js .hm-r--tile:not(.is-in) { opacity: 0; translate: 0 90px; scale: .9; rotate: -2deg; }
.hm-js .hm-r--title { clip-path: inset(-10% -5% -25% -5%); }
.hm-js .hm-r--title:not(.is-in) { opacity: 0; translate: 0 .6em; clip-path: inset(-10% -5% 100% -5%); filter: blur(6px); }
.hm-js .hm-r--img img { transition: clip-path 1.3s var(--hm-ease) var(--d), scale 1.6s var(--hm-ease) var(--d); clip-path: inset(0 0 0 0 round 28px); }
.hm-js .hm-r--img:not(.is-in) img { clip-path: inset(100% 0 0 0 round 28px); scale: 1.25; }
.hm-js .hm-r--left:not(.is-in) { opacity: 0; translate: -120px 0; rotate: -4deg; }
.hm-js .hm-r--right:not(.is-in) { opacity: 0; translate: 120px 0; rotate: 4deg; }
.hm-js .hm-r--pop { transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.hm-js .hm-r--pop:not(.is-in) { opacity: 0; scale: .3; translate: 0 30px; }
.hm-js .hm-r--title mark { background-size: 0% 100%; background-repeat: no-repeat; transition: background-size 1s var(--hm-ease) calc(var(--d) + .5s); }
.hm-js .hm-r--title.is-in mark { background-size: 100% 100%; }

/* Hero entrance on load */
.hm-js .hm-hero-in > * { transition: opacity 1s var(--hm-ease), translate 1.1s var(--hm-ease), clip-path 1.2s var(--hm-ease), filter 1s var(--hm-ease); transition-delay: calc(var(--i, 0) * 140ms + 100ms); }
.hm-js .hm-hero-in:not(.is-in) > * { opacity: 0; translate: 0 50px; filter: blur(8px); }
.hm-js .hm-collage.hm-hero-collage > .elementor-widget-image { transition: opacity 1s var(--hm-ease), translate 1.3s var(--hm-ease); transition-delay: calc(var(--i, 0) * 180ms + 350ms); }
.hm-js .hm-collage.hm-hero-collage:not(.is-in) > .elementor-widget-image:nth-child(1) { opacity: 0; translate: 80px 40px; }
.hm-js .hm-collage.hm-hero-collage:not(.is-in) > .elementor-widget-image:nth-child(2) { opacity: 0; translate: -80px 80px; }
.hm-js .hm-collage.hm-hero-collage:not(.is-in) > .elementor-widget-image:nth-child(3) { opacity: 0; translate: 0 0; scale: 0; }
.hm-collage > .elementor-widget-image:nth-child(3) { transition: scale 1s cubic-bezier(.34, 1.56, .64, 1) 1s, opacity .6s 1s; }

/* Scroll-linked layers (values written by motion.js) */
.hm-collage > .elementor-widget-image img { translate: 0 var(--hm-py, 0px); }
.hm-ink::before, .hm-mesh::before { translate: 0 var(--hm-glow, 0px); }
.hm-footer__big { scale: var(--hm-grow, 1); transform-origin: 0 100%; }
.hm-marquee { rotate: -1.5deg; scale: 1.04; }

@media (prefers-reduced-motion: reduce) {
	.hm-mesh::before, .hm-spin img, .hm-marquee > .hm-marquee__track { animation: none; }
	.hm-marquee > .hm-marquee__track { flex-wrap: wrap !important; width: auto !important; }
	.hm-marquee { rotate: none; scale: none; }
	.hm-progress { display: none; }
	* { transition-duration: 0s !important; transition-delay: 0s !important; }
}
