/* The hero: AgentPad's blue-to-violet, js/hero-cards.js's capsules drifting in it and now and then
   looping together into something you could build, the icon, the title, the tagline with its smug
   face, Join the Beta. Shared by the live page (index.html) and the redesign (redesign/), which
   loads this first and overrides the colours per theme. */

:root {
	/* The icon's blue to violet as Finder draws it, taken halfway darker so the icon stands out on it. */
	--sky-1: #4c89e0; --sky-2: #6755db; --sky-3: #9840ed;
	--hero-text: #ffffff; --hero-soft: rgba(255, 255, 255, 0.8);
	--star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C10.9 6.2 13.8 9.1 20 10C13.8 10.9 10.9 13.8 10 20C9.1 13.8 6.2 10.9 0 10C6.2 9.1 9.1 6.2 10 0Z'/%3E%3C/svg%3E");
}

.btn {
	display: inline-block; padding: 12px 24px; border: 0; border-radius: 999px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
	font: 500 17px/1.2 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; text-decoration: none; cursor: pointer;
	transition: filter 0.2s;
}
.btn:hover { filter: brightness(1.1); }
.btn.small { padding: 6px 15px; font-size: 14px; }

/* The Loopware loop, in any colour (mask of the logo). */
.loop {
	display: inline-block; width: 1.5em; height: 0.75em; background: currentColor;
	-webkit-mask: url("../img/Loopware.svg") center / contain no-repeat; mask: url("../img/Loopware.svg") center / contain no-repeat;
}

/* ── The nav along its top ── */

nav.top { display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 24px; font-size: 17px; }
nav.top a { text-decoration: none; }
nav.top .links { display: flex; align-items: center; gap: 18px; }
nav.top .links a { font-size: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: 0.02em; }
.hero-band nav.top a { color: var(--hero-text); }
/* Join the Beta on the hero: frosted white glass, glowing softly. */
.hero-band .btn {
	background: rgba(255, 255, 255, 0.72); color: #3b2fb8;
	-webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 28px rgba(255, 255, 255, 0.4), 0 10px 24px -12px rgba(30, 10, 90, 0.45);
	animation: glow 4s ease-in-out infinite; transition: background 0.3s;
}
.hero-band nav.top .btn { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 16px rgba(255, 255, 255, 0.3); animation: none; }
.hero-band .btn:hover { filter: none; background: rgba(255, 255, 255, 0.88); }
@keyframes glow { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6), 0 10px 24px -12px rgba(30, 10, 90, 0.45); } }
/* The buttons (the main one still softly pulsing): almost white, their words cut out of them so the sky
   shows through (screen blending: white stays white, black lets everything behind it through). */
