/* ── Web Design & Sviluppo page ──────────────────────────────────── */

/* CTA bg: nero in dark, grigio in light */
:root {
	--sw-cta-bg: #000;
}
@media ( prefers-color-scheme: light ) {
	:root:not( [data-theme="dark"] ) { --sw-cta-bg: #d0d0d0; }
}
:root[data-theme="light"] { --sw-cta-bg: #d0d0d0; }

/* ── WP wrapper resets ─────────────────────────────────────────────── */
.page-sviluppo-web .wp-block-post-title { display: none; }
.page-sviluppo-web body,
.page-sviluppo-web .wp-site-blocks { overflow-x: hidden; }
.page-sviluppo-web .wp-block-post-content,
.page-sviluppo-web .entry-content,
.page-sviluppo-web article,
.page-sviluppo-web main > *,
.page-sviluppo-web .wp-site-blocks > * {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
.page-sviluppo-web .wp-block-post-content > *:first-child,
.page-sviluppo-web .entry-content > *:first-child { margin-top: 0 !important; }

/* ── Outer wrapper ─────────────────────────────────────────────────── */
.sw-page {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc( 50% - 50vw ) !important;
	margin-right: calc( 50% - 50vw ) !important;
	box-sizing: border-box;
	background: var( --bg );
	color: var( --text );
	overflow-x: hidden;
}

/* ── Eyebrow label ─────────────────────────────────────────────────── */
.sw-eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --accent-cyan );
	margin: 0 0 clamp( 16px, 2.5vh, 28px );
}

/* Accent word in headings */
.sw-accent { color: var( --accent-cyan ); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.sw-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp( 40px, 6vw, 80px );
	padding:
		clamp( 60px, 8vh, 100px )
		clamp( 24px, 6vw, 96px )
		clamp( 40px, 6vh, 80px );
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}

.sw-hero__content { display: flex; flex-direction: column; }

.sw-hero__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2.6rem, 5.2vw, 4.6rem );
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0 0 clamp( 20px, 3vh, 36px );
}

.sw-hero__tagline {
	font-size: clamp( 1rem, 1.8vw, 1.35rem );
	font-weight: 600;
	color: var( --accent-cyan );
	line-height: 1.35;
	margin: 0 0 clamp( 24px, 4vh, 40px );
}

.sw-hero__body {
	color: var( --text-muted );
	font-size: clamp( 0.88rem, 1.3vw, 1.02rem );
	line-height: 1.8;
	margin: 0 0 clamp( 28px, 4vh, 44px );
	display: flex;
	flex-direction: column;
	gap: 1em;
}
.sw-hero__body p { margin: 0; }

.sw-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.8em 1.8em;
	background: var( --accent-cyan );
	color: #111;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	border-radius: 100px;
	text-decoration: none;
	align-self: flex-start;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sw-hero__btn:hover {
	background: #00c5e0;
	transform: translateY( -2px );
	box-shadow: 0 8px 24px rgba( 34, 225, 255, 0.35 );
}

.sw-hero__visual {
	display: flex;
	align-items: center;
	justify-content: center;
}
.sw-hero__visual img {
	width: 100%;
	max-width: 560px;
	height: auto;
	filter: drop-shadow( 0 24px 64px rgba( 34, 225, 255, 0.18 ) );
	animation: sw-float 6s ease-in-out infinite;
}
@keyframes sw-float {
	0%, 100% { transform: translateY( 0 ); }
	50%       { transform: translateY( -14px ); }
}

/* ── Services grid ─────────────────────────────────────────────────── */
.sw-services {
	padding:
		clamp( 60px, 10vh, 120px )
		clamp( 24px, 6vw, 96px );
	max-width: 1440px;
	margin: 0 auto;
}

.sw-services__intro { margin-bottom: clamp( 40px, 6vh, 72px ); }

.sw-services__heading {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2rem, 4vw, 3.5rem );
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0;
	text-align: center;
}

.sw-services__grid {
	display: grid;
	grid-template-columns: repeat( 6, 1fr );
	gap: 8px;
	max-width: none;
}

/* ── Service cards ─────────────────────────────────────────────────── */
.sw-card {
	display: flex;
	flex-direction: column;
	background: var( --surface );
	border: 1px solid var( --border );
	border-radius: 20px;
	overflow: hidden;
	text-decoration: none;
	color: var( --text );
	transition:
		transform 0.35s cubic-bezier( 0.34, 1.56, 0.64, 1 ),
		box-shadow 0.35s ease,
		border-color 0.25s ease;
}
.sw-card:hover {
	transform: translateY( -10px );
	border-color: var( --accent-cyan );
	box-shadow:
		0 24px 64px rgba( 34, 225, 255, 0.18 ),
		0 0 0 1px var( --accent-cyan );
}

.sw-card__image-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp( 16px, 3%, 28px );
	box-sizing: border-box;
}
.sw-card__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.45s ease;
}
.sw-card:hover .sw-card__image-wrap img { transform: scale( 1.06 ); }

.sw-card__body {
	flex: 1;
	padding:
		clamp( 18px, 2.2vw, 28px )
		clamp( 18px, 2.2vw, 28px )
		clamp( 10px, 1.2vw, 14px );
}
.sw-card__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 1.05rem, 1.6vw, 1.35rem );
	line-height: 1.15;
	margin: 0 0 0.4em;
	color: var( --text );
}
.sw-card__subtitle {
	font-size: clamp( 0.8rem, 1.1vw, 0.92rem );
	color: var( --text-muted );
	line-height: 1.55;
	margin: 0;
}

