/* =========================================================
   darbellay.io — Linktree premium
   Vanilla CSS — dark, glassmorphism, aurora, spotlight
   ========================================================= */

:root {
  --bg: #07080c;
  --bg-soft: #0c0e15;
  --text: #f5f7fc;
  --muted: #888fa3;
  --muted-soft: #5d6478;

  --card-bg: rgba(255, 255, 255, 0.028);
  --card-bg-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --radius: 24px;
  --radius-sm: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell-w: 460px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px) 20px;
  position: relative;
}

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

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

/* =========================================================
   FOND : aurora + grain
   ========================================================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #11131d 0%, var(--bg) 55%),
    var(--bg);
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.aurora--1 {
  width: 52vw;
  height: 52vw;
  top: -14vw;
  left: -10vw;
  background: radial-gradient(circle, #ff7a45 0%, transparent 68%);
  animation: drift1 26s var(--ease) infinite alternate;
}

.aurora--2 {
  width: 48vw;
  height: 48vw;
  bottom: -16vw;
  right: -12vw;
  background: radial-gradient(circle, #2bd6a6 0%, transparent 68%);
  animation: drift2 30s var(--ease) infinite alternate;
}

.aurora--3 {
  width: 40vw;
  height: 40vw;
  top: 35%;
  left: 45%;
  background: radial-gradient(circle, #5b6cff 0%, transparent 70%);
  opacity: 0.32;
  animation: drift3 34s var(--ease) infinite alternate;
}

@keyframes drift1 {
  to { transform: translate3d(8vw, 10vh, 0) scale(1.12); }
}
@keyframes drift2 {
  to { transform: translate3d(-7vw, -8vh, 0) scale(1.18); }
}
@keyframes drift3 {
  to { transform: translate3d(-12vw, 6vh, 0) scale(0.85); }
}

/* Grain subtil pour le rendu "premium" */
.grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* =========================================================
   SHELL
   ========================================================= */
.shell {
  width: 100%;
  max-width: var(--shell-w);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 30px);
}

/* =========================================================
   INTRO
   ========================================================= */
.intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.intro__logo {
  margin: 0;
  line-height: 0;
}

.intro__logo img {
  width: clamp(168px, 46vw, 210px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.14));
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Texte accessible mais masqué visuellement (SEO + lecteurs d'écran) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro__subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34ch;
  text-wrap: balance;
}

.intro__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #b9c0d0;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  margin-top: 2px;
}

.intro__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2bd6a6;
  box-shadow: 0 0 0 0 rgba(43, 214, 166, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(43, 214, 166, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(43, 214, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 214, 166, 0); }
}

/* =========================================================
   CARTES
   ========================================================= */
.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  transform: perspective(900px) rotateX(0) rotateY(0);
  transform-style: preserve-3d;
  transition:
    transform 0.5s var(--ease),
    border-color 0.4s var(--ease),
    background 0.4s var(--ease),
    box-shadow 0.5s var(--ease);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}

/* Accent par marque */
.card--trip {
  --accent: #ff8a52;
  --accent-2: #ff5e7a;
  --glow: rgba(255, 122, 69, 0.32);
}
.card--bambu {
  --accent: #34e0a8;
  --accent-2: #2fd0e0;
  --glow: rgba(43, 214, 166, 0.30);
}

/* Spotlight qui suit le curseur */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    var(--glow),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

/* Liseré accent en haut de carte */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

/* Halo coloré diffus derrière la carte */
.card__halo {
  position: absolute;
  inset: -1px;
  z-index: -2;
  border-radius: inherit;
  background: radial-gradient(120% 120% at 0% 0%, var(--accent), transparent 45%),
              radial-gradient(120% 120% at 100% 100%, var(--accent-2), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.card:hover,
.card:focus-visible {
  border-color: var(--border-strong);
  background: var(--card-bg-hover);
  box-shadow:
    0 24px 50px -24px rgba(0, 0, 0, 0.9),
    0 0 60px -28px var(--glow);
  outline: none;
}

.card:hover::before,
.card:focus-visible::before,
.card:hover::after,
.card:focus-visible::after { opacity: 1; }

.card:hover .card__halo,
.card:focus-visible .card__halo { opacity: 0.12; }

.card:active { transform: scale(0.99); }

/* Ligne du haut : tag + flèche */
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.card:hover .card__tag,
.card:focus-visible .card__tag {
  color: var(--text);
  border-color: var(--border-strong);
}

.card__cta {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition:
    transform 0.45s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    background 0.4s var(--ease);
}

.card:hover .card__cta,
.card:focus-visible .card__cta {
  color: #0a0b10;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  border-color: transparent;
  transform: rotate(45deg) scale(1.05);
}

/* Zone logo */
.card__logo {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.logo {
  height: auto;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.45));
  transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}

/* TripForge : wordmark horizontal + éclair (ratio ~5.2) */
.logo--trip {
  max-width: 252px;
  max-height: 54px;
}

/* BambuSync : wordmark large (ratio ~6.39) → calé sur la largeur */
.logo--bambu {
  max-width: 248px;
  max-height: 46px;
}

.card:hover .logo,
.card:focus-visible .logo {
  filter: drop-shadow(0 6px 26px var(--glow));
  transform: translateY(-1px);
}

/* Ligne du bas : description + url */
.card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto; /* colle le bas de carte vers le bas (cartes de hauteur égale) */
}

.card__desc {
  font-size: 0.92rem;
  color: #c6cad6;
  font-weight: 500;
  max-width: 24ch;
  text-wrap: balance;
}

.card__url {
  font-size: 0.74rem;
  color: var(--muted-soft);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}

.card:hover .card__url,
.card:focus-visible .card__url {
  color: var(--accent);
}

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  text-align: center;
}

/* Filet dégradé fin */
.foot__line {
  width: min(220px, 70%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  margin-bottom: 4px;
}

.foot__row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.foot__mark {
  width: 20px;
  height: 20px;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.12));
}

.foot__brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #d7dbe6;
}

.foot__dot {
  background: linear-gradient(120deg, #ff7a45, #2bd6a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot__meta {
  font-size: 0.74rem;
  color: var(--muted-soft);
  letter-spacing: 0.01em;
}

/* =========================================================
   ENTRÉE ANIMÉE (cascade)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 0.12s + 0.05s);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 420px) {
  .card { padding: 18px 18px 17px; }
  .card__logo { min-height: 54px; margin-bottom: 16px; }
  .logo--trip { max-width: 212px; }
  .logo--bambu { max-width: 206px; }
  .card__desc { font-size: 0.86rem; }
}

/* Écrans larges : un peu plus d'air */
@media (min-width: 720px) and (hover: hover) {
  :root { --shell-w: 480px; }
}

/* Assez de place : deux cartes côte à côte */
@media (min-width: 768px) {
  .shell { max-width: 820px; }

  .links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  /* la carte remplit toute la hauteur de sa cellule → hauteurs égales */
  .links > li { display: flex; }
}

/* =========================================================
   ACCESSIBILITÉ — réduire les animations
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .card { transform: none !important; }
}