.hero .cta .btn, .hero-band nav.top .btn { background: rgba(255, 255, 255, 0.94); color: #000; mix-blend-mode: screen; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero .cta .btn:hover, .hero-band nav.top .btn:hover { background: #fff; }

/* ── The band ── */

/* At least three quarters of the window, the title block in the middle, the capsules' things beside it
   (on phones, above it, in the icon's place: it blurs away while they're there). */
.hero-band, .hero-band * { box-sizing: border-box; }
.hero-band, #nav-and-header-container.hero-band {   /* (the second beats the old header's gradient in ../agentpad.css) */
	position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 75vh; min-height: 75svh;
	background: linear-gradient(to bottom, var(--sky-1), var(--sky-2) 55%, var(--sky-3));
	color: var(--hero-text);
	/* Its sky runs under a phone's notch in landscape (viewport-fit=cover); what's in it stays clear. */
	padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.header-cards {
	position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
	-webkit-mask-image: radial-gradient(ellipse 80% 85% at 50% 40%, black 30%, transparent 100%);
	mask-image: radial-gradient(ellipse 80% 85% at 50% 40%, black 30%, transparent 100%);
}
.header-cards canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* Full size in a tall window; in a shorter one the icon, title and tagline (and the space around them)
   shrink a little with the window's height, so the band never feels crammed. */
header.hero {
	flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 1040px; margin: 0 auto;
	padding: clamp(24px, 4vh, 40px) 24px clamp(48px, 7.2vh, 72px); text-align: center; position: relative;
}
.hero .app-icon {
	width: clamp(88px, 13vh, 128px); height: clamp(88px, 13vh, 128px); margin: 0 auto clamp(14px, 2vh, 20px); display: block;
	filter: drop-shadow(0 12px 24px rgba(20, 10, 70, 0.3));
}
.hero h1 { margin: 0 0 12px; color: var(--hero-text); font-size: clamp(48px, 6.8vh, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.hero .lede { margin: 0 auto clamp(22px, 3.2vh, 32px); color: var(--hero-soft); font-size: clamp(20px, 2.6vh, 24px); line-height: 1.4; max-width: 720px; }
/* Two lines, the second starting at "Claude", where there's room; on a phone it just wraps, evenly. */
.hero .lede br.wide { display: none; }
@media (min-width: 761px) { .hero .lede br.wide { display: inline; } }
@media (max-width: 760px) { .hero .lede { text-wrap: balance; } }
.hero .cta { margin: 0 0 10px; }
.hero .small { margin: 0; font-size: 14px; color: var(--hero-soft); }

/* ── Sparkles (magic.js) ── */

/* A puff: each sparkle flies out from the trick, turns and twinkles away. */
.sparkle {
	position: absolute; z-index: 5; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
	background: hsl(var(--hue) 100% var(--light, 62%)); pointer-events: none; animation: puff 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
	-webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
.hero .sparkle { --light: 82%; }
@keyframes puff {
	from { transform: translate(0, 0) scale(0) rotate(0); }
	35% { transform: translate(calc(var(--dx) * 0.7), calc(var(--dy) * 0.7)) scale(1.1) rotate(40deg); }
	to { transform: translate(var(--dx), var(--dy)) scale(0) rotate(90deg); }
}

/* ── The smug face at the end of the tagline (smug.js): a knowing look once, and when hovered; click
   it and it pulls a capsule out of thin air, spinning up and vanishing in sparkles ── */

.smug-wrap { position: relative; display: inline-block; }
.smug { width: 1.1em; height: 0.77em; vertical-align: -0.06em; color: var(--hero-soft); overflow: visible; cursor: pointer; }
.smug:focus-visible { outline: 2px solid var(--hero-text); outline-offset: 2px; border-radius: 4px; }
/* The "wink": one lid lifts, knowingly. */
.smug:hover .eye-r, .smug.wink .eye-r { animation: wink 0.6s ease; }
@keyframes wink { 35%, 65% { transform: translateY(-2.2px); } }
.trick {
	position: absolute; left: 50%; top: 0; width: 34px; height: 12px; margin-left: -17px; border-radius: 6px; pointer-events: none;
	border: 1px solid rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.28); animation: trick 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.trick::before { content: ""; position: absolute; left: 3px; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
@keyframes trick {
	from { transform: translateY(10px) scale(0.3); opacity: 0; }
	25% { opacity: 1; }
	70% { transform: translateY(-40px) scale(1) rotate(360deg); opacity: 1; }
	to { transform: translateY(-44px) scale(0) rotate(400deg); opacity: 0; }
}

/* ── Small screens, and Reduce Motion ── */

@media (max-width: 760px) {
	/* Smaller still on a short phone screen, to leave the things room to build in the icon's place. */
	.hero .app-icon { width: clamp(64px, 11vh, 128px); height: clamp(64px, 11vh, 128px); }
	.hero h1 { font-size: clamp(34px, 6vh, 44px); }
	.hero .lede { font-size: clamp(16px, 2.6vh, 19px); }
	.hero-band, #nav-and-header-container.hero-band { min-height: 87.5svh; }
	header.hero { padding: 40px 20px 48px; }
}

/* A short phone screen (a folded Duo's cover screen, an SE): all of it above Safari's bar, about 7/8
   of the glass (Safari's page is shorter than the glass there, so 7/8 of the page was only 3/4). */
@media (max-width: 760px) and (max-height: 680px) {
	.hero-band, #nav-and-header-container.hero-band { min-height: 100svh; }
}

@media (prefers-reduced-motion: reduce) {
	.smug .eye-r, .hero-band .btn { animation: none !important; }
	.trick { display: none; }
}

/* The hero shot, just below the band: AgentPad's main window on a Mac (Hero.png, its own frame and
   shadow) and the tours' iPhone Duo floating on its lower right, showing real screenshots of the
   Demo Library too. Sized in cqw so the pair scales as one picture. */
.hero-shot { container-type: inline-size; position: relative; max-width: 1100px; margin: 0 auto; padding-bottom: 4cqw; }
.hero-shot picture { display: contents; }   /* (a dark-mode shot's <picture>, redesign only) */
.hero-shot .mac { display: block; width: 84cqw; height: auto; margin-top: calc(40px - 84cqw * 41 / 1600); }   /* its window's top 40pt under the band */
/* The Duo (duo.css) is 30em wide: 40% of the shot. */
.hero-shot .hd-duo { right: 0; bottom: 0; font-size: calc(40cqw / 30); }
/* Clicking the phone folds it (shot.js): only the phone, not the empty half of its box when shut. */
.hero-shot .hd-duo { pointer-events: none; outline-offset: 0.3em; border-radius: 1.8em; }
.hero-shot .hd-duo :is(.hd-face, .hd-duo.shown > .hd-inner) { pointer-events: auto; cursor: pointer; }
