/* ============================================================
 * BWC THEME · template-grafica.css
 * Stili dedicati alla pagina /grafica-pubblicitaria/
 * Scroll-driven experience con transizioni forti tra sezioni
 * Caricato condizionalmente solo su quella pagina.
 * ============================================================ */

.gx {
	--gx-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--gx-ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
	--gx-bg: #F4EFE5;
	--gx-fg: #1C1C1C;
	--gx-muted: rgba(28,28,28,.65);
	--gx-border: rgba(28,28,28,.12);
	background: var(--gx-bg);
	color: var(--gx-fg);
	transition: background-color 1s var(--gx-ease), color 1s var(--gx-ease);
}
/* DARK MODE — la pagina Grafica segue il tema del sito */
html[data-bwc-theme="dark"] .gx {
	--gx-bg: #1C1C1C;
	--gx-fg: #F4EFE5;
	--gx-muted: rgba(244,239,229,.65);
	--gx-border: rgba(244,239,229,.12);
}
@media (prefers-reduced-motion: reduce) {
	.gx *, .gx *::before, .gx *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}

/* ============================================================
 * SEZIONE 01 · HERO SHRINK
 * ============================================================ */
.gx-hero {
	position: relative;
	min-height: 200vh;
}
.gx-hero__sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	padding: 0 var(--gutter);
	display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
	overflow: hidden;
}
.gx-hero__noise {
	position: absolute; inset: 0; pointer-events: none;
	opacity: .04;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.gx-hero__inner { position: relative; max-width: 1480px; margin: 0 auto; width: 100%; }
.gx-hero__eyebrow {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
	color: var(--gx-muted);
	display: flex; align-items: center; gap: 14px;
	margin-bottom: 32px;
}
.gx-hero__eyebrow::after { content: ''; height: 1px; flex: 1; background: currentColor; opacity: .25; }
.gx-hero h1 {
	font-family: var(--font-display);
	font-size: clamp(64px, 16vw, 280px);
	font-weight: 900;
	line-height: .85;
	letter-spacing: -0.04em;
	margin: 0;
	text-transform: uppercase;
	transform-origin: top left;
	will-change: transform;
}
.gx-hero h1 em {
	font-family: var(--font-italic); font-style: italic;
	color: var(--bwc-accent2); font-weight: 600;
	text-transform: lowercase;
	display: inline-block;
	transform: rotate(-3deg);
}
.gx-hero__sub {
	margin-top: clamp(20px, 3vw, 36px);
	max-width: 560px;
	font-size: clamp(15px, 1.4vw, 18px);
	color: var(--gx-muted);
	line-height: 1.55;
	opacity: 0; transform: translateY(20px);
	transition: opacity .8s var(--gx-ease), transform .8s var(--gx-ease);
}
.gx-hero.is-shrunk .gx-hero__sub { opacity: 1; transform: translateY(0); }
.gx-hero__sub strong { color: var(--gx-fg); }

.gx-scroll-hint {
	position: absolute;
	bottom: 32px; left: 50%; transform: translateX(-50%);
	font-family: var(--font-mono); font-size: 11px;
	letter-spacing: .25em; text-transform: uppercase;
	color: var(--gx-muted);
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	opacity: .5; transition: opacity .3s;
}
.gx-hero.is-shrunk .gx-scroll-hint { opacity: 0; }
.gx-scroll-hint::after {
	content: ''; width: 1px; height: 32px;
	background: currentColor;
	animation: gx-drop 1.6s ease-in-out infinite;
}
@keyframes gx-drop {
	0%, 100% { transform: scaleY(0); transform-origin: top; }
	50% { transform: scaleY(1); transform-origin: top; }
}

/* ============================================================
 * SEZIONE 02 · MANIFESTI STACK (sticky overlap)
 * ============================================================ */
.gx-stack { position: relative; }
.gx-stack__panel {
	position: sticky;
	top: 0;
	height: 100vh;
	width: 100%;
	display: flex; align-items: center;
	padding: clamp(60px, 10vw, 120px) var(--gutter);
	overflow: hidden;
	transform-origin: 50% 100%;
	transition: transform .8s var(--gx-ease), border-radius .8s var(--gx-ease);
}
.gx-stack__panel--1 { background: var(--bwc-accent2); color: #fff; z-index: 1; }
.gx-stack__panel--2 { background: #1C1C1C; color: #F4EFE5; z-index: 2; }
.gx-stack__panel--3 { background: var(--bwc-accent); color: #fff; z-index: 3; }

.gx-stack__panel.is-passed {
	transform: scale(.92) translateY(-20px) rotateX(2deg);
	border-radius: 32px 32px 0 0;
	box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}

.gx-stack__panel-inner { max-width: 1480px; margin: 0 auto; width: 100%; position: relative; }
.gx-stack__num {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
	margin-bottom: 32px; opacity: .55;
}
.gx-stack__quote {
	font-family: var(--font-display);
	font-size: clamp(40px, 9vw, 160px);
	font-weight: 900; line-height: .9; letter-spacing: -0.03em;
	margin: 0; text-transform: uppercase;
}
.gx-stack__quote em {
	font-family: var(--font-italic); font-style: italic;
	font-weight: 600; text-transform: lowercase;
}
.gx-stack__panel--1 .gx-stack__quote em,
.gx-stack__panel--3 .gx-stack__quote em { color: rgba(255,255,255,.85); }
.gx-stack__panel--2 .gx-stack__quote em { color: var(--bwc-accent2); }
.gx-stack__caption {
	margin-top: clamp(28px, 4vw, 48px);
	font-size: clamp(14px, 1.3vw, 17px);
	max-width: 600px;
	line-height: 1.5;
	opacity: .85;
}

/* Decorative cube */
.gx-cube {
	position: absolute;
	width: 200px; height: 200px;
	top: 50%; right: 8%;
	transform-style: preserve-3d;
	animation: gx-cube-rotate 16s linear infinite;
	pointer-events: none;
}
.gx-stack__panel--2 .gx-cube { left: 6%; right: auto; top: 70%; }
.gx-stack__panel--3 .gx-cube { right: auto; left: 50%; top: 12%; }
@keyframes gx-cube-rotate {
	to { transform: rotateX(360deg) rotateY(720deg); }
}
.gx-cube-face {
	position: absolute; inset: 0;
	border: 2px solid currentColor;
	opacity: .14;
}
.gx-cube-face--front  { transform: translateZ(100px); }
.gx-cube-face--back   { transform: rotateY(180deg) translateZ(100px); }
.gx-cube-face--right  { transform: rotateY(90deg) translateZ(100px); }
.gx-cube-face--left   { transform: rotateY(-90deg) translateZ(100px); }
.gx-cube-face--top    { transform: rotateX(90deg) translateZ(100px); }
.gx-cube-face--bottom { transform: rotateX(-90deg) translateZ(100px); }

/* ============================================================
 * SEZIONE 03 · MORPHING SHAPE
 * ============================================================ */
.gx-morph {
	position: relative;
	min-height: 300vh;
	background: #F4EFE5;
	color: #1C1C1C;
}
.gx-morph__sticky {
	position: sticky; top: 0;
	height: 100vh;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	padding: 0 var(--gutter);
	max-width: 1480px;
	margin: 0 auto;
	align-items: center;
}
@media (max-width: 880px) { .gx-morph__sticky { grid-template-columns: 1fr; padding-top: 80px; } }

.gx-morph__shape { display: flex; align-items: center; justify-content: center; height: 80vh; }
.gx-morph__svg {
	width: clamp(220px, 40vw, 480px);
	height: clamp(220px, 40vw, 480px);
	color: var(--bwc-accent2);
}
.gx-morph__svg path { transition: d 1s var(--gx-ease); }
.gx-morph__text { display: flex; flex-direction: column; gap: 18px; }
.gx-morph__num {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
	color: var(--bwc-accent2); font-weight: 700;
}
.gx-morph__steps { position: relative; min-height: clamp(120px, 18vw, 220px); }
.gx-morph__step {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; gap: 12px;
	opacity: 0; transform: translateY(30px);
	transition: opacity .6s var(--gx-ease), transform .6s var(--gx-ease);
}
.gx-morph__step.is-active { opacity: 1; transform: translateY(0); }
.gx-morph__step h3 {
	font-family: var(--font-display);
	font-size: clamp(36px, 5vw, 72px);
	font-weight: 900; line-height: .95; letter-spacing: -.025em;
	margin: 0;
}
.gx-morph__step h3 em { font-family: var(--font-italic); font-style: italic; color: var(--bwc-accent2); font-weight: 600; }
.gx-morph__step p {
	font-size: clamp(14px, 1.3vw, 17px);
	color: rgba(28,28,28,.65); line-height: 1.55;
	max-width: 460px; margin: 0;
}
.gx-morph__progress {
	display: flex; gap: 8px;
	margin-top: 24px;
}
.gx-morph__progress span {
	flex: 1; max-width: 60px;
	height: 3px; background: rgba(28,28,28,.12);
	border-radius: 999px;
	transition: background .3s;
}
.gx-morph__progress span.is-on { background: var(--bwc-accent2); }

/* ============================================================
 * SEZIONE 04 · CUBE FLIP REVEAL
 * ============================================================ */
.gx-cube-grid {
	padding: clamp(80px, 12vw, 160px) var(--gutter);
	background: #1C1C1C;
	color: #F4EFE5;
}
.gx-cube-grid__inner { max-width: 1480px; margin: 0 auto; }
.gx-cube-grid__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 80px); }
.gx-cube-grid__num {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
	color: var(--bwc-accent2); font-weight: 700;
	margin-bottom: 18px;
}
.gx-cube-grid h2 {
	font-family: var(--font-display);
	font-size: clamp(40px, 6vw, 88px);
	font-weight: 900; line-height: .92; letter-spacing: -.025em;
	margin: 0 0 24px;
}
.gx-cube-grid h2 em { font-family: var(--font-italic); font-style: italic; color: var(--bwc-accent2); font-weight: 600; }
.gx-cube-grid__lead { font-size: 16px; color: rgba(244,239,229,.6); line-height: 1.55; max-width: 560px; }

.gx-cube-grid__cards {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
	perspective: 1500px;
}
@media (max-width: 980px) { .gx-cube-grid__cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gx-cube-grid__cards { grid-template-columns: 1fr; } }

.gx-flip-card {
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.08);
	padding: 32px 26px;
	border-radius: 12px;
	display: flex; flex-direction: column; gap: 16px;
	min-height: 320px;
	transform: rotateY(80deg) translateZ(-100px);
	opacity: 0;
	transform-origin: 0 50%;
	transition: transform 1s var(--gx-ease), opacity .8s var(--gx-ease);
}
.gx-flip-card.in-view { transform: rotateY(0) translateZ(0); opacity: 1; }
.gx-flip-card:nth-child(1).in-view { transition-delay: 0s; }
.gx-flip-card:nth-child(2).in-view { transition-delay: .12s; }
.gx-flip-card:nth-child(3).in-view { transition-delay: .24s; }
.gx-flip-card:nth-child(4).in-view { transition-delay: .36s; }
.gx-flip-card:nth-child(5).in-view { transition-delay: .48s; }
.gx-flip-card:nth-child(6).in-view { transition-delay: .6s; }
.gx-flip-card:hover { background: rgba(255,255,255,.07); border-color: var(--bwc-accent2); }
.gx-flip-card__num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--bwc-accent2); font-weight: 700; }
.gx-flip-card__demo {
	flex: 1;
	display: flex; align-items: center; justify-content: center;
	min-height: 120px;
	border-radius: 6px;
	background: rgba(255,255,255,.03);
	position: relative; overflow: hidden;
}
.gx-flip-card__title { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.gx-flip-card__desc { font-size: 13px; color: rgba(244,239,229,.6); line-height: 1.5; margin: 0; }

.gx-flip-card--accent { background: var(--bwc-accent2); color: #fff; border-color: transparent; }
.gx-flip-card--accent .gx-flip-card__num { color: rgba(255,255,255,.7); }
.gx-flip-card--accent .gx-flip-card__desc { color: rgba(255,255,255,.85); }
.gx-flip-card--accent .gx-flip-card__demo { background: rgba(0,0,0,.18); }

/* Demo content */
.gx-demo-mark {
	width: 60px; height: 60px;
	background: #F4EFE5; color: #1C1C1C;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-weight: 900; font-size: 22px;
}
.gx-demo-mark--xs { width: 14px; height: 14px; font-size: 7px; }
.gx-demo-row { display: flex; align-items: center; gap: 14px; }
.gx-demo-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; opacity: .55; text-transform: uppercase; }
.gx-demo-half-grid { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.gx-demo-half { display: flex; align-items: center; justify-content: center; }
.gx-demo-half--light { background: rgba(255,255,255,.08); }
.gx-demo-half--dark { background: rgba(0,0,0,.4); }
.gx-demo-half--light .gx-demo-mark { background: #F4EFE5; color: #1C1C1C; width: 42px; height: 42px; font-size: 16px; }
.gx-demo-half--dark .gx-demo-mark { background: #1C1C1C; color: #F4EFE5; width: 42px; height: 42px; font-size: 16px; }
.gx-demo-flash {
	font-family: var(--font-display);
	font-size: 56px; font-weight: 900;
	color: #F4EFE5; line-height: 1;
	display: flex; align-items: center; gap: 8px;
}
.gx-demo-flash::before {
	content: '◆'; color: var(--bwc-accent2); font-size: 28px;
}
.gx-demo-pair {
	width: 100%; padding: 0 14px;
	display: flex; align-items: center; gap: 12px;
	font-size: 13px;
}
.gx-demo-pair--good { color: #F4EFE5; border-left: 2px solid #1AA66A; padding-left: 12px; }
.gx-demo-pair--bad  { color: rgba(244,239,229,.5); border-left: 2px solid #d04444; padding-left: 12px; }
.gx-demo-pair__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; opacity: .5; display: block; margin-bottom: 2px; }
.gx-demo-pair__type { font-family: var(--font-italic); font-style: italic; font-weight: 600; font-size: 17px; }
.gx-demo-pair--bad .gx-demo-pair__type { font-family: 'Comic Sans MS', cursive; font-style: normal; color: #e69100; }
.gx-demo-eras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 18px; width: 100%; }
.gx-demo-era {
	aspect-ratio: 1;
	background: rgba(255,255,255,.06);
	border-radius: 4px;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-weight: 800; font-size: 13px;
	color: #F4EFE5; position: relative;
}
.gx-demo-era[data-y]::after {
	content: attr(data-y);
	position: absolute; bottom: -16px; left: 0; right: 0;
	font-family: var(--font-mono); font-size: 8px; opacity: .5;
	text-align: center; letter-spacing: .08em;
}
.gx-demo-era--current { background: var(--bwc-accent2); color: #fff; }
.gx-demo-sales {
	font-family: var(--font-display);
	font-size: 38px; font-weight: 900; letter-spacing: -.02em;
	color: #fff;
	display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.gx-demo-sales em { font-family: var(--font-italic); font-style: italic; font-size: 22px; font-weight: 600; opacity: .85; }

/* ============================================================
 * SEZIONE 05 · BRAND ANATOMY
 * ============================================================ */
.gx-anatomy {
	padding: clamp(80px, 12vw, 160px) var(--gutter);
	background: #F4EFE5; color: #1C1C1C;
}
.gx-anatomy__inner { max-width: 1480px; margin: 0 auto; }
.gx-anatomy__head {
	display: grid; grid-template-columns: 5fr 7fr; gap: 32px;
	margin-bottom: clamp(48px, 7vw, 80px);
	align-items: end;
}
@media (max-width: 880px) { .gx-anatomy__head { grid-template-columns: 1fr; } }
.gx-anatomy__num {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
	color: var(--bwc-accent2); font-weight: 700; margin-bottom: 18px;
}
.gx-anatomy h2 {
	font-family: var(--font-display);
	font-size: clamp(40px, 6vw, 88px);
	font-weight: 900; line-height: .92; letter-spacing: -.025em;
	margin: 0;
}
.gx-anatomy h2 em { font-family: var(--font-italic); font-style: italic; color: var(--bwc-accent2); font-weight: 600; }
.gx-anatomy__lead { font-size: 16px; color: rgba(28,28,28,.65); line-height: 1.55; max-width: 480px; }

.gx-anatomy__grid {
	display: grid; grid-template-columns: 4fr 8fr; gap: 24px;
}
@media (max-width: 880px) { .gx-anatomy__grid { grid-template-columns: 1fr; } }

.gx-morph-block {
	background: #1C1C1C; color: #F4EFE5;
	padding: 32px;
	display: flex; flex-direction: column; gap: 14px;
	border-radius: 100px;
	transition: border-radius 1.2s var(--gx-ease), transform 1.2s var(--gx-ease), opacity .8s;
	opacity: 0;
	transform: scale(.85) rotate(-3deg);
}
.gx-morph-block.in-view {
	border-radius: 14px;
	transform: scale(1) rotate(0);
	opacity: 1;
}
.gx-morph-block:nth-child(2).in-view { transition-delay: .15s; }
.gx-morph-block__label {
	font-family: var(--font-mono); font-size: 11px;
	letter-spacing: .2em; text-transform: uppercase;
	color: var(--bwc-accent2); font-weight: 700;
}
.gx-morph-block__title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0; }

.gx-brand-logo {
	background: #F4EFE5; color: #1C1C1C;
	border-radius: 8px;
	padding: 60px 32px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.gx-brand-logo__mark {
	width: 60px; height: 60px;
	background: #1C1C1C;
	border-radius: 50%;
	position: relative;
}
.gx-brand-logo__mark::before {
	content: ''; position: absolute;
	top: 50%; left: 50%;
	width: 30px; height: 30px;
	background: var(--bwc-accent2);
	border-radius: 50% 50% 0 50%;
	transform: translate(-50%, -50%) rotate(-15deg);
}
.gx-brand-logo__name {
	font-family: var(--font-mono); font-weight: 700;
	font-size: 14px; letter-spacing: .25em;
	margin-top: 6px;
}
.gx-brand-logo__tag { font-family: var(--font-italic); font-style: italic; font-size: 11px; opacity: .55; }

.gx-right-stack { display: flex; flex-direction: column; gap: 24px; }
.gx-right-stack .gx-morph-block:nth-child(1).in-view { transition-delay: .3s; }
.gx-right-stack .gx-morph-block:nth-child(2).in-view { transition-delay: .45s; }
.gx-right-stack .gx-morph-block:nth-child(3).in-view { transition-delay: .6s; }

.gx-palette-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gx-swatch {
	aspect-ratio: 1; border-radius: 6px;
	display: flex; align-items: flex-end; padding: 10px;
	font-family: var(--font-mono); font-size: 9px;
	letter-spacing: .1em; color: rgba(255,255,255,.85);
	font-weight: 600;
}
.gx-s-ink { background: #1C1C1C; }
.gx-s-cream { background: #F4EFE5; color: rgba(28,28,28,.65); }
.gx-s-terra { background: #C66B3C; }
.gx-s-ochre { background: #E8A33D; }
.gx-s-sage { background: #6B7C5E; }

.gx-type-row { padding: 14px 0; border-bottom: 1px solid rgba(244,239,229,.08); }
.gx-type-row:last-child { border-bottom: none; }
.gx-type-row__label { font-family: var(--font-mono); font-size: 10px; opacity: .5; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 4px; }
.gx-type-display { font-family: var(--font-display); font-size: 32px; font-weight: 900; line-height: 1; }
.gx-type-italic { font-family: var(--font-italic); font-style: italic; font-size: 24px; font-weight: 500; line-height: 1.1; }
.gx-type-body { font-family: var(--font-display); font-size: 14px; font-weight: 400; line-height: 1.5; opacity: .8; }

.gx-asset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 600px) { .gx-asset-row { grid-template-columns: repeat(2, 1fr); } }
.gx-asset {
	aspect-ratio: 3/4;
	border-radius: 6px;
	padding: 12px;
	font-family: var(--font-mono); font-size: 9px;
	letter-spacing: .15em; text-transform: uppercase;
	display: flex; align-items: flex-end;
	color: #F4EFE5;
	font-weight: 700;
}
.gx-asset--biz { background: linear-gradient(135deg, #F4EFE5, #FFF8EC); color: #1C1C1C; }
.gx-asset--pkg { background: linear-gradient(180deg, #6B7C5E, #4A5840); }
.gx-asset--lbl { background: linear-gradient(135deg, #C66B3C, #8B4521); }
.gx-asset--scl { background: var(--bwc-accent2); }

/* ============================================================
 * SEZIONE 06 · CTA EXPLOSION
 * ============================================================ */
.gx-cta {
	min-height: 100vh;
	background: var(--bwc-accent2);
	color: #fff;
	padding: clamp(80px, 14vw, 200px) var(--gutter);
	position: relative;
	overflow: hidden;
	display: flex; align-items: center; justify-content: center;
}
.gx-cta::before, .gx-cta::after {
	content: ''; position: absolute;
	border-radius: 50%; pointer-events: none;
}
.gx-cta::before {
	width: 800px; height: 800px;
	background: radial-gradient(circle, rgba(255,255,255,.15), transparent 60%);
	top: -200px; left: -200px;
	animation: gx-cta-orb 18s ease-in-out infinite;
}
.gx-cta::after {
	width: 600px; height: 600px;
	background: radial-gradient(circle, rgba(0,0,0,.2), transparent 60%);
	bottom: -100px; right: -100px;
	animation: gx-cta-orb 22s ease-in-out infinite reverse;
}
@keyframes gx-cta-orb {
	50% { transform: translate(80px, -40px) scale(1.15); }
}
.gx-cta__inner {
	position: relative; max-width: 1280px; text-align: center;
	transform: scale(.6); opacity: 0;
	transition: transform 1.4s var(--gx-ease-back), opacity .8s;
}
.gx-cta__inner.in-view { transform: scale(1); opacity: 1; }
.gx-cta__num {
	font-family: var(--font-mono);
	font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
	margin-bottom: 28px; opacity: .65;
}
.gx-cta h2 {
	font-family: var(--font-display);
	font-size: clamp(48px, 9vw, 160px);
	font-weight: 900; line-height: .9;
	letter-spacing: -.03em;
	margin: 0 0 32px;
	text-transform: uppercase;
}
.gx-cta h2 em { font-family: var(--font-italic); font-style: italic; font-weight: 600; text-transform: lowercase; color: rgba(255,255,255,.92); }
.gx-cta p {
	font-size: clamp(15px, 1.4vw, 18px);
	max-width: 560px; margin: 0 auto 36px;
	line-height: 1.6; opacity: .9;
}
.gx-btn-large {
	display: inline-flex; align-items: center; gap: 14px;
	padding: 22px 40px; border-radius: 999px;
	font-weight: 700; font-size: 17px;
	background: #fff; color: #1C1C1C;
	transition: transform .3s var(--gx-ease);
	cursor: pointer;
}
.gx-btn-large:hover { transform: scale(1.06); color: #1C1C1C; }
.gx-btn-large::after { content: '→'; }

/* ============================================================
 * TRANSLATION-RESILIENT (Weglot) overrides per Grafica
 * ============================================================ */

/* Hero shrink: titolo scalato preserva equilibrio */
.gx-hero h1 {
	max-width: 14ch;
	text-wrap: balance;
}

/* Stack manifesti: max-width sui claim per traduzioni più corte/lunghe */
.gx-stack__quote {
	max-width: 18ch;
	text-wrap: balance;
}

/* Morph step: testo cambia ma area resta */
.gx-morph__steps {
	min-height: clamp(180px, 22vw, 280px);
}
.gx-morph__step h3 {
	max-width: 14ch;
	text-wrap: balance;
}

/* Cube flip cards: altezza minima maggiore per testi più lunghi */
.gx-flip-card {
	min-height: 360px;
}
.gx-flip-card__title {
	min-height: 2.4em; /* spazio per 2 righe di titolo */
}
.gx-flip-card__desc {
	min-height: 5em; /* spazio per ~3 righe descrizione */
}

/* Anatomy blocks: contenuto può espandersi senza rompere il sistema */
.gx-morph-block { min-height: 200px; }
.gx-brand-logo { min-height: 220px; }

/* CTA giant: text-balance + max-width per evitare 4 righe */
.gx-cta h2 {
	max-width: 14ch;
	text-wrap: balance;
	margin-left: auto;
	margin-right: auto;
}

/* Bugfix 1.9.4: hero giant ridotto per assorbire traduzioni più lunghe */
.gx-hero h1 {
	font-size: clamp(56px, 11vw, 180px) !important;
	overflow-wrap: break-word;
	hyphens: auto;
}
@media (max-width: 700px) {
	.gx-hero h1 { font-size: clamp(40px, 11vw, 80px) !important; }
}

/* Cube grid + Anatomy h2 */
.gx-cube-grid h2,
.gx-anatomy h2 {
	font-size: clamp(32px, 5.5vw, 72px) !important;
	max-width: 18ch;
	text-wrap: balance;
}

/* CTA giant grafica */
.gx-cta h2 {
	font-size: clamp(40px, 7vw, 96px) !important;
	max-width: 14ch;
	text-wrap: balance;
	hyphens: auto;
}

/* ============================================================
 * MOBILE — Scroll-driven CALIBRATO (≤880px)
 * Mantiene TUTTI gli effetti (sticky, morph, flip card 3D, cube)
 * ma riduce intensità/altezze per UX touch-friendly.
 * Diagnosi e fix da analisi Claude in Chrome.
 * ============================================================ */

/* iOS: no rubber-band sul body (può fare flash dello sticky) */
html, body { overscroll-behavior-y: none; }

@media (max-width: 880px) {

	/* B1 — Reset overflow-safe globale per tutti i grid */
	.gx-anatomy__grid,
	.gx-cube-grid__cards,
	.gx-asset-row,
	.gx-palette-row,
	.gx-morph__sticky { min-width: 0; }
	.gx-anatomy__grid > *,
	.gx-cube-grid__cards > *,
	.gx-asset-row > *,
	.gx-morph__sticky > * { min-width: 0; }

	/* B2 — Grid columns adattivi (mantiene 2 colonne dove possibile) */
	.gx-anatomy__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.gx-cube-grid__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.gx-asset-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.gx-palette-row {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 4px;
	}
	.gx-swatch {
		font-size: 8px;
		padding: 4px;
		min-width: 0;
	}

	/* B3 — Cubo decorativo: 100x100 invece di 200x200 */
	.gx-cube {
		width: 100px;
		height: 100px;
		right: 12px;
		top: 60%;
		opacity: .5;
		animation-duration: 24s; /* rallentato per ridurre carico GPU */
	}
	.gx-cube-face { transform-origin: center; }
	.gx-cube-face--front  { transform: translateZ(50px); }
	.gx-cube-face--back   { transform: rotateY(180deg) translateZ(50px); }
	.gx-cube-face--right  { transform: rotateY(90deg) translateZ(50px); }
	.gx-cube-face--left   { transform: rotateY(-90deg) translateZ(50px); }
	.gx-cube-face--top    { transform: rotateX(90deg) translateZ(50px); }
	.gx-cube-face--bottom { transform: rotateX(-90deg) translateZ(50px); }
	.gx-stack__panel--2 .gx-cube { left: 12px; right: auto; top: 75%; }
	.gx-stack__panel--3 .gx-cube { left: 50%; right: auto; top: 8%; }

	/* B4 — Sticky con altezze dinamiche e dvh (90dvh non 100vh) */
	.gx-stack__panel {
		height: 90dvh;
		min-height: 540px; /* fallback per device piccoli o no-dvh */
		padding: clamp(40px, 8vw, 80px) 20px;
	}
	.gx-morph { min-height: 320dvh; } /* 5 shapes × ~64dvh ciascuna = scroll fluido tra step */
	.gx-morph__sticky {
		height: 90dvh;
		grid-template-columns: 1fr;
		padding: 20px;
		gap: 16px;
	}
	.gx-morph__shape {
		height: 35dvh;
		max-height: 280px;
	}
	.gx-morph__steps { gap: 12px; }
	.gx-morph__step {
		padding: 12px 14px;
		font-size: 14px;
	}

	/* B5 — Effetto scale al passing più sottile */
	.gx-stack__panel.is-passed {
		transform: scale(.96) translateY(-8px);
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -6px 20px rgba(0,0,0,.15);
	}

	/* B6 — Tipografia fluida adattiva */
	.gx-hero h1 {
		font-size: clamp(40px, 13vw, 72px) !important;
		line-height: 1.02;
		word-break: keep-all;
		hyphens: manual;
		-webkit-hyphens: manual;
		overflow-wrap: break-word;
	}
	.gx-stack__quote {
		font-size: clamp(32px, 8.5vw, 56px);
		line-height: .95;
	}
	.gx-stack__caption { font-size: 13px; }
	.gx-cube-grid h2,
	.gx-anatomy h2,
	.gx-stack h2,
	.gx-morph h2 {
		font-size: clamp(28px, 7.5vw, 48px) !important;
		line-height: 1.1;
	}
	.gx-cta h2 {
		font-size: clamp(34px, 9vw, 56px) !important;
		line-height: 1.05;
	}

	/* B7 — Compositing hint per smooth scroll su touch */
	.gx-stack__panel,
	.gx-morph__sticky,
	.gx-flip-card,
	.gx-morph-block {
		will-change: transform;
		transform: translateZ(0);
		backface-visibility: hidden;
	}
	.gx-morph__svg path {
		transition: d .6s var(--gx-ease, cubic-bezier(.2,.8,.2,1));
	}

	/* B8 — Containment per ottimizzare paint */
	.gx-stack__panel,
	.gx-cube-grid__inner,
	.gx-anatomy__inner {
		contain: layout paint;
	}

	/* B9 — Stato iniziale flip-card e morph-block ridotto (rotazione meno estrema) */
	.gx-flip-card {
		transform: translateY(40px) rotateY(20deg);
		transform-origin: center;
	}
	.gx-flip-card.in-view {
		transform: translateY(0) rotateY(0);
	}
	.gx-morph-block {
		transform: translateY(30px) scale(.95);
	}
	.gx-morph-block.in-view {
		transform: translateY(0) scale(1);
	}

	/* Anatomy header: 1 colonna */
	.gx-anatomy__head { grid-template-columns: 1fr; }
}

/* Sotto 480px: cube grid a 1 colonna */
@media (max-width: 480px) {
	.gx-cube-grid__cards { grid-template-columns: 1fr; }
}

/* B10 — Reduced motion (accessibilità + dispositivi deboli) */
@media (prefers-reduced-motion: reduce) {
	.gx-stack__panel { position: static !important; height: auto !important; }
	.gx-morph { min-height: auto !important; }
	.gx-morph__sticky { position: static !important; height: auto !important; }
	.gx-flip-card,
	.gx-morph-block {
		transform: none !important;
		opacity: 1 !important;
		transition: none !important;
	}
	.gx-cube { animation: none !important; }
}
/* FIX dark mode — le FAQ (classi bwc-) dentro <main class="gx"> ereditano
   il colore nero di .gx. Forziamo i colori del tema in dark mode. */
html[data-bwc-theme="dark"] .gx .bwc-faq summary,
html[data-bwc-theme="dark"] .gx .bwc-section__head h2 {
	color: var(--bwc-white);
}
html[data-bwc-theme="dark"] .gx .bwc-faq__answer {
	color: rgba(255,255,255,.65);
}
/* La pagina Grafica segue il tema del sito: in dark, inverti le variabili --gx */
html[data-bwc-theme="dark"] .gx {
	--gx-bg: #1C1C1C;
	--gx-fg: #F4EFE5;
	--gx-muted: rgba(244,239,229,.65);
	--gx-border: rgba(244,239,229,.12);
}