/* process.css — "How I work": UX thinking first. Compact title, phase bar (UX 70 · UI 20 · Handoff 10) that fills in, then 3 phases (sticky label left, steps in a 2-column grid right) with method chips (AI tools marked ✦) */

/* Section colors. Dark: yellow accents. Light: this band is solid yellow, so yellow would vanish → ink accents (same rule as Projects) */
.process {
  --process-accent: var(--yellow);          /* "think", UX bar, phase tags */
  --process-icon-hover: var(--yellow);
  --bar-ux: var(--yellow);
  --bar-ui: var(--honey);                   /* softer yellow */
  --bar-handoff: var(--grey-600);           /* grey */
  --bar-track: var(--white-a08);
  --step-bg: var(--white-a04);
  --step-border: var(--white-a08);
  --chip-border: var(--white-a15);
  --ai-text: var(--yellow);
  --ai-bg: var(--yellow-a12);
  --ai-border: var(--yellow-a30);

  padding: 40px 0 48px;
  --band: var(--yellow);                    /* light theme: About ends yellow → this stays yellow → Projects starts yellow */
}

[data-theme="light"] .process {
  --process-accent: var(--ink);
  --process-icon-hover: var(--syntax-amber-dark);   /* a deep amber: readable on the pale step cards */
  --bar-ux: var(--ink);
  --bar-ui: var(--brown);
  --bar-handoff: var(--white-a80);
  --bar-track: var(--ink-a08);
  --step-bg: var(--white-a60);              /* pale cards keep the text calm and readable on the yellow band */
  --step-border: var(--white-a80);
  --chip-border: var(--ink-a12);
  --ai-text: var(--ink);
  --ai-bg: var(--yellow-a50);
  --ai-border: var(--yellow);
  --text: var(--grey-800);
  --muted: var(--grey-800);
}

.process .glow--5 { top: 10%; right: -220px; bottom: auto; left: auto; }

/* Light theme: the eyebrow sits on yellow too → dark ink version (same as Projects) */
[data-theme="light"] .process .eyebrow__num { color: var(--ink); background: var(--white-a60); border-color: var(--ink-a12); }
[data-theme="light"] .process .eyebrow__text { color: var(--grey-800); }
[data-theme="light"] .process .eyebrow__line { background: linear-gradient(90deg, var(--ink), transparent); }

/* Reveal in this section: shorter and faster than the global one (never slows reading) */
.process .reveal { transform: translateY(14px); transition: opacity 0.45s ease var(--d, 0s), transform 0.45s ease var(--d, 0s); }
.process .reveal.is-visible { transform: none; }

/* ---------- Title ---------- */
.process__title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -1px; color: var(--heading); }
.process__title span { color: var(--process-accent); }

.process__subtitle { margin-top: 10px; font-size: 15px; color: var(--muted); }
.process__subtitle strong { font-weight: 600; color: var(--heading); }

/* ---------- Phase bar ---------- */
.phase-bar { max-width: 760px; margin-top: 28px; }

.phase-bar__track {
  display: flex;
  gap: 3px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bar-track);
  clip-path: inset(0 100% 0 0 round 999px);           /* hidden until the bar appears … */
  transition: clip-path 1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}
.phase-bar.is-visible .phase-bar__track { clip-path: inset(0 0 0 0 round 999px); }   /* … then it fills left → right */

.phase-bar__seg { flex: var(--w) 0 0; }   /* --w = 70 / 20 / 10 → the widths */
.phase-bar__seg--ux { background: var(--bar-ux); }
.phase-bar__seg--ui { background: var(--bar-ui); }
.phase-bar__seg--handoff { background: var(--bar-handoff); }

/* Labels sit under their own segment (same 70 / 20 / 10 split) */
.phase-bar__labels { display: grid; grid-template-columns: 70fr 20fr 10fr; gap: 3px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.phase-bar__label { white-space: nowrap; }
.phase-bar__label strong { margin-right: 4px; font-weight: 700; color: var(--heading); }

/* ---------- Phases: label on the left (sticky on desktop), steps on the right ---------- */
.phase {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--step-border);
}

.phase__label {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.phase__tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--process-accent);
  box-shadow: inset 0 0 0 1.5px var(--process-accent);
}
.phase__name { font-size: 15px; font-weight: 600; color: var(--heading); }

.phase__steps { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* ---------- One step ---------- */
.step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: var(--step-bg);
  box-shadow: inset 0 0 0 1px var(--step-border);
}
/* Hover lift uses `translate` (the fade-up uses `transform`), so the two never wait on each other */
.process .step.reveal { transition: opacity 0.45s ease var(--d, 0s), transform 0.45s ease var(--d, 0s), translate 0.2s ease; }
.step:hover { translate: 0 -3px; }

.step__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

.step__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px var(--chip-border);
}

.step__icon { display: grid; color: var(--muted); transition: color 0.2s ease; }
.step__icon svg { width: 20px; height: 20px; }
.step:hover .step__icon { color: var(--process-icon-hover); }

.step__title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--heading); }
.step__text { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Method chips; AI tools get a ✦ and a soft yellow tint */
.step__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.step__chips li {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--chip-border);
}
.step__chips .step__chip--ai { color: var(--ai-text); background: var(--ai-bg); box-shadow: inset 0 0 0 1px var(--ai-border); }
.step__chip--ai::before { content: '✦ '; }

/* ---------- Closing line ---------- */
.process__note { max-width: 620px; margin: 48px auto 0; text-align: center; font-size: 17px; line-height: 1.6; color: var(--muted); }
.process__note strong { font-weight: 600; color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* Label above its steps (not sticky) */
  .phase { grid-template-columns: 1fr; gap: 16px; }
  .phase__label { position: static; flex-direction: row; align-items: center; gap: 10px; }
}

@media (max-width: 760px) {
  .phase__steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* The 10% column is too narrow for its label → a simple legend with colored dots instead */
  .phase-bar__labels { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .phase-bar__label { display: inline-flex; align-items: center; gap: 6px; }
  .phase-bar__label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
  .phase-bar__label--ux::before { background: var(--bar-ux); }
  .phase-bar__label--ui::before { background: var(--bar-ui); }
  .phase-bar__label--handoff::before { background: var(--bar-handoff); box-shadow: inset 0 0 0 1px var(--chip-border); }
  .process__note { font-size: 16px; }
}

/* Reduced motion: everything visible, bar already full */
@media (prefers-reduced-motion: reduce) {
  .phase-bar__track { clip-path: none; transition: none; }
  .process .reveal { transform: none; transition: none; }
  .step:hover { translate: none; }
}
