/* =========================================================================
   HOME · landing page at the site root — typewriter hero + tool cards.
   Scoped under #tool-home. Uses the shared core primitives.
   ========================================================================= */

#tool-home .hm-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 90px;
}

/* ---- hero ---- */
#tool-home .hm-hero {
  position: relative;
  /* the hero always fills the whole screen: pull it up under the nav (cancel the
     shell padding) and make it at least one viewport tall, so nothing peeks in below */
  margin-top: calc(-1 * (var(--nav-top) + var(--nav-h) + 14px));
  padding-top: calc(var(--nav-top) + var(--nav-h) + 14px + 40px);
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding-bottom: 60px;
  cursor: default;
}
#tool-home .hm-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}
#tool-home .hm-pill .dot { color: var(--pos); font-size: 9px; }

#tool-home .hm-title {
  margin: 0;
  min-height: 1.25em;
  font-size: clamp(30px, 7.2vw, 84px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--fg-strong);
  white-space: nowrap;
}
#tool-home .hm-line { white-space: pre; }
#tool-home .hm-caret {
  display: inline-block;
  width: 0.5em;
  height: 0.92em;
  margin-left: 0.06em;
  vertical-align: -0.1em;
  background: var(--fg-strong);
  animation: hmBlink 1s steps(1) infinite;
}
#tool-home .hm-caret.is-typing { animation: none; }
#tool-home .hm-caret.is-done { animation: hmBlink 1s steps(1) 3, hmCaretOut 0.4s ease 3s forwards; }
@keyframes hmBlink { 50% { opacity: 0; } }
@keyframes hmCaretOut { to { opacity: 0; } }

/* "umbra" powers on like the boot logo's neon sign */
#tool-home .hm-brand.is-lit {
  color: #fff;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.85),
    0 0 22px rgba(255, 255, 255, 0.45),
    0 0 60px rgba(255, 255, 255, 0.22);
  animation: hmNeon 1.1s ease-out both;
}
@keyframes hmNeon {
  0%   { opacity: 0.25; text-shadow: none; }
  10%  { opacity: 1; }
  14%  { opacity: 0.3; text-shadow: none; }
  22%  { opacity: 1; }
  27%  { opacity: 0.55; }
  40%, 100% { opacity: 1; }
}

#tool-home .hm-sub {
  margin: 0;
  max-width: 560px;
  font-size: clamp(12.5px, 1.6vw, 15px);
  line-height: 1.6;
  color: var(--muted);
}
#tool-home .hm-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
#tool-home .hm-cta { text-decoration: none; }
#tool-home .hm-skip {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--dim);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
#tool-home .hm-hero.is-typing .hm-skip { opacity: 0.7; }

/* everything under the title waits for the typewriter, then fades up */
#tool-home .hm-hero.is-typing .hm-sub,
#tool-home .hm-hero.is-typing .hm-ctas,
#tool-home .hm-hero.is-typing .hm-pill { opacity: 0; transform: translateY(6px); transition: none; }
#tool-home .hm-sub,
#tool-home .hm-ctas,
#tool-home .hm-pill { transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
#tool-home .hm-ctas { transition-delay: 0.12s; }

/* ---- tool cards ---- */
#tool-home .hm-tools { scroll-margin-top: calc(var(--nav-h) + 30px); }
#tool-home .hm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
#tool-home .hm-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-strong); }
#tool-home .hm-head .desc { font-size: 11px; color: var(--dim); }
#tool-home .hm-head .kbd { margin: 0 2px; }

#tool-home .hm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
#tool-home .hm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px 18px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), border-color 0.2s, background 0.2s;
}
#tool-home .hm-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); }
#tool-home .hm-card:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
#tool-home .hm-key {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
  color: var(--dim);
}
#tool-home .hm-ico { font-size: 24px; line-height: 1; color: var(--fg-strong); }
#tool-home .hm-card h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--fg-strong); }
#tool-home .hm-card p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
#tool-home .hm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
#tool-home .hm-tags li { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; color: var(--dim); }
#tool-home .hm-open { margin-top: auto; padding-top: 6px; font-size: 11.5px; color: var(--muted); transition: color 0.2s, transform 0.2s var(--ease-out); }
#tool-home .hm-card:hover .hm-open { color: var(--fg-strong); transform: translateX(3px); }
#tool-home .hm-wip {
  padding: 2px 8px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
}

