/**
 * Alexander Elementor Components — Design System stylesheet.
 *
 * Layout, color and typography ONLY for the .ag-* widget markup. Reuses
 * the same :root tokens defined in the theme's main.css (palette, type
 * scale, spacing, radius, shadows, motion timing) so pages built from
 * AG widgets and legacy theme templates share one visual language.
 * Behavioural/animation mechanics (opacity/transform toggles, marquee
 * track cloning, etc.) live in Motion Engine's motion-engine.css — this
 * file never duplicates those rules, only the finished look.
 */

/* Extra depth token used by the new component system (two-tier navy). */
:root {
	--c-navy-deep: #030814;
}

/* ---------- Shared eyebrow (hero / manifesto / services / story / cta) --- */
.ag-eyebrow,
.ag-hero__eyebrow,
.ag-manifesto__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-family: var(--f-mono);
	font-size: var(--fs-eyebrow, 0.8125rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--c-royal);
	margin: 0 0 1.25rem;
}
.ag-eyebrow::before,
.ag-hero__eyebrow::before,
.ag-manifesto__eyebrow::before {
	content: '';
	width: 24px;
	height: 1px;
	background: currentColor;
	display: inline-block;
}
/* On dark sections the eyebrow reads brighter (electric) for contrast. */
.ag-hero__eyebrow,
.ag-cta .ag-eyebrow {
	color: var(--c-electric);
}

/* ---------- Buttons ------------------------------------------------------ */
.ag-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.95em 1.7em;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	font-family: var(--f-body);
	will-change: transform;
	transition: transform var(--dur-fast) var(--ease-out-expo), box-shadow var(--dur-fast), background var(--dur-fast);
}
.ag-btn--primary {
	background: var(--g-accent);
	color: var(--c-white);
	box-shadow: var(--shadow-glow);
}
.ag-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 25px 70px rgba(0, 107, 255, 0.4); }
.ag-btn--ghost {
	background: var(--c-glass);
	border: 1px solid var(--c-glass-border);
	color: var(--c-white);
	backdrop-filter: blur(10px);
}
.ag-btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- AG Hero -------------------------------------------------------
   Widget already sets position/min-height/overflow inline; this adds the
   background, typography and colour so it matches .hero from the theme. */
.ag-hero {
	background: var(--c-navy-deep);
	color: var(--c-white);
	isolation: isolate;
}
.ag-hero__content { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }
.ag-hero__headline {
	font-family: var(--f-display);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.01em;
	font-size: var(--fs-hero);
	color: var(--c-white);
	max-width: 18ch;
	margin: 0;
}
.ag-hero__lead {
	margin-top: 1.75rem;
	max-width: 42ch;
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.75);
}
.ag-hero__ctas { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }

/* ---------- AG Manifesto — huge editorial statement, light section ------- */
.ag-manifesto { background: var(--c-white); }
.ag-manifesto__eyebrow { justify-content: center; }
.ag-manifesto__statement {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: clamp(1.75rem, 4.2vw, 3.5rem);
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--c-navy);
	max-width: 24ch;
	margin: 0 auto;
}

/* ---------- AG Services (header) + AG Service (card) ---------------------- */
.ag-services-head h2 {
	font-family: var(--f-display);
	font-size: var(--fs-h2);
	color: var(--c-navy);
	margin: 0.5rem 0 0;
	max-width: 20ch;
}

.ag-service {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	background: var(--c-white);
	border-radius: var(--radius-md);
	padding: 2.25rem;
	box-shadow: 0 10px 30px rgba(7, 27, 55, 0.06);
	transition: transform var(--dur-fast) var(--ease-out-expo), box-shadow var(--dur-fast);
}
.ag-service:hover { box-shadow: 0 30px 60px rgba(0, 107, 255, 0.18); transform: translateY(-4px); }
.ag-service__media { border-radius: var(--radius-sm); aspect-ratio: 4/3; }
.ag-service__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ag-service__number {
	font-family: var(--f-mono);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	color: var(--c-royal);
	display: block;
	margin-bottom: 0.25rem;
}
.ag-service__title { font-family: var(--f-display); font-size: var(--fs-h3); color: var(--c-navy); margin: 0 0 0.5rem; }
.ag-service__desc { color: #5B6577; font-size: 0.95rem; margin: 0; }
.ag-service__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: 0.5rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--c-royal);
}
.ag-service__link::after { content: '→'; transition: transform var(--dur-fast) var(--ease-out-expo); }
.ag-service__link:hover::after { transform: translateX(4px); }

