/* AMPLI Signals board — infinite pannable canvas of creator reels.
   Inherits the theme's design tokens (--ink, --green, --blue, fonts). */

.ampli-board-section {
	background: var(--surface, #fff);
	padding: clamp(88px, 12vw, 180px) 0 clamp(48px, 6vw, 96px);
}
.ampli-board-head {
	max-width: 1520px; margin: 0 auto clamp(28px, 4vw, 56px);
	padding: 0 clamp(20px, 5vw, 84px);
}
.ampli-board-kicker {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-body, sans-serif);
	font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--ink-soft, #4E5261); margin: 0 0 18px;
}
.ampli-board-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #70F2AA); box-shadow: 0 0 12px var(--green, #70F2AA); }
.ampli-board-title {
	font-family: var(--font-display, sans-serif); font-weight: 600;
	font-size: clamp(34px, 5vw, 72px); letter-spacing: -0.02em; line-height: 1.02;
	color: var(--ink, #0B0C17); margin: 0;
}
.ampli-board-sub { margin: 16px 0 0; font-size: clamp(16px, 1.4vw, 20px); color: var(--ink-soft, #4E5261); max-width: 48ch; }

/* Canvas frame — full-bleed, edge to edge, no rounded container */
.ampli-board {
	position: relative;
	height: clamp(600px, 88vh, 1040px);
	width: 100%; max-width: none; margin: 0;
	border-radius: 0;
	overflow: hidden;
	border-top: 1px solid rgba(11,12,16,.08);
	border-bottom: 1px solid rgba(11,12,16,.08);
	background:
		radial-gradient(circle at 50% 42%, rgba(42,76,246,.05) 0%, rgba(11,12,16,.02) 55%, rgba(11,12,16,.06) 100%),
		#EEF0F4;
	isolation: isolate;
}
.ampli-board-wrap {
	position: absolute; inset: 0;
	cursor: grab; touch-action: none; overscroll-behavior: contain;
}
.ampli-board-wrap.is-dragging { cursor: grabbing; }
.ampli-board.has-preview .ampli-board-wrap {
	filter: blur(7px) saturate(.85) brightness(.92);
	transition: filter .5s cubic-bezier(.16,1,.3,1);
	pointer-events: none;
}
.ampli-board:not(.has-preview) .ampli-board-wrap { transition: filter .5s cubic-bezier(.16,1,.3,1); }

.ampli-board-stage {
	position: absolute; top: 0; left: 0; width: 0; height: 0;
	transform-origin: 0 0; will-change: transform;
}

/* Tiles */
.ampli-tile {
	position: absolute;
	width: var(--tile-w, 230px); height: var(--tile-h, 409px);
	border-radius: 18px; overflow: hidden;
	background: #14161f;
	box-shadow: 0 2px 6px rgba(11,12,40,.10), 0 18px 44px rgba(11,12,40,.16);
	transform-origin: center center;
	transform: translate(0,0) scale(.8); opacity: 0;
	/* No persistent will-change here: 36 permanently-composited tile layers made a
	 * single playing video thrash the compositor (measured). The stage carries the
	 * one transform layer; tiles are promoted by the browser only while animating. */
	user-select: none; -webkit-user-select: none;
	cursor: pointer;
}
.ampli-tile video, .ampli-tile img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; display: block; pointer-events: none;
}
.ampli-tile video { opacity: 0; transition: opacity .45s ease; }
.ampli-tile.is-playing video { opacity: 1; }
.ampli-tile-veil {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(11,12,16,.55) 0%, rgba(11,12,16,0) 42%);
	pointer-events: none;
}
.ampli-tile-tag {
	position: absolute; left: 12px; bottom: 12px; right: 12px;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	pointer-events: none;
}
.ampli-tile-brand {
	font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 14px;
	color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.ampli-tile-metric {
	font-size: 11px; font-weight: 700; color: var(--ink, #0B0C17);
	background: var(--green, #70F2AA); padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.ampli-tile-play {
	position: absolute; top: 12px; right: 12px;
	width: 30px; height: 30px; border-radius: 50%;
	background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
	display: grid; place-items: center; opacity: 0; transition: opacity .3s;
}
.ampli-tile:hover .ampli-tile-play { opacity: 1; }
.ampli-tile-play svg { width: 12px; height: 12px; fill: #fff; }

/* HUD */
.ampli-board-hud { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.ampli-board-hint {
	position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 18px; border-radius: 999px;
	background: rgba(11,12,16,.78); color: #fff; backdrop-filter: blur(10px);
	font-family: var(--font-body, sans-serif); font-size: 13px; font-weight: 600;
	transition: opacity .5s;
}
.ampli-board-hint.is-hidden { opacity: 0; }
.ampli-board-zoom {
	position: absolute; right: 18px; bottom: 18px;
	display: flex; align-items: center; gap: 4px; pointer-events: auto;
	background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
	border-radius: 999px; padding: 4px; box-shadow: 0 6px 20px rgba(11,12,40,.14);
}
.ampli-board-zoom button {
	width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
	font-size: 20px; line-height: 1; color: var(--ink, #0B0C17); cursor: pointer;
	display: grid; place-items: center; transition: background .2s;
}
.ampli-board-zoom button:hover { background: rgba(11,12,16,.08); }
.ampli-board-zoom span { min-width: 46px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-soft, #4E5261); font-variant-numeric: tabular-nums; }

/* Preview overlay */
.ampli-board-preview {
	position: absolute; inset: 0; z-index: 20;
	display: grid; place-items: center; padding: 4vmin;
}
.ampli-board-preview[hidden] { display: none; }
.ampli-board-preview-inner {
	position: relative;
	width: min(420px, 88vw); aspect-ratio: 9/16; max-height: 92%;
	border-radius: 22px; overflow: hidden;
	background: #000; box-shadow: 0 40px 100px rgba(0,0,0,.5);
	opacity: 0; transform: scale(.9); transition: opacity .42s cubic-bezier(.16,1,.3,1), transform .42s cubic-bezier(.16,1,.3,1);
}
.ampli-board-preview.is-open .ampli-board-preview-inner { opacity: 1; transform: scale(1); }
.ampli-board-preview-inner video, .ampli-board-preview-inner iframe {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover;
}
.ampli-board-preview-meta {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 44px 18px 18px;
	background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	pointer-events: none;
}
.ampli-board-preview-meta .b { font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 18px; color: #fff; }
.ampli-board-preview-meta .m { font-size: 12px; font-weight: 700; color: var(--ink,#0B0C17); background: var(--green,#70F2AA); padding: 4px 10px; border-radius: 999px; }
.ampli-board-preview-close {
	position: absolute; top: 3vmin; right: 3vmin; z-index: 3;
	width: 46px; height: 46px; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px);
	display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.ampli-board-preview-close:hover { background: rgba(255,255,255,.28); }

/* Reduced motion / no-JS: fall back to a simple horizontal scroll strip */
.ampli-board.is-fallback { height: auto; background: none; overflow: visible; }
.ampli-board.is-fallback .ampli-board-wrap { position: static; cursor: default; }
.ampli-board.is-fallback .ampli-board-stage {
	position: static; width: auto; height: auto; transform: none !important;
	display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 18px;
	overflow-x: auto; padding: 4px; scroll-snap-type: x mandatory;
}
.ampli-board.is-fallback .ampli-tile { position: relative; transform: none !important; opacity: 1 !important; scroll-snap-align: start; }
.ampli-board.is-fallback .ampli-board-hud { display: none; }

@media (prefers-reduced-motion: reduce) {
	.ampli-tile { transition: none; }
}
@media (max-width: 640px) {
	.ampli-board { height: 78vh; }
	.ampli-board-hint { font-size: 12px; }
}

/* ── Strip mode: video wall del home (con overlay "Content at Scale") ── */
.ampli-board-section.is-strip { padding: clamp(90px, 12vh, 176px) 0 clamp(40px, 5vh, 72px); }
.ampli-board[data-board-mode="strip"] {
	height: 72vh; min-height: 460px; border-radius: 0;
	/* No top/bottom rule lines at the section seams (they read as a stray line
	   under the hero); and a soft top edge so the tiles fade in instead of being
	   hard-cut right under the hero. */
	border-top: 0; border-bottom: 0; background: var(--surface, #fff);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(48px, 7vh, 96px));
	mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(48px, 7vh, 96px));
}
.ampli-board-overlay {
	position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center;
	pointer-events: none; padding: 4vw;
	background: radial-gradient(ellipse at center, rgba(11,12,23,.58) 0%, rgba(11,12,23,.30) 48%, rgba(11,12,23,.05) 82%, transparent 100%);
}
.ampli-board-overlay-title { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: clamp(34px, 5.4vw, 76px); color: #fff; letter-spacing: -0.02em; margin: 0; text-shadow: 0 2px 24px rgba(11,12,23,.55); }
.ampli-board-overlay-sub { margin: 12px 0 0; font-size: clamp(15px, 1.6vw, 22px); color: rgba(255,255,255,.92); text-shadow: 0 1px 16px rgba(11,12,23,.6); }
.ampli-board-overlay-sub strong { color: var(--green, #70F2AA); font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 1.2em; margin-right: .12em; }

.ampli-board-fs {
	position: absolute; right: 16px; bottom: 16px; z-index: 8; pointer-events: auto;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
	background: rgba(255,255,255,.92); color: var(--ink, #0B0C17); font-family: var(--font-body, sans-serif); font-weight: 700; font-size: 13.5px;
	box-shadow: 0 6px 20px rgba(11,12,40,.2); transition: background-color .2s;
}
.ampli-board-fs:hover { background: #fff; }

/* Hero expand CTA (strip mode) — bottom-right, branded, pulsing to draw the eye. */
.ampli-board-fs.is-hero {
	right: 20px; bottom: 20px; left: auto; top: auto;
	padding: 13px 24px; gap: 10px; font-size: 15px; letter-spacing: .01em;
	background: var(--blue, #2A4CF6); color: #fff;
	box-shadow: 0 14px 40px rgba(42,76,246,.4), 0 0 0 5px rgba(255,255,255,.12);
}
.ampli-board-fs.is-hero:hover { background: var(--blue-deep, #1A34C9); transform: scale(1.05); }
.ampli-board-fs.is-hero:active { transform: scale(.98); }
.ampli-board-fs-pulse { position: absolute; inset: 0; border-radius: 999px; pointer-events: none; box-shadow: 0 0 0 0 rgba(112,242,170,.55); animation: ampliFsPulse 2.2s cubic-bezier(.22,.61,.36,1) infinite; }
@keyframes ampliFsPulse {
	0% { box-shadow: 0 0 0 0 rgba(112,242,170,.55); }
	70% { box-shadow: 0 0 0 24px rgba(112,242,170,0); }
	100% { box-shadow: 0 0 0 0 rgba(112,242,170,0); }
}
@media (prefers-reduced-motion: reduce) { .ampli-board-fs-pulse { animation: none; } }
.ampli-board-fs-close { display: none; }

/* Full-screen state */
.ampli-board.is-fs { position: fixed; inset: 0; z-index: 99999; height: 100vh !important; width: 100vw; border-radius: 0; }
.ampli-board.is-fs .ampli-board-overlay,
.ampli-board.is-fs .ampli-board-fs { display: none; }
.ampli-board.is-fs .ampli-board-fs-close {
	display: grid; place-items: center; position: fixed; top: 18px; right: 18px; z-index: 100000;
	width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(11,12,23,.7); color: #fff; backdrop-filter: blur(8px);
}
