/* =========================================================================
   LINKS · REFINED DIRECTORY
   -------------------------------------------------------------------------
   - 왼쪽: 실제 외부 링크 디렉토리
   - 오른쪽: hover / focus에 따라 바뀌는 sticky preview
   - X / CREPE / POSTYPE 3개 링크
   - PC: hover만으로 preview 변경
   - 터치: 링크 자체를 바로 방문
   ========================================================================= */

/* -------------------------------------------------
   01. SECTION / PAGE HEADER
   ------------------------------------------------- */

.page-links .section-links {
  position: relative;
  overflow: clip;
  padding: clamp(64px, 8vh, 92px) var(--pad-x) clamp(64px, 8.8vh, 104px);
  background:
    radial-gradient(118% 58% at 14% -4%, rgba(104, 76, 184, 0.26) 0%, rgba(104, 76, 184, 0) 56%),
    radial-gradient(72% 44% at 88% 12%, rgba(58, 48, 130, 0.2) 0%, rgba(58, 48, 130, 0) 62%),
    radial-gradient(56% 30% at 78% 54%, rgba(239, 170, 205, 0.04) 0%, rgba(239, 170, 205, 0) 66%),
    radial-gradient(66% 38% at 40% 103%, rgba(243, 207, 154, 0.085) 0%, rgba(243, 207, 154, 0) 64%),
    linear-gradient(to bottom, #0a0917 0%, #0c0a1d 46%, var(--bg-deep) 100%);
}

.page-links .section-links::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 96%);
  height: 540px;
  background: radial-gradient(
    closest-side,
    rgba(150, 120, 232, 0.15),
    rgba(150, 120, 232, 0)
  );
  pointer-events: none;
}

.page-links .section-links::after {
  opacity: 0.3;
}

.page-links .links-inner {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.page-links .links-inner::before {
  content: "";
  position: absolute;
  top: -28px;
  right: 6px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  box-shadow:
    -27px 22px 0 0 rgba(255, 232, 190, 0.34),
    -27px 22px 14px 0 rgba(243, 207, 154, 0.18),
    -27px 22px 34px 4px rgba(197, 180, 243, 0.08);
  pointer-events: none;
  z-index: -1;
}

.page-links .section-header {
  position: relative;
  max-width: 650px;
  margin-bottom: clamp(48px, 6vh, 70px);
}

.page-links .section-eyebrow {
  gap: 13px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: rgba(243, 207, 154, 0.82);
}

.page-links .section-eyebrow::before {
  width: clamp(22px, 3vw, 38px);
}

.page-links .section-title {
  margin: 12px 0 15px;
  font-size: clamp(42px, 5.6vw, 74px);
  letter-spacing: 0.1em;
  line-height: 1.05;
  text-shadow: 0 0 52px rgba(150, 122, 232, 0.34);
}

.page-links .section-title::after {
  width: clamp(44px, 8vw, 104px);
  margin-left: 22px;
  background: linear-gradient(
    to right,
    rgba(243, 207, 154, 0.55),
    rgba(197, 180, 243, 0.26) 55%,
    rgba(197, 180, 243, 0)
  );
}

.page-links .section-description {
  max-width: 54ch;
  font-size: clamp(14px, 1.15vw, 15.5px);
  line-height: 1.85;
  color: rgba(214, 207, 240, 0.7);
}

/* -------------------------------------------------
   02. TWO-COLUMN DIRECTORY
   ------------------------------------------------- */

.page-links .links-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: start;
  gap: clamp(44px, 6vw, 84px);
}

.page-links .links-directory {
  min-width: 0;
}

.page-links .links-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(190, 176, 238, 0.1);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: rgba(206, 199, 238, 0.42);
}

.page-links .links-directory-head span:last-child {
  color: rgba(243, 207, 154, 0.45);
}

/* -------------------------------------------------
   03. LINK ROWS
   ------------------------------------------------- */

.page-links .links-list {
  display: flex;
  flex-direction: column;
}