/* ---- why ---- */
#tool-home .hm-why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 70px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
#tool-home .hm-why-ico { display: block; margin-bottom: 10px; font-size: 18px; color: var(--fg-strong); }
#tool-home .hm-why h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--fg-strong); }
#tool-home .hm-why p { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--muted); }

/* ---- responsive ---- */
@media (max-width: 960px) {
  #tool-home .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #tool-home .hm-grid,
  #tool-home .hm-why { grid-template-columns: minmax(0, 1fr); }
  #tool-home .hm-hero { gap: 18px; }
  #tool-home .hm-title { font-size: clamp(22px, 7.4vw, 40px); }
  #tool-home .hm-cta { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #tool-home .hm-caret { display: none; }
  #tool-home .hm-brand.is-lit { animation: none; }
  #tool-home .hm-card, #tool-home .hm-open { transition: none; }
}

/* =========================================================================
   what's inside: bento grid, each card opens with a tiny looping demo
   (react-bits style). demos only run while the card is on screen
   (.is-live, set by home.js); otherwise every animation is paused.
   ========================================================================= */
#tool-home .hm-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
#tool-home .hm-bento .hm-card {
  grid-column: span 4;
  padding: 10px 10px 20px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
}
#tool-home .hm-bento .hm-card:hover { background: rgba(255, 255, 255, 0.03); }
#tool-home .hm-bento .hm-b-update { grid-column: span 5; }
#tool-home .hm-bento .hm-b-mosaic { grid-column: span 3; }
#tool-home .hm-bento .hm-b-rocalc { grid-column: span 4; }
#tool-home .hm-bento .hm-b-front  { grid-column: span 5; }
#tool-home .hm-bento .hm-b-crop   { grid-column: span 4; }
#tool-home .hm-bento .hm-b-gltf   { grid-column: span 3; }
#tool-home .hm-bento .hm-card h3,
#tool-home .hm-bento .hm-card p { padding: 0 12px; }
#tool-home .hm-bento .hm-card h3 { margin-top: 10px; font-size: 14px; }
#tool-home .hm-bento .hm-key { top: 20px; right: 20px; z-index: 2; background: rgba(0, 0, 0, 0.5); }

#tool-home .hm-stage {
  position: relative;
  height: 172px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0b0e;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tool-home .hm-stage *,
#tool-home .hm-stage *::before,
#tool-home .hm-stage *::after { animation-play-state: paused; }
#tool-home .hm-card.is-live .hm-stage *,
#tool-home .hm-card.is-live .hm-stage *::before,
#tool-home .hm-card.is-live .hm-stage *::after { animation-play-state: running; }

/* ---- 1 · update icon ---- */
#tool-home .bx-icon {
  position: relative;
  width: 124px; height: 124px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 30px -10px rgba(0, 0, 0, 0.8);
}
#tool-home .bx-icon-art {
  position: absolute; inset: 0;
  /* a soft "game art" placeholder: light from the top-left, falling into dark */
  background:
    radial-gradient(120% 90% at 22% 12%, #5c5c64 0%, #34343a 42%, #1a1a1e 78%),
    #1a1a1e;
}
#tool-home .bx-hg {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
  animation: bxFlip 1.8s cubic-bezier(.6, 0, .3, 1) infinite;
}
@keyframes bxFlip { 0%, 72% { transform: translate(-50%, -50%) rotate(0); } 100% { transform: translate(-50%, -50%) rotate(180deg); } }
#tool-home .bx-sand-top { animation: bxSandTop 1.8s linear infinite; transform-box: fill-box; transform-origin: 50% 0; }
#tool-home .bx-sand-bot { animation: bxSandBot 1.8s linear infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bxSandTop { 0% { transform: scaleY(1); } 70%, 100% { transform: scaleY(0.15); } }
@keyframes bxSandBot { 0% { transform: scaleY(0.2); } 70%, 100% { transform: scaleY(1); } }
#tool-home .bx-count {
  position: absolute; left: 0; right: 0; bottom: 14px;
  text-align: center;
  font: 800 15px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s, transform 0.25s;
}
#tool-home .bx-count.is-swap { opacity: 0; transform: translateY(5px); }

