/* Scoped Intention hero demo, ported from danieldelaney.net/intention/. */

.intention-hero-scope {
	max-width: 920px;
	margin: 1em auto 3em;
	padding: 0 24px;
}

.intention-hero-scope .hero-demo {
	width: 100%;
	max-width: 58rem;
	margin: 0 auto;
	isolation: isolate;
}
.intention-hero-scope .demo-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 1.2em;
	overflow: hidden;
	background: #000;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.05) inset,
		0 30px 60px -20px rgba(0, 0, 0, 0.6),
		0 12px 24px -12px rgba(0, 0, 0, 0.8);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
	color: #fff;
	user-select: none;
	line-height: 1.4;
}
.intention-hero-scope .demo-wallpaper {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 88% 70% at 22% 16%, rgba(246, 200, 150, 0.58), transparent 62%),
		linear-gradient(155deg, #a26a3e 0%, #6e3a24 45%, #421e14 72%, #1e0e08 100%);
}

/* Menubar */
.intention-hero-scope .demo-menubar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2em;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.9em;
	padding: 0 1.1em;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	font-size: 0.85em;
	font-weight: 500;
	letter-spacing: 0.01em;
	z-index: 5;
}
.intention-hero-scope .demo-menu-left { flex: 1; }
.intention-hero-scope .demo-menu-timer {
	display: inline-block;
	padding: 0 0.4em;
	border-radius: 0.45em;
	background: rgba(255, 255, 255, 0.12);
	font-variant-numeric: tabular-nums;
	color: #fff;
	transition: opacity 0.18s ease-out;
}
.intention-hero-scope .demo-menu-intent {
	font-weight: 600;
}
.intention-hero-scope .demo-menu-intent:not(:empty) {
	margin-right: 0.6em;
}
.intention-hero-scope .demo-menu-clock {
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.92);
}
.intention-hero-scope .demo-menu-icon {
	width: 1.15em;
	height: 1.15em;
	color: rgba(255, 255, 255, 0.88);
	display: block;
	flex-shrink: 0;
}
.intention-hero-scope .demo-menu-icon--battery {
	width: 1.9em;
	height: 0.9em;
}

