/* ==========================================================================
   La Galga Comunicación — main.css
   Paleta: 80% marfil / piedra / blanco roto · 15% grafito · 5% verde #798274
   ========================================================================== */

:root {
	--ivory:       #f4f0e9;
	--ivory-deep:  #ece7de;
	--stone:       #e3ddd2;
	--paper:       #fbf9f5;
	--graphite:    #1c1c1a;
	--graphite-2:  #55554f;
	--green:       #c4c9bf;
	--green-deep:  #798274;
	--green-dark:  #5f6759;
	--line:        rgba(28, 28, 26, .12);

	--serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--sans:  'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--header-h: 120px;
	--pad-x: clamp(24px, 5.5vw, 80px);
	--ease: cubic-bezier(.25, .46, .45, .94);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ivory);
	color: var(--graphite);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, blockquote, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: italic; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 10000;
	background: var(--graphite); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Tipografía y piezas comunes ---------- */
.h2 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(28px, 3.1vw, 44px);
	line-height: 1.12;
	letter-spacing: -.005em;
}
.h2 em, .hero__title em, .site-footer__title em { color: var(--green-deep); }

.eyebrow {
	display: block;
	margin-bottom: 18px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--green-deep);
}
.eyebrow--center { text-align: center; }

.rule {
	display: block;
	width: 26px;
	height: 1.5px;
	background: var(--green-deep);
	margin: 26px 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 34px;
	border: 1px solid transparent;
	border-radius: 2px;
	font-family: var(--sans);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--green { background: var(--green-deep); color: #fff; }
.btn--green:hover { background: var(--green-dark); }
.btn--dark { background: var(--graphite); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { border-color: var(--graphite); color: var(--graphite); background: transparent; }
.btn--ghost:hover { background: var(--graphite); color: #fff; }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 0 0 5px;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--graphite);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: color .25s, border-color .25s;
}
.link-arrow svg { width: 16px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.link-arrow:hover { color: var(--green-dark); border-color: var(--green-dark); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	background: var(--ivory);
	transition: box-shadow .3s, background .3s, height .3s;
}
.site-header.is-scrolled {
	--header-h: 92px;
	background: rgba(244, 240, 233, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 var(--line);
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 var(--pad-x);
}
.site-header__logo { display: block; height: 100%; padding: 8px 0; }
.site-header__logo img { height: 100%; width: auto; transition: opacity .2s; }
.site-header__logo:hover img { opacity: .75; }

.site-nav__list { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 44px); }
.site-nav a {
	position: relative;
	display: block;
	padding: 6px 0;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
}
.site-nav a::after {
	content: '';
	position: absolute; left: 0; right: 0; bottom: 0;
	height: 1.5px;
	background: var(--green-deep);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--ease);
}
.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
	background: none;
	border: 0;
	cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--graphite); transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
	position: fixed;
	inset: var(--header-h) 0 0 0;
	z-index: 99;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 30px;
	background: var(--ivory);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { font-family: var(--serif); font-size: 30px; text-decoration: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	align-items: center;
	min-height: min(720px, calc(100vh - var(--header-h)));
	margin-top: calc(var(--header-h) * -1);
	padding-top: var(--header-h);
	overflow: hidden;
	background: var(--ivory);
}
.hero__text { position: relative; z-index: 2; padding: 56px 24px 72px var(--pad-x); max-width: 640px; }
.hero__title {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(36px, 4.2vw, 58px);
	line-height: 1.1;
	letter-spacing: -.01em;
}
.hero__sub {
	max-width: 400px;
	margin-bottom: 36px;
	font-size: 12.5px;
	font-weight: 400;
	letter-spacing: .13em;
	line-height: 2;
	text-transform: uppercase;
}
.hero__visual {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 62%;
	z-index: 1;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%);
	mask-image: linear-gradient(90deg, transparent 0, #000 38%);
}
.hero__visual img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: 50% 62%;
	filter: brightness(1.1) contrast(.93) saturate(.9);
}

/* ==========================================================================
   Sobre nosotros
   ========================================================================== */
.about { background: var(--paper); }
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 520px; }
.about__text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 80px 56px 80px var(--pad-x); }
.about__text .h2 { max-width: 420px; }
.about__text p { max-width: 400px; margin-bottom: 18px; font-size: 14.5px; color: var(--graphite-2); }
.about__text .link-arrow { margin-top: 14px; }
.about__photo { position: relative; overflow: hidden; }
.about__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.about__more {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	background: var(--stone);
	transition: grid-template-rows .6s var(--ease), visibility 0s .6s;
}
.about__more.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .6s var(--ease), visibility 0s; }
.about__more-inner {
	min-height: 0;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: 64px;
	padding: 0 var(--pad-x);
}
.about__more.is-open .about__more-inner { padding-top: 64px; padding-bottom: 72px; }
.about__more-body p { margin-bottom: 18px; font-size: 15px; color: var(--graphite-2); }
.about__more-body p:last-child { margin-bottom: 0; }
.about__more-cta { align-self: center; padding-left: 40px; border-left: 1px solid var(--line); }
.about__more-lead { margin-bottom: 22px; font-family: var(--serif); font-size: 30px; line-height: 1.15; color: var(--graphite); }
.about__more-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Sectores
   ========================================================================== */
