/**
 * BABOD Linktree — design tokens from constants/Colors.ts & app.json
 */

:root {
  --babod-yellow: #f9e41c;
  --babod-black: #1d1d1b;
  --babod-green: #2a736f;
  --babod-turquoise: #47babc;
  --babod-purple: #aa529a;

  --page-bg: #f0f1f5;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --text-secondary: #5a5a58;

  --dark-bg: #111113;
  --dark-deeper: #060608;
  --text-on-dark: #fff;
  --text-on-dark-muted: #ccc;

  --yellow-start: #f9e41c;
  --yellow-end: #ffe94d;

  /* Fluid content width: comfortable on phones, uses more of the screen on tablet/desktop */
  --content-inline-pad: clamp(16px, 4vw, 40px);
  --content-max: min(1100px, calc(100vw - 2 * var(--content-inline-pad)));
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 9999px;

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;

  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 14px 40px rgba(0, 0, 0, 0.13), 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-glow-yellow: 0 0 32px rgba(249, 228, 28, 0.18);

  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Syne", var(--font-body);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--babod-black);
  background: var(--page-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  background: linear-gradient(170deg, var(--dark-deeper) 0%, #17181d 50%, var(--dark-bg) 100%);
  color: var(--text-on-dark);
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md) calc(var(--sp-2xl) + 16px);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--babod-yellow) 20%,
    var(--babod-turquoise) 50%,
    var(--babod-purple) 80%,
    transparent
  );
}

.hero__aurora {
  position: absolute;
  inset: -50% -30%;
  background:
    radial-gradient(ellipse 45% 40% at 25% 25%, rgba(249, 228, 28, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 35% at 75% 30%, rgba(71, 186, 188, 0.14), transparent 50%),
    radial-gradient(ellipse 35% 30% at 55% 70%, rgba(170, 82, 154, 0.1), transparent 45%);
  animation: aurora 16s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  0%   { transform: translate3d(-3%, 0, 0) scale(1); opacity: 1; }
  100% { transform: translate3d(3%, -2%, 0) scale(1.05); opacity: 0.88; }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 15%, transparent 65%);
  pointer-events: none;
}

.hero__content {
  position: relative;
}

.hero__logo {
  display: block;
  height: clamp(40px, 8vw, 56px);
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2px 12px rgba(249, 228, 28, 0.25));
  animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 2px 12px rgba(249, 228, 28, 0.2)); }
  50%      { filter: drop-shadow(0 2px 20px rgba(249, 228, 28, 0.4)); }
}

.hero__tagline {
  position: relative;
  margin: var(--sp-md) 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

.hero__tagline::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin: 0 auto var(--sp-sm);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, transparent, var(--babod-yellow), transparent);
}

/* ─── Main ─── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(var(--sp-lg), 4vh, var(--sp-2xl)) var(--content-inline-pad)
    clamp(var(--sp-xl), 6vh, var(--sp-2xl));
  padding-left: max(var(--content-inline-pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--content-inline-pad), env(safe-area-inset-right, 0px));
  padding-bottom: max(
    clamp(var(--sp-xl), 6vh, var(--sp-2xl)),
    env(safe-area-inset-bottom, 0px)
  );
}

/* ─── Profile ─── */
.profile {
  text-align: center;
  margin-bottom: var(--sp-xl);
  animation: fade-up 0.6s var(--ease-out) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile__avatar-wrap {
  display: inline-block;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    var(--babod-yellow),
    var(--babod-turquoise),
    var(--babod-purple),
    var(--babod-green),
    var(--babod-yellow)
  );
  box-shadow: var(--shadow-md);
  animation: avatar-glow 5s ease-in-out infinite;
}

@keyframes avatar-glow {
  0%, 100% { box-shadow: var(--shadow-md), 0 0 20px rgba(249, 228, 28, 0.18); }
  50%      { box-shadow: var(--shadow-md), 0 0 28px rgba(71, 186, 188, 0.22); }
}

.profile__avatar {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: #fff;
}

.profile__title {
  font-family: var(--font-display);
  margin: var(--sp-lg) 0 var(--sp-xs);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.profile__bio {
  margin: 0 auto;
  max-width: min(42ch, 100%);
  font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (min-width: 720px) {
  .profile__bio {
    max-width: min(52ch, 100%);
  }
}

/* ─── Grid ─── */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 20px);
}

.grid__item--full {
  grid-column: 1 / -1;
}

/* Scroll-triggered entrance */
.grid__item {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
}

.grid__item.visible {
  animation: card-enter 0.5s var(--ease-out) forwards;
}

.grid__item:nth-child(1).visible  { animation-delay: 0s; }
.grid__item:nth-child(2).visible  { animation-delay: 0.06s; }
.grid__item:nth-child(3).visible  { animation-delay: 0.1s; }
.grid__item:nth-child(4).visible  { animation-delay: 0.14s; }
.grid__item:nth-child(5).visible  { animation-delay: 0.18s; }
.grid__item:nth-child(6).visible  { animation-delay: 0.22s; }
.grid__item:nth-child(7).visible  { animation-delay: 0.26s; }
.grid__item:nth-child(8).visible  { animation-delay: 0.30s; }
.grid__item:nth-child(9).visible  { animation-delay: 0.34s; }
.grid__item:nth-child(10).visible { animation-delay: 0.38s; }

