/* JAL-15: Link-tree page mirrors the compact xacwhite links layout with JAL branding. */
:root {
  --bg: #f7f1e8;
  --card: #fffaf1;
  --text: #0d2230;
  --muted: #5f7179;
  --line: rgba(13, 34, 48, 0.14);
  --line-strong: rgba(13, 34, 48, 0.24);
  --brand: #164a64;
  --warm: #c89a61;
  --radius: 8px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  min-width: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  text-size-adjust: 100%;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(180deg, #fffaf1 0%, var(--bg) 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  transform: translateY(-150%);
  border-radius: var(--radius);
  background: var(--text);
  color: #fffaf1;
  padding: 0.75rem 1rem;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(100% - 2rem, 520px);
  min-height: 100svh;
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: clamp(2.25rem, 7vw, 4.8rem) 0;
}

.link-card {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

.profile {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.profile-logo {
  width: clamp(178px, 48vw, 248px);
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.profile p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.link-list {
  display: grid;
  gap: 0.85rem;
  width: 100%;
}

.link-button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.92);
  color: var(--text);
  padding: 0.86rem 1rem;
  font-size: 1rem;
  font-weight: 830;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 10px 28px rgba(13, 34, 48, 0.08);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.link-button:hover,
.link-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--brand);
  color: #fffaf1;
  transform: translateY(-2px);
}

.link-button.primary {
  background: var(--brand);
  color: #fffaf1;
}

.link-button.primary:hover,
.link-button.primary:focus-visible {
  background: var(--warm);
  color: #12100d;
}

@media (prefers-reduced-motion: no-preference) {
  .profile-logo,
  .profile p,
  .link-button {
    opacity: 0;
    transform: translateY(16px);
    animation: link-rise 620ms var(--ease-out) both;
  }

  .profile-logo {
    animation-delay: 40ms;
  }

  .profile p {
    animation-delay: 140ms;
  }

  .link-button:nth-child(1) {
    animation-delay: 240ms;
  }

  .link-button:nth-child(2) {
    animation-delay: 310ms;
  }

  .link-button:nth-child(3) {
    animation-delay: 380ms;
  }

  .link-button:nth-child(4) {
    animation-delay: 450ms;
  }

  .link-button:nth-child(5) {
    animation-delay: 520ms;
  }

  .link-button:nth-child(6) {
    animation-delay: 590ms;
  }
}

@keyframes link-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 1.25rem, 520px);
    align-items: flex-start;
  }

  .profile-logo {
    width: clamp(166px, 60vw, 228px);
  }

  .link-button {
    min-height: 56px;
  }
}