.page-links .links-item {
  --accent: var(--lavender);
  --accent-soft: rgba(197, 180, 243, 0.18);
  --accent-line: rgba(197, 180, 243, 0.36);

  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 15px 10px 15px 0;
  border-bottom: 1px solid rgba(190, 176, 238, 0.09);
  color: inherit;
  text-decoration: none;
}

.page-links .links-item[data-tone="gold"] {
  --accent: var(--gold);
  --accent-soft: rgba(243, 207, 154, 0.18);
  --accent-line: rgba(243, 207, 154, 0.38);
}

.page-links .links-item[data-tone="lavender"] {
  --accent: var(--lavender);
  --accent-soft: rgba(197, 180, 243, 0.18);
  --accent-line: rgba(197, 180, 243, 0.36);
}

.page-links .links-item[data-tone="rose"] {
  --accent: var(--rose);
  --accent-soft: rgba(239, 170, 205, 0.18);
  --accent-line: rgba(239, 170, 205, 0.36);
}

.page-links .links-item::before {
  content: "";
  position: absolute;
  inset: 4px -12px;
  z-index: -1;
  border-radius: 18px;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--accent) 8%, transparent),
    rgba(255, 255, 255, 0) 72%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.page-links .links-item:is(:hover, :focus-visible, .is-active)::before {
  opacity: 1;
}

.page-links .links-index {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.page-links .links-item-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.page-links .links-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.page-links .links-item-label::after {
  content: "";
  width: clamp(18px, 4vw, 46px);
  height: 1px;
  background: linear-gradient(to right, var(--accent-line), transparent);
}

.page-links .links-item-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1.15;
  color: rgba(246, 242, 255, 0.92);
  transition: color 0.35s var(--ease);
}

.page-links .links-item[data-label="POSTYPE"] .links-item-title {
  font-family: var(--font-serif-kr);
  font-size: clamp(21px, 2.3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-links .links-item:is(:hover, :focus-visible, .is-active) .links-item-title {
  color: #fff;
}

.page-links .links-item-hint {
  justify-self: end;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  white-space: nowrap;
  color: rgba(206, 199, 238, 0.36);
}

.page-links .links-item-arrow {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(190, 176, 238, 0.13);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: rgba(222, 216, 246, 0.52);
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    color 0.35s var(--ease);
}

.page-links .links-item:is(:hover, :focus-visible, .is-active) .links-item-arrow {
  transform: translate(2px, -2px);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* -------------------------------------------------
   04. STICKY PREVIEW
   ------------------------------------------------- */

.page-links .links-preview {
  --preview-accent: var(--gold);
  --preview-soft: rgba(243, 207, 154, 0.18);

  position: sticky;
  top: clamp(108px, 13vh, 136px);
  overflow: hidden;
  min-height: 360px;
  padding: clamp(26px, 2.8vw, 38px);
  border: 1px solid rgba(202, 188, 246, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(
      155deg,
      rgba(31, 25, 66, 0.54) 0%,
      rgba(13, 11, 30, 0.44) 100%
    );
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 28px 64px rgba(4, 3, 12, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.page-links .links-preview[data-tone="gold"] {
  --preview-accent: var(--gold);
  --preview-soft: rgba(243, 207, 154, 0.18);
}

.page-links .links-preview[data-tone="lavender"] {
  --preview-accent: var(--lavender);
  --preview-soft: rgba(197, 180, 243, 0.18);
}

.page-links .links-preview[data-tone="rose"] {
  --preview-accent: var(--rose);
  --preview-soft: rgba(239, 170, 205, 0.18);
}

.page-links .links-preview::before {
  content: "";
  position: absolute;
  top: -95px;
  right: -75px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    var(--preview-soft),
    rgba(197, 180, 243, 0.035) 52%,
    transparent 72%
  );
  pointer-events: none;
}

.page-links .links-preview-number {
  position: relative;
  margin: 0 0 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--preview-accent);
}

.page-links .links-preview-label {
  position: relative;
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--preview-accent);
}

.page-links .links-preview-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.3vw, 44px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #fbf7ff;
}

.page-links .links-preview[data-tone="rose"] .links-preview-title {
  font-family: var(--font-serif-kr);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-links .links-preview-line {
  width: 100%;
  height: 1px;
  margin: 24px 0 22px;
  background: linear-gradient(
    to right,
    var(--preview-accent),
    rgba(190, 176, 238, 0.08) 55%,
    transparent
  );
  opacity: 0.5;
}

.page-links .links-preview-text {
  position: relative;
  margin: 0;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(230, 225, 252, 0.8);
}

.page-links .links-preview-visit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 10px 0 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(244, 240, 255, 0.82);
  transition: color 0.35s var(--ease);
}

.page-links .links-preview-visit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, var(--preview-accent), transparent);
  transition: right 0.45s var(--ease);
}

