/* =====================================================================
   Agorreta.eu — custom design system for the hand-built page templates
   (template-home.php, template-services.php). Scoped so it never leaks
   into Blocksy's header/footer or the GreenShift-built pages.
   Brand palette mirrors the Blocksy palette: blue #2872fa on navy #192a3d.
   ===================================================================== */

:root {
	--ag-ink: #0f1b2d;          /* primary text */
	--ag-navy: #101c30;         /* dark section background */
	--ag-navy-2: #0b1626;       /* darker gradient stop */
	--ag-blue: #2872fa;         /* brand accent */
	--ag-blue-2: #1559ed;       /* accent hover */
	--ag-cyan: #36d6e7;         /* secondary highlight */
	--ag-slate: #5a6b82;        /* muted body text */
	--ag-slate-soft: #8a99ad;
	--ag-line: #e7ecf3;         /* hairline borders */
	--ag-bg: #ffffff;
	--ag-bg-soft: #f4f7fb;
	--ag-radius: 20px;
	--ag-radius-sm: 14px;
	--ag-shadow: 0 18px 50px rgba(15, 27, 45, .10);
	--ag-shadow-sm: 0 8px 24px rgba(15, 27, 45, .07);
	--ag-maxw: 1180px;
}

/* ---- Let the custom templates run full-bleed inside Blocksy's <main> ---- */
.page-template-template-home #main,
.page-template-template-services #main,
.page-template-template-about #main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
.page-template-template-home .site-main > .entry-content,
.page-template-template-services .site-main > .entry-content,
.page-template-template-about .site-main > .entry-content { max-width: none; }

/* ---- Base scope ---- */
.ag {
	color: var(--ag-ink);
	font-feature-settings: "cv02", "cv03", "cv04";
	line-height: 1.6;
}
.ag *, .ag *::before, .ag *::after { box-sizing: border-box; }
.ag img { max-width: 100%; height: auto; display: block; }
.ag a { text-decoration: none; color: inherit; }

.ag-wrap {
	width: 100%;
	max-width: var(--ag-maxw);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}
