/* =========================================================
   CISBE — Sistema de diseño
   Paleta: navy (estructura/quiropráctica) + verde hoja (belleza/bienestar)
   Tipografía: Fraunces (display) + Inter (texto)
   ========================================================= */

:root {
	--navy: #17284A;
	--navy-soft: #3B4A6B;
	--forest: #2F6B33;
	--forest-dark: #1F4F24;
	--leaf: #8BC34A;
	--mint-100: #EAF7F4;
	--mint-50: #F6FBFA;
	--cream: #FFFFFF;
	--line: #CFE8D9;
	--whatsapp: #25D366;

	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--container: 1180px;
	--container-narrow: 760px;
	--radius-sm: 10px;
	--radius-md: 18px;
	--radius-lg: 28px;
	--shadow-soft: 0 20px 45px -25px rgba(23, 40, 74, 0.35);
	--shadow-card: 0 12px 30px -18px rgba(23, 40, 74, 0.25);
}

/* ---------- Reset base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
	margin: 0;
	background: var(--mint-50);
	color: var(--navy-soft);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.5em; font-weight: 500; }
p { margin: 0 0 1em; }
svg { display: block; }

.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 1000;
	background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
	outline: 2px solid var(--forest);
	outline-offset: 3px;
}

/* ---------- Layout helpers ---------- */
.section-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}
.section-inner--narrow { max-width: var(--container-narrow); }

.eyebrow {
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--forest);
	margin: 0 0 0.9em;
}
.eyebrow--center { text-align: center; }

.section-title {
	font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
	line-height: 1.2;
	max-width: 640px;
}
.section-title--center { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }

section { padding: 88px 0; }

/* ---------- Botones ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 14px 26px;
	border-radius: var(--radius-sm);
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
	white-space: nowrap;
}
.btn--pill { border-radius: 999px; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }

.btn--primary { background: var(--forest); color: #fff; box-shadow: var(--shadow-card); }
.btn--primary:hover { background: var(--forest-dark); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--navy); border-color: rgba(23,40,74,0.25); }
.btn--ghost:hover { border-color: var(--navy); transform: translateY(-2px); }

.btn--outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: #fff; transform: translateY(-2px); }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #EAF7F4; font-size: 0.82rem; }
.topbar__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 8px 24px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}
.topbar__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border: 1px solid rgba(234,247,244,0.3);
	border-radius: 999px;
	transition: border-color 0.18s ease, background 0.18s ease;
}
.topbar__pill:hover { border-color: var(--leaf); background: rgba(139,195,74,0.12); }
.topbar__pill--whatsapp { color: #B7F0C0; }
.topbar__icon { width: 15px; height: 15px; color: currentColor; }
.topbar__icon svg { width: 100%; height: 100%; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(246, 251, 250, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(23,40,74,0.4); }

.site-header__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.site-logo { flex-shrink: 0; }
.site-logo img { max-height: 52px; width: auto; }
.site-logo__text {
	font-family: var(--font-display);
	font-size: 1.7rem;
	font-weight: 600;
	color: var(--navy);
	letter-spacing: 0.02em;
}
.site-logo__text--light { color: #fff; }

.site-nav { flex: 1; }
.nav-menu { display: flex; gap: 30px; justify-content: center; }
.nav-menu a {
	font-weight: 500;
	font-size: 0.95rem;
	color: var(--navy-soft);
	position: relative;
	padding: 4px 0;
}
.nav-menu a:hover { color: var(--forest); }
.nav-menu a::after {
	content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
	background: var(--forest); transition: width 0.2s ease;
}
.nav-menu a:hover::after { width: 100%; }

.site-header__cta { flex-shrink: 0; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
	display: none;
	flex-direction: column;
	gap: 18px;
	padding: 20px 24px 28px;
	background: var(--mint-50);
	border-top: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__menu { display: flex; flex-direction: column; gap: 14px; }
.mobile-nav__menu a { font-size: 1.05rem; font-weight: 500; color: var(--navy); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 64px; overflow: hidden; }
.hero__bg {
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(600px 400px at 85% 0%, rgba(139,195,74,0.16), transparent 60%),
		radial-gradient(500px 380px at 10% 10%, rgba(47,107,51,0.10), transparent 60%),
		var(--mint-100);
}
.hero__inner { max-width: 820px; margin: 0 auto; padding: 0 24px; text-align: center; }
.hero__title {
	font-size: clamp(2.3rem, 1.7rem + 2.6vw, 3.6rem);
	line-height: 1.12;
	margin-bottom: 0.6em;
}
.hero__title-line { display: block; }
.hero__title-line--accent { font-style: italic; color: var(--forest); font-weight: 400; }
.hero__lead { font-size: 1.1rem; max-width: 560px; margin: 0 auto 2em; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Divisor de firma: columna -> hoja ---------- */
.spine-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 12px 0 8px;
	background: var(--mint-100);
}
.spine-divider__svg { width: 64px; height: 208px; }
.spine-divider__path {
	stroke-dasharray: 420;
	stroke-dashoffset: 420;
	transition: stroke-dashoffset 1.6s ease;
}
.spine-divider__marker {
	opacity: 0;
	transform-origin: center;
	transform: scale(0.4);
	transition: opacity 0.5s ease, transform 0.5s ease;
	transition-delay: calc(var(--d) * 0.09s);
}
.spine-divider.is-drawn .spine-divider__path { stroke-dashoffset: 0; }
.spine-divider.is-drawn .spine-divider__marker { opacity: 1; transform: scale(1); }
.spine-divider__caption {
	font-family: var(--font-display);
	font-style: italic;
	color: var(--navy-soft);
	font-size: 0.95rem;
	margin: 6px 0 0;
}