.sectors { padding: 88px var(--pad-x) 80px; background: var(--ivory); text-align: center; }
.sectors__head { margin-bottom: 52px; }
.sectors__grid { display: flex; flex-wrap: wrap; justify-content: center; max-width: 1060px; margin: 0 auto; }
.sector {
	position: relative;
	display: flex;
	flex: 0 0 25%;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 30px 14px;
}
.sector::after { content: ''; position: absolute; top: 18%; right: 0; bottom: 18%; width: 1px; background: var(--line); }
.sector:nth-child(4n)::after, .sector:last-child::after { display: none; }
.sector__icon {
	width: 46px; height: 46px;
	fill: none;
	stroke: #55554f;
	stroke-width: 1.15;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke .3s, transform .3s var(--ease);
}
.sector:hover .sector__icon { stroke: var(--green-deep); transform: translateY(-3px); }
.sector__label { font-size: 11px; font-weight: 400; letter-spacing: .14em; line-height: 1.7; text-transform: uppercase; }

/* ==========================================================================
   Bloques con intro a la izquierda (casos / reseñas)
   ========================================================================== */
.cases, .reviews { background: var(--ivory-deep); border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); max-width: 1440px; margin: 0 auto; }
.split__intro { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 72px 32px 72px var(--pad-x); }
.split__intro .h2 { font-size: clamp(26px, 2.4vw, 34px); max-width: 280px; }
.split__intro .rule { margin: 22px 0; }
.split__intro p { max-width: 260px; font-size: 13.5px; color: var(--graphite-2); }
.split__intro .link-arrow { margin-top: 26px; }
.split__content { min-width: 0; padding: 56px 0 48px; }

/* Carrusel */
.carousel { position: relative; }
.carousel__viewport { position: relative; }
.carousel__track {
	display: flex;
	gap: 18px;
	padding: 6px var(--pad-x) 10px 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 8px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 42px; height: 42px;
	margin-top: -21px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--green-deep);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(28, 28, 26, .14);
	transition: background .25s, opacity .25s, transform .25s;
}
.carousel__arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel__arrow:hover:not(:disabled) { background: var(--green-dark); transform: scale(1.06); }
.carousel__arrow:disabled { opacity: 0; pointer-events: none; }
.carousel__arrow--next { right: 18px; }
.carousel__arrow--prev { left: -4px; }
.carousel__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px var(--pad-x) 0 8px; }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(28, 28, 26, .2); transition: background .3s, transform .3s; }
.carousel__dots i.is-active { background: var(--green-deep); transform: scale(1.15); }
.carousel__hint { font-size: 12.5px; font-style: italic; color: var(--graphite-2); }
.carousel__hint span { opacity: .75; }

/* Tarjetas de casos */
.card {
	flex: 0 0 min(280px, 78%);
	scroll-snap-align: start;
	overflow: hidden;
	border-radius: 6px;
	background: var(--paper);
	box-shadow: 0 1px 0 var(--line);
	transition: transform .35s var(--ease), box-shadow .35s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(28, 28, 26, .12); }
