/* ============ TRADICITY — Linktree ============ */

:root {
  --navy-deep: #04101c;
  --gold: #e8b84b;
  --gold-soft: #f0cd7e;
  --gold-dim: rgba(232, 184, 75, .35);
  --ink: #eaf2f7;
  --ink-dim: rgba(234, 242, 247, .62);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--navy-deep);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  animation: grainShift 1.2s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ---------- carte decorative ---------- */
.deco-card {
  position: fixed;
  z-index: 1;
  width: clamp(120px, 14vw, 210px);
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  opacity: .5;
  filter: blur(1.5px) saturate(.9);
  pointer-events: none;
  will-change: transform;
}
.deco-1 { top: 6%; left: -3%; transform: rotate(-14deg); }
.deco-2 { bottom: 8%; left: 6%; transform: rotate(9deg); }
.deco-3 { top: 10%; right: -2%; transform: rotate(12deg); }
.deco-4 { bottom: -6%; right: 7%; transform: rotate(-8deg); }

@media (max-width: 720px) {
  .deco-card { opacity: .28; width: 110px; }
  .deco-2, .deco-4 { display: none; }
}

/* ---------- layout ---------- */
#page {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) 22px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lk-hero { text-align: center; }
.lk-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(50px, 13vw, 84px);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.lk-title span {
  padding: 0 .06em .1em;
  background: linear-gradient(178deg, #fdf6e3 15%, var(--gold-soft) 45%, var(--gold) 65%, #a97c1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 30px rgba(232,184,75,.22));
  display: inline-block;
}
.lk-sub {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(17px, 4.6vw, 24px);
  opacity: .9;
  margin-top: 2px;
}
.lk-kicker {
  font-family: 'Cinzel', serif;
  font-size: clamp(10px, 2.6vw, 12px);
  font-weight: 500;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--gold);
  opacity: .85;
  margin-top: 14px;
}
.lk-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto 16px;
  width: min(300px, 70%);
}
.rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.lk-rule .rule-line:last-child { background: linear-gradient(90deg, var(--gold-dim), transparent); }
.rule-diamond { color: var(--gold); font-size: 10px; }
.lk-hint {
  font-size: clamp(14px, 3.6vw, 16px);
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: .03em;
}

/* ---------- links ---------- */
.lk-links {
  width: 100%;
  margin-top: 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  perspective: 900px;
}

.lk-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 19px 22px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(160deg, rgba(232,184,75,.10), rgba(232,184,75,.03) 45%, rgba(255,255,255,.02));
  border: 1px solid rgba(232,184,75,.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
  overflow: hidden;
  will-change: transform;
  transition: border-color .3s ease, box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.lk-link:hover {
  border-color: var(--gold);
  box-shadow: 0 22px 54px rgba(0,0,0,.5), 0 0 40px rgba(232,184,75,.16);
}

.lk-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(232,184,75,.10);
  border: 1px solid rgba(232,184,75,.28);
  box-shadow: inset 0 0 18px rgba(232,184,75,.07);
  transition: transform .3s ease;
}
.lk-link:hover .lk-icon { transform: scale(1.08) rotate(-3deg); }

/* Il sito e' la voce principale: stesso riquadro degli altri, un filo piu'
   acceso. Niente di diverso nella forma, solo un po' piu' d'oro. */
.lk-link--sito {
  background: linear-gradient(160deg, rgba(232,184,75,.20), rgba(232,184,75,.07) 45%, rgba(255,255,255,.03));
  border-color: rgba(232,184,75,.55);
}
.lk-link--sito .lk-icon { color: var(--gold-soft); }

.lk-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.lk-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  /* Cinzel con le lettere larghe mangia spazio: su un telefono stretto un
     titolo lungo andava a capo tre volte e la scheda cresceva il doppio
     delle altre. Qui rimpicciolisce quanto basta, e se proprio deve andare
     a capo lo fa in due righe pari invece che in tre sbilenche. */
  font-size: clamp(14px, 3.9vw, 17px);
  letter-spacing: .12em;
  text-wrap: balance;
}
@media (max-width: 380px) {
  .lk-name { letter-spacing: .06em; }
}
.lk-handle {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: .03em;
}

.lk-arrow {
  margin-left: auto;
  color: var(--gold);
  opacity: .55;
  transition: opacity .3s ease, transform .3s ease;
}
.lk-link:hover .lk-arrow { opacity: 1; transform: translateX(4px); }

.lk-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.13) 48%, rgba(255,255,255,.02) 56%, transparent 70%);
  background-size: 250% 250%;
  background-position: 100% 100%;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.lk-link:hover .lk-shine {
  opacity: 1;
  animation: shineSweep 1.1s ease forwards;
}
@keyframes shineSweep {
  from { background-position: 100% 100%; }
  to { background-position: 0% 0%; }
}

/* TikTok — coming soon */
.lk-link.is-soon {
  cursor: default;
  border-style: dashed;
  border-color: rgba(232,184,75,.22);
  opacity: .8;
}
.lk-link.is-soon .lk-icon {
  color: rgba(234,242,247,.55);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}
.lk-link.is-soon:hover { box-shadow: 0 14px 36px rgba(0,0,0,.35); }
.lk-link.is-soon:hover .lk-icon { transform: none; }
.lk-link.is-soon:hover .lk-shine { animation: none; opacity: 0; }
.lk-soon-badge {
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--gold);
  border: 1px solid rgba(232,184,75,.45);
  border-radius: 100px;
  padding: 7px 14px;
  white-space: nowrap;
  animation: soonPulse 2.6s ease-in-out infinite;
}
@keyframes soonPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(232,184,75,0); opacity: .85; }
  50% { box-shadow: 0 0 18px rgba(232,184,75,.28); opacity: 1; }
}

/* ---------- footer ---------- */
.lk-footer {
  margin-top: 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
}
.lk-copy {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(234,242,247,.34);
  font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .lk-soon-badge { animation: none; }
  .lk-link:hover .lk-shine { animation: none; }
}
