/*
 * License page: Process section = roadmap (spec Block 8).
 * Desktop (>=1024): horizontal roadmap, N columns (--n): big outlined step number, icon node on a connector line,
 * title, duration badge, description. Mobile / tablet (<1024): vertical timeline, line on the left.
 * The connector between two steps is drawn in two layers: ::after = faint track, ::before = gold progress that
 * grows when process.js marks the next step as reached (end state = default, so no-JS shows a finished roadmap).
 * Band colours (--lpl-seam) are the Figma purple gradient shared with turnkey.css.
 */
.lpl-sec--process {
  --lpl-seam: #6a1294; /* derived: gradient at ~68% of the 1505px mobile band */
  position: relative;
  overflow-x: clip;
  padding: 90px 0 35px;
  background: linear-gradient(180deg, #330a6e 0%, var(--lpl-seam) 100%);
  color: #fff;
  font-family: var(--lpl-font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  margin-bottom: -1px; /* hides the sub-pixel seam towards the turnkey partial */
  box-sizing: border-box;
}
.lpl-sec--process *,
.lpl-sec--process *::before,
.lpl-sec--process *::after { box-sizing: border-box; }

/* top-right blurred blob (Ellipse 2, svg 909px = 509px + 200px blur margin each side) */
.lpl-sec--process::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: calc(50% - 178px);
  top: -536px;
  width: 909px;
  height: 909px;
  background: url('../../img/license/process-blob-right-m.svg') no-repeat center / 100% 100%;
  pointer-events: none;
}

/* mobile-only "Legal Pilot" gradient watermark (280:4) */
.lpl-process__mark {
  position: absolute;
  z-index: 0;
  left: -50px;
  right: -51px;
  top: 27px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 72px;
  line-height: 19.6px;
  text-align: center;
  white-space: nowrap;
  opacity: 0.7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.lpl-process__inner {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 14px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.lpl-process__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.lpl-process__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #640ea1;
  color: #fff;
  font-weight: 600;
  font-size: 10px;
  line-height: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
.lpl-sec--process .lpl-process__title {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 22px;
  line-height: 29px;
  letter-spacing: -0.22px;
  text-align: left;
}
.lpl-sec--process .lpl-process__lead {
  margin: 4px 0 0;
  color: #e0e0e0;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  text-align: left;
}

/* ---- roadmap, mobile-first = vertical timeline ----------------------------------------- */
.lpl-sec--process .lpl-process__steps {
  --node: 48px;
  --g: 30px; /* gap between steps */
  display: flex;
  flex-direction: column;
  gap: var(--g);
  margin: 0;
  padding: 0;
  list-style: none;
}
.lpl-sec--process .lpl-process__step {
  position: relative;
  display: grid;
  grid-template-columns: var(--node) minmax(0, 1fr);
  grid-template-areas: 'node num' 'node body';
  column-gap: 18px;
  row-gap: 2px;
  margin: 0;
  padding: 0;
}
.lpl-sec--process .lpl-process__step::before,
.lpl-sec--process .lpl-process__step::after { content: none; }

/* connector: vertical segment from this node down to the next one */
.lpl-sec--process .lpl-process__step:not(:last-child)::before,
.lpl-sec--process .lpl-process__step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(var(--node) / 2 - 1px);
  top: calc(var(--node) + 6px);
  bottom: calc(-1 * var(--g) + 6px);
  width: 2px;
  border-radius: 2px;
  pointer-events: none;
}
.lpl-sec--process .lpl-process__step:not(:last-child)::after { background: rgba(255, 255, 255, 0.16); }
.lpl-sec--process .lpl-process__step:not(:last-child)::before {
  z-index: 1;
  background: linear-gradient(180deg, #f5b319, rgba(245, 179, 25, 0.75));
  transform-origin: 50% 0;
  transition: transform 0.7s var(--lpl-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.lpl-process__num {
  grid-area: num;
  align-self: end;
  font-weight: 700;
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  -webkit-text-stroke: 0 transparent;
  transition: color 0.5s var(--lpl-ease, ease), -webkit-text-stroke-color 0.5s var(--lpl-ease, ease);
}

.lpl-process__node {
  grid-area: node;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  border: 1.5px solid #f5b319;
  background: rgba(245, 179, 25, 0.12);
  box-shadow: 0 0 0 6px rgba(245, 179, 25, 0.1);
  color: #fff;
  transition:
    border-color 0.5s var(--lpl-ease, ease),
    background-color 0.5s var(--lpl-ease, ease),
    box-shadow 0.5s var(--lpl-ease, ease),
    color 0.5s var(--lpl-ease, ease),
    transform var(--lpl-dur, 0.45s) var(--lpl-ease, ease);
}
.lpl-process__node .lpl-ico { display: block; width: 24px; height: 24px; }
.lpl-sec--process .lpl-process__step:last-child .lpl-process__node {
  background: #f5b319;
  color: #330a6e;
  box-shadow: 0 0 0 6px rgba(245, 179, 25, 0.18);
}

.lpl-process__body { grid-area: body; min-width: 0; padding-top: 2px; }
.lpl-sec--process .lpl-process__name {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
}
.lpl-sec--process .lpl-process__dur {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(245, 179, 25, 0.5);
  border-radius: 14px;
  background: rgba(245, 179, 25, 0.14);
  color: #ffd36b;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
}
.lpl-process__dur .lpl-ico { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; }
.lpl-sec--process .lpl-process__desc {
  margin: 12px 0 0;
  color: #e0e0e0;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  white-space: pre-line; /* imported steps keep paragraph / list line breaks */
}

@media (hover: hover) {
  .lpl-sec--process .lpl-process__step:hover .lpl-process__node {
    transform: translateY(-3px);
    box-shadow: 0 0 0 8px rgba(245, 179, 25, 0.18), 0 12px 24px -10px rgba(0, 0, 0, 0.5);
  }
}

/* ---- scroll choreography: only when process.js armed the roadmap (end state = default) ------- */
@media (prefers-reduced-motion: no-preference) {
  html.lpl-js:not(.lpl-motion-off) .lpl-process__steps.is-armed .lpl-process__step:not(.is-linked)::before { transform: scaleY(0); }
  html.lpl-js:not(.lpl-motion-off) .lpl-process__steps.is-armed .lpl-process__step:not(.is-reached) .lpl-process__node {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    color: rgba(255, 255, 255, 0.55);
  }
  html.lpl-js:not(.lpl-motion-off) .lpl-process__steps.is-armed .lpl-process__step:not(.is-reached) .lpl-process__num {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55);
  }
}

/* ---- tablet: vertical timeline gets a comfortable measure ------------------------------------ */
@media (min-width: 768px) {
  .lpl-sec--process { padding: 100px 0 45px; }
  .lpl-process__inner { width: min(760px, calc(100% - 48px)); gap: 52px; }
  .lpl-process__tag { font-size: 14px; }
  .lpl-sec--process .lpl-process__title { font-size: 40px; line-height: 1.18; letter-spacing: -1.6px; }
  .lpl-sec--process .lpl-process__lead { font-size: 16px; line-height: 25px; }
  .lpl-sec--process .lpl-process__steps { --node: 56px; --g: 36px; }
  .lpl-process__num { font-size: 40px; line-height: 44px; }
  .lpl-sec--process .lpl-process__name { font-size: 20px; line-height: 26px; }
  .lpl-sec--process .lpl-process__desc { font-size: 15px; line-height: 24px; max-width: 560px; }
}

/* ---- desktop: horizontal roadmap -------------------------------------------------------------- */
@media (min-width: 1024px) {
  .lpl-sec--process {
    --lpl-seam: #5f108c; /* gradient at 833/1522 of the 1522px desktop band */
    padding: 90px 0 56px;
  }
  .lpl-sec--process::before {
    left: calc(50% + 480px);
    top: -341px;
    background-image: url('../../img/license/process-blob-right.svg');
  }
  .lpl-process__mark { display: none; }
  .lpl-process__inner { width: min(1360px, calc(100% - 48px)); gap: 64px; }
  .lpl-process__head { align-items: center; gap: 16px; }
  .lpl-sec--process .lpl-process__title {
    width: min(1160px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 1.2;
    letter-spacing: -2px;
    text-align: center;
  }
  .lpl-sec--process .lpl-process__lead {
    width: min(818px, 100%);
    margin: 0;
    color: #c9c2d8;
    font-size: 18px;
    line-height: 26px;
    text-align: center;
  }

  .lpl-sec--process .lpl-process__steps {
    --node: 64px;
    --g: 24px;
    --num-h: 48px;
    --row: 16px;
    display: grid;
    grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
    column-gap: var(--g);
    row-gap: 0;
    align-items: start;
  }
  .lpl-sec--process .lpl-process__step {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'num' 'node' 'body';
    grid-template-rows: var(--num-h) var(--node) auto;
    row-gap: var(--row);
    column-gap: 0;
  }
  /* connector: horizontal segment from this node to the next one */
  .lpl-sec--process .lpl-process__step:not(:last-child)::before,
  .lpl-sec--process .lpl-process__step:not(:last-child)::after {
    left: calc(var(--node) + 10px);
    right: auto;
    top: calc(var(--num-h) + var(--row) + var(--node) / 2 - 1px);
    bottom: auto;
    width: calc(100% + var(--g) - var(--node) - 20px);
    height: 2px;
  }
  .lpl-sec--process .lpl-process__step:not(:last-child)::before {
    background: linear-gradient(90deg, #f5b319, rgba(245, 179, 25, 0.75));
    transform-origin: 0 50%;
  }
  html.lpl-js:not(.lpl-motion-off) .lpl-process__steps.is-armed .lpl-process__step:not(.is-linked)::before { transform: scaleX(0); }

  .lpl-process__num { align-self: end; font-size: 44px; line-height: var(--num-h); letter-spacing: -1px; }
  .lpl-process__body { padding-top: 4px; padding-right: 8px; }
  .lpl-sec--process .lpl-process__name { font-size: 18px; line-height: 24px; }
  .lpl-sec--process .lpl-process__desc { font-size: 14px; line-height: 22px; max-width: none; }
}

@media (min-width: 1200px) {
  .lpl-process__inner { width: min(1360px, calc(100% - 80px)); gap: 70px; }
  .lpl-sec--process .lpl-process__title {
    min-height: 176px;
    font-size: 60px;
    line-height: 83.6px;
    letter-spacing: -3px;
  }
  .lpl-sec--process .lpl-process__steps { --g: 32px; }
  .lpl-sec--process .lpl-process__name { font-size: 20px; line-height: 26px; }
  .lpl-sec--process .lpl-process__desc { font-size: 15px; line-height: 24px; }
}

/* QA: base .lpl-tag has align-self:flex-start, which beat the centred header (Figma centres the pill) */
@media (min-width: 1024px) {
  .lpl-process__tag { align-self: center; }
}
/* VQA: every width (below 1024 the pill stayed at the left edge above the centred title, 360/390/768) */
.lpl-process__tag { align-self: center; }
/* VQA: same container as the other blocks (1360 / gutter 24): was calc(100% - 80px) = 1345 at a 1425 viewport, 8px
   inside the why/fees/types edge */
@media (min-width: 1200px) {
  .lpl-process__inner { width: min(1360px, calc(100% - 48px)); }
}
/* VQA: title block height is equalised by process.js (--lpl-name-h); desktop roadmap only */
@media (min-width: 1024px) {
  .lpl-sec--process .lpl-process__name { min-height: var(--lpl-name-h, 0px); }
}

/* =====================================================================================================
 * TZ compliance pass (2026-10-14): scanning instead of reading, little vertical space.
 *  - long step texts are line-clamped (process.js adds a "Read more" toggle; full text stays in the DOM)
 *  - compact heading block, bigger step numbers / icon nodes, duration as a solid gold badge
 * ===================================================================================================== */
.lpl-sec--process .is-clamp,
.lpl-sec--process [data-lpl-clamp].is-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lpl-lines, 5);
  line-clamp: var(--lpl-lines, 5);
  overflow: hidden;
}
.lpl-sec--process .lpl-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #ffd36b;
  font: 600 13px/20px var(--lpl-font, 'Inter', system-ui, sans-serif);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 211, 107, 0.45);
}
.lpl-sec--process .lpl-more:hover { text-decoration-color: currentColor; }
.lpl-sec--process .lpl-more:focus-visible { outline: 2px solid #ffd36b; outline-offset: 3px; border-radius: 4px; }
.lpl-sec--process .lpl-more[hidden] { display: none; }
.lpl-sec--process .lpl-process__lead + .lpl-more { align-self: center; margin-top: 0; }   /* VQA: was flex-start under a centred lede below 1024 */

/* duration = the colour accent of every step (solid gold, dark text) */
.lpl-sec--process .lpl-process__dur {
  align-items: center;
  margin-top: 10px;
  padding: 5px 12px 5px 10px;
  border: 0;
  border-radius: 999px;
  background: #f5b319;
  color: #2b0a5a;
  font-size: 13px;
  line-height: 18px;
}
.lpl-process__dur .lpl-ico { margin-top: 0; width: 15px; height: 15px; }
.lpl-sec--process .lpl-process__desc { margin-top: 10px; }

@media (max-width: 1023.98px) {
  .lpl-sec--process { padding: 64px 0 28px; }
  .lpl-process__inner { gap: 28px; }
  .lpl-sec--process .lpl-process__steps { --g: 24px; }
  .lpl-process__mark { display: none; }
}

@media (min-width: 1024px) {
  .lpl-sec--process { padding: 72px 0 48px; }
  .lpl-process__inner { gap: 44px; }
  .lpl-process__head { gap: 12px; }
  .lpl-sec--process .lpl-process__lead + .lpl-more { align-self: center; }
  .lpl-sec--process .lpl-process__steps { --node: 72px; --num-h: 60px; --row: 14px; }
  .lpl-process__node .lpl-ico { width: 30px; height: 30px; }
  .lpl-process__num { font-size: 56px; letter-spacing: -2px; }
}
@media (min-width: 1200px) {
  .lpl-process__inner { gap: 48px; }
  .lpl-sec--process .lpl-process__title { min-height: 0; line-height: 1.15; }
}

/* VQA: balanced title lines */
.lpl-sec--process .lpl-process__title { text-wrap: balance; }
.lpl-sec--process .lpl-process__lead { text-wrap: pretty; }