/* ---------- Servicios ---------- */
.servicios { background: var(--mint-100); }
.servicios-grid {
	margin-top: 48px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.service-card {
	background: var(--cream);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 32px 26px;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--leaf); }

.service-card__icon {
	width: 56px; height: 56px;
	border-radius: 50%;
	border: 1.5px solid var(--line);
	display: flex; align-items: center; justify-content: center;
	color: var(--forest);
	margin-bottom: 20px;
	overflow: hidden;
}
.service-card__icon svg { width: 30px; height: 30px; }
.service-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.service-card__monogram { font-family: var(--font-display); font-size: 1.4rem; color: var(--forest); }

.service-card__title { font-size: 1.18rem; margin-bottom: 0.5em; }
.service-card__excerpt { font-size: 0.94rem; margin: 0; }

/* ---------- Nosotros ---------- */
.nosotros__grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 64px;
	align-items: start;
}
.nosotros__text p { font-size: 1rem; }
.nosotros__values { display: flex; flex-direction: column; gap: 20px; }
.value-card {
	background: var(--mint-100);
	border-left: 3px solid var(--leaf);
	border-radius: var(--radius-sm);
	padding: 22px 24px;
}
.value-card h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.value-card p { font-size: 0.92rem; margin: 0; }

/* ---------- Testimonios ---------- */
.testimonios { background: var(--navy); color: #DCE6F0; }
.testimonios .eyebrow { color: var(--leaf); }
.testimonios .section-title { color: #fff; }
.testimonios-grid {
	margin-top: 48px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.testimonio-card {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: var(--radius-md);
	padding: 28px 26px;
}
.testimonio-card p { font-size: 0.96rem; font-style: italic; margin-bottom: 1.4em; }
.testimonio-card__autor { display: flex; align-items: center; gap: 12px; }
.testimonio-card__avatar {
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--forest); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-size: 1rem; flex-shrink: 0;
}
.testimonio-card__autor strong { display: block; font-size: 0.92rem; color: #fff; }
.testimonio-card__autor span { font-size: 0.82rem; color: #A9BCD4; }

/* ---------- Contacto ---------- */
.contacto__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: stretch;
}
.contacto__lead { font-size: 1rem; }
.contacto__whatsapp { margin-bottom: 32px; }
.contacto__datos { display: flex; flex-direction: column; gap: 16px; }
.contacto__datos li { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.contacto__datos strong { color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.contacto__datos a:hover { color: var(--forest); }

.contacto__mapa { min-height: 320px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.contacto__mapa iframe { width: 100%; height: 100%; min-height: 320px; }
.contacto__mapa-placeholder {
	height: 100%; min-height: 320px;
	display: flex; align-items: center; justify-content: center;
	background: var(--mint-100); padding: 32px; text-align: center;
}
.contacto__mapa-placeholder p { font-size: 0.9rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C9D6E8; padding: 72px 0 0; }
.site-footer__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 40px;
	padding-bottom: 48px;
}
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 1em; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; }
.footer-col a:hover { color: var(--leaf); }
.footer-col--brand p { font-size: 0.9rem; margin: 16px 0 20px; max-width: 260px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; }
.footer-social svg { width: 16px; height: 16px; }
.footer-social a:hover { border-color: var(--leaf); color: var(--leaf); }
.footer-contact li { margin-bottom: 8px; font-size: 0.9rem; }

.site-footer__bottom {
	border-top: 1px solid rgba(255,255,255,0.12);
	padding: 20px 24px;
	text-align: center;
	font-size: 0.8rem;
	color: #8FA2BE;
}
.site-footer__bottom p { margin: 0; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 58px;
	height: 58px;
	background: var(--whatsapp);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 28px -10px rgba(37,211,102,0.6);
	z-index: 90;
	transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ---------- Paginas genericas ---------- */
.page-generic { padding: 72px 0 96px; }
.page-generic__content { font-size: 1rem; }
.page-generic__content h2 { margin-top: 1.4em; }
.page-generic__thumb { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
	.nosotros__grid { grid-template-columns: 1fr; gap: 40px; }
	.contacto__grid { grid-template-columns: 1fr; }
	.site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
	.site-nav, .site-header__cta { display: none; }
	.nav-toggle { display: flex; }
	.topbar__inner { justify-content: center; }

	.servicios-grid { grid-template-columns: repeat(2, 1fr); }
	.testimonios-grid { grid-template-columns: 1fr; }

	section { padding: 64px 0; }
}

@media (max-width: 560px) {
	.servicios-grid { grid-template-columns: 1fr; }
	.site-footer__inner { grid-template-columns: 1fr; }
	.hero__actions { flex-direction: column; align-items: stretch; }
	.topbar__pill span:last-child { display: inline; }
	.hero { padding: 72px 0 48px; }
	.whatsapp-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}
