/**
 * process-header.css
 * Figma 데스크탑 653:2113 · 모바일 653:2114 정렬
 * - 현재 세그먼트: 좌측 라임 고정폭 스트립 + 진행 채움(scaleX)
 * - 스크롤 숨김: components.css 의 .site-header--scroll-hidden + header-progress.js
 */

body:has(.process-header) {
  --header-height: 64px;
}

.process-header {
  --process-header-height: 64px;
  --process-segment-gap: 4px;
  --process-segment-height: 32px;
  --process-accent-width: 12px;
  --process-fill: var(--color-accent-lime);
  --process-track: var(--color-neutral-100);
  --process-text-active: var(--color-brand-navy);
  --process-text-inactive: var(--color-neutral-500);
  --process-actions-gap: 8px;
  transition:
    transform 0.34s var(--ease-smooth-in-out, ease-in-out),
    opacity 0.34s var(--ease-smooth-in-out, ease-in-out);
  background-color: var(--color-surface);
}

@media (prefers-reduced-motion: reduce) {
  .process-header {
    transition-duration: 0.06s;
  }
}

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

.process-header__logo {
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
}

.process-header__logo:hover {
  opacity: 0.9;
}

.process-header__logo:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.process-header__logo img,
.process-header__logo svg {
  width: 34px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.process-header__nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-self: stretch;
  align-items: center;
}

.process-header__segments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  gap: var(--process-segment-gap);
}

.process-header__segment {
  flex: 1;
  min-width: 0;
}

.process-header__link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--process-segment-height);
  min-height: var(--process-segment-height);
  padding: 0 8px;
  text-decoration: none;
  color: var(--process-text-inactive);
  background: var(--process-track);
  border: none;
  font: inherit;
  cursor: pointer;
  width: 100%;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  transition:
    color 0.2s var(--ease-smooth, ease-in-out),
    filter 0.2s var(--ease-smooth, ease-in-out),
    box-shadow 0.2s var(--ease-smooth, ease-in-out);
}

.process-header__link:hover {
  color: var(--process-text-active);
}

@media (hover: hover) and (pointer: fine) {
  .process-header__link:hover {
    filter: brightness(0.97);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  }
}

.process-header__link:active {
  filter: brightness(0.92);
}

.process-header__link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.process-header__link[aria-current="true"] {
  color: var(--process-text-active);
}

.process-header__segment--completed .process-header__link {
  color: var(--process-text-active);
}

.process-header__track {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: var(--process-track);
  overflow: hidden;
}

/* Figma: 현재(미완료) 구간만 좌측 라임 스트립 */
.process-header__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--process-accent-width);
  background: var(--process-fill);
  z-index: 2;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease-smooth-in-out, ease-in-out);
}

.process-header__segment--current:not(.process-header__segment--completed) .process-header__accent {
  transform: scaleX(1);
}

.process-header__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--process-fill);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 1;
  transition: transform 0.3s var(--ease-smooth-in-out, ease-in-out);
}

.process-header__segment--completed .process-header__fill {
  transform: scaleX(1);
}

.process-header__label {
  position: relative;
  z-index: 3;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.0357em;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.process-header__label-short {
  display: none;
}

.process-header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--process-actions-gap);
}

.process-header__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 8px 12px;
  border: 1px solid var(--process-text-active);
  border-radius: 2px;
  background: var(--color-surface);
  color: var(--process-text-active);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.0357em;
  transition:
    background 0.2s var(--ease-smooth, ease-in-out),
    color 0.2s var(--ease-smooth, ease-in-out),
    box-shadow 0.2s var(--ease-smooth, ease-in-out),
    transform 0.2s var(--ease-smooth, ease-in-out);
}

.process-header__download:hover {
  background: var(--process-text-active);
  color: var(--color-surface);
}

@media (hover: hover) and (pointer: fine) {
  .process-header__download:hover {
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.22);
    transform: translateY(-1px);
  }

  .process-header__download:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 94, 184, 0.15);
  }
}

.process-header__download:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.process-header__download-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.process-header__download-text {
  white-space: nowrap;
}

.process-header__download svg {
  width: 18px;
  height: 18px;
}

.process-header__share {
  box-sizing: border-box;
  margin: 0;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 8px 12px;
  border: 1px solid var(--process-text-active);
  border-radius: 2px;
  background: var(--color-surface);
  color: var(--process-text-active);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.0357em;
  transition:
    background 0.2s var(--ease-smooth, ease-in-out),
    color 0.2s var(--ease-smooth, ease-in-out),
    box-shadow 0.2s var(--ease-smooth, ease-in-out),
    transform 0.2s var(--ease-smooth, ease-in-out);
}

.process-header__share:hover {
  background: var(--process-text-active);
  color: var(--color-surface);
}

@media (hover: hover) and (pointer: fine) {
  .process-header__share:hover {
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.22);
    transform: translateY(-1px);
  }

  .process-header__share:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 94, 184, 0.15);
  }
}

.process-header__share:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.process-header__share-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}


/* ----- 모바일 653:2114 (로고 없음, 짧은 라벨·24px 높이) ----- */
@media (max-width: 768px) {
  body:has(.process-header) {
    --header-height: 56px;
  }

  .process-header {
    --process-header-height: 56px;
    --process-segment-height: 24px;
    --process-accent-width: 24px;
    --process-segment-gap: 2px;
  }

  .process-header__inner {
    gap: 8px;
    padding: 16px;
  }

  .process-header__logo {
    display: none;
  }

  .process-header__nav {
    justify-content: stretch;
  }

  .process-header__segments {
    max-width: none;
    gap: 2px;
  }

  .process-header__link {
    padding: 0 6px;
    justify-content: flex-start;
  }

  .process-header__label {
    font-size: 13px;
    letter-spacing: -0.0385em;
  }

  .process-header__label-full {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .process-header__label-short {
    display: inline;
  }

  .process-header__download {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 2px;
  }

  .process-header__download-text {
    display: none;
  }

  .process-header__download-icon,
  .process-header__download svg {
    width: 18px;
    height: 18px;
  }

  .process-header__share {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 2px;
  }

  .process-header__share-text {
    display: none;
  }

  .process-header__share-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .process-header__inner {
    padding: 12px 10px;
  }

  .process-header__label {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-header__download,
  .process-header__share,
  .process-header__link {
    transition-duration: 0.05s;
  }

  .process-header__download:hover,
  .process-header__download:active,
  .process-header__share:hover,
  .process-header__share:active {
    transform: none;
  }
}