/* ---------- AG Stats ------------------------------------------------------ */
.ag-stat { display: flex; flex-direction: column; }
.ag-stat__number {
	font-family: var(--f-display);
	font-size: clamp(2rem, 4vw, 3.5rem);
	color: var(--c-electric);
	line-height: 1;
}
.ag-stat__label { font-size: 0.85rem; color: var(--c-steel); margin-top: 0.5rem; }
/* On dark host sections, swap the muted label for a legible light tone. */
.ag-cta .ag-stat__label,
.ag-hero .ag-stat__label { color: rgba(255, 255, 255, 0.65); }

/* ---------- AG Case Study -------------------------------------------------- */
.ag-case-study { color: inherit; }
.ag-case-study__media { border-radius: var(--radius-lg); aspect-ratio: 16/10; }
.ag-case-study__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease-out-expo); }
.ag-case-study:hover .ag-case-study__media img { transform: scale(1.05); }
.ag-case-study__meta { padding-top: 1.5rem; }
.ag-case-study__category {
	display: block;
	font-family: var(--f-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--c-royal);
	margin-bottom: 0.5rem;
}
.ag-case-study__title { font-family: var(--f-display); font-size: var(--fs-h3); color: var(--c-navy); margin: 0 0 0.4rem; }
.ag-case-study__desc { color: #5B6577; font-size: 0.95rem; margin: 0; max-width: 48ch; }

/* ---------- AG Partner Marquee --------------------------------------------
   Behaviour (track cloning, animation) lives in motion-engine.css; this
   only styles the item chrome and vertical rhythm. */
.ag-partner-marquee { padding: 1.5rem 0; }
.ag-partner-marquee__item { display: flex; align-items: center; }
.ag-partner-marquee__item img {
	height: 36px;
	width: auto;
	object-fit: contain;
	filter: grayscale(1) opacity(0.6);
	transition: filter var(--dur-fast);
}
.ag-partner-marquee__item:hover img { filter: grayscale(0) opacity(1); }

/* ---------- AG Video -------------------------------------------------------- */
.ag-video { background: var(--c-navy-deep); }
.ag-video__caption {
	position: absolute;
	left: var(--gutter);
	bottom: 2rem;
	color: var(--c-white);
	font-size: 0.95rem;
	max-width: 42ch;
}

/* ---------- AG Story (two-column narrative, "Chi Siamo") ------------------- */
.ag-story { padding: var(--section-pad) var(--gutter); max-width: var(--container-wide); margin: 0 auto; }
.ag-story__text h2 {
	font-family: var(--f-display);
	font-size: var(--fs-h2);
	color: var(--c-navy);
	margin: 0 0 1.25rem;
	max-width: 16ch;
}
.ag-story__text p { color: #4B5769; font-size: 1.05rem; max-width: 46ch; margin: 0; }
.ag-story__media { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.ag-story__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- AG CTA (widget sets bg/padding inline; this adds type) -------- */
.ag-cta__headline {
	font-family: var(--f-display);
	font-weight: 600;
	font-size: clamp(2rem, 5vw, 4rem);
	color: var(--c-white);
	margin: 0 0 1.5rem;
	max-width: 20ch;
	margin-left: auto;
	margin-right: auto;
}
.ag-cta__secondary { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; margin-top: 1.5rem; }
.ag-cta .ag-eyebrow { justify-content: center; }

/* ---------- Responsive ----------------------------------------------------- */
@media (max-width: 1024px) {
	.ag-story { grid-template-columns: 1fr !important; }
}
@media (max-width: 782px) {
	.ag-hero__headline { font-size: clamp(2.25rem, 10vw, 3.5rem); }
	.ag-story { grid-template-columns: 1fr !important; direction: ltr !important; }
	.ag-story__media { direction: ltr !important; }
}
/* ==========================================================================
   FASE 7 — Homepage: additions for the custom Strategy / Testimonials /
   Brand-positioning sections and small AG-widget refinements.
   ========================================================================== */

/* ---------- AG Story: no-image single-column variant -------------------- */
.ag-story--solo .ag-eyebrow { justify-content: center; }
.ag-story--solo h2 { max-width: 100% !important; }
.ag-story--solo p { max-width: 100% !important; margin-left: auto; margin-right: auto; }

/* ---------- AG Service: bullet list inside description ------------------ */
.ag-service__desc ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ag-service__desc li { position: relative; padding-left: 1.3em; font-size: 0.9rem; color: #5B6577; }
.ag-service__desc li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-royal); }

/* ---------- Services head intro line ------------------------------------ */
.ag-services-head__intro { color: #5B6577; font-size: 1.05rem; max-width: 56ch; margin: 1.25rem 0 0; }

/* ---------- Strategy section: "Tre aree. Un solo obiettivo." ------------- */
.ag-strategy { position: relative; text-align: center; padding: var(--section-pad) var(--gutter); overflow: hidden; }
.ag-strategy .ag-eyebrow { justify-content: center; color: var(--c-electric); }
.ag-strategy__heading { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.25rem, 5vw, 4.25rem); color: var(--c-white); max-width: 18ch; margin: 0 auto 1.5rem; line-height: 1.08; }
.ag-strategy__lead { color: rgba(255, 255, 255, 0.7); font-size: 1.05rem; max-width: 52ch; margin: 0 auto; }
.ag-strategy__line { display: flex; align-items: center; justify-content: center; margin: 3rem auto 0; max-width: 720px; }
.ag-strategy__node { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-electric); white-space: nowrap; }
.ag-strategy__track { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(24,168,255,0.1), rgba(24,168,255,0.6), rgba(24,168,255,0.1)); margin: 0 1rem; position: relative; overflow: hidden; }
.ag-strategy__track::after { content: ''; position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: ag-strategy-pulse 3.2s ease-in-out infinite; }
@keyframes ag-strategy-pulse { 0% { left: -30%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .ag-strategy__track::after { animation: none; display: none; } }
@media (max-width: 700px) { .ag-strategy__line { flex-direction: column; } .ag-strategy__track { width: 1px; height: 40px; margin: 0.75rem 0; } }

/* ---------- Testimonial editorial section -------------------------------- */
.ag-testimonials { padding: var(--section-pad) var(--gutter); max-width: var(--container-wide); margin: 0 auto; }
.ag-testimonials__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.75rem; align-items: stretch; }
.ag-testimonial-feature { background: var(--c-navy-deep); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.25rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-soft); }
.ag-testimonial-feature__quote { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; margin: 0 0 2rem; }
.ag-testimonial-feature__author strong { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.ag-testimonial-feature__author span { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }
.ag-testimonial-side { display: flex; flex-direction: column; gap: 1.75rem; }
.ag-testimonial-card { background: var(--c-white); border-radius: var(--radius-md); padding: 1.75rem; box-shadow: 0 10px 30px rgba(7,27,55,0.06); flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.ag-testimonial-card__quote { font-size: 0.98rem; color: #33405A; margin: 0 0 1.25rem; }
.ag-testimonial-card__author strong { display: block; font-family: var(--f-display); font-size: 0.95rem; color: var(--c-navy); }
.ag-testimonial-card__author span { font-size: 0.8rem; color: var(--c-steel); }
@media (max-width: 900px) { .ag-testimonials__grid { grid-template-columns: 1fr; } }

/* ---------- Brand positioning section ------------------------------------ */
.ag-brand-block { text-align: center; padding: clamp(5rem, 10vw, 8rem) var(--gutter); background: var(--c-navy-deep); }
.ag-brand-block__mark { width: 72px; height: auto; margin: 0 auto 2rem; filter: brightness(0) invert(1); opacity: 0.95; }
.ag-brand-block__word { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.5rem, 8vw, 6rem); letter-spacing: -0.01em; color: var(--c-white); line-height: 1; margin: 0; }
.ag-brand-block__tagline { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 1.25rem; }
.ag-services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
@media (max-width: 1024px) { .ag-services-grid { grid-template-columns: 1fr; } }

.ag-section { padding: var(--section-pad) var(--gutter); max-width: var(--container-wide); margin: 0 auto; }