/* ---- 2 · mosaic ---- */
#tool-home .bx-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 92px);
  grid-auto-rows: 52px;
  gap: 7px;
}
/* each tile is a tiny 16:9 "thumbnail": light, a horizon and a subject */
#tool-home .bx-mosaic i {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(110% 100% at var(--lx, 25%) 10%, rgba(255, 255, 255, var(--g)), transparent 60%), #17171b;
  will-change: transform;
}
#tool-home .bx-mosaic i::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: rgba(255, 255, 255, 0.07);
}
#tool-home .bx-mosaic i::after {
  content: '';
  position: absolute; left: var(--sx, 55%); bottom: 22%;
  width: 16px; height: 22px;
  border-radius: 7px 7px 3px 3px;
  background: rgba(255, 255, 255, calc(var(--g) + 0.25));
}

/* ---- 3 · rocalc ---- */
#tool-home .bx-term {
  width: 82%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0f13;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
}
#tool-home .bx-term-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
#tool-home .bx-term-bar i { width: 7px; height: 7px; border-radius: 50%; background: #2c2c32; }
#tool-home .bx-term-bar span { margin-left: 6px; font-size: 10px; color: var(--dim); }
#tool-home .bx-term-cmd { padding: 9px 12px 6px; color: var(--fg); }
#tool-home .bx-term-row { display: flex; justify-content: space-between; padding: 3px 12px; }
#tool-home .bx-term-row:last-child { padding-bottom: 10px; }
#tool-home .bx-term-row b { color: var(--fg-strong); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- 4 · frontpage ---- */
#tool-home .bx-front { width: 88%; display: flex; flex-direction: column; gap: 7px; }
#tool-home .bx-front-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
#tool-home .bx-front-bar i { width: 12px; height: 12px; border-radius: 3px; background: #2f2f35; }
#tool-home .bx-front-bar b { width: 30px; height: 5px; border-radius: 3px; background: #26262b; }
#tool-home .bx-front-bar span { flex: 1; height: 12px; margin-left: 6px; border-radius: 6px; background: #19191d; }
#tool-home .bx-front-h { width: 34%; height: 7px; border-radius: 3px; background: #2a2a30; }
#tool-home .bx-front-h.is-short { width: 22%; }
#tool-home .bx-front-row { overflow: hidden; padding-top: 8px; margin-top: -8px; }
#tool-home .bx-front-track { display: flex; gap: 6px; width: max-content; animation: bxSlide 9s linear infinite; }
#tool-home .bx-front-track i,
#tool-home .bx-front-row.is-sq i {
  position: relative;
  flex: none;
  width: 74px; height: 42px;
  border-radius: 6px;
  background: linear-gradient(135deg, #232328, #18181c);
}
#tool-home .bx-front-row.is-sq { display: flex; gap: 6px; }
#tool-home .bx-front-row.is-sq i { width: 34px; height: 34px; }
#tool-home .bx-front-track i.is-mine {
  background: linear-gradient(135deg, #8a8a92, #4a4a52);
  outline: 1px dashed rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
  animation: bxPulse 1.6s ease-in-out infinite;
}
#tool-home .bx-front-track i.is-mine em {
  position: absolute; left: 4px; top: -7px;
  padding: 1px 4px;
  border-radius: 3px;
  font: 600 7px/1.2 'JetBrains Mono', monospace;
  font-style: normal;
  color: #000;
  background: #fff;
}
@keyframes bxSlide { from { transform: translateX(0); } to { transform: translateX(-400px); } }
@keyframes bxPulse { 50% { box-shadow: 0 0 16px rgba(255, 255, 255, 0.35); } }

