/* ================================================================
   jak.css — sticky 6-stage process page
   ================================================================ */

/* HERO */
.how-hero {
  text-align: center;
  padding: 120px 0 80px;
  background: radial-gradient(ellipse 1100px 500px at 50% 0%, var(--blue-soft), transparent 70%), var(--bg);
}
.how-hero .chip { margin-bottom: 28px; }
.how-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin: 0;
  text-wrap: balance;
}
.how-hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--blue), #5E5CE6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.how-hero p {
  margin: 32px auto 0;
  font-size: clamp(19px, 1.6vw, 24px);
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.42;
  text-wrap: balance;
}

/* STICKY PROCESS */
.process {
  position: relative;
  height: 700vh;
  background: var(--bg);
}
.process__pin {
  position: sticky; top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: center;
  padding: 0 var(--gutter);
  max-width: 1480px;
  margin: 0 auto;
}
.process__steps { display: flex; flex-direction: column; gap: 4px; }
.step {
  padding: 18px 20px 18px 48px;
  border-radius: 14px;
  position: relative;
  opacity: 0.32;
  transition: background 280ms var(--ease), opacity 280ms;
}
.step::before {
  content: attr(data-num);
  position: absolute; left: 18px; top: 22px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.06em;
}
.step h3 {
  font-family: var(--display);
  font-size: 21px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0;
  color: var(--ink);
}
.step p {
  font-size: 14px; line-height: 1.5;
  color: var(--ink-2); margin: 0;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 380ms var(--ease), opacity 280ms, margin 280ms;
}
.process__pin[data-stage="0"] .step[data-s="0"],
.process__pin[data-stage="1"] .step[data-s="1"],
.process__pin[data-stage="2"] .step[data-s="2"],
.process__pin[data-stage="3"] .step[data-s="3"],
.process__pin[data-stage="4"] .step[data-s="4"],
.process__pin[data-stage="5"] .step[data-s="5"] {
  background: var(--blue-soft);
  opacity: 1;
}
.process__pin[data-stage="0"] .step[data-s="0"] p,
.process__pin[data-stage="1"] .step[data-s="1"] p,
.process__pin[data-stage="2"] .step[data-s="2"] p,
.process__pin[data-stage="3"] .step[data-s="3"] p,
.process__pin[data-stage="4"] .step[data-s="4"] p,
.process__pin[data-stage="5"] .step[data-s="5"] p {
  max-height: 200px; opacity: 1; margin-top: 8px;
}
.process__pin[data-stage="0"] .step[data-s="0"]::before,
.process__pin[data-stage="1"] .step[data-s="1"]::before,
.process__pin[data-stage="2"] .step[data-s="2"]::before,
.process__pin[data-stage="3"] .step[data-s="3"]::before,
.process__pin[data-stage="4"] .step[data-s="4"]::before,
.process__pin[data-stage="5"] .step[data-s="5"]::before {
  color: var(--blue);
}

/* RIGHT visual */
.process__visual {
  position: relative;
  height: 80vh; max-height: 640px;
  perspective: 1500px;
}
.scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 500ms var(--ease), transform 600ms var(--ease);
  pointer-events: none;
}
.process__pin[data-stage="0"] .scene[data-i="0"],
.process__pin[data-stage="1"] .scene[data-i="1"],
.process__pin[data-stage="2"] .scene[data-i="2"],
.process__pin[data-stage="3"] .scene[data-i="3"],
.process__pin[data-stage="4"] .scene[data-i="4"],
.process__pin[data-stage="5"] .scene[data-i="5"] {
  opacity: 1; transform: none; pointer-events: auto;
}

/* small inner widgets used by scenes */
.gpanel { padding: 36px 40px; text-align: center; }
.gauth__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #FF9F0A, #FF375F);
  color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}
.gauth__row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; text-align: left; margin-bottom: 8px;
}
.gauth__row strong { display: block; font-size: 14px; font-weight: 500; }
.gauth__row span { display: block; font-size: 12px; color: var(--ink-3); }
.gauth__heading { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 18px 0 6px; }
.gauth__sub { color: var(--ink-2); margin: 0 0 22px; font-size: 14px; }

.dgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 22px;
}
.dtile {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; background: #fff;
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px;
}
.dtile.is-on { border-color: var(--blue); background: var(--blue-soft); }
.dtile.is-on::after {
  content: "✓"; position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; background: var(--blue);
  color: #fff; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.dtile__ico {
  width: 32px; height: 40px;
  background: linear-gradient(180deg, #F2F2F5, #E8E8EC);
  border-radius: 4px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--blue);
}
.dtile__name { font-weight: 500; color: var(--ink); }
.dtile__meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.dgrid + .dgrid-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.dgrid-foot strong { color: var(--blue); }
.dgrid-foot .pill {
  background: var(--blue); color: #fff;
  padding: 8px 14px; border-radius: 980px;
  font-size: 13px; font-weight: 500;
}

/* ledger row (review/edit scene) */
.ledger { padding: 0; }
.ledger__h {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
}
.ledger__h h4 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; }
.ledger__h span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.lrow {
  display: grid; grid-template-columns: 130px 1fr 80px;
  gap: 16px; align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.lrow:last-of-type { border-bottom: none; }
.lrow > span:first-child { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.lrow .val { color: var(--ink); font-weight: 500; }
.lrow .ok { color: #0F8A36; font-family: var(--mono); font-size: 11px; text-align: right; }
.lrow.is-edit { background: var(--blue-soft); }
.lrow.is-edit .val::after {
  content: "|"; color: var(--blue);
  margin-left: 2px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.lrow .edit { color: var(--blue); font-family: var(--mono); font-size: 11px; text-align: right; }
.ledger__foot {
  padding: 16px 22px;
  display: flex; justify-content: flex-end; gap: 8px;
}
.ledger__foot .ghost { background: var(--bg-deep); color: var(--ink-2); padding: 9px 16px; border-radius: 8px; font-size: 13px; }
.ledger__foot .primary { background: var(--blue); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; }

/* dark trace scene */
.dark-pane {
  background: var(--bg-dark); color: var(--dark-ink);
  padding: 28px;
}
.dark-pane__h {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.ai-pulse {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 var(--blue);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(10,132,255,0.6); }
  70% { box-shadow: 0 0 0 14px rgba(10,132,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(10,132,255,0); }
}
.dark-pane__h strong { font-family: var(--display); font-size: 17px; font-weight: 600; }
.dark-pane__h em { font-family: var(--mono); font-size: 11px; color: var(--ink-3); font-style: normal; display: block; }
.darklog {
  font-family: var(--mono); font-size: 12px; line-height: 1.9;
  color: rgba(245,245,247,0.78);
}
.darklog div { display: flex; gap: 8px; }
.darklog .arr { color: var(--blue); }
.darklog .ok { color: var(--green); }
.darklog .dim { color: rgba(245,245,247,0.4); margin-left: auto; }
.dark-pane .progbar {
  margin-top: 18px; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden;
}
.dark-pane .progbar > div { height: 100%; width: 84%; background: var(--blue); }
.dark-pane .progmeta {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px;
  color: rgba(245,245,247,0.4);
  display: flex; justify-content: space-between;
}

/* bank pill grid */
.bgrid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  padding: 22px;
}
.bgrid + .bfoot {
  margin: 0 22px 22px;
  padding: 14px 16px; background: var(--blue-soft); border-radius: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.bfoot .go { background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 980px; font-size: 13px; font-weight: 500; }
.bfoot strong { color: var(--ink); }
.bcell {
  display: grid; grid-template-columns: 36px 1fr 18px;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
}
.bcell.is-on { border-color: var(--blue); background: var(--blue-soft); }
.bcell .lg {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  color: #fff; font-family: var(--display); font-weight: 700;
  font-size: 11px; letter-spacing: -0.04em;
}
.bcell strong { display: block; font-size: 13px; font-weight: 500; }
.bcell em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.bcell .ck {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line-strong);
}
.bcell.is-on .ck {
  background: var(--blue); border-color: var(--blue);
  display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700;
}
.bcell.is-on .ck::after { content: "✓"; }
.bspan2 { grid-column: span 2; }

/* drive return list */
.drive-head {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
.drow {
  display: grid; grid-template-columns: 24px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.drow:last-of-type { border-bottom: none; }
.drow.is-new { background: rgba(48,209,88,0.06); color: #0F8A36; }
.drow.is-new strong { color: #0F8A36; }
.drow .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.drive-foot {
  padding: 16px 22px;
  background: rgba(48,209,88,0.08);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.drive-foot .ok-dot {
  width: 24px; height: 24px; background: #34A853;
  border-radius: 50%; color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

/* PRINCIPLES BENTO */
.principles { padding: 140px 0; background: var(--bg-deep); }
.principles__head { text-align: center; margin-bottom: 64px; }
.principles__head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05; letter-spacing: -0.04em;
  margin: 12px 0 0; color: var(--ink);
}
.bgrid-p {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 18px;
  max-width: 1200px; margin: 0 auto;
}
.bento {
  background: #fff; border: 1px solid var(--line);
  border-radius: 24px; padding: 32px;
  position: relative; overflow: hidden;
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
}
.bento:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -20px rgba(20,30,60,0.15); }
.bento--3 { grid-column: span 3; }
.bento--2 { grid-column: span 2; }
.bento--tall { grid-row: span 2; }
.bento--dark { background: var(--bg-dark); color: var(--dark-ink); border-color: rgba(255,255,255,0.06); }
.bento h3 {
  font-family: var(--display);
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 600; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.bento--dark h3 { color: var(--dark-ink); }
.bento p { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 36ch; }
.bento--dark p { color: var(--dark-ink-2); }
.bento__num {
  font-family: var(--mono); font-size: 11px;
  color: var(--blue); letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.bento__big {
  font-family: var(--display);
  font-size: clamp(56px, 6vw, 88px);
  font-weight: 700; line-height: 1; letter-spacing: -0.045em;
  margin: 24px 0 4px;
}
.bento__big small { font-size: 0.42em; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.bento--dark .bento__big small { color: var(--dark-ink-2); }
.bento__cap {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3);
}
.bento__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.bento__chips span {
  font-family: var(--mono); font-size: 11px;
  background: var(--bg-deep); padding: 4px 10px; border-radius: 6px;
}

/* TIMELINE */
.tl-section { background: var(--bg); padding: 140px 0; text-align: center; }
.tl-section h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.04em; margin: 12px 0 64px;
}
.tl {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 16px; max-width: 1100px; margin: 0 auto;
  position: relative;
}
.tl::before {
  content: ""; position: absolute;
  top: 28px; left: 5%; right: 5%; height: 2px;
  background: var(--blue);
}
.tl__step { text-align: center; position: relative; }
.tl__dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue);
  margin: 0 auto 18px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  color: var(--blue);
  position: relative; z-index: 1;
}
.tl__time {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tl__title { font-family: var(--display); font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.tl__sub { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.4; }

/* FINAL CTA */
.final {
  background: var(--bg-dark); color: var(--dark-ink);
  text-align: center;
  padding: 140px 0 160px;
  background-image: radial-gradient(ellipse 800px 500px at 50% 50%, rgba(10,132,255,0.12), transparent 70%);
}
.final h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 1; letter-spacing: -0.045em;
  margin: 0; text-wrap: balance;
}
.final h2 em {
  font-style: normal;
  background: linear-gradient(180deg, #5AB0FF, var(--blue));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.final p {
  margin: 28px auto 40px;
  font-size: 18px; color: var(--dark-ink-2);
  max-width: 480px;
}

@media (max-width: 880px) {
  .process__pin { grid-template-columns: 1fr; gap: 12px; align-content: start; padding-top: 40px; }
  .process__visual { height: 50vh; order: -1; }
  .bgrid-p { grid-template-columns: 1fr; }
  .bento--3, .bento--2 { grid-column: span 1; }
  .tl { grid-template-columns: 1fr; gap: 32px; }
  .tl::before { display: none; }
}
