/* =============================================================
   TEXT TO BRAND — SIGNATURE TRANSFORMATION SCENE
   Loaded only on pages that include home-v2-transformation.php.
   All classes are scoped under .tb-scene.
   ============================================================= */

.tb-scene {
	background: #0B0D1A;
	color: #F7F6F2;
	position: relative;
	z-index: 1;
}
.tb-scene__pin {
	height: 100vh;
	width: 100%;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Ambient light-source glows */
.tb-scene__ambient { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.tb-scene__glow { position: absolute; border-radius: 50%; filter: blur(120px); }
.tb-scene__glow--a {
	top: -240px; left: -160px;
	width: 640px; height: 640px;
	background: color-mix(in srgb, var(--primary) 45%, transparent);
	opacity: 0.55;
}
.tb-scene__glow--b {
	bottom: -300px; right: -140px;
	width: 720px; height: 720px;
	background: color-mix(in srgb, var(--secondary) 60%, transparent);
	opacity: 0.35;
}

/* Editorial header — always visible above the pinned canvas */
.tb-scene__head {
	position: relative;
	z-index: 3;
	text-align: center;
	padding: 3.5rem 1.5rem 0;
}
.tb-scene__eyebrow {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: color-mix(in srgb, #fff 60%, transparent);
	padding: .3rem .9rem;
	border: 1px solid color-mix(in srgb, #fff 15%, transparent);
	border-radius: 999px;
	margin-bottom: 1.1rem;
}
.tb-scene__title {
	font-size: clamp(1.95rem, 4.2vw, 3.15rem);
	font-weight: 500;
	letter-spacing: -0.032em;
	line-height: 1.05;
	color: #fff;
	margin: 0;
}
.tb-scene__title em {
	font-style: italic;
	font-family: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
	font-weight: 400;
	color: color-mix(in srgb, var(--primary) 60%, #fff);
}

/* Stage: pinned canvas — every state stacks in the same area */
.tb-scene__stage {
	flex: 1;
	position: relative;
	z-index: 2;
	min-height: 0;
}
.tb-scene__state {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem 2rem;
	opacity: 0;
	visibility: hidden;
	will-change: opacity, transform, filter;
}
.tb-scene__state[data-state="0"] { opacity: 1; visibility: visible; }

/* =============================================================
   STATE 0 — THE IDEA
   ============================================================= */
.tb-idea {
	max-width: 960px;
	width: 100%;
	border: 1px solid color-mix(in srgb, #fff 10%, transparent);
	border-radius: 20px;
	background: color-mix(in srgb, #fff 3%, transparent);
	padding: 1.75rem 2.5rem 1.75rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.4),
		0 40px 120px -40px color-mix(in srgb, var(--primary) 40%, transparent);
}
.tb-idea__label {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: 0.72rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .18em;
	color: color-mix(in srgb, #fff 60%, transparent);
	margin-bottom: 1.25rem;
}
.tb-idea__dot {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--primary);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent);
	animation: tb-pulse 2s ease-in-out infinite;
}
@keyframes tb-pulse { 0%,100%{opacity:1;} 50%{opacity:.55;} }
.tb-idea__sentence {
	font-family: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.55rem, 3.2vw, 2.65rem);
	line-height: 1.28;
	letter-spacing: -0.018em;
	color: #F7F6F2;
	margin: 0 0 1.25rem;
}
.tb-idea__sentence span { display: inline-block; will-change: opacity, filter; }
.tb-idea__cursor {
	display: inline-block;
	width: 3px; height: 1em;
	vertical-align: -0.16em;
	margin-left: 0.15em;
	background: var(--primary);
	animation: tb-blink 1.1s steps(2, end) infinite;
}
@keyframes tb-blink { 0%,50%{opacity:1;} 51%,100%{opacity:0;} }
.tb-idea__meta {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem;
	padding-top: 1.1rem;
	border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
}
.tb-idea__meta-item {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: 0.78rem; font-weight: 500;
	color: color-mix(in srgb, #fff 75%, transparent);
}
.tb-idea__meta-item svg { width: 14px; height: 14px; color: var(--primary); }
.tb-idea__meta-item--muted { color: color-mix(in srgb, #fff 45%, transparent); font-weight: 400; }

/* =============================================================
   STATE 1 — UNDERSTANDING (semantic cloud)

   Layout: the prompt reference sits at the top as a small, muted
   caption. The cloud occupies the rest, with words positioned
   container-relative via calc(50% + var(--tx|--ty)) so the eight
   words actually spread across the stage instead of clustering
   near the centre (the old self-relative transform offsets moved
   each word by a fraction of its own size, which collapsed into
   a visual pile-up).
   ============================================================= */
.tb-words {
	position: relative;
	width: 100%;
	max-width: 1100px;
	height: min(70vh, 620px);
	display: grid;
	grid-template-rows: auto 1fr;
	row-gap: 2rem;
	padding-top: .5rem;
}
.tb-words__ghost {
	position: relative;
	text-align: center;
	max-width: 60ch;
	margin: 0 auto;
	padding: 0 1.5rem;
}
.tb-words__ghost-label {
	display: inline-block;
	font-family: 'Inter', 'Helvetica Neue', sans-serif;
	font-size: 0.66rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .2em;
	color: color-mix(in srgb, #fff 55%, transparent);
	padding: .28rem .85rem;
	border: 1px solid color-mix(in srgb, #fff 14%, transparent);
	border-radius: 999px;
	margin-bottom: .85rem;
}
.tb-words__ghost-text {
	font-family: 'Inter', 'Helvetica Neue', sans-serif;
	font-style: normal;
	font-size: clamp(0.88rem, 1.25vw, 1.02rem);
	font-weight: 400;
	line-height: 1.5;
	color: color-mix(in srgb, #fff 52%, transparent);
	margin: 0;
}
.tb-words__cloud {
	position: relative;
	width: 100%;
	height: 100%;
}
.tb-words__word {
	position: absolute;
	top: calc(50% + var(--ty, 0%));
	left: calc(50% + var(--tx, 0%));
	font-family: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
	font-style: italic;
	font-weight: 400;
	color: #F7F6F2;
	letter-spacing: -0.02em;
	white-space: nowrap;
	will-change: transform, opacity;
}
.tb-words__word--xl { font-size: clamp(2.5rem, 5vw, 4rem); }
.tb-words__word--lg { font-size: clamp(1.85rem, 3.6vw, 2.85rem); color: color-mix(in srgb, var(--primary) 65%, #fff); }
.tb-words__word--md { font-size: clamp(1.3rem, 2.5vw, 1.95rem); color: color-mix(in srgb, #fff 82%, transparent); }
.tb-words__word--sm { font-size: clamp(0.95rem, 1.8vw, 1.35rem); color: color-mix(in srgb, #fff 55%, transparent); }

/* =============================================================
   STATE 2 — STRATEGY
   ============================================================= */
.tb-strat {
	width: 100%;
	max-width: 880px;
	background: #F7F6F2;
	color: #1a1613;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 40px 100px -40px rgba(0,0,0,0.5);
}
.tb-strat__head {
	display: flex; justify-content: space-between; align-items: center;
	padding: .85rem 1.75rem;
	background: #EEEBE1;
	border-bottom: 1px solid #DBD5C6;
	font-size: 0.75rem;
}
.tb-strat__handle { font-weight: 600; color: #2a1a0e; }
.tb-strat__tag { color: #7A6650; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; font-weight: 600; }
.tb-strat__body { padding: 2rem 2.5rem 2.25rem; }
.tb-strat__row { padding-block: 1.15rem; border-top: 1px solid #E4DFD1; }
.tb-strat__row:first-child { border-top: none; padding-top: 0; }
.tb-strat__row--hero { padding-bottom: 1.35rem; }
.tb-strat__split {
	display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
	padding-block: 1.15rem; border-top: 1px solid #E4DFD1;
}
.tb-strat__k {
	display: block;
	font-size: 0.7rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .16em;
	color: #7A6650;
	margin-bottom: .6rem;
}
.tb-strat__v {
	font-size: clamp(1.4rem, 2.2vw, 1.85rem);
	line-height: 1.25;
	color: #1a1613;
	margin: 0;
	letter-spacing: -0.015em;
}
.tb-strat__v--serif { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; }
.tb-strat__v--italic { font-style: italic; }
.tb-strat__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.tb-strat__list li {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.1rem;
	color: #1a1613;
	letter-spacing: -0.01em;
}

/* =============================================================
   STATE 3 — IDENTITY
   ============================================================= */
.tb-ident {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	grid-template-rows: 1fr 1fr;
	grid-template-areas: "palette type" "palette mark";
	gap: 1.15rem;
	width: 100%;
	max-width: 980px;
	height: min(70vh, 600px);
}
.tb-ident__palette { grid-area: palette; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tb-ident__swatch {
	border-radius: 14px;
	padding: 1.15rem 1.35rem;
	display: flex; flex-direction: column; justify-content: flex-end;
	color: #F7F6F2;
	will-change: opacity, transform;
}
.tb-ident__swatch span {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: -0.01em;
}
.tb-ident__swatch small {
	font-size: 0.72rem; font-weight: 600;
	letter-spacing: 0.14em; text-transform: uppercase;
	opacity: 0.7;
}
.tb-ident__type {
	grid-area: type;
	background: #F7F6F2;
	color: #1a1613;
	border-radius: 14px;
	padding: 1.65rem;
	display: flex; flex-direction: column; justify-content: space-between;
}
.tb-ident__type-display {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: clamp(2.75rem, 5.5vw, 5rem);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.03em;
	color: #1a1613;
}
.tb-ident__type-meta { display: flex; flex-direction: column; gap: .15rem; margin-top: 1rem; }
.tb-ident__type-name { font-size: 0.85rem; font-weight: 600; color: #2a1a0e; }
.tb-ident__type-pair { font-size: 0.78rem; color: #7A6650; }
.tb-ident__mark {
	grid-area: mark;
	background: #F7F6F2;
	border-radius: 14px;
	padding: 1rem;
	display: flex; align-items: center; justify-content: center;
}
.tb-ident__mark svg { width: 100%; height: 100%; max-width: 200px; max-height: 200px; }

/* =============================================================
   STATE 4 — ASSETS (asymmetric applied brand)
   ============================================================= */
.tb-assets { position: relative; width: 100%; max-width: 1100px; height: min(70vh, 600px); }
.tb-assets__item {
	position: absolute;
	border-radius: 12px;
	box-shadow: 0 30px 80px -25px rgba(0,0,0,0.55);
	overflow: hidden;
}
.tb-assets__pack   { top: 4%;  left: 4%;   width: 22%; aspect-ratio: 200/260; transform: rotate(-4deg); }
.tb-assets__site   { top: 8%;  right: 3%;  width: 52%; }
.tb-assets__card   { bottom: 6%; left: 22%; width: 26%; aspect-ratio: 200/120; transform: rotate(3deg); }
.tb-assets__social { bottom: 4%; right: 15%; width: 22%; aspect-ratio: 1; transform: rotate(-2deg); }
.tb-assets__item svg { width: 100%; height: 100%; display: block; }
.tb-assets__browser-bar {
	background: #E8E4D9;
	padding: .5rem .75rem;
	display: flex; align-items: center; gap: .35rem;
}
.tb-assets__browser-bar > span { width: 8px; height: 8px; border-radius: 50%; background: #C8BEA9; }
.tb-assets__url {
	flex: 1;
	background: #F5F1EA;
	border-radius: 4px;
	padding: .2rem .5rem;
	font-size: 0.68rem;
	color: #7A6650;
	margin-left: .35rem;
}

/* =============================================================
   STATE 5 — RESULT
   ============================================================= */
.tb-final-scene { text-align: center; max-width: 640px; }
.tb-final-scene__mark { display: inline-flex; width: 130px; height: 130px; margin-bottom: 1.5rem; }
.tb-final-scene__mark svg { width: 100%; height: 100%; }
.tb-final-scene__headline {
	font-size: clamp(2.25rem, 5vw, 4rem);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.02;
	color: #fff;
	margin-bottom: 1.1rem;
}
.tb-final-scene__headline em {
	font-style: italic;
	font-family: 'Playfair Display', Georgia, serif;
	font-weight: 400;
	color: color-mix(in srgb, var(--primary) 60%, #fff);
}
.tb-final-scene__sub {
	font-size: 1.1rem;
	color: color-mix(in srgb, #fff 72%, transparent);
	margin-bottom: 1.75rem;
	line-height: 1.5;
}
.tb-final-scene__cta {
	display: inline-flex; align-items: center; gap: .5rem;
	background: #fff; color: #0B0D1A;
	padding: 1rem 1.85rem;
	border-radius: 10px;
	font-size: 1rem; font-weight: 600;
	letter-spacing: -0.005em;
	transition: background .15s ease;
}
.tb-final-scene__cta:hover { background: color-mix(in srgb, var(--primary) 22%, #fff); color: #0B0D1A; }
.tb-final-scene__cta svg { width: 1rem; height: 1rem; }
.tb-final-scene__note { display: block; margin-top: 1rem; font-size: 0.8rem; color: color-mix(in srgb, #fff 55%, transparent); }

/* =============================================================
   PROGRESS RAIL
   ============================================================= */
.tb-scene__rail { position: relative; z-index: 3; padding: 0 1.5rem 1.5rem; }
.tb-scene__rail ol {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	margin: 0 auto;
	padding: 0;
	max-width: 1100px;
}
.tb-scene__rail li {
	display: flex; flex-direction: column;
	gap: .1rem;
	padding: .35rem .5rem .6rem;
	border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
	transition: color .35s ease, border-color .35s ease;
	color: color-mix(in srgb, #fff 30%, transparent);
}
.tb-scene__rail li.is-active { color: #fff; border-top-color: var(--primary); }
.tb-scene__rail-idx { font-size: 0.65rem; font-weight: 600; letter-spacing: .18em; opacity: 0.6; }
.tb-scene__rail-name { font-size: 0.82rem; font-weight: 500; letter-spacing: -0.005em; }

/* =============================================================
   MOBILE — no pin. Stacked scroll, all states visible.
   ============================================================= */
@media (max-width: 900px) {
	.tb-scene__pin { height: auto; overflow: visible; }
	.tb-scene__head { padding: 3rem 1.5rem 1.5rem; }
	.tb-scene__stage { display: flex; flex-direction: column; }
	.tb-scene__state {
		position: relative; inset: auto;
		opacity: 1; visibility: visible;
		padding-block: 3rem;
		border-top: 1px solid color-mix(in srgb, #fff 8%, transparent);
	}
	.tb-scene__state[data-state="0"] { border-top: none; }
	.tb-scene__rail { display: none; }
	.tb-words { height: auto; min-height: 420px; row-gap: 1.5rem; }
	.tb-words__cloud { min-height: 320px; }
	.tb-ident {
		display: flex; flex-direction: column;
		height: auto; max-width: 420px;
	}
	.tb-ident__palette { grid-template-columns: 1fr 1fr; aspect-ratio: 2/1; }
	.tb-ident__type-display { font-size: 3.25rem; }
	.tb-ident__mark svg { max-width: 140px; max-height: 140px; }
	.tb-assets { height: auto; min-height: 460px; }
}
