/* ============================================================
   HOMEPAGE HERO: assistant -> GripMCP -> your site (vertical)
   Driven by hero-flow.js.
   ============================================================ */

.howgrid__flow { min-width: 0; }
.hflow {
	position: relative;
	display: flex; flex-direction: column;
	padding: 14px; border-radius: 26px;
	background: linear-gradient(180deg, #141d3a 0%, #0a1020 100%);
	border: 1px solid rgba(255,255,255,.1);
	box-shadow: 0 40px 80px -30px rgba(44,40,120,.55), inset 0 1px 0 rgba(255,255,255,.07);
	color: #fff;
	font-family: var(--font-body);
}

/* ---------- Cards ---------- */
.hflow__card {
	border-radius: 16px; overflow: hidden;
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.09);
	transition: border-color .35s ease, box-shadow .35s ease;
}
.hflow__head {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 13px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.hflow__n {
	flex: none; width: 19px; height: 19px; border-radius: 50%;
	display: grid; place-items: center;
	font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 700;
	background: var(--grad); box-shadow: 0 4px 12px -4px rgba(124,58,237,.8);
}
.hflow__head img { flex: none; width: 20px; height: 20px; border-radius: 6px; }
.hflow__head strong { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.hflow__sub {
	margin-left: auto; min-width: 0;
	font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px;
	color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 1. Assistant */
.hflow__chat { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 9px; min-height: 104px; }
.hflow__you {
	align-self: flex-end; max-width: 92%; min-height: 36px;
	padding: 8px 12px; border-radius: 13px 13px 4px 13px;
	background: var(--grad); font-size: 13.5px; line-height: 1.45;
	box-shadow: 0 10px 22px -12px rgba(76,141,255,.75);
	transition: opacity .35s ease;
}
.hflow__you.is-out { opacity: 0; }
.hflow__caret {
	display: inline-block; width: 2px; height: 14px; margin-left: 2px; vertical-align: -2px;
	background: rgba(255,255,255,.9); animation: hf-blink 1s steps(1) infinite;
}
.hflow__you.is-sent .hflow__caret { display: none; }
.hflow__tool {
	align-self: flex-start; display: flex; align-items: center; gap: 8px;
	max-width: 100%; padding: 6px 10px; border-radius: 10px;
	background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
	font-size: 11px; color: rgba(255,255,255,.5);
	opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease;
}
.hflow__tool.is-on { opacity: 1; transform: none; }
.hflow__tool code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: #cbd8f5; }
.hflow__tool span:last-child { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hflow__ic {
	flex: none; width: 12px; height: 12px; border-radius: 50%;
	border: 2px solid rgba(138,180,255,.25); border-top-color: #8ab4ff;
	animation: hf-rot .7s linear infinite;
}
.hflow__tool.is-hold .hflow__ic { animation: hf-pulse 1.1s ease-in-out infinite; border-color: #f59e0b; background: rgba(245,158,11,.25); }
.hflow__tool.is-hold span:last-child { color: #fcd34d; }
.hflow__tool.is-done span:last-child { color: #6ee7b7; }
.hflow__tool.is-done .hflow__ic,
.hflow__checks li.is-ok i {
	animation: none; border: 0;
	background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3L9.5 3.8'/%3E%3C/svg%3E") center / 8px no-repeat;
}

/* 2. GripMCP */
.hflow__gm.is-live {
	border-color: rgba(139,92,246,.6);
	box-shadow: 0 0 0 4px rgba(124,58,237,.12), 0 16px 40px -18px rgba(124,58,237,.7);
}
.hflow__checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 13px 6px; }
.hflow__checks li {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	padding: 7px 4px; border-radius: 9px;
	background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
	font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.38);
	transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.hflow__checks i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); }
.hflow__checks li.is-active { color: #fff; border-color: rgba(138,180,255,.4); }
.hflow__checks li.is-active i { border: 2px solid rgba(138,180,255,.25); border-top-color: #8ab4ff; animation: hf-rot .7s linear infinite; }
.hflow__checks li.is-ok { color: #fff; border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.1); }
.hflow__checks li.is-wait { color: #fcd34d; border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.1); }
.hflow__checks li.is-wait i { border: 2px solid #f59e0b; background: rgba(245,158,11,.25); animation: hf-pulse 1.1s ease-in-out infinite; }
.hflow__checks li.is-skip { color: rgba(255,255,255,.55); }
.hflow__checks li.is-skip i { border-style: dashed; }
.hflow__detail {
	min-height: 30px; padding: 3px 13px 11px;
	font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; line-height: 1.5;
	color: rgba(255,255,255,.45);
}
.hflow__detail b { font-weight: 600; color: #cbd8f5; }
.hflow__detail em { font-style: normal; color: #6ee7b7; }
.hflow__detail em.is-wait { color: #fcd34d; }

/* Wires */
.hflow__wire { position: relative; height: 38px; }
.hflow__wire::before {
	content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; margin-left: -1px;
	background: repeating-linear-gradient(180deg, rgba(138,180,255,.75) 0 6px, transparent 6px 11px);
	opacity: .3; transition: opacity .3s ease;
}
.hflow__wire.is-busy::before { opacity: 1; animation: hf-flow .5s linear infinite; }
.hflow__wire > span {
	position: absolute; left: 50%; top: 50%; transform: translate(14px, -50%);
	font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px;
	color: rgba(255,255,255,.42); white-space: nowrap;
}
.hf-packet {
	position: absolute; left: 50%; top: 0; z-index: 2;
	width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
	background: #8ab4ff; box-shadow: 0 0 14px 4px rgba(76,141,255,.75);
	animation: hf-y .6s cubic-bezier(.5,0,.5,1) forwards;
}
.hf-packet--back { background: #6ee7b7; box-shadow: 0 0 14px 4px rgba(16,185,129,.65); animation-direction: reverse; }

/* 3. The site: a slice of wp-admin */
.hflow__site {
	position: relative; min-height: 150px;
	background: #f0f0f1; color: #1d2327;
	font-size: 12px; line-height: 1.4;
}
.hf-screen { display: none; padding: 11px 13px 13px; }
.hf-screen.is-on { display: block; animation: hf-fade .35s ease both; }
.hf-screen__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.hf-notice {
	display: none; font-size: 10.5px; font-weight: 500;
	padding: 2px 8px; background: #fff; border-left: 3px solid #00a32a; color: #1d2327;
}
.hf-notice.is-on { display: inline-block; animation: hf-fade .3s ease both; }
.hf-table { background: #fff; border: 1px solid #c3c4c7; }
.hf-row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	max-height: 50px; padding: 7px 10px; overflow: hidden;
	border-bottom: 1px solid #f0f0f1;
	transition: max-height .5s ease, padding .5s ease, opacity .35s ease, border-color .5s ease;
}
.hf-row:last-child { border-bottom: 0; }
.hf-row a { min-width: 0; color: #2271b1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-row.is-flash { animation: hf-flash 1.8s ease both; }
.hf-row.is-gone { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-color: transparent; }
.hf-row .hf-spam { color: #8a2424; font-weight: 500; }
.hf-tag { flex: none; padding: 1px 7px; border-radius: 3px; font-size: 10.5px; font-weight: 600; }
.hf-tag--draft { background: #fcf0c3; color: #7a5b00; }
.hf-tag--ok { background: #d7f2df; color: #007017; }
.hf-tag--upd { background: #fcf9e8; color: #7a5b00; border-left: 3px solid #dba617; border-radius: 0; font-weight: 500; }
.hf-tag--going { background: #f0f6fc; color: #135e96; border-left: 3px solid #72aee6; border-radius: 0; font-weight: 500; }
.hf-tag--done { background: #edfaef; color: #007017; border-left: 3px solid #00a32a; border-radius: 0; font-weight: 500; }
.hf-tag--mute { color: #8c8f94; font-weight: 500; }
.hf-price { flex: none; }
.hf-price s { margin-right: 4px; color: #8c8f94; }
.hf-sale { display: none; margin-left: 6px; padding: 1px 5px; border-radius: 3px; font-size: 9.5px; font-weight: 700; color: #fff; background: #d63638; }
.hf-sale.is-on { display: inline-block; animation: hf-fade .3s ease both; }

.hf-approve {
	display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px;
	background: #fff; border: 1px solid #c3c4c7; border-left: 3px solid #7c3aed;
	font-size: 11px;
	opacity: 0; max-height: 0; overflow: hidden; margin-bottom: 0;
	transition: opacity .3s ease, max-height .35s ease;
}
.hf-approve.is-on { opacity: 1; max-height: 60px; }
.hf-approve img { flex: none; width: 16px; height: 16px; }
.hf-approve > span:not(.hf-btn) { flex: 1; min-width: 0; color: #50575e; }
.hf-approve b { color: #1d2327; }
.hf-btn { flex: none; padding: 4px 10px; border-radius: 4px; font-size: 10.5px; font-weight: 600; color: #fff; background: #2271b1; transition: transform .15s ease, background .15s ease; }
.hf-btn.is-press { transform: scale(.92); background: #135e96; }
.hf-btn--ghost { color: #2271b1; background: #fff; border: 1px solid #2271b1; }

/* Only a human approves. */
.hf-you {
	position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none;
	display: flex; align-items: flex-start;
	opacity: 0; transform: translate(360px, 170px);
	transition: transform .8s cubic-bezier(.65,0,.35,1), opacity .3s ease;
}
.hf-you.is-on { opacity: 1; }
.hf-you svg { width: 17px; height: 17px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); transition: transform .15s ease; }
.hf-you.is-click svg { transform: scale(.82); }
.hf-you span { margin: 13px 0 0 -3px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; color: #fff; background: #1d2327; }

.hflow.is-paused *, .hflow.is-paused *::before { animation-play-state: paused !important; }

/* ---------- Keyframes ---------- */
@keyframes hf-blink { 50% { opacity: 0; } }
@keyframes hf-rot { to { transform: rotate(360deg); } }
@keyframes hf-pulse { 50% { box-shadow: 0 0 0 4px rgba(245,158,11,.2); } }
@keyframes hf-flow { to { background-position: 0 11px; } }
@keyframes hf-y { from { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes hf-fade { from { opacity: 0; } }
@keyframes hf-flash { 0%, 35% { background: #fcf0c3; } 100% { background: #fff; } }

@media (max-width: 520px) {
	.hflow { padding: 10px; border-radius: 22px; }
	.hflow__sub { display: none; }
	.hflow__checks { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.hflow *, .hflow *::before { animation: none !important; transition: none !important; }
}
