/* =================================================================
   Home: opening + "git log" life story (before the laptop)
   ================================================================= */

/* ---------- Opening: the headline that edits itself ---------- */
.st-hero { min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; background: #F4F4F5; position: relative; }
.st-kicker { margin: 0 0 26px; font: 14px var(--mono); color: var(--accent-text); }
.st-title { margin: 0; font: 500 clamp(3rem, 9vw, 9rem)/.95 var(--sans); letter-spacing: -.06em; }
.st-line { display: block; opacity: 0; transform: translateY(24px); animation: stIn .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.st-line--1 { animation-delay: .15s; }
.st-line--2 { animation-delay: 1.5s; }
.st-line--3 { animation-delay: 2.4s; color: var(--accent-text); }
.st-strike { position: relative; display: inline-block; color: var(--faint); transition: color .6s 1s; }
.st-strike::after { content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: .07em; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: stStrike .55s cubic-bezier(.65, 0, .35, 1) .95s forwards; }
.st-line--1 .st-strike { animation: stFade .6s 1s forwards; color: var(--text); }
@keyframes stIn { to { opacity: 1; transform: none; } }
@keyframes stStrike { to { transform: scaleX(1); } }
@keyframes stFade { to { color: var(--faint); } }
.st-lede { margin: 34px 0 0; max-width: 52ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); opacity: 0; animation: stIn .9s cubic-bezier(.2, .8, .2, 1) 2.9s forwards; }
.st-cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 44px; font: 14px var(--mono); color: var(--text); text-decoration: none; opacity: 0; animation: stIn .9s cubic-bezier(.2, .8, .2, 1) 3.2s forwards; }
.st-cue span { width: 18px; height: 28px; border: 1.5px solid currentColor; border-radius: 10px; position: relative; }
.st-cue span::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: lpwheel 1.6s ease-in-out infinite; }

/* ---------- Story: pinned git graph + commits ---------- */
.st { position: relative; height: 560vh; background: #FFFFFF; }
.st-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.4fr); align-items: center; gap: clamp(20px, 5vw, 80px); padding: 84px var(--g) 40px; max-width: 1400px; margin: 0 auto; }
.st-graph { height: 100%; max-height: 78svh; display: flex; justify-content: center; }
.st-graph svg { height: 100%; width: auto; overflow: visible; }
.st-graph path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.g-main { stroke: var(--text); }
.g-branch { stroke: var(--accent); }
.g-merge { stroke: var(--accent); }
.g-ghost { stroke: var(--line-2) !important; stroke-width: 3 !important; stroke-dasharray: .012 .02 !important; stroke-dashoffset: 0 !important; opacity: 0; transition: opacity .6s; }
.st.is-turned .g-ghost { opacity: 1; }
.g-node circle { fill: #fff; stroke: var(--text); stroke-width: 4; transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .45s cubic-bezier(.16, 1, .3, 1), fill .3s; }
.g-node--blue circle { stroke: var(--accent); }
.g-node.on circle { transform: scale(1); }
.g-node.cur circle { fill: var(--text); }
.g-node--blue.cur circle { fill: var(--accent); }
.g-node text { font: 500 15px var(--mono); fill: var(--muted); opacity: 0; transition: opacity .3s; }
.g-node.on text { opacity: 1; }
.g-node--merge > rect:first-child { fill: #0C0C0E; stroke: none; }
.g-node--merge path { stroke: #fff; }
.g-caret { fill: var(--accent); animation: logoBlink 1.1s steps(1) infinite; }
.g-node--merge { transform-box: fill-box; opacity: 0; transition: opacity .4s; }
.g-node--merge.on { opacity: 1; }

.st-steps { position: relative; height: min(560px, 70svh); }
.st-step { position: absolute; inset: 50% 0 auto; translate: 0 -50%; opacity: 0; transform: translateY(26px); transition: opacity .55s cubic-bezier(.2, .8, .2, 1), transform .65s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.st-step.on { opacity: 1; transform: none; pointer-events: auto; }
.st-step.was { transform: translateY(-26px); }
.st-commit { display: inline-flex; gap: 10px; margin: 0 0 20px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; font: 13px var(--mono); color: var(--text-2); background: #F4F4F5; }
.st-commit span { color: var(--faint); }
.st-commit--blue { color: var(--accent-text); border-color: rgba(184, 67, 47, .25); background: rgba(184, 67, 47, .06); }
.st-commit i { font-style: normal; color: var(--accent-text); }
.st-step h2 { margin: 0; font: 500 clamp(2.2rem, 4.6vw, 4.6rem)/1 var(--sans); letter-spacing: -.05em; text-wrap: balance; }
.st-step--turn h2, .st-step--merge h2 { color: var(--accent-text); }
.st-step p { margin: 18px 0 0; max-width: 48ch; font-size: clamp(1.02rem, 1.3vw, 1.2rem); color: var(--muted); }
.st-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 30px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.st-stats b { display: block; font: 500 clamp(2rem, 3.4vw, 3rem)/1 var(--sans); letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.st-stats span { display: block; margin-top: 6px; font: 13px var(--mono); color: var(--muted); }
.st-next { display: inline-flex; margin-top: 28px; font: 500 15px var(--sans); color: #fff; background: var(--accent); padding: 13px 20px; border-radius: 6px; text-decoration: none; }
.st-progress { position: absolute; left: var(--g); right: var(--g); bottom: 26px; height: 2px; background: var(--line); }
.st-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

@media (max-width: 760px) {
  .st { height: 620vh; }
  .st-pin { grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 80px 16px 40px; }
  .st-graph { max-height: 70svh; }
  .g-node text { display: none; }
  .st-steps { height: 78svh; }
  .st-step h2 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .st-step p { font-size: 1rem; }
  .st-stats { gap: 14px 22px; }
  .st-title { font-size: clamp(2.8rem, 13vw, 4rem); }
}

/* ---------- Services ---------- */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--g); align-items: baseline; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--line); transition: background .3s; }
.svc-list li:hover { background: #F4F4F5; }
.svc-tag { font: 13px var(--mono); color: var(--accent-text); }
.svc-list h3 { margin: 0; font: 500 clamp(1.4rem, 2.4vw, 2rem)/1.1 var(--sans); letter-spacing: -.035em; }
.svc-list p { margin: 0; color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .svc-list li { grid-template-columns: 1fr; gap: 8px; padding-inline: 4px; } }

@media (prefers-reduced-motion: reduce) {
  .st-line, .st-lede, .st-cue { animation: none; opacity: 1; transform: none; }
  .st-strike::after { animation: none; transform: scaleX(1); }
  .st-step, .g-node circle { transition: none; }
}
@media (max-width: 760px) { .st-commit { font-size: 11.5px; padding: 6px 9px; gap: 7px; } }