/* ---- 5 · crop ---- */
#tool-home .bx-crop { position: relative; width: 236px; height: 133px; }
#tool-home .bx-crop-img {
  position: absolute; inset: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(160deg, #3b3b42, #1d1d22 60%, #2b2b31);
}
#tool-home .bx-crop-img .s1 { position: absolute; left: 22%; top: 30%; width: 64px; height: 64px; border-radius: 50%; background: #9a9aa2; }
#tool-home .bx-crop-img .s2 { position: absolute; left: 62%; top: 16%; width: 44px; height: 70px; border-radius: 6px; background: #55555c; }
#tool-home .bx-crop-img .s3 { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: #2a2a2f; }
#tool-home .bx-crop-box {
  position: absolute;
  left: 18%; top: 0; width: 133px; height: 133px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 400px rgba(0, 0, 0, 0.55);
  animation: bxCrop 6s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes bxCrop {
  0%, 18%   { left: 18%; width: 133px; }
  33%, 50%  { left: 42%; width: 133px; }
  66%, 84%  { left: 0;   width: 236px; }
  100%      { left: 18%; width: 133px; }
}
#tool-home .bx-crop-box .c { position: absolute; width: 14px; height: 14px; border: 0 solid #fff; }
#tool-home .bx-crop-box .tl { left: -3px; top: -3px; border-left-width: 3px; border-top-width: 3px; }
#tool-home .bx-crop-box .tr { right: -3px; top: -3px; border-right-width: 3px; border-top-width: 3px; }
#tool-home .bx-crop-box .bl { left: -3px; bottom: -3px; border-left-width: 3px; border-bottom-width: 3px; }
#tool-home .bx-crop-box .br { right: -3px; bottom: -3px; border-right-width: 3px; border-bottom-width: 3px; }
#tool-home .bx-crop-box .r {
  position: absolute; left: 50%; bottom: 8px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 9.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
}
#tool-home .bx-crop-box .r1 { animation: bxR1 6s steps(1) infinite; }
#tool-home .bx-crop-box .r2 { opacity: 0; animation: bxR2 6s steps(1) infinite; }
@keyframes bxR1 { 0%, 60% { opacity: 1; } 61%, 89% { opacity: 0; } 90% { opacity: 1; } }
@keyframes bxR2 { 0%, 60% { opacity: 0; } 61%, 89% { opacity: 1; } 90% { opacity: 0; } }

/* ---- 6 · gltf → png ---- */
#tool-home .bx-gltf { position: relative; display: flex; align-items: center; gap: 14px; margin-top: -14px; }
#tool-home .bx-file {
  position: relative;
  width: 46px; height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 6px 14px 6px 6px;
  background: #15151a;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 7px;
  font-size: 9.5px;
  color: var(--fg);
  animation: bxFile 4s ease-in-out infinite;
}
@keyframes bxFile { 0%, 8% { transform: scale(1); } 14% { transform: scale(1.08); } 22%, 100% { transform: scale(1); } }
#tool-home .bx-arrow { color: var(--dim); font-size: 14px; }
#tool-home .bx-out { display: grid; grid-template-columns: repeat(2, 36px); gap: 5px; }
#tool-home .bx-out i {
  height: 22px;
  border-radius: 4px;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  animation: bxPop 4s ease-out infinite;
}
#tool-home .bx-out i::after { content: ''; display: block; width: 40%; height: 60%; margin: 18% auto 0; border-radius: 50% 50% 3px 3px; background: #bdbdc4; }
#tool-home .bx-out i:nth-child(2) { animation-delay: 0.18s; }
#tool-home .bx-out i:nth-child(3) { animation-delay: 0.36s; }
#tool-home .bx-out i:nth-child(4) { animation-delay: 0.54s; }
@keyframes bxPop {
  0%, 20% { opacity: 0; transform: translate(-28px, 0) scale(0.6); }
  32%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
#tool-home .bx-done {
  position: absolute; left: 50%; bottom: -30px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--pos);
  opacity: 0;
  animation: bxDone 4s ease infinite;
}
@keyframes bxDone { 0%, 45% { opacity: 0; } 55%, 86% { opacity: 1; } 100% { opacity: 0; } }

/* ---- responsive ---- */
@media (max-width: 960px) {
  #tool-home .hm-bento .hm-card.hm-card { grid-column: span 6; }
}
@media (max-width: 640px) {
  #tool-home .hm-bento .hm-card.hm-card { grid-column: span 12; }
}
@media (prefers-reduced-motion: reduce) {
  #tool-home .hm-stage *, #tool-home .hm-stage *::before, #tool-home .hm-stage *::after { animation: none !important; }
  #tool-home .bx-out i, #tool-home .bx-done { opacity: 1; }
}