.page-links .links-preview-visit:hover {
  color: #fff;
}

.page-links .links-preview-visit:hover::after {
  right: 0;
}

.page-links .links-preview-hint {
  position: absolute;
  right: 28px;
  bottom: 24px;
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(206, 199, 238, 0.34);
}

/* -------------------------------------------------
   05. BACK TO HOME
   ------------------------------------------------- */

.page-links .links-home {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  margin-top: clamp(70px, 8vh, 104px);
  text-align: right;
}

.page-links .links-home::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * clamp(26px, 3.2vh, 38px));
  height: 1px;
  background: linear-gradient(
    to left,
    rgba(243, 207, 154, 0.26) 0%,
    rgba(190, 176, 238, 0.09) 46%,
    rgba(190, 176, 238, 0) 100%
  );
  pointer-events: none;
}

.page-links .links-home-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  width: 100%;
  margin: 0 2px clamp(9px, 1.3vh, 13px) 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: rgba(243, 207, 154, 0.6);
}

.page-links .links-home-label::before {
  content: "✦";
  font-size: 8.5px;
  letter-spacing: 0;
  opacity: 0.8;
}

.page-links .links-home-label::after {
  content: "";
  order: -1;
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(
    to left,
    rgba(190, 176, 238, 0.18),
    rgba(190, 176, 238, 0) 80%
  );
}

.page-links .links-home-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 22px);
  padding: 2px 2px 6px;
  font-family: var(--font-display);
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.2;
  color: rgba(244, 240, 255, 0.92);
  transition: color 0.4s var(--ease);
}

.page-links .links-home-link::before {
  content: "";
  position: absolute;
  right: clamp(48px, 6vw, 62px);
  left: calc(100% - clamp(48px, 6vw, 62px));
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    to left,
    rgba(243, 207, 154, 0.7),
    rgba(197, 180, 243, 0.3)
  );
  transition: left 0.55s var(--ease);
}

.page-links .links-home-link:hover::before {
  left: 2px;
}

.page-links .links-home-link:hover {
  color: #fff6e6;
}

.page-links .links-home-link span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(243, 207, 154, 0.3);
  border-radius: 50%;
  background: rgba(243, 207, 154, 0.05);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gold);
  transition:
    transform 0.4s var(--ease),
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.page-links .links-home-link:hover span {
  transform: translateX(4px);
  border-color: rgba(243, 207, 154, 0.55);
  background: rgba(243, 207, 154, 0.12);
}

/* -------------------------------------------------
   06. RESPONSIVE
   ------------------------------------------------- */

