/* ==========================================================================
   GESET SRLS - pagina link-in-bio
   Stessi materiali del sito: inchiostro, curve di livello, arancio picchetto.
   Pesi tipografici 300-500.
   ========================================================================== */

:root {
  --ink: #0e2130;
  --ink-2: #132a3b;
  --on-ink: #e7eef1;
  --on-ink-2: #a3b6c2;
  --on-ink-3: #6f8797;
  --line: rgba(163, 196, 214, 0.16);
  --line-strong: rgba(163, 196, 214, 0.3);
  --signal: #ff5b14;
  --signal-hover: #ff7333;
  --laser: #4de8c2;
  --white: #fbfcfa;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.link-page {
  min-height: 100svh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--on-ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* Curve di livello disegnate da app.js (data-contours) */
.link-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.link-bg canvas {
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.link-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(14, 33, 48, 0.2), rgba(14, 33, 48, 0.85) 70%);
}

.link-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
}

/* ---------- Testata ---------- */
.link-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0 12px;
}

.link-hero__avatar {
  display: block;
  width: 132px;
  margin-bottom: 8px;
  transition: transform 0.4s var(--ease);
}

.link-hero__avatar:hover {
  transform: translateY(-2px);
}

.link-hero__avatar img {
  width: 100%;
  height: auto;
}

.link-hero__name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-size: 2rem;
  font-weight: 500;
  font-stretch: 118%;
  letter-spacing: 0.22em;
  line-height: 1;
  padding-left: 0.22em;
}

.link-hero__legal {
  font-family: var(--mono);
  font-size: 0.42em;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--on-ink-2);
}

.link-hero__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--on-ink-2);
  margin-bottom: 6px;
}

.link-hero__dash {
  width: 16px;
  height: 1.5px;
  background: var(--signal);
}

.link-hero__role {
  color: var(--on-ink-2);
  font-size: 0.9375rem;
}

.link-hero__place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--on-ink-3);
}

.link-hero__place svg {
  width: 14px;
  height: 14px;
  fill: var(--signal);
}

/* ---------- Dati aziendali ---------- */
.link-card {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(19, 42, 59, 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.link-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.link-card__icon svg {
  width: 18px;
  height: 18px;
  fill: var(--signal);
}

.link-card__title {
  font-size: 1rem;
  font-weight: 500;
}

.link-fiscal__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-areas:
    "label copy"
    "value copy";
  column-gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.link-fiscal__label {
  grid-area: label;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.6875rem;
  color: var(--on-ink-3);
}

.link-fiscal__value {
  grid-area: value;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.link-fiscal__value--wrap {
  font-family: var(--font);
  font-size: 0.9375rem;
}

.link-fiscal__value--link {
  color: var(--signal);
}

.link-copy {
  grid-area: copy;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.link-copy svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.link-copy:hover {
  border-color: var(--on-ink-2);
}

.link-copy.is-done {
  border-color: var(--laser);
  color: var(--laser);
}

.link-vcard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s var(--ease);
}

.link-vcard svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.link-vcard:hover {
  border-color: var(--on-ink);
}

/* ---------- Collegamenti ---------- */
.link-list {
  display: grid;
  gap: 10px;
}

.link-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius);
  background: rgba(19, 42, 59, 0.88);
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.link-item:hover {
  border-color: var(--line-strong);
  background: rgba(27, 54, 73, 0.92);
}

.link-item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.link-item__icon svg {
  width: 20px;
  height: 20px;
  fill: var(--on-ink);
}

.link-item__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.link-item__label {
  font-size: 1rem;
  font-weight: 500;
}

.link-item__desc {
  font-size: 0.8125rem;
  color: var(--on-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-item__arrow svg {
  width: 20px;
  height: 20px;
  fill: var(--on-ink-3);
  transition: transform 0.25s var(--ease), fill 0.2s var(--ease);
}

.link-item:hover .link-item__arrow svg {
  transform: translateX(3px);
  fill: var(--on-ink);
}

.link-item.is-featured {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}

.link-item.is-featured:hover {
  background: var(--signal-hover);
}

.link-item.is-featured .link-item__icon {
  border-color: rgba(14, 33, 48, 0.3);
}

.link-item.is-featured .link-item__icon svg,
.link-item.is-featured .link-item__arrow svg {
  fill: var(--ink);
}

.link-item.is-featured .link-item__desc {
  color: rgba(14, 33, 48, 0.75);
}

/* ---------- Footer e avviso copia ---------- */
.link-footer {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 16px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.6875rem;
  color: var(--on-ink-3);
}

.link-footer__brand {
  color: var(--on-ink-2);
  font-size: 0.75rem;
}

.link-footer__brand:hover {
  color: var(--signal);
}

.link-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--on-ink);
  color: var(--ink);
  font-size: 0.875rem;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

.link-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Ingresso in sequenza, una volta sola al caricamento */
@media (prefers-reduced-motion: no-preference) {
  .link-hero,
  .link-card,
  .link-item,
  .link-footer {
    animation: link-in 0.6s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 60ms + 80ms);
  }

  .link-hero {
    animation-delay: 0ms;
  }
}

@keyframes link-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