@keyframes card-enter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Card ─── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--sp-lg) var(--sp-md);
  min-height: 120px;
  border-radius: var(--r-xl);
  text-decoration: none;
  color: var(--babod-black);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.4s var(--ease-out),
    border-color 0.3s ease;
}

/* Shimmer sweep */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 70%
  );
  transform: translateX(-110%);
  transition: transform 0.65s var(--ease-out);
  pointer-events: none;
}

.card:hover::before {
  transform: translateX(110%);
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lift);
  border-color: rgba(249, 228, 28, 0.35);
}

.card:active {
  transform: translateY(-1px) scale(1);
  transition-duration: 0.1s;
}

.card:focus-visible {
  outline: 3px solid var(--babod-green);
  outline-offset: 3px;
}

/* ─── Icon — no box, just big and centered ─── */
.card__icon {
  font-size: 1.75rem;
  color: var(--babod-black);
  transition: transform 0.4s var(--ease-spring);
  line-height: 1;
}

.card:hover .card__icon {
  transform: scale(1.15);
}

.card__icon--sm {
  font-size: 1rem;
}

.card__label {
  font-weight: 700;
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  letter-spacing: 0.01em;
  text-align: center;
}

.card__sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: -4px;
}

/* ─── Primary card (download CTAs) ─── */
.card--primary {
  background: linear-gradient(140deg, var(--yellow-start) 0%, var(--yellow-end) 100%);
  border-color: rgba(29, 29, 27, 0.06);
  box-shadow: var(--shadow-soft), var(--shadow-glow-yellow);
  min-height: 130px;
}

.card--primary .card__icon {
  font-size: 2.25rem;
}

.card--primary::before {
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 75%
  );
}

.card--primary:hover {
  border-color: var(--babod-green);
  box-shadow: var(--shadow-lift), 0 0 44px rgba(249, 228, 28, 0.22);
}

/* ─── Flat card (legal links) ─── */
.card--flat {
  flex-direction: row;
  min-height: auto;
  padding: var(--sp-md) var(--sp-lg);
  gap: var(--sp-md);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.04);
}

.card--flat .card__icon {
  font-size: 1rem;
  color: var(--text-secondary);
}

.card--flat .card__label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.card--flat:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 228, 28, 0.3);
  box-shadow: var(--shadow-md);
}

.card--flat:hover .card__label {
  color: var(--babod-black);
}

/* ─── Accent strip ─── */
.accent-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.accent-strip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: dot-pulse 3s ease-in-out infinite;
}

.accent-strip__dot:nth-child(2) { animation-delay: 0.4s; }
.accent-strip__dot:nth-child(3) { animation-delay: 0.8s; }

@keyframes dot-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 6px currentColor; }
  50%      { transform: scale(1.25); box-shadow: 0 0 14px currentColor; }
}

.accent-strip__dot--green     { background: var(--babod-green);     color: var(--babod-green); }
.accent-strip__dot--turquoise { background: var(--babod-turquoise); color: var(--babod-turquoise); }
.accent-strip__dot--purple    { background: var(--babod-purple);    color: var(--babod-purple); }

/* ─── Footer ─── */
.footer {
  position: relative;
  background: linear-gradient(180deg, #151517 0%, var(--dark-bg) 100%);
  color: var(--text-on-dark-muted);
  text-align: center;
  padding: var(--sp-xl) var(--sp-md);
  font-size: 0.8125rem;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    var(--babod-yellow) 25%,
    var(--babod-turquoise) 50%,
    var(--babod-purple) 75%,
    transparent 95%
  );
}

.footer a {
  color: var(--babod-turquoise);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--babod-yellow);
}

.footer__fine {
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  max-width: 40ch;
  margin-inline: auto;
  line-height: 1.55;
}

/* ─── Reduced-motion ─── */
@media (prefers-reduced-motion: reduce) {
  .hero__aurora { animation: none; }
  .hero__logo { animation: none; }
  .accent-strip__dot { animation: none; }
  .profile { animation: none; }
  .profile__avatar-wrap { animation: none; }
  .grid__item { opacity: 1; transform: none; }
  .grid__item.visible { animation: none; }
  .card, .card::before { transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Small screens (single column: easier taps on narrow phones) ─── */
@media (max-width: 440px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .grid__item--full {
    grid-column: auto;
  }

  .card {
    min-height: 96px;
    flex-direction: row;
    justify-content: flex-start;
    padding-inline: var(--sp-lg);
    gap: var(--sp-md);
  }

  .card--primary {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-inline: var(--sp-md);
  }

  .card--primary .card__label,
  .card--primary .card__sub {
    text-align: center;
  }

  .card--flat {
    flex-direction: row;
  }

  .card__icon {
    flex-shrink: 0;
    width: 1.75rem;
    text-align: center;
  }

  .card__label {
    text-align: start;
  }

  .card--primary .card__icon {
    width: auto;
  }

  .card--primary .card__label {
    text-align: center;
  }
}

/* ─── Tablet / desktop: larger tap targets and breathing room ─── */
@media (min-width: 600px) {
  .card {
    min-height: 128px;
    padding: var(--sp-xl) var(--sp-lg);
  }

  .card--primary {
    min-height: 136px;
  }

  .card--primary .card__icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .card__icon {
    font-size: clamp(1.6rem, 3vw, 2rem);
  }
}

@media (min-width: 900px) {
  .grid {
    gap: 20px;
  }

  .card {
    min-height: 136px;
  }

  .card--primary {
    min-height: 148px;
  }
}
