/* Homepage only. Loaded after style.css. */
:root { --neon: #6EF3C5; --deep: #08292D; }

.scroll-bar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 90; pointer-events: none; }
.admin-bar .scroll-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .scroll-bar { top: 46px; } }
.scroll-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--neon), var(--signal)); transform: scaleX(0); transform-origin: 0 50%; }
.notice-zone:empty { display: none; }
.notice-zone { padding-top: 1rem; }

/* Hero */
.hero {
	position: relative; overflow: hidden; isolation: isolate; color: #fff;
	background:
		radial-gradient(760px 480px at 82% 18%, rgba(110, 243, 197, .2), transparent 62%),
		radial-gradient(560px 380px at 8% 92%, rgba(255, 199, 44, .14), transparent 60%),
		var(--teal);
}
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 15%, transparent 75%);
	mask-image: radial-gradient(ellipse at 70% 40%, #000 15%, transparent 75%);
}
.hero::after {
	content: ""; position: absolute; z-index: 0; pointer-events: none; width: 440px; height: 440px;
	left: calc(var(--gx, 70%) - 220px); top: calc(var(--gy, 30%) - 220px);
	background: radial-gradient(circle, rgba(110, 243, 197, .2), transparent 65%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { grid-template-columns: 1.1fr .9fr; }
.hero h1 { color: #fff; }
.hero .lead { color: #E3F7F1; }
.kicker {
	display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem; margin: 0 0 1.25rem;
	border: 1px solid rgba(110, 243, 197, .5); border-radius: 99px; color: var(--neon);
	font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase;
}
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); animation: phub-pulse 2s infinite; }
.typed-line { font: 600 1.15rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--neon); margin: 0 0 1.75rem; }
.typed-line .prompt { color: var(--signal); margin-right: .6rem; }
.caret { display: inline-block; width: .6ch; height: 1.1em; background: var(--neon); margin-left: 2px; vertical-align: -.15em; animation: phub-caret 1s steps(1) infinite; }

.hero-stage { position: relative; min-height: 450px; padding-top: 6rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.hero-stage::before, .hero-stage::after { content: ""; position: absolute; inset: 0; margin: auto; border-radius: 50%; pointer-events: none; }
.hero-stage::before { width: min(92%, 420px); height: min(92%, 420px); border: 1px dashed rgba(110, 243, 197, .4); animation: phub-spin 50s linear infinite; }
.hero-stage::after { width: min(66%, 300px); height: min(66%, 300px); border: 1px solid rgba(255, 199, 44, .28); animation: phub-spin 34s linear infinite reverse; }
.chip {
	position: absolute; left: var(--l, auto); right: var(--r, auto); top: var(--t, 0); z-index: 3;
	display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 14px;
	background: rgba(8, 41, 45, .78); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
	font-weight: 700; font-size: .92rem; text-decoration: none;
	transform: translate(calc(var(--mx, 0) * var(--d, 1) * 14px), calc(var(--my, 0) * var(--d, 1) * 14px));
	transition: transform .25s ease-out, background-color .2s, color .2s, border-color .2s;
}
.chip:hover { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.chip .ico { width: 1.15rem; height: 1.15rem; flex: none; }

/* Hub the robot */
.hub { position: relative; }
.hub-big { width: clamp(170px, 26vw, 250px); z-index: 2; }
.hub-tap { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 24px; -webkit-tap-highlight-color: transparent; }
.hub-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hub-float { animation: phub-float 4s ease-in-out infinite; }
.hub-pupil { transform: translate(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px)); transition: transform .09s linear; }
.hub-eye { transform-box: fill-box; transform-origin: center; animation: phub-blink 5.5s infinite; }
.hub-core { transform-box: fill-box; transform-origin: center; animation: phub-core 2s ease-in-out infinite; }
.hub-mouth { transform-box: fill-box; transform-origin: center; }
.hub.is-talking .hub-mouth { animation: phub-talk .28s ease-in-out infinite; }
.hub-arm-r { transform-box: fill-box; transform-origin: 50% 8%; }
.hub.is-waving .hub-arm-r { animation: phub-wave .9s ease-in-out; }
.hub-bubble {
	position: absolute; left: 50%; bottom: calc(100% + .35rem); z-index: 4; width: max-content; max-width: min(270px, 78vw);
	padding: .65rem .9rem; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--ink);
	font-size: .92rem; line-height: 1.4; font-weight: 600; box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .55);
	opacity: 0; transform: translate(-50%, 6px) scale(.96); pointer-events: none; transition: opacity .2s, transform .2s;
}
.hub.is-open .hub-bubble { opacity: 1; transform: translate(-50%, 0) scale(1); }
.hub-mini { position: fixed; left: .75rem; bottom: .75rem; z-index: 55; width: 76px; transform: translateY(140%); transition: transform .4s cubic-bezier(.2, .9, .3, 1.2); }
.hub-mini.is-on { transform: none; }
.hub-mini .hub-bubble { left: 0; transform: translate(0, 6px) scale(.96); border-radius: 14px 14px 14px 4px; }
.hub-mini.is-open .hub-bubble { transform: translate(0, 0) scale(1); }
.spark { position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; border-radius: 2px; background: var(--signal); pointer-events: none; animation: phub-spark .8s ease-out forwards; }
.spark:nth-of-type(3n) { background: var(--neon); }
.spark:nth-of-type(3n+1) { background: #fff; }

/* Ticker */
.ticker { overflow: hidden; background: var(--signal); color: var(--ink); border-block: 2px solid var(--ink); }
.ticker-track { display: flex; width: max-content; animation: phub-ticker 30s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; flex: none; list-style: none; margin: 0; padding: 0; }
.ticker li { padding: .7rem 1.6rem; font-weight: 800; white-space: nowrap; }
.ticker li::after { content: "/"; margin-left: 1.6rem; opacity: .55; }

/* Product cards */
body .woocommerce ul.products[class*="columns-"] li.product { transition: transform .2s, box-shadow .2s, border-color .2s; }
body .woocommerce ul.products[class*="columns-"] li.product:hover { transform: translateY(-4px); border-color: var(--teal-2); box-shadow: 0 16px 30px -18px rgba(14, 65, 71, .6); }
.woocommerce ul.products li.product .added_to_cart { display: block; text-align: center; margin-top: .6rem; font-weight: 700; }

/* Finder */
.finder-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.finder-opt {
	display: flex; align-items: center; gap: .75rem; padding: 1rem; text-align: left; cursor: pointer;
	border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
	font: inherit; font-weight: 700; transition: border-color .15s, background-color .15s;
}
.finder-opt:hover { border-color: var(--teal-2); }
.finder-opt[aria-checked="true"] { border-color: var(--teal); background: var(--mint); }
.finder-opt .ico { width: 1.6rem; height: 1.6rem; flex: none; color: var(--teal); }
.finder-out { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; min-height: 9rem; }
.finder-hint { margin: 0; color: #3f5359; }
.find-result h3 { margin-bottom: .3rem; }
.find-result p { max-width: 60ch; }
.find-result[hidden], .finder-hint[hidden] { display: none; }
html:not(.js) .finder-opts, html:not(.js) .finder-hint { display: none; }
html:not(.js) .find-result + .find-result { margin-top: 1.5rem; }

/* Setup demo */
.on-dark { color: #E3F7F1; }
.on-dark h2, .on-dark h3 { color: #fff; }
.demo { background: var(--deep); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.demo-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.demo p { color: #E3F7F1; max-width: 46ch; }
.term { background: #051C1F; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; overflow: hidden; }
.term-top { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: rgba(255, 255, 255, .06); font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #B9DDD3; }
.term-top i { width: 10px; height: 10px; border-radius: 50%; background: #4a6b70; }
.term-top span { margin-left: .6rem; }
.term-body { padding: 1.25rem; font: 500 .95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #CFF5E8; }
.term-lines { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.term-lines li { display: flex; align-items: baseline; gap: .5rem; }
.term-lines li::before { content: ">"; color: var(--signal); }
.t-dots { flex: 1; min-width: 1rem; border-bottom: 1px dotted rgba(207, 245, 232, .4); }
.t-ok { color: var(--neon); font-weight: 700; }
.term-bar { height: 6px; background: rgba(255, 255, 255, .14); border-radius: 99px; overflow: hidden; }
.term-bar span { display: block; height: 100%; width: 100%; background: var(--neon); transition: width .5s ease-out; }
.term-done { margin: 1rem 0 0; color: var(--signal); font-weight: 700; }
.js .term-lines li { opacity: 0; transition: opacity .25s; }
.js .term-lines li.on { opacity: 1; }
.js .term-lines li .t-ok { visibility: hidden; }
.js .term-lines li.ok .t-ok { visibility: visible; }
.js .term-bar span { width: 0; }

/* Steps polish */
.steps li::before { transition: background-color .2s, color .2s; }
.steps li:hover::before { background: var(--signal); color: var(--ink); }

@keyframes phub-pulse { 0% { box-shadow: 0 0 0 0 rgba(110, 243, 197, .7); } 70% { box-shadow: 0 0 0 10px rgba(110, 243, 197, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 243, 197, 0); } }
@keyframes phub-caret { 50% { opacity: 0; } }
@keyframes phub-spin { to { transform: rotate(360deg); } }
@keyframes phub-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes phub-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes phub-core { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .7; } }
@keyframes phub-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.9); } }
@keyframes phub-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-42deg); } 50% { transform: rotate(-12deg); } 75% { transform: rotate(-42deg); } }
@keyframes phub-spark { to { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(180deg); opacity: 0; } }
@keyframes phub-ticker { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
	.hero-grid, .demo-grid { grid-template-columns: 1fr; }
	.hero-stage { min-height: 420px; }
}
@media (max-width: 560px) {
	.chip { font-size: .8rem; padding: .4rem .65rem; }
	.hub-mini { width: 62px; }
	.typed-line { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hub-float, .hub-eye, .hub-core, .hero-stage::before, .hero-stage::after, .kicker i, .caret { animation: none !important; }
	.ticker-track { animation: none !important; width: auto; flex-wrap: wrap; }
	.ticker ul + ul { display: none; }
	.js .term-lines li { transition: none; }
}
