/**
 * Link-tree theme: pastel pink as the primary field; blue and purple only as soft blob highlights.
 * Spacing scale and radii use rem for predictable scaling with user font settings.
 */

:root {
  /* Primary canvas: pink stops only (see body background — no blue/purple in base stack). */
  --lt-pink-deep: #ffc8dd;
  --lt-pink-mid: #ffe0ec;
  --lt-pink-light: #fff5f9;
  /* Soft rose lift at the top of the field (still pink family; adds depth without second hue). */
  --lt-pink-glow: rgba(255, 214, 232, 0.75);
  --lt-pink-wash-end: #fffafc;
  /* Focus rings & card accents (full chroma). */
  --lt-blue: #a8d4f0;
  --lt-purple: #c9b6e8;
  /* Translucent mixes for focus halo (matches solid accents). */
  --lt-purple-soft: rgba(201, 182, 232, 0.5);
  /**
   * Decorative blob highlights — intentionally low-contrast vs pink so blue/purple read as
   * glints, not competing primaries.
   */
  --lt-highlight-blue-core: rgba(168, 212, 240, 0.38);
  --lt-highlight-purple-core: rgba(201, 182, 232, 0.42);
  --lt-blob-blur: 56px;
  --lt-blob-layer-opacity: 0.45;
  --lt-text: #4a3550;
  --lt-text-soft: #6b5575;
  --lt-surface: rgba(255, 255, 255, 0.72);
  --lt-surface-border: rgba(255, 255, 255, 0.95);
  --lt-shadow: 0 12px 40px rgba(74, 53, 80, 0.12);
  --lt-radius-lg: 1.25rem;
  --lt-radius-pill: 999px;
  /**
   * Fluid column width: scales with viewport between --lt-column-min and --lt-column-max.
   * min(vw, cap) in the middle term lets phones stay proportionally narrow while desktops
   * grow until the cap (readability on ultra-wide monitors).
   */
  --lt-column-min: 16rem;
  --lt-column-vw: 92vw;
  --lt-column-max: 30rem;
  --lt-max-width: clamp(
    var(--lt-column-min),
    min(var(--lt-column-vw), var(--lt-column-max)),
    var(--lt-column-max)
  );
  --lt-space-xs: 0.35rem;
  --lt-space-sm: 0.75rem;
  --lt-space-md: 1.25rem;
  --lt-space-lg: 2rem;
  --lt-focus: 0 0 0 3px var(--lt-blue), 0 0 0 6px var(--lt-purple-soft);
}

/* Wider cap on tablets / laptops so cards use more horizontal space than on phones. */
@media (min-width: 48em) {
  :root {
    --lt-column-vw: 88vw;
    --lt-column-max: 34rem;
  }
}

/* Desktops: allow a broader column while vw term still respects side padding rhythm. */
@media (min-width: 64em) {
  :root {
    --lt-column-max: 38rem;
  }
}

@media (min-width: 90em) {
  :root {
    --lt-column-vw: min(82vw, 72rem);
    --lt-column-max: 42rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--lt-text);
  line-height: 1.5;
  /**
   * Sole primary treatment: pink-only layers. Blue/purple stay on `.link-tree__bg-blob` orbs
   * as lightweight highlights (see --lt-highlight-* tokens).
   */
  background:
    radial-gradient(ellipse 95% 55% at 50% -5%, var(--lt-pink-glow), transparent 58%),
    linear-gradient(
      168deg,
      var(--lt-pink-deep) 0%,
      var(--lt-pink-mid) 38%,
      var(--lt-pink-light) 72%,
      var(--lt-pink-wash-end) 100%
    );
}

.skip-link {
  position: absolute;
  left: var(--lt-space-sm);
  top: var(--lt-space-sm);
  padding: var(--lt-space-xs) var(--lt-space-sm);
  background: var(--lt-surface);
  border-radius: var(--lt-radius-pill);
  color: var(--lt-text);
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 10;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid var(--lt-surface-border);
}

