/* Template sections: Hero variants (template-sections/hero.html). V1 is the homepage hero (css/sections/hero.css). */
.lib-variant__stage > .s-hero { padding-top: var(--space-16); }

.ts-hero { position: relative; overflow-x: clip; }
.ts-hero__title { font-size: var(--h1-size); line-height: var(--h1-lh); letter-spacing: var(--h1-ls); text-wrap: balance; }
.ts-hero__copy { display: grid; justify-items: start; gap: var(--space-5); min-width: 0; }
.ts-hero__copy .ts-actions { margin-top: var(--space-2); }
.ts-hero__grid { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 1024px) { .ts-hero__grid { grid-template-columns: 1fr 1.1fr; gap: var(--space-16); } }

.ts-hero__pill {
  display: inline-flex; align-items: center; gap: var(--space-2); max-width: 100%; padding: 4px 12px 4px 4px;
  border: 1px solid var(--border-thin); border-radius: var(--radius-pill); background: var(--base-high);
  font-weight: var(--fw-medium); font-size: var(--body-sm-size); color: var(--text-strong);
  transition: border-color var(--dur) var(--ease);
}
.ts-hero__pill-new { flex: none; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--peach-100); color: var(--amber-800); }
.ts-hero__pill .ts-svg { width: 14px; height: 14px; flex: none; transition: transform var(--dur) var(--ease); }
@media (hover: hover) { .ts-hero__pill:hover { border-color: var(--border-strong); } .ts-hero__pill:hover .ts-svg { transform: translateX(2px); } }

/* V2 split */
.ts-hero--v2 { padding-top: var(--space-12); }
.ts-hero__proof { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.ts-hero__proof > span:last-child { display: grid; gap: 2px; }
.ts-hero__proof-row { display: flex; align-items: center; gap: var(--space-2); color: var(--text-strong); }
.ts-hero__media { min-width: 0; }

/* V3 centered */
.ts-hero--v3 { text-align: center; }
.ts-hero__glow { position: absolute; inset: 0 0 auto; height: 520px; z-index: -1; background: radial-gradient(60% 70% at 50% 0%, var(--hero-grad-top), transparent 70%), radial-gradient(40% 50% at 70% 10%, var(--hero-grad-mid), transparent 70%); }
.ts-hero__center { display: grid; justify-items: center; gap: var(--space-5); max-width: 860px; }
.ts-hero__center .ts-lead { max-width: 640px; }
.ts-hero__form { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); width: 100%; max-width: 440px; margin-top: var(--space-2); }
.ts-hero__form .input { flex: 1 1 220px; min-width: 0; }
.ts-hero__form .btn { flex: 1 0 auto; }
.ts-hero__form-msg { flex-basis: 100%; min-height: 0; }
.ts-hero__form-msg:empty { display: none; }
.ts-hero__logos { display: grid; gap: var(--space-4); margin-top: var(--space-10); }
.ts-hero__logos ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6) var(--space-10); padding: 0; }
.ts-hero__logos .ts-logo { height: 20px; }
@media (min-width: 640px) { .ts-hero__form { flex-wrap: nowrap; } .ts-hero__form .btn { flex: none; } }

/* V4 dark + terminal */
.ts-hero__install { display: flex; align-items: center; gap: var(--space-2); max-width: 100%; padding: 4px 4px 4px var(--space-4); border: 1px solid var(--border-thin); border-radius: var(--radius-pill); background: var(--base-high); }
.ts-hero__install code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--text-strong); }
.ts-hero__term { min-width: 0; overflow: hidden; border: 1px solid var(--border-thin); border-radius: var(--radius-lg); background: var(--code-bg); box-shadow: var(--shadow-lg); }
.ts-hero__term .ts-frame__bar { background: rgb(255 255 255 / 0.04); }
.ts-hero__term .ts-frame__url { background: transparent; }
.ts-hero__term .ts-code { border-radius: 0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 768px) { .ts-hero__term .ts-code { font-size: 13px; padding: var(--space-6); } }

/* V5 big type + video */
.ts-hero__mega { font-size: clamp(48px, 13vw, 156px); line-height: 0.92; letter-spacing: -0.045em; }
.ts-hero__mega em { font-style: normal; color: var(--text-low); }
.ts-hero__row { display: grid; gap: var(--space-6); margin-top: var(--space-8); }
@media (min-width: 1024px) { .ts-hero__row { grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; align-items: end; } }
.ts-hero__video { position: relative; display: block; width: 100%; margin-top: var(--space-12); overflow: hidden; border-radius: var(--radius-xl); aspect-ratio: 16 / 9; background: var(--base-medium); }
.ts-hero__video img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.ts-hero__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; translate: -50% -50%; border-radius: 50%; background: rgb(255 255 255 / 0.9); color: #0a0a0a; box-shadow: var(--shadow-lg); transition: transform var(--dur-slow) var(--ease-spring); }
.ts-hero__play .ts-svg { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.ts-hero__dur { position: absolute; left: var(--space-4); bottom: var(--space-4); padding: 4px 12px; border-radius: var(--radius-pill); background: rgb(0 0 0 / 0.55); font-weight: var(--fw-medium); font-size: var(--body-sm-size); color: #fff; backdrop-filter: blur(8px); }
@media (hover: hover) { .ts-hero__video:hover img { transform: scale(1.03); } .ts-hero__video:hover .ts-hero__play { transform: scale(1.08); } }
.ts-hero__dialog { width: min(880px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--code-bg); color: var(--code-text); }
.ts-hero__dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.ts-hero__dialog-body { display: grid; place-items: center; gap: var(--space-4); aspect-ratio: 16 / 9; padding: var(--space-6); text-align: center; }

/* V6 left + stats */
.ts-hero--v6 { padding-block: var(--space-20); }
.ts-hero__grid-bg { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--border-thin) 1px, transparent 1px), linear-gradient(90deg, var(--border-thin) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 80% at 20% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(70% 80% at 20% 30%, #000 30%, transparent 75%); }
.ts-hero--v6 .ts-hero__copy { max-width: 760px; }
.ts-hero--v6 .tag .ts-svg { width: 14px; height: 14px; color: var(--accent); }
.ts-hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-4); margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--border-thin); }
.ts-hero__stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--space-2); }
.ts-hero__stats dt { font-size: var(--para-sm-size); color: var(--text-low); }
.ts-hero__stats dd { margin: 0; font-family: var(--font-heading); font-weight: var(--fw-heading); font-size: var(--h3-size); line-height: 1; letter-spacing: var(--h3-ls); color: var(--text-strong); }
@media (min-width: 768px) { .ts-hero__stats { grid-template-columns: repeat(4, 1fr); } .ts-hero__stats div + div { padding-left: var(--space-6); border-left: 1px solid var(--border-thin); } }
@media (max-width: 767px) { .ts-hero__stats div:nth-child(even) { padding-left: var(--space-4); border-left: 1px solid var(--border-thin); } }
