/* Hero / nav / final CTA for the two versions (hosted vs open source). Owned by the hero task. */

/* ---------- open source pill ---------- */
.os-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glassline); color: var(--ink2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), color .2s, border-color .2s; }
.os-pill:hover { color: var(--ink); border-color: var(--line); transform: translateY(-1px); }
.os-pill:focus-visible, .os-btn:focus-visible, .tm-copy:focus-visible, .tm-code:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.os-pill svg { color: var(--ink); flex: none; }
.os-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--okbg); flex: none; }
.ext { display: inline-block; color: var(--ink3); font-weight: 700; transition: transform .25s; }
.os-pill:hover .ext, .navlink:hover .ext { transform: translate(1px,-1px); color: var(--focus); }

/* ---------- nav CTA: stable width ---------- */
.cta-nav { min-width: 142px; }
@media (max-width: 759px) { .cta-nav { min-width: 0; padding: 0 16px; } }
.cta-nav [data-mode-only] { display: inline; }

/* ---------- hero blocks ---------- */
.hero-sw { align-self: flex-start; }
@media (max-width: 560px) { .hero-sw, .cta-sw { display: grid; width: 100%; } }
.hero-line { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink2); font-weight: 500; text-wrap: pretty; }
.hero-line strong { color: var(--ink); font-weight: 700; }
.hero-local { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 540px; }
.hero-help { margin: -4px 0 0; }
.hero-stage-col { align-self: start; margin-top: 56px; position: sticky; top: 96px; }
@media (max-width: 860px) { .hero-stage-col { margin-top: 0; position: relative; top: auto; } }

@keyframes ty-swap-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html.ty-swapped .hero-swap, html.ty-swapped .cta-local, html.ty-swapped [data-mode-only].swap-in { animation: ty-swap-in .42s cubic-bezier(.22,1,.36,1) both; }
@media (prefers-reduced-motion: reduce) { html.ty-swapped .hero-swap, html.ty-swapped .cta-local, html.ty-swapped [data-mode-only].swap-in { animation: none; } }

/* ---------- buttons ---------- */
.os-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.os-btn { flex: 1 1 150px; height: 52px; padding: 0 22px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit;
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .2s, border-color .2s; box-sizing: border-box; }
.os-btn-main { flex-grow: 1.5; border: 0; background: var(--btn); color: var(--btnink); box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.os-btn-alt { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.os-btn-alt:hover { border-color: var(--focus); }

/* ---------- terminal card ---------- */
.tm { position: relative; border-radius: 20px; color: #e6eeff; isolation: isolate;
  background: radial-gradient(120% 90% at 0% 0%, rgba(138,180,248,.16), transparent 55%), linear-gradient(160deg, #1f3f78 0%, #152c55 100%);
  border: 1px solid rgba(138,180,248,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.25), 0 2px 5px rgba(10,22,48,.25), 0 26px 46px -16px rgba(21,44,85,.6); }
.tm::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
.tm-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.tm-dots { display: inline-flex; gap: 6px; }
.tm-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.22); }
.tm-dots i:nth-child(1) { background: #ff6b64; } .tm-dots i:nth-child(2) { background: #ffc34a; } .tm-dots i:nth-child(3) { background: #3fd16a; }
.tm-title { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(214,226,255,.55); letter-spacing: .02em; }
.tm-copy { justify-self: end; appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #dbe7ff; font: 700 12.5px/1 inherit; font-family: inherit;
  transition: background .2s, border-color .2s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.tm-copy:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.34); }
.tm-copy:active { transform: scale(.95); }
.tm-copy.is-done { background: rgba(63,209,106,.2); border-color: rgba(63,209,106,.55); color: #bdf5cf; }
.tm-code { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font: 500 13.5px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e8efff; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 0 0 20px 20px; }
.tm-code code { font: inherit; }
.tm-l { display: block; padding-left: 2ch; text-indent: -2ch; }
.tm-l b { color: #8ab4f8; font-weight: 700; user-select: none; -webkit-user-select: none; }
.tm-h { visibility: hidden; }
.tm.is-typed .tm-h { visibility: visible; }
.tm-caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: #8ab4f8; border-radius: 1px; opacity: .85; animation: tm-blink 1.1s steps(2, jump-none) infinite; }
@keyframes tm-blink { 50% { opacity: 0; } }
.tm-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tm-pop { position: absolute; right: -12px; bottom: -14px; width: 84px; height: 84px; object-fit: contain; z-index: 2; pointer-events: none; opacity: 0;
  transform: rotate(9deg) scale(.9); filter: drop-shadow(0 12px 14px rgba(21,44,85,.35)); transition: opacity .4s, transform .6s cubic-bezier(.34,1.56,.64,1); }
.tm-pop.is-ok { opacity: 1; transform: rotate(9deg); }
@media (max-width: 560px) { .tm-pop { right: -4px; bottom: -10px; width: 66px; height: 66px; } .tm-code { font-size: 12.5px; padding: 14px 14px 16px; } }
.tm--sm .tm-code { font-size: 13px; line-height: 1.7; padding: 12px 16px 14px; }
.tm--sm .tm-pop { width: 72px; height: 72px; right: -10px; bottom: -14px; }
.tm--sm { border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .tm-caret { animation: none; } .tm-pop { transition: none; } }

/* ---------- final CTA ---------- */
.cta-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.cta-local { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 540px; }
@media (max-width: 560px) { .cta-top { flex-direction: column; align-items: flex-start; } }

/* phone: switch labels fit their halves */
@media (max-width: 440px) { .hero-sw .mode-tag, .cta-sw .mode-tag { display: none; } }
@media (max-width: 440px) { .cta-sw [data-mode-set] { padding: 0 6px; font-size: 12.5px; } .hero-sw [data-mode-set] { padding: 0 8px; } }
@media (max-width: 440px) { .cta-nav { padding: 0 12px; font-size: 13px; height: 42px; } }