.skip-link:focus {
  clip-path: none;
  width: auto;
  height: auto;
  outline: none;
  box-shadow: var(--lt-focus);
}

.link-tree__bg-blob {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.link-tree__bg-blob::before,
.link-tree__bg-blob::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--lt-blob-blur));
  /* Opacity stacks with translucent cores so blobs stay highlight-weight, not second backgrounds. */
  opacity: var(--lt-blob-layer-opacity);
}

/* Pastel blue / purple as specular-style highlights (smaller footprint = less “field takeover”). */
.link-tree__bg-blob::before {
  width: min(42vw, 17rem);
  height: min(42vw, 17rem);
  left: -6%;
  top: 14%;
  background: var(--lt-highlight-blue-core);
}

.link-tree__bg-blob::after {
  width: min(48vw, 19rem);
  height: min(48vw, 19rem);
  right: -10%;
  bottom: 8%;
  background: var(--lt-highlight-purple-core);
}

.link-tree {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--lt-space-lg) var(--lt-space-md) calc(var(--lt-space-lg) * 1.5);
}

/**
 * Single constrained column: width follows --lt-max-width so header, cards, status, and footer align.
 */
.link-tree__header,
.link-tree__status,
.link-tree > main,
.link-tree__foot {
  width: 100%;
  max-width: var(--lt-max-width);
}

.link-tree__header {
  text-align: center;
  margin-bottom: var(--lt-space-md);
}

.link-tree__avatar {
  width: 5.5rem;
  height: 5.5rem;
  margin-inline: auto;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--lt-surface) 0%, rgba(255, 255, 255, 0.5) 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--lt-shadow), 0 0 0 2px var(--lt-blue), 0 0 0 4px var(--lt-purple-soft);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--lt-text);
  margin-bottom: var(--lt-space-sm);
}

.link-tree__title {
  margin: 0 0 var(--lt-space-xs);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.link-tree__tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--lt-text-soft);
  font-weight: 500;
}

.link-tree__status {
  margin: 0 0 var(--lt-space-sm);
  padding: var(--lt-space-sm) var(--lt-space-md);
  text-align: center;
  font-size: 0.9rem;
  color: #7a2e3e;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--lt-radius-lg);
  border: 1px solid rgba(199, 120, 150, 0.35);
}

.link-tree__status:empty,
.link-tree__status[hidden] {
  display: none;
}

.link-tree > main [data-link-tree-nav] {
  width: 100%;
}

.link-tree__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-tree__row + .link-tree__row {
  margin-top: var(--lt-space-sm);
}

.link-tree__link {
  display: flex;
  align-items: center;
  gap: var(--lt-space-sm);
  width: 100%;
  padding: var(--lt-space-sm) var(--lt-space-md);
  border-radius: var(--lt-radius-lg);
  text-decoration: none;
  color: var(--lt-text);
  font-weight: 600;
  font-size: 1rem;
  background: var(--lt-surface);
  border: 1px solid var(--lt-surface-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  /* Raised card + subtle inner highlight (single declaration; avoid cascade overrides). */
  box-shadow: var(--lt-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.link-tree__link:hover {
  transform: translateY(-2px);
  border-color: var(--lt-blue);
  box-shadow: 0 16px 48px rgba(74, 53, 80, 0.14), 0 0 0 1px var(--lt-purple-soft);
}

.link-tree__link:focus-visible {
  outline: none;
  box-shadow: var(--lt-focus), var(--lt-shadow);
}

.link-tree__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  opacity: 0.92;
}

.link-tree__label {
  flex: 1;
  text-align: center;
}

.link-tree__foot {
  margin-top: auto;
  padding-top: var(--lt-space-lg);
  font-size: 0.8rem;
  color: var(--lt-text-soft);
  text-align: center;
}

.link-tree__foot a {
  color: var(--lt-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-tree__foot a:focus-visible {
  outline: none;
  box-shadow: var(--lt-focus);
  border-radius: 4px;
}