.ag-section { padding: clamp(64px, 8vw, 112px) 0; position: relative; }
.ag-section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.ag-section--soft { background: var(--ag-bg-soft); }
.ag-section--dark {
	background: radial-gradient(120% 120% at 80% 0%, #16263f 0%, var(--ag-navy) 45%, var(--ag-navy-2) 100%);
	color: #eaf1fb;
}
.ag-section--dark h2, .ag-section--dark h3 { color: #fff; }

/* ---- Typography ---- */
.ag h1, .ag h2, .ag h3 { letter-spacing: -.02em; line-height: 1.08; margin: 0; font-weight: 800; }
.ag h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.ag h2 { font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
.ag h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 700; letter-spacing: -.01em; }
.ag p { margin: 0; color: var(--ag-slate); }
.ag-section--dark p { color: #aebfd6; }

.ag-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--ag-blue);
	background: rgba(40, 114, 250, .09);
	border: 1px solid rgba(40, 114, 250, .18);
	padding: 7px 14px; border-radius: 100px;
}
.ag-section--dark .ag-eyebrow {
	color: #8fc0ff; background: rgba(120, 170, 255, .12); border-color: rgba(120, 170, 255, .22);
}
.ag-lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ag-slate); max-width: 56ch; }
.ag-section--dark .ag-lead { color: #c4d3e8; }

.ag-head { max-width: 720px; margin: 0 auto; text-align: center; display: grid; gap: 18px; justify-items: center; }
.ag-head--left { margin: 0; text-align: left; justify-items: start; }

/* ---- Buttons ---- */
.ag-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.ag-btn {
	display: inline-flex; align-items: center; gap: 9px;
	font-weight: 700; font-size: 1rem; line-height: 1;
	padding: 15px 26px; border-radius: 100px; border: 1px solid transparent;
	cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
	white-space: nowrap;
}
.ag-btn svg { width: 18px; height: 18px; }
.ag-btn--primary {
	background: linear-gradient(135deg, var(--ag-blue) 0%, var(--ag-blue-2) 100%);
	color: #fff; box-shadow: 0 12px 26px rgba(40, 114, 250, .32);
}
.ag-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(40, 114, 250, .42); }
.ag-btn--ghost { background: #fff; color: var(--ag-ink); border-color: var(--ag-line); box-shadow: var(--ag-shadow-sm); }
.ag-btn--ghost:hover { transform: translateY(-2px); border-color: #cdd8e8; }
.ag-btn--wa { background: #25d366; color: #062a14; box-shadow: 0 12px 26px rgba(37, 211, 102, .3); }
.ag-btn--wa:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(37, 211, 102, .42); }
.ag-section--dark .ag-btn--ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.ag-section--dark .ag-btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
/* CTA band sits on a dark panel but its WhatsApp button keeps the light/ghost
   style — force black text so it never inherits a white link colour. */
.ag-cta .ag-btn--ghost, .ag-cta .ag-btn--ghost:hover { color: #000; }

/* ============================ HERO ============================ */
.ag-hero {
	position: relative; overflow: hidden;
	/* Top clearance so the transparent/overlay Blocksy header (promo top-bar +
	   main row) never crosses the hero eyebrow/title. Routed here so every hero
	   variant inherits it. */
	padding-top: clamp(96px, 11vw, 162px);
	background:
		radial-gradient(60% 60% at 12% 8%, rgba(40, 114, 250, .10) 0%, rgba(40, 114, 250, 0) 60%),
		radial-gradient(50% 50% at 95% 18%, rgba(54, 214, 231, .12) 0%, rgba(54, 214, 231, 0) 60%),
		var(--ag-bg);
}
.ag-hero::before {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background-image: linear-gradient(rgba(15, 27, 45, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(15, 27, 45, .045) 1px, transparent 1px);
	background-size: 46px 46px;
	-webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
	        mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
}
.ag-hero .ag-wrap { position: relative; z-index: 1; }
.ag-hero-grid {
	display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
	padding: clamp(20px, 3vw, 40px) 0 clamp(48px, 6vw, 80px);
}
.ag-hero-copy { display: grid; gap: 24px; justify-items: start; }
.ag-hero h1 .grad {
	background: linear-gradient(120deg, var(--ag-blue) 0%, var(--ag-cyan) 100%);
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ag-hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 4px; }
.ag-stat { display: grid; gap: 2px; }
.ag-stat b { font-size: 1.7rem; font-weight: 800; color: var(--ag-ink); letter-spacing: -.02em; }
.ag-stat span { font-size: .85rem; color: var(--ag-slate); }

/* Hero visual — portrait with floating glass cards */
.ag-hero-visual { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.ag-portrait {
	position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 5;
	box-shadow: var(--ag-shadow); border: 1px solid var(--ag-line); background: var(--ag-bg-soft);
}
.ag-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ag-portrait::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(16, 28, 48, 0) 55%, rgba(16, 28, 48, .35) 100%);
}
.ag-chip {
	position: absolute; display: flex; align-items: center; gap: 10px;
	background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: var(--ag-shadow-sm); border-radius: 14px; padding: 11px 14px;
	font-weight: 700; font-size: .9rem; color: var(--ag-ink);
}
.ag-chip svg { width: 20px; height: 20px; color: var(--ag-blue); }
.ag-chip--1 { top: 22px; left: -18px; animation: ag-float 6s ease-in-out infinite; }
.ag-chip--2 { bottom: 88px; right: -22px; animation: ag-float 6s ease-in-out infinite .8s; }
.ag-chip--3 { bottom: 18px; left: 18px; animation: ag-float 6s ease-in-out infinite 1.6s; }
@keyframes ag-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .ag-chip { animation: none !important; } }

/* ---- Trust / experience strip ---- */
.ag-trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; }
.ag-trust-label { font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ag-slate-soft); }
.ag-trust-item { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; color: var(--ag-ink); opacity: .72; }

/* ============================ Cards / grids ============================ */
.ag-grid { display: grid; gap: 22px; }
.ag-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ag-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ag-grid--4 { grid-template-columns: repeat(4, 1fr); }

