:root {
  --ink: #1e2952;
  --muted: #4e586f;
  --paper: #f6f4ef;
  --line: #d7d7db;
  --orange: #f97316;
  --orange-ink: #a5420c;
  --header-height: 4.625rem;
  --anchor-offset: 6rem;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 0.22em; }
:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }

.process-wrap {
  width: min(100%, 88rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}

.process-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.process-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: calc(var(--header-height) - 1px);
}

.process-brand { flex: 0 0 auto; }
.process-brand img { display: block; width: 8.5rem; height: auto; }
.process-header__links { display: flex; align-items: center; gap: clamp(0.75rem, 3vw, 2rem); }
.process-header__links a { font-size: 0.875rem; font-weight: 650; }
.process-header__links a:hover { color: var(--orange-ink); }

.process-intro { padding-block: clamp(2.3rem, 5vw, 4.5rem) clamp(1.8rem, 4vw, 3.25rem); }
.process-intro h1 {
  border-left: 0.38rem solid var(--orange);
  padding-inline-start: clamp(0.75rem, 2vw, 1.6rem);
  font-size: clamp(2.9rem, 6vw, 6.25rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
  font-weight: 800;
}
.process-intro p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1.55;
}

.process-timeline {
  display: grid;
  grid-template-columns: minmax(15rem, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(1.5rem, 4vw, 3.75rem);
  align-items: start;
  padding-bottom: clamp(2.5rem, 7vw, 6.25rem);
}

.process-index { position: sticky; top: var(--anchor-offset); z-index: 2; }
.process-count { display: none; }

.process-index__list {
  position: relative;
  isolation: isolate;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
}
.process-index__list::before,
.process-index__list::after {
  content: "";
  position: absolute;
  top: 2rem;
  bottom: 2rem;
  left: 0.35rem;
  width: 2px;
  background: var(--line);
  z-index: -1;
}
.process-index__list::after {
  background: var(--orange);
  transform: scaleY(var(--progress, 0));
  transform-origin: top;
  transition: transform 260ms ease;
}

.process-index__link {
  position: relative;
  display: grid;
  grid-template-columns: 2ch 1fr;
  align-items: center;
  gap: 0.85rem;
  min-height: 4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}
.process-index__link::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid #8d95a7;
  border-radius: 50%;
  background: var(--paper);
}
.process-index__link:hover { background: #ebe8e0; }
.process-index__link[aria-current="step"] { background: var(--ink); color: #fff; }
.process-index__link[data-past]::before { border-color: var(--orange-ink); }
.process-index__link[aria-current="step"]::before { border-color: var(--orange-ink); background: var(--orange); }
.process-index__number { font-variant-numeric: tabular-nums; }

.process-stage, .process-advice { scroll-margin-top: var(--anchor-offset); }
.process-stage + .process-stage {
  margin-top: clamp(2rem, 5vw, 4.5rem);
  padding-top: clamp(2rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.process-stage__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 45%;
  background: #e0ded7;
}
.process-stage__figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.process-stage__body { padding-top: 1.35rem; }
.process-stage__body h2, .process-advice h2 {
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 1.05;
}
.process-stage__body p {
  max-width: 66ch;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.55;
}
.process-stage.is-current .process-stage__figure img { animation: process-photo-in 320ms ease-out; }
@keyframes process-photo-in {
  from { opacity: 0.68; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.process-button {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-top: 1.2rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 0.3rem;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}
.process-button:hover { background: #eae8e3; }
.process-button--primary { background: var(--orange); border-color: var(--orange); color: #151c34; }
.process-button--primary:hover { background: #fb923c; border-color: #fb923c; }

.process-advice { padding-block: clamp(2.5rem, 7vw, 6rem); background: #fff; border-top: 1px solid var(--line); }
.process-advice__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.process-advice article { padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 0.4rem; }
.process-advice .process-advice__premium { background: #fff5ea; border-color: #d78851; }
.process-advice h3 { font-size: 1.2rem; }
.process-advice p { margin-top: 0.4rem; }
.process-advice__price { font-size: 1.65rem; font-weight: 800; }
.process-footer { padding-block: 1.35rem; color: #e4e8f6; background: var(--ink); font-size: 0.875rem; }

@media (max-width: 50rem) {
  :root { --header-height: 3.75rem; --anchor-offset: 8rem; }
  .process-brand img { width: 6.75rem; }
  .process-header__inner { gap: 0.45rem; }
  .process-header__links { gap: 0.75rem; }
  .process-header__links a { font-size: 0.75rem; }
  .process-timeline { display: block; }
  .process-index {
    top: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.95rem;
    padding-block: 0.35rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .process-count { display: block; white-space: nowrap; font-size: 0.8125rem; font-weight: 750; }
  .process-index__list { display: flex; gap: 0.15rem; padding: 0; }
  .process-index__list::before, .process-index__list::after, .process-index__link::before { display: none; }
  .process-index__link {
    display: grid;
    place-items: center;
    min-width: 2.65rem;
    min-height: 2.65rem;
    grid-template-columns: 1fr;
    padding: 0.3rem;
    font-size: 0.8125rem;
  }
  .process-index__link[data-past] { text-decoration: underline; text-decoration-color: var(--orange-ink); }
  .process-index__label {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }
}

@media (max-width: 32rem) {
  .process-advice__options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .process-index__list::after, .process-index__link { transition: none; }
  .process-stage.is-current .process-stage__figure img { animation: none; }
}