/* ---- the demos use @gfxs0da's own thumbnail mockups (assets/home/) ---- */
#tool-home .bx-icon img.bx-icon-art { width: 100%; height: 100%; object-fit: cover; background: none; }
#tool-home .bx-icon-dark { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
#tool-home .bx-hg, #tool-home .bx-count { z-index: 1; }
#tool-home .bx-mosaic i { background: #fff center / cover no-repeat; border-color: rgba(255, 255, 255, 0.14); }
#tool-home .bx-mosaic i::before, #tool-home .bx-mosaic i::after { content: none; }
#tool-home .bx-front-track i.is-mine { background: #fff url(../assets/home/thumb-run.jpg) center / cover no-repeat; }
#tool-home .bx-crop-img { background: #fff url(../assets/home/thumb-crowd.jpg) center / cover no-repeat; }
#tool-home .bx-out i { background: #fff center / cover no-repeat; }
#tool-home .bx-out i::after { content: none; }
#tool-home .bx-out { grid-template-columns: repeat(2, 48px); }
#tool-home .bx-out i { height: 27px; }

/* update icon demo = the tool's own defaults: real rovisuals hourglass (hgSize 100%),
   50% darkness, countdown in bold arial at 18% of the icon height, centred at 87% */
#tool-home .bx-icon-dark { background: rgba(0, 0, 0, 0.5); }
#tool-home .bx-hg-img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#tool-home .bx-icon .bx-count {
  top: 87%; bottom: auto;
  transform: translateY(-50%);
  font: bold 22px/1 Arial, sans-serif;
  letter-spacing: 0;
  text-shadow: none;
  white-space: nowrap;
}
#tool-home .bx-icon .bx-count.is-swap { transform: translateY(-30%); }

/* =========================================================================
   from studio to front page — five steps on a rail; the rail fills and each
   step lights up as you scroll through the section (home.js sets --p and .is-on)
   ========================================================================= */
#tool-home .hm-flow { margin-top: 90px; }
#tool-home .hm-flow-track { position: relative; padding-top: 8px; }
#tool-home .hm-flow-line {
  position: absolute;
  left: 10%; right: 10%; top: 78px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}
#tool-home .hm-flow-line i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), #fff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
#tool-home .hm-flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#tool-home .hm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  opacity: 0.35;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
#tool-home .hm-step.is-on { opacity: 1; transform: none; }
#tool-home .hm-step:hover h3 { color: #fff; }
#tool-home .hm-step-vis {
  position: relative;
  z-index: 1;
  width: 132px; height: 140px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0b0e;
  transition: border-color 0.5s, box-shadow 0.5s;
}
#tool-home .hm-step.is-on .hm-step-vis { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 30px -12px rgba(255, 255, 255, 0.12); }
#tool-home .hm-step-n { margin-top: 8px; font-size: 10px; color: var(--dim); letter-spacing: 0.08em; }
#tool-home .hm-step h3 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--fg-strong); transition: color 0.2s; }
#tool-home .hm-step p { margin: 0; max-width: 190px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }

#tool-home .fs-file {
  width: 50px; height: 64px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px 15px 6px 6px;
  background: #15151a;
  font-size: 10.5px; color: var(--fg);
}
#tool-home .fs-thumb {
  position: relative;
  width: 104px; height: 58px;
  border-radius: 6px;
  background: #fff center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
/* the 1:1 crop frame sits on the character */
#tool-home .fs-crop i {
  position: absolute;
  top: 0; bottom: 0; left: 44%; width: 56px;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 200px rgba(0, 0, 0, 0.55);
}
#tool-home .fs-crop { overflow: hidden; }
/* update icon at the tool's defaults: 50% darkness, real hourglass, bold arial */
#tool-home .fs-icon {
  position: relative;
  width: 84px; height: 84px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff center / cover no-repeat;
}
#tool-home .fs-icon::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
#tool-home .fs-hg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#tool-home .fs-icon span {
  position: absolute; left: 0; right: 0; top: 87%;
  transform: translateY(-50%);
  text-align: center;
  font: bold 15px/1 Arial, sans-serif;
  color: #fff;
}
#tool-home .fs-front { display: flex; gap: 5px; }
#tool-home .fs-front i {
  width: 34px; height: 46px;
  border-radius: 5px;
  background: linear-gradient(135deg, #232328, #18181c);
}
#tool-home .fs-front i.is-mine {
  width: 46px;
  background: #fff center / cover no-repeat;
  outline: 1px dashed rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