/* Browser window */
.intention-hero-scope .demo-browser {
	position: absolute;
	top: 16%;
	left: 8%;
	right: 10%;
	bottom: 8%;
	border-radius: 0.7em;
	border: 1px solid rgba(255, 255, 255, 0.06);
	overflow: hidden;
	background: #4a2d1c;
	box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
	z-index: 2;
}
.intention-hero-scope .demo-browser-chrome {
	display: flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.8em 1em;
	background: #4a2d1c;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.intention-hero-scope .demo-browser .demo-dot {
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	flex-shrink: 0;
	display: block;
}
.intention-hero-scope .demo-browser .demo-dot:nth-child(1) { background: #ff5f57; }
.intention-hero-scope .demo-browser .demo-dot:nth-child(2) { background: #febc2e; }
.intention-hero-scope .demo-browser .demo-dot:nth-child(3) { background: #28c840; }
.intention-hero-scope .demo-browser-body {
	position: relative;
	padding: 1.6em 1.8em;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "stack";
}

/* Activity templates */
.intention-hero-scope .demo-activity {
	grid-area: stack;
	justify-self: center;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}
.intention-hero-scope .hero-demo[data-activity="0"] .demo-activity--draft,
.intention-hero-scope .hero-demo[data-activity="1"] .demo-activity--email,
.intention-hero-scope .hero-demo[data-activity="2"] .demo-activity--read,
.intention-hero-scope .hero-demo[data-activity="3"] .demo-activity--code {
	opacity: 1;
}
.intention-hero-scope .demo-doc-line, .intention-hero-scope .demo-doc-title,
.intention-hero-scope .demo-email-line, .intention-hero-scope .demo-email-subject,
.intention-hero-scope .demo-email-from, .intention-hero-scope .demo-email-meta,
.intention-hero-scope .demo-email-reply,
.intention-hero-scope .demo-read-line,
.intention-hero-scope .demo-code-line, .intention-hero-scope .demo-code-num {
	display: block;
	background: rgba(255, 255, 255, 0.10);
	border-radius: 0.18em;
}

/* Per-activity tints */
.intention-hero-scope .hero-demo[data-activity="0"] .demo-doc-title  { background: rgba(248, 232, 196, 0.62); }
.intention-hero-scope .hero-demo[data-activity="0"] .demo-doc-line   { background: rgba(248, 232, 196, 0.34); }

.intention-hero-scope .hero-demo[data-activity="1"] .demo-email-from    { background: rgba(248, 232, 196, 0.58); }
.intention-hero-scope .hero-demo[data-activity="1"] .demo-email-meta    { background: rgba(248, 232, 196, 0.22); }
.intention-hero-scope .hero-demo[data-activity="1"] .demo-email-subject { background: rgba(248, 232, 196, 0.62); }
.intention-hero-scope .hero-demo[data-activity="1"] .demo-email-line    { background: rgba(248, 232, 196, 0.30); }
.intention-hero-scope .hero-demo[data-activity="1"] .demo-email-reply   { background: rgba(56, 130, 232, 0.92); }

.intention-hero-scope .hero-demo[data-activity="2"] .demo-read-line { background: rgba(236, 210, 168, 0.42); }

.intention-hero-scope .hero-demo[data-activity="3"] .demo-code-num             { background: rgba(248, 232, 196, 0.30); }
.intention-hero-scope .hero-demo[data-activity="3"] .demo-code-line            { background: rgba(248, 232, 196, 0.50); }
.intention-hero-scope .hero-demo[data-activity="3"] .demo-code-line--in1       { background: rgba(228, 184, 110, 0.55); }
.intention-hero-scope .hero-demo[data-activity="3"] .demo-code-line--in2       { background: rgba(240, 142, 112, 0.55); }
.intention-hero-scope .hero-demo[data-activity="3"] .demo-code-line--in2.demo-code-line--short { background: rgba(220, 130, 90, 0.55); }

/* Activity: DRAFT */
.intention-hero-scope .demo-activity--draft {
	width: 100%;
	max-width: 22em;
}
.intention-hero-scope .demo-doc-title {
	height: 0.85em;
	width: 55%;
	background: rgba(255, 255, 255, 0.20);
	margin-bottom: 0.4em;
}
.intention-hero-scope .demo-doc-line {
	height: 0.4em;
	width: 100%;
}
.intention-hero-scope .demo-doc-line--short { width: 60%; }

/* Activity: EMAIL */
.intention-hero-scope .demo-activity--email {
	gap: 0.45em;
	width: 100%;
	max-width: 24em;
}
.intention-hero-scope .demo-email-head {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 0.2em;
}
.intention-hero-scope .demo-email-from {
	height: 0.5em;
	width: 4em;
	background: rgba(255, 255, 255, 0.16);
}
.intention-hero-scope .demo-email-meta {
	height: 0.4em;
	width: 5em;
	background: rgba(255, 255, 255, 0.07);
}
.intention-hero-scope .demo-email-subject {
	height: 0.7em;
	width: 70%;
	background: rgba(255, 255, 255, 0.20);
	margin-bottom: 0.5em;
}
.intention-hero-scope .demo-email-line {
	height: 0.4em;
	width: 100%;
}
.intention-hero-scope .demo-email-line--short { width: 50%; }
.intention-hero-scope .demo-email-reply {
	margin-top: 0.7em;
	height: 1.1em;
	width: 4.5em;
	border-radius: 0.4em;
	background: rgba(255, 255, 255, 0.16);
}

/* Activity: READ */
.intention-hero-scope .demo-activity--read {
	gap: 0.34em;
	width: 100%;
	max-width: 20em;
}
.intention-hero-scope .demo-read-line {
	height: 0.32em;
	width: 100%;
	background: rgba(255, 255, 255, 0.10);
	border-radius: 0.16em;
}
.intention-hero-scope .demo-read-line--short { width: 70%; }
.intention-hero-scope .demo-read-gap { height: 0.7em; }

/* Activity: CODE */
.intention-hero-scope .demo-activity--code {
	gap: 0.35em;
	width: 100%;
	max-width: 22em;
}
.intention-hero-scope .demo-code-row {
	display: flex;
	align-items: center;
	gap: 0.7em;
}
.intention-hero-scope .demo-code-num {
	height: 0.4em;
	width: 0.7em;
	background: rgba(255, 255, 255, 0.12);
	flex-shrink: 0;
	border-radius: 0.1em;
}
.intention-hero-scope .demo-code-line {
	height: 0.4em;
	background: rgba(255, 255, 255, 0.13);
	border-radius: 0.18em;
	flex: 1;
}
.intention-hero-scope .demo-code-line--in1 { margin-left: 1.2em; }
.intention-hero-scope .demo-code-line--in2 { margin-left: 2.4em; }
.intention-hero-scope .demo-code-line--short { max-width: 60%; }

/* Dim/blur veil */
.intention-hero-scope .demo-dim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	z-index: 4;
	transition: opacity 0.55s ease-in;
}
.intention-hero-scope .hero-demo.is-dimmed .demo-dim { opacity: 1; }
.intention-hero-scope .hero-demo.is-clearing .demo-dim {
	transition-duration: 0s;
}

/* Intention popup card */
.intention-hero-scope .demo-intention {
	position: absolute;
	top: 3em;
	right: 1.6em;
	width: 21em;
	padding: 1.6em;
	background: #1B1B1B;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 1.6em;
	box-shadow:
		0 20px 40px -10px rgba(0, 0, 0, 0.55),
		0 0 0 0.5px rgba(0, 0, 0, 0.6);
	font-size: 0.77em;
	color: #fff;
	text-align: left;
	opacity: 0;
	transform: translateY(-6px) scale(0.97);
	transform-origin: 100% 0%;
	transition:
		opacity 0.22s ease-out,
		transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.25);
	z-index: 5;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
.intention-hero-scope .hero-demo.is-prompting .demo-intention {
	opacity: 1;
	transform: translateY(0) scale(1);
}
.intention-hero-scope .demo-gear {
	position: absolute;
	top: 0.65em;
	right: 0.65em;
	width: 1.3em;
	height: 1.3em;
	padding: 0;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.42);
	cursor: default;
}
.intention-hero-scope .demo-gear svg { width: 100%; height: 100%; display: block; }
.intention-hero-scope .demo-int-label {
	font-size: 1em;
	font-weight: 500;
	color: #fff;
	margin: 0 0 0.55em;
	line-height: 1.2;
	padding-right: 1.4em;
}
.intention-hero-scope .demo-int-label--mid {
	margin: 1.8em 0 0.55em;
	padding-right: 0;
}
.intention-hero-scope .demo-hint {
	color: rgba(255, 255, 255, 0.45);
	font-weight: 400;
	margin-left: 0.15em;
}
.intention-hero-scope .demo-int-field {
	display: block;
	min-height: 3.8em;
	padding: 0.5em 0.7em;
	background: rgba(0, 0, 0, 0.25);
	border: 2px solid #24638E;
	border-radius: 0.35em;
	font-size: 0.95em;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
}
.intention-hero-scope .demo-typed {
	color: #fff;
	letter-spacing: 0;
}
.intention-hero-scope .demo-caret {
	display: inline-block;
	width: 2px;
	height: 1em;
	background: #007AFF;
	margin-left: 1px;
	vertical-align: -0.15em;
	animation: intention-demo-caret-blink 1s steps(1, end) infinite;
}
@keyframes intention-demo-caret-blink {
	0%, 49%   { opacity: 1; }
	50%, 100% { opacity: 0; }
}
.intention-hero-scope .demo-int-timers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.8em;
}
.intention-hero-scope .demo-timer {
	padding: 0.62em 0;
	background: rgba(255, 255, 255, 0.11);
	border: none;
	border-radius: 999px;
	color: #fff;
	font-size: 1em;
	font-weight: 500;
	font-family: inherit;
	cursor: default;
	transition: background 0.18s ease, transform 0.12s ease;
}
.intention-hero-scope .demo-timer.is-selected {
	background: #007AFF;
	color: #fff;
}
.intention-hero-scope .demo-timer.is-chosen {
	background: rgba(255, 255, 255, 0.24);
}
.intention-hero-scope .hero-demo.is-sending .demo-int-timers:not(:has(.is-chosen)) .demo-timer.is-selected {
	animation: intention-demo-send-pulse 0.32s ease;
}
.intention-hero-scope .hero-demo.is-sending .demo-timer.is-chosen {
	animation: intention-demo-send-pulse 0.32s ease;
}
@keyframes intention-demo-send-pulse {
	0%   { transform: scale(1); }
	45%  { transform: scale(1.08); filter: brightness(1.2); }
	100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 60em) {
	.intention-hero-scope .hero-demo { font-size: 1em; }
}
@media (max-width: 50em) {
	.intention-hero-scope .demo-menu-icon--bluetooth { display: none; }
	.intention-hero-scope .hero-demo { font-size: 0.9em; }
}
@media (max-width: 40em) {
	.intention-hero-scope .demo-stage { aspect-ratio: 1 / 1; }
}
@media (max-width: 25em) {
	.intention-hero-scope { padding: 0; }
	.intention-hero-scope .demo-menu-icon--sound { display: none; }
	.intention-hero-scope .demo-stage { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.intention-hero-scope .demo-caret { animation: none; }
	.intention-hero-scope .demo-dim,
	.intention-hero-scope .demo-intention { transition-duration: 0s; }
	.intention-hero-scope .demo-timer.is-selected { animation: none !important; }
}