.ag-card {
	background: var(--ag-bg); border: 1px solid var(--ag-line); border-radius: var(--ag-radius);
	padding: 30px; display: grid; gap: 14px; align-content: start;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	height: 100%;
}
.ag-card:hover { transform: translateY(-5px); box-shadow: var(--ag-shadow); border-color: #d8e2f0; }
.ag-ico {
	width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
	background: linear-gradient(135deg, rgba(40, 114, 250, .12), rgba(54, 214, 231, .12));
	color: var(--ag-blue); border: 1px solid rgba(40, 114, 250, .16);
}
.ag-ico svg { width: 26px; height: 26px; }
.ag-card h3 { margin-top: 2px; }
.ag-card p { font-size: .97rem; }
.ag-card-link { margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; color: var(--ag-blue); font-weight: 700; font-size: .92rem; }
.ag-card-link svg { width: 16px; height: 16px; transition: transform .18s ease; }
.ag-card:hover .ag-card-link svg { transform: translateX(4px); }

/* ---- Split (image + text) ---- */
.ag-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ag-split--rev .ag-split-media { order: 2; }
.ag-split-copy { display: grid; gap: 20px; justify-items: start; }
.ag-split-media { position: relative; }
.ag-split-media img { border-radius: var(--ag-radius); box-shadow: var(--ag-shadow); width: 100%; }
.ag-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.ag-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 1rem; color: var(--ag-ink); }
.ag-section--dark .ag-list li { color: #dce7f5; }
.ag-list svg { width: 22px; height: 22px; color: var(--ag-blue); margin-top: 1px; }

/* ---- Project cards (logo grid) ---- */
.ag-proj {
	background: var(--ag-bg); border: 1px solid var(--ag-line); border-radius: var(--ag-radius);
	padding: 26px; display: grid; gap: 14px; align-content: start; height: 100%;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ag-proj:hover { transform: translateY(-5px); box-shadow: var(--ag-shadow); border-color: #d8e2f0; }
.ag-proj-logo { height: 46px; display: flex; align-items: center; }
.ag-proj-logo img { height: 100%; width: auto; max-width: 180px; object-fit: contain; }
.ag-proj-tag { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ag-blue); }
.ag-proj-tag.is-past { color: var(--ag-slate-soft); }
.ag-proj h3 { font-size: 1.18rem; }
.ag-proj p { font-size: .94rem; }

/* ---- Process / steps ---- */
.ag-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.ag-step { display: grid; gap: 12px; align-content: start; }
.ag-step-num {
	width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
	font-weight: 800; font-size: 1.15rem; color: #fff;
	background: linear-gradient(135deg, var(--ag-blue), var(--ag-blue-2));
	box-shadow: 0 10px 22px rgba(40, 114, 250, .3);
}
.ag-section--dark .ag-step h3 { color: #fff; }
.ag-step p { font-size: .95rem; }

/* ---- CTA band ---- */
.ag-cta {
	position: relative; overflow: hidden; text-align: center;
	border-radius: 28px; padding: clamp(44px, 6vw, 76px) 28px;
	background: radial-gradient(120% 130% at 50% 0%, #1f3a66 0%, var(--ag-navy) 55%, var(--ag-navy-2) 100%);
	color: #fff; display: grid; gap: 22px; justify-items: center;
	box-shadow: var(--ag-shadow);
}
.ag-cta::before {
	content: ""; position: absolute; inset: 0; opacity: .5; 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: 40px 40px;
	-webkit-mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 70%);
	        mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 70%);
}
.ag-cta > * { position: relative; z-index: 1; }
.ag-cta h2 { color: #fff; }
.ag-cta p { color: #c4d3e8; max-width: 54ch; }

/* ---- FAQ ---- */
.ag-faq { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.ag-faq details {
	background: var(--ag-bg); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-sm);
	padding: 4px 22px; transition: border-color .2s ease, box-shadow .2s ease;
}
.ag-faq details[open] { border-color: #cfdcf0; box-shadow: var(--ag-shadow-sm); }
.ag-faq summary {
	cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 1.05rem;
	display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ag-ink);
}
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary::after {
	content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--ag-blue); transition: transform .2s ease; line-height: 1;
}
.ag-faq details[open] summary::after { transform: rotate(45deg); }
.ag-faq p { padding: 0 0 20px; font-size: 1rem; }

/* ---- Capability panel (Services service blocks) ---- */
.ag-panel {
	background: linear-gradient(180deg, #fff, var(--ag-bg-soft));
	border: 1px solid var(--ag-line); border-radius: var(--ag-radius);
	padding: 30px; box-shadow: var(--ag-shadow-sm); display: grid; gap: 16px; align-content: start;
}
.ag-panel-head { display: flex; align-items: center; gap: 14px; }
.ag-panel-head b { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.ag-caps { display: grid; gap: 11px; margin: 2px 0 0; }
.ag-cap { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; font-size: .96rem; color: var(--ag-ink); }
.ag-cap svg { width: 20px; height: 20px; color: var(--ag-blue); margin-top: 1px; }

/* ---- Service block header (numbered) ---- */
.ag-svc-tag { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ag-blue); }

/* ---- Hero centered variant (Services) ---- */
.ag-hero--center .ag-wrap { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(48px, 6vw, 76px); }

/* ---- Career timeline (About) ---- */
.ag-timeline { position: relative; max-width: 840px; margin: 0 auto; }
.ag-tl-item { position: relative; padding: 0 0 40px 80px; }
.ag-tl-item:last-child { padding-bottom: 0; }
.ag-tl-item::before {
	content: ""; position: absolute; left: 23px; top: 8px; bottom: -8px; width: 2px;
	background: linear-gradient(var(--ag-blue), rgba(40, 114, 250, .25));
}
.ag-tl-item:last-child::before { display: none; }
.ag-tl-dot {
	position: absolute; left: 7px; top: 0; width: 34px; height: 34px; border-radius: 50%;
	background: #fff; border: 2px solid var(--ag-blue); display: grid; place-items: center;
	color: var(--ag-blue); box-shadow: 0 0 0 5px rgba(40, 114, 250, .08); z-index: 1;
}
.ag-tl-dot svg { width: 17px; height: 17px; }
/* Timeline bubble holding a personal photo instead of an icon. Slightly larger
   and re-centred on the connector line; the photo fills the circle. */
.ag-tl-dot--img {
	width: 48px; height: 48px; left: 0; top: -6px; padding: 0; overflow: hidden;
	background: #fff; box-shadow: 0 0 0 5px rgba(40, 114, 250, .08), var(--ag-shadow-sm);
}
.ag-tl-dot--img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ag-tl-dot--img + .ag-tl-year { display: inline-block; margin-top: 4px; }

/* Optional photo above a Services capability panel. */
.ag-svc-shot {
	margin: 0 0 16px; border-radius: var(--ag-radius-sm); overflow: hidden;
	aspect-ratio: 16 / 10; box-shadow: var(--ag-shadow-sm);
}
.ag-svc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ag-tl-year { font-weight: 800; color: var(--ag-blue); font-size: .88rem; letter-spacing: .04em; }
.ag-tl-item h3 { margin: 5px 0 4px; font-size: 1.22rem; }
.ag-tl-org { font-weight: 700; color: var(--ag-slate); font-size: .95rem; }
.ag-tl-item p { margin-top: 9px; font-size: .98rem; }

/* ---- Highlight callout ---- */
.ag-callout {
	display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
	background: linear-gradient(135deg, rgba(40, 114, 250, .06), rgba(54, 214, 231, .06));
	border: 1px solid rgba(40, 114, 250, .18); border-radius: var(--ag-radius); padding: 26px 30px;
	max-width: 920px; margin: 0 auto;
}
.ag-callout .ag-ico { width: 56px; height: 56px; }
.ag-callout-copy b { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.ag-callout-copy p { font-size: .96rem; }
@media (max-width: 768px) { .ag-callout { grid-template-columns: 1fr; text-align: left; } }

/* ---- Travel gallery ---- */
.ag-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ag-gallery figure {
	margin: 0; border-radius: var(--ag-radius-sm); overflow: hidden; aspect-ratio: 3 / 4;
	box-shadow: var(--ag-shadow-sm); position: relative;
}
.ag-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ag-gallery figure:hover img { transform: scale(1.06); }
.ag-gallery figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 22, 38, .55)); }
.ag-gallery figcaption { position: absolute; left: 14px; bottom: 11px; z-index: 1; color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: .01em; }
@media (max-width: 600px) { .ag-gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---- Section intro spacing ---- */
.ag-section > .ag-wrap > .ag-head { margin-bottom: clamp(36px, 4vw, 56px); }

/* ============================ Responsive ============================ */
@media (max-width: 980px) {
	.ag-hero-grid { grid-template-columns: 1fr; }
	.ag-hero-visual { order: -1; max-width: 380px; }
	.ag-grid--3, .ag-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.ag-steps { grid-template-columns: repeat(2, 1fr); }
	.ag-split { grid-template-columns: 1fr; }
	.ag-split--rev .ag-split-media { order: 0; }
}
@media (max-width: 600px) {
	.ag-grid--3, .ag-grid--4, .ag-grid--2 { grid-template-columns: 1fr; }
	.ag-steps { grid-template-columns: 1fr; }
	.ag-hero-stats { gap: 18px; }
	.ag-stat b { font-size: 1.45rem; }
	.ag-btns { width: 100%; }
	.ag-btn { flex: 1 1 auto; justify-content: center; }
	.ag-chip--1 { left: 4px; } .ag-chip--2 { right: 4px; }
}