/* ---- numbers ---- */
#tool-home .hm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 80px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
#tool-home .hm-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
}
#tool-home .hm-stat + .hm-stat { border-left: 1px solid var(--line); }
#tool-home .hm-stat b {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}
#tool-home .hm-stat span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---- faq ---- */
#tool-home .hm-faq { margin-top: 80px; }
#tool-home .hm-q { border-bottom: 1px solid var(--line); }
#tool-home .hm-q summary {
  position: relative;
  padding: 18px 40px 18px 0;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-strong);
  cursor: pointer;
}
#tool-home .hm-q summary::-webkit-details-marker { display: none; }
#tool-home .hm-q summary::after {
  content: '+';
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; font-weight: 400;
  color: var(--muted);
  transition: transform 0.25s var(--ease-out);
}
#tool-home .hm-q[open] summary::after { transform: translateY(-50%) rotate(45deg); }
#tool-home .hm-q summary:hover { color: #fff; }
#tool-home .hm-q p { margin: -4px 0 18px; max-width: 720px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
#tool-home .hm-q p b { color: var(--fg); font-weight: 600; }
#tool-home .hm-q[open] p { animation: hmQ 0.3s var(--ease-out); }
@keyframes hmQ { from { opacity: 0; transform: translateY(-4px); } }

/* ---- final cta ---- */
#tool-home .hm-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-top: 110px;
  padding: 70px 0 30px;
}
#tool-home .hm-end-stop { margin: 0; font-size: clamp(18px, 3vw, 30px); font-weight: 600; color: var(--dim); letter-spacing: -0.03em; }
#tool-home .hm-end-stop span { position: relative; }
/* the strike draws across when the section scrolls in */
#tool-home .hm-end-stop span::after {
  content: '';
  position: absolute; left: -4px; right: -4px; top: 54%;
  height: 3px;
  border-radius: 2px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s 0.2s var(--ease-out);
}
#tool-home .hm-end.is-on .hm-end-stop span::after { transform: scaleX(1); }
#tool-home .hm-end-go {
  margin: 0 0 14px;
  font-size: clamp(30px, 6.4vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--fg-strong);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s 0.7s var(--ease-out), transform 0.7s 0.7s var(--ease-out);
}
#tool-home .hm-end.is-on .hm-end-go { opacity: 1; transform: none; }
#tool-home .hm-end.is-on .hm-end-go .hm-brand {
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.85), 0 0 22px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.22);
  animation: hmNeon 1.1s 1.2s ease-out both;
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  #tool-home .hm-flow-line { left: 27px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  #tool-home .hm-flow-line i { width: 100%; height: calc(var(--p, 0) * 100%); background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), #fff); }
  #tool-home .hm-flow-steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  #tool-home .hm-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 16px;
    align-items: center;
    text-align: left;
  }
  #tool-home .hm-step-vis { grid-row: 1 / 4; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; }
  #tool-home .hm-step-vis > * { transform: scale(0.5); }
  #tool-home .hm-step-n { margin: 0; }
  #tool-home .hm-step p { max-width: none; }
  #tool-home .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tool-home .hm-stat:nth-child(3) { border-left: 0; }
  #tool-home .hm-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  #tool-home .hm-step, #tool-home .hm-end-go, #tool-home .hm-end-stop span::after { transition: none; }
  #tool-home .hm-step { opacity: 1; transform: none; }
}

/* links inside faq answers (twitter handles) */
#tool-home .hm-link {
  color: var(--fg-strong);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
#tool-home .hm-link:hover { color: #fff; text-decoration-color: #fff; }
#tool-home .hm-stat b small { font-size: 0.5em; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }

/* ---- why did i make this ---- */
#tool-home .hm-story {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 90px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
}
#tool-home .hm-story-me { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#tool-home .hm-story-me img {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: #1b1b1f;
  border: 1px solid var(--line-strong);
}
#tool-home .hm-story-me .hm-link { font-size: 13px; }
#tool-home .hm-story-text h2 { margin: 0 0 16px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-strong); }
#tool-home .hm-story-text p { margin: 0 0 14px; max-width: 680px; font-size: 14px; line-height: 1.8; color: var(--muted); }
#tool-home .hm-story-text p:last-child { margin-bottom: 0; color: var(--fg); }
@media (max-width: 760px) {
  #tool-home .hm-story { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 26px 22px; }
  #tool-home .hm-story-me { flex-direction: row; justify-content: flex-start; }
  #tool-home .hm-story-me img { width: 64px; height: 64px; }
  #tool-home .hm-story-text p { font-size: 13px; }
}