.card__img { overflow: hidden; aspect-ratio: 4 / 2.6; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { padding: 16px 18px 22px; }
.card__title { margin-bottom: 6px; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.15; }
.card__body p { font-size: 13px; line-height: 1.55; color: var(--graphite-2); }

/* Reseñas */
.reviews { background: var(--ivory); }
.google-badge {
	position: absolute;
	top: 26px;
	right: var(--pad-x);
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	transition: opacity .25s;
}
.google-badge:hover { opacity: .75; }
.google-badge svg { width: 28px; height: 28px; }
.google-badge__info { display: flex; flex-direction: column; line-height: 1.25; }
.google-badge__stars { color: #f2a81d; font-size: 12px; letter-spacing: 1px; }
.google-badge strong { font-size: 12.5px; font-weight: 500; }
.google-badge small { font-size: 11px; color: var(--graphite-2); }
.reviews .split__content { padding-top: 72px; }
.carousel__track--reviews { gap: 18px; padding-left: 52px; padding-right: 60px; scroll-padding-left: 52px; }
.review {
	flex: 0 0 min(300px, 80%);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px 26px 22px;
	border-radius: 6px;
	background: var(--paper);
	box-shadow: 0 1px 0 var(--line);
}
.review__quote { height: 30px; font-family: var(--serif); font-size: 62px; line-height: .8; color: var(--green-deep); }
.review__stars { color: #f2a81d; font-size: 12px; letter-spacing: 1px; }
.review blockquote { flex: 1; font-size: 13px; line-height: 1.7; color: var(--graphite); }
.review cite { padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; font-style: normal; font-weight: 500; color: var(--graphite-2); }

/* ==========================================================================
   Newsletter
   ========================================================================== */
.newsletter { position: relative; overflow: hidden; background: #dfe2db; }
.newsletter__leaf {
	position: absolute;
	left: -40px; bottom: -30px;
	width: min(420px, 38vw);
	opacity: .55;
	mix-blend-mode: multiply;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, #000 40%, transparent);
	mask-image: linear-gradient(90deg, #000 40%, transparent);
}
.newsletter__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
	align-items: center;
	gap: 56px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 64px var(--pad-x);
}
.newsletter__title { padding-left: clamp(0px, 15vw, 220px); }
.newsletter .h2 em { color: var(--green-dark); }
.newsletter .eyebrow { color: var(--green-dark); }
.newsletter .rule { margin: 20px 0 0; background: var(--green-dark); }
.newsletter__form p { max-width: 400px; margin-bottom: 18px; font-size: 13.5px; color: var(--graphite); }
.nl-form { display: flex; max-width: 500px; }
.nl-form input[type="email"] {
	flex: 1;
	min-width: 0;
	padding: 15px 18px;
	border: 0;
	border-radius: 2px 0 0 2px;
	background: rgba(255, 255, 255, .65);
	font: inherit;
	font-size: 14px;
	color: var(--graphite);
}
.nl-form input[type="email"]::placeholder { color: rgba(28, 28, 26, .45); }
.nl-form input[type="email"]:focus { outline: 2px solid var(--graphite); outline-offset: -2px; background: #fff; }
.nl-form .btn { border-radius: 0 2px 2px 0; padding-inline: 28px; }
.nl-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-msg { margin: 14px 0 0 !important; font-size: 13px !important; font-weight: 500; }
.nl-msg--error { color: #8a2d2d; }

/* ==========================================================================
   Pie
   ========================================================================== */
.site-footer { position: relative; overflow: hidden; background: var(--graphite); color: var(--paper); isolation: isolate; scroll-margin-top: 0; }
.site-footer__ring {
	position: absolute;
	right: -140px; bottom: -330px;
	z-index: -1;
	width: 620px; height: 620px;
	border: 1px solid rgba(251, 249, 245, .1);
	border-radius: 50%;
}
.site-footer__ring::before { content: ''; position: absolute; inset: 56px; border: 1px solid rgba(121, 130, 116, .16); border-radius: 50%; }
.site-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
	align-items: center;
	gap: 56px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 72px var(--pad-x) 64px;
}
.site-footer__title { margin-bottom: 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
.site-footer__title em { color: var(--green); }
.site-footer__claim p { max-width: 420px; margin-bottom: 28px; font-size: 14px; color: rgba(251, 249, 245, .62); }
.site-footer__contact { display: flex; flex-direction: column; gap: 14px; }
.site-footer__contact li { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.site-footer__contact svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.site-footer__contact a { text-decoration: none; transition: color .2s; }
.site-footer__contact a:hover { color: var(--green); }
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 24px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 20px var(--pad-x);
	border-top: 1px solid rgba(251, 249, 245, .08);
	font-size: 11.5px;
	color: rgba(251, 249, 245, .42);
}
.site-footer__bottom a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom a:hover { color: var(--green); }

/* ==========================================================================
   Páginas internas (legal, 404…)
   ========================================================================== */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 72px var(--pad-x) 96px; }
.page-article__title { margin-bottom: 32px; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }
.page-article__content > * + * { margin-top: 1.1em; }
.page-article__content h2, .page-article__content h3 { margin-top: 1.8em; font-family: var(--serif); font-weight: 500; line-height: 1.2; }
.page-article__content a { color: var(--green-dark); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.site-nav__list { gap: 20px; }
	.site-nav a { font-size: 10.5px; letter-spacing: .1em; }
	.about__more-inner { gap: 40px; }
	.sector { flex-basis: 33.333%; }
	.sector:nth-child(4n)::after { display: block; }
	.sector:nth-child(3n)::after, .sector:last-child::after { display: none; }
}

@media (max-width: 900px) {
	:root { --header-h: 96px; }
	.site-header.is-scrolled { --header-h: 80px; }
	.site-nav { display: none; }
	.nav-toggle { display: flex; }

	.hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 0; }
	.hero__text { padding: 40px var(--pad-x) 40px; max-width: none; }
	.hero__visual { position: relative; width: 100%; height: 340px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%); mask-image: linear-gradient(180deg, transparent 0, #000 30%); }

	.about__grid { grid-template-columns: 1fr; }
	.about__text { padding: 56px var(--pad-x); }
	.about__photo { order: -1; aspect-ratio: 4 / 3; }
	.about__more-inner { grid-template-columns: 1fr; gap: 32px; }
	.about__more.is-open .about__more-inner { padding-top: 48px; padding-bottom: 56px; }
	.about__more-cta { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); }

	.split { grid-template-columns: 1fr; }
	.split__intro { padding: 56px var(--pad-x) 8px; }
	.split__content { padding: 28px 0 48px; }
	.reviews .split__content { padding-top: 72px; }
	.carousel__arrow--prev { left: 6px; }
	.google-badge { top: 14px; right: var(--pad-x); }

	.newsletter__inner { grid-template-columns: 1fr; gap: 28px; padding: 56px var(--pad-x); }
	.newsletter__title { padding-left: 0; }
	.newsletter__leaf { width: 260px; opacity: .3; }

	.site-footer__inner { grid-template-columns: 1fr; gap: 40px; padding: 56px var(--pad-x) 48px; }
}

@media (max-width: 640px) {
	.sector { flex-basis: 50%; }
	.sector:nth-child(3n)::after { display: block; }
	.sector:nth-child(2n)::after, .sector:last-child::after { display: none; }
	.nl-form { flex-direction: column; gap: 10px; }
	.nl-form input[type="email"], .nl-form .btn { border-radius: 2px; }
	.carousel__foot { flex-direction: column; align-items: flex-start; }
	.hero__sub { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==========================================================================
   Capa de detalle — "papel en relieve"
   Textura de papel, carga orquestada del hero, trazado de iconos y
   microinteracciones. Todo se desactiva con prefers-reduced-motion.
   ========================================================================== */

::selection { background: var(--green); color: var(--graphite); }

/* Grano de papel sobre toda la página (muy sutil, no intercepta clics) */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 200;
	pointer-events: none;
	opacity: .5;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .32  0 0 0 0 .28  0 0 0 .11 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Barra de progreso de lectura bajo la cabecera */
.site-header::after {
	content: '';
	position: absolute;
	left: 0; bottom: 0;
	height: 2px;
	width: calc(var(--progress, 0) * 100%);
	background: linear-gradient(90deg, var(--green), var(--green-deep));
	transition: width .15s linear;
}

/* Hero: entrada orquestada (título → raya → subtítulo → botón → imagen) */
@keyframes lg-rise {
	from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
	to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes lg-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lg-emboss {
	from { opacity: 0; transform: scale(1.07); filter: brightness(1.25) contrast(.8) saturate(.9) blur(8px); }
	to   { opacity: 1; transform: none; filter: brightness(1.1) contrast(.93) saturate(.9) blur(0); }
}
.js .hero .reveal { opacity: 0; transition: none; animation: lg-rise 1.1s var(--ease) forwards; }
.js .hero .hero__title { animation-delay: .15s; }
.js .hero .rule { transform-origin: left; animation: lg-draw .9s var(--ease) .75s forwards; }
.js .hero .hero__sub { animation-delay: .9s; }
.js .hero .btn { animation-delay: 1.1s; }
.js .hero__visual img { animation: lg-emboss 2.2s var(--ease) .1s both; }
.hero__title em { display: inline-block; background: linear-gradient(100deg, var(--green-dark), var(--green-deep) 60%, #9aa394); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: .06em; }

/* La raya verde se "dibuja" al aparecer */
.js .rule.reveal { transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .15s; }
.js .rule.reveal.is-visible { transform: scaleX(1); }

/* Iconos de sectores: trazo que se dibuja */
.js .sector__icon > * {
	stroke-dasharray: var(--len, 200);
	stroke-dashoffset: var(--len, 200);
	transition: stroke-dashoffset 1.7s var(--ease);
}
.js .sector.is-visible .sector__icon > * { stroke-dashoffset: 0; }
.sector { transition: opacity .8s var(--ease), transform .8s var(--ease), background .4s; }
.sector:hover { background: linear-gradient(180deg, transparent, rgba(121, 130, 116, .22)); }

/* Sobre nosotros: foto con luz que se desplaza al pasar el ratón */
.about__photo::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
	transform: translateX(-120%);
	transition: transform 1.2s var(--ease);
	pointer-events: none;
}
.about__photo:hover::after { transform: translateX(120%); }
.about__photo img { transition: transform 1.4s var(--ease); }
.about__photo:hover img { transform: scale(1.035); }

/* Tarjetas: filete verde que aparece al elevarse */
.card, .review { position: relative; }
.card::after, .review::after {
	content: '';
	position: absolute; left: 0; right: 0; bottom: 0;
	height: 2px;
	background: var(--green-deep);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .5s var(--ease);
}
.card:hover::after, .review:hover::after { transform: scaleX(1); }
.review { transition: transform .35s var(--ease), box-shadow .35s; }
.review:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(28, 28, 26, .1); }

/* Newsletter: la hoja respira lentamente */
@keyframes lg-sway { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(1.2deg); } }
.newsletter__leaf { transform-origin: 20% 100%; animation: lg-sway 9s ease-in-out infinite; }

/* Pie: halo verde muy tenue tras el anillo */
.site-footer::before {
	content: '';
	position: absolute;
	right: -10%; bottom: -40%;
	z-index: -2;
	width: 60%; aspect-ratio: 1;
	background: radial-gradient(circle, rgba(121, 130, 116, .09), transparent 65%);
}

@media (prefers-reduced-motion: reduce) {
	.js .hero .reveal, .js .hero__visual img { animation: none; opacity: 1; filter: none; }
	.js .hero .rule, .js .rule.reveal { transform: none; }
	.js .sector__icon > * { stroke-dasharray: none; stroke-dashoffset: 0; }
	.newsletter__leaf { animation: none; }
}


/* Newsletter: la hoja ocupa todo el alto y se funde con el fondo (sin bordes visibles) */
.newsletter__leaf {
	left: 0; top: 0; bottom: auto;
	width: min(520px, 42%);
	height: 100%;
	object-fit: cover;
	object-position: left center;
	opacity: .5;
	animation: none;
	-webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
	mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
}
.newsletter__title { padding-left: clamp(0px, 8vw, 140px); }
@media (max-width: 900px) {
	.newsletter__leaf { width: 70%; opacity: .28; }
	.newsletter__title { padding-left: 0; }
}


/* ---------- Banner de posicionamiento ---------- */
.banner { background: var(--green-deep); color: #fff; text-align: center; padding: 26px var(--pad-x); }
.banner__text { margin: 0; font-family: var(--serif); font-size: clamp(19px, 2vw, 26px); font-weight: 500; line-height: 1.3; letter-spacing: .01em; }
.banner__text em { font-style: italic; }

/* ---------- Casos: imagen del trabajo al pasar el ratón ---------- */
.card__link { display: block; color: inherit; text-decoration: none; }
.card__img { position: relative; background: var(--stone); }
.card__img .card__hover { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .7s ease; }
.card:hover .card__img .card__hover, .card:focus-within .card__img .card__hover { opacity: 1; }
.card__badge {
	position: absolute; right: 10px; bottom: 10px; z-index: 2;
	padding: 6px 12px; border-radius: 99px;
	background: var(--green-deep); color: #fff;
	font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}

/* Vídeo al pasar el ratón */
.card__img video.card__hover { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.is-playing .card__img .card__hover { opacity: 1; }