@media (max-width: 960px) {
  .page-links .links-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
  }

  .page-links .links-preview {
    position: relative;
    top: auto;
    order: -1;
    min-height: 0;
  }

  .page-links .links-preview-hint {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-links .section-links {
    padding-top: clamp(42px, 6vh, 58px);
  }

  .page-links .links-inner::before {
    top: -14px;
    right: -8px;
    transform: scale(0.82);
    transform-origin: top right;
  }

  .page-links .section-header {
    margin-bottom: 40px;
  }

  .page-links .links-directory-head {
    font-size: 8.5px;
    letter-spacing: 0.2em;
  }

  .page-links .links-item {
    grid-template-columns: 32px minmax(0, 1fr) 27px;
    grid-template-areas:
      "index heading arrow"
      ". hint arrow";
    gap: 8px 12px;
    min-height: 92px;
  }

  .page-links .links-index {
    grid-area: index;
    font-size: 15px;
  }

  .page-links .links-item-heading {
    grid-area: heading;
  }

  .page-links .links-item-hint {
    grid-area: hint;
    justify-self: start;
    white-space: normal;
  }

  .page-links .links-item-arrow {
    grid-area: arrow;
  }

  .page-links .links-item-title {
    font-size: clamp(22px, 7vw, 29px);
  }

  .page-links .links-item[data-label="POSTYPE"] .links-item-title {
    font-size: clamp(20px, 6.2vw, 25px);
  }

  .page-links .links-preview {
    padding: 22px;
    border-radius: 22px;
  }

  .page-links .links-preview-title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .page-links .links-preview-text {
    font-size: 14px;
    line-height: 1.85;
  }

  .page-links .links-home {
    margin-top: 76px;
  }
}

/* -------------------------------------------------
   07. MOTION / ACCESSIBILITY
   ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .page-links .links-item::before,
  .page-links .links-item-arrow,
  .page-links .links-preview-visit::after,
  .page-links .links-home-link,
  .page-links .links-home-link span {
    transition: none !important;
  }
}


/* =========================================================================
   08. INTERACTION REWORK
   -------------------------------------------------------------------------
   - 카드 전체는 선택 / preview / 모바일 펼침용
   - 실제 외부 이동은 동그란 ↗ 버튼만
   - 모바일은 TIMELINE / LIKES와 같은 방식으로 탭 → 펼침 / 재탭 → 접힘
   ========================================================================= */

/* 카드 자체는 더 이상 링크가 아님 */
.page-links .links-item {
  cursor: default;
  outline: none;
}

.page-links .links-item:focus-visible {
  outline: 1px solid var(--accent-line);
  outline-offset: 4px;
  border-radius: 14px;
}

/* 원형 버튼만 실제 링크 */
.page-links .links-item-arrow {
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.page-links .links-item-arrow:focus-visible,
.page-links .links-preview-visit-circle:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* 오른쪽 preview의 VISIT 문구는 텍스트, 원형 ↗만 링크 */
.page-links .links-preview-visit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 10px 0 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(244, 240, 255, 0.82);
}

.page-links .links-preview-visit::after {
  display: none !important;
}

.page-links .links-preview-visit-circle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(190, 176, 238, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
  color: var(--preview-accent);
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

.page-links .links-preview-visit-circle:hover {
  transform: translate(2px, -2px);
  border-color: var(--preview-accent);
  background: rgba(255, 255, 255, 0.05);
}

/* PC에선 우측 preview가 있으므로 inline detail은 숨김 */
.page-links .links-inline-detail {
  display: none;
}

/* 터치/좁은 화면에서는 카드 탭 시 설명을 아래로 펼침 */
@media (hover: none), (pointer: coarse), (max-width: 960px) {
  .page-links .links-item {
    cursor: pointer;
  }

  .page-links .links-inline-detail {
    grid-area: detail;
    display: block;
    overflow: hidden;
    min-width: 0;
    opacity: 1;
  }

  .page-links .links-inline-detail[hidden] {
    display: none !important;
  }

  .page-links .links-inline-detail p {
    margin: 0;
    padding: 10px 2px 4px 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: rgba(224, 218, 247, 0.72);
  }
}

@media (max-width: 640px) {
  .page-links .links-item {
    grid-template-columns: 32px minmax(0, 1fr) 27px;
    grid-template-areas:
      "index heading arrow"
      ". hint arrow"
      ". detail detail";
  }
}