.sw-card__arrow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 0 clamp( 18px, 2.2vw, 28px ) clamp( 16px, 2vw, 24px );
	font-size: 0;
}
.sw-card__arrow::after {
	content: '→';
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid var( --accent-cyan );
	color: var( --accent-cyan );
	font-size: 1rem;
	font-weight: 600;
	transition: background 0.25s ease, transform 0.25s ease;
}
.sw-card:hover .sw-card__arrow::after {
	background: var( --accent-cyan );
	color: #111;
	transform: translateX( 4px );
}

/* ── Approach section ──────────────────────────────────────────────── */
.sw-approach {
	display: grid;
	grid-template-columns: 55fr 45fr;
	align-items: start;
	gap: clamp( 40px, 6vw, 80px );
	padding:
		clamp( 60px, 10vh, 120px )
		clamp( 24px, 6vw, 96px );
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}

.sw-approach__content { display: flex; flex-direction: column; }

.sw-approach__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2rem, 4vw, 3.5rem );
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0 0 clamp( 16px, 2.5vh, 28px );
}
.sw-approach__intro {
	font-size: clamp( 0.88rem, 1.3vw, 1.02rem );
	color: var( --text-muted );
	line-height: 1.8;
	margin: 0 0 clamp( 40px, 6vh, 64px );
}

/* Steps orizzontali con linea tratteggiata */
.sw-steps {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 12px;
	position: relative;
}
.sw-steps::before {
	content: '';
	position: absolute;
	top: 23px;
	left: calc( 24px + 2.5% );
	right: calc( 24px + 2.5% );
	height: 1px;
	background: repeating-linear-gradient(
		90deg,
		var( --accent-cyan ) 0,
		var( --accent-cyan ) 5px,
		transparent 5px,
		transparent 12px
	);
	z-index: 0;
}

.sw-step {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}
.sw-step__number {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid var( --accent-cyan );
	color: var( --accent-cyan );
	background: var( --bg );
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: 0.85rem;
	letter-spacing: 0.05em;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}
.sw-step__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 700;
	font-size: clamp( 0.88rem, 1.2vw, 1rem );
	color: var( --text );
	margin: 0 0 0.3em;
}
.sw-step__desc {
	font-size: clamp( 0.78rem, 1vw, 0.88rem );
	color: var( --text-muted );
	line-height: 1.6;
	margin: 0;
}

.sw-approach__visual {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: clamp( 20px, 4vh, 48px );
}
.sw-approach__visual img {
	width: 100%;
	max-width: 520px;
	height: auto;
	filter: drop-shadow( 0 20px 50px rgba( 34, 225, 255, 0.15 ) );
}

/* ── CTA finale ────────────────────────────────────────────────────── */
.sw-cta {
	position: relative;
	text-align: center;
	padding:
		clamp( 60px, 10vh, 120px )
		clamp( 24px, 6vw, 96px );
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}
.sw-cta::before {
	content: '';
	position: absolute;
	top: 0; bottom: 0;
	left: 50%;
	transform: translateX( -50% );
	width: 100vw;
	background: var( --sw-cta-bg );
	z-index: 0;
}
.sw-cta > * { position: relative; z-index: 1; }

.sw-cta__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2rem, 4vw, 3.5rem );
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0 0 clamp( 16px, 2.5vh, 24px );
}
.sw-cta__body {
	font-size: clamp( 0.88rem, 1.3vw, 1.02rem );
	color: var( --text-muted );
	line-height: 1.75;
	max-width: 560px;
	margin: 0 auto clamp( 28px, 4vh, 44px );
}
.sw-cta__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.8em 2em;
	background: var( --accent-cyan );
	color: #111;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	border-radius: 100px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sw-cta__btn:hover {
	background: #00c5e0;
	transform: translateY( -2px );
	box-shadow: 0 8px 24px rgba( 34, 225, 255, 0.35 );
}

/* ── Tablet (768 – 1100px) ─────────────────────────────────────────── */
@media ( max-width: 1100px ) {
	.sw-hero {
		grid-template-columns: 1fr;
		padding-top: clamp( 100px, 12vh, 140px );
	}
	.sw-hero__visual { order: -1; }
	.sw-hero__visual img { max-width: 360px; }
	.sw-hero__btn { align-self: center; }

	.sw-services__grid { grid-template-columns: repeat( 3, 1fr ); }

	.sw-approach { grid-template-columns: 1fr; }
	.sw-approach__visual { order: -1; }
	.sw-approach__visual img { max-width: 360px; }
	.sw-steps { grid-template-columns: repeat( 2, 1fr ); gap: 24px; }
	.sw-steps::before { display: none; }
}

/* ── Mobile (≤ 600px) ─────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.sw-hero {
		padding: 90px 20px 48px;
		gap: 28px;
	}
	.sw-hero__content,
	.sw-hero__visual { padding-left: 20px; padding-right: 20px; }
	.sw-hero__visual img { max-width: 280px; }

	.sw-services { padding: 48px 20px; }
	.sw-services__grid { grid-template-columns: repeat( 2, 1fr ); }
	.sw-steps { grid-template-columns: 1fr; }

	.sw-card__image-wrap { padding: 20px; }
	.sw-card__body { padding: 20px 20px 10px; }
	.sw-card__arrow { padding: 0 20px 16px; }

	.sw-approach {
		padding: 48px 20px;
		gap: 32px;
	}
	.sw-approach__visual img { max-width: 280px; }

	.sw-cta { padding: 48px 20px; }
}
