/* social.tid.swiss · la pagina "link in bio" di TID.
   Stesso linguaggio del sito: hero teal radiale, griglia cyan, glifo TID in
   wireframe, eyebrow in mono, angoli vivi con taglio a 45°, CTA principale
   arancio sempre a destra. Pensata prima per il telefono (si apre dall'app). */

@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('fonts/sora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('fonts/sora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 800; font-display: swap; src: url('fonts/sora-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --blu-700: #0033A0;
  --teal-600: #007FA3;
  --cyan-600: #00B0B9;
  --cyan-400: #5DD3D9;
  --cyan-300: #8FE0E5;
  --arancio: #FF6B35;
  --arancio-700: #E55A2B;
  --graphite-900: #0F1E2E;
  --ice: #F5F9FA;
  --testo: rgba(212, 232, 236, .82);
  --linea: rgba(143, 224, 229, .2);
  --card: rgba(255, 255, 255, .05);
  --taglio: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  /* Lo stesso taglio rientrato di 1px: il riempimento sta dentro, il fondo esterno fa da bordo
     e il filo segue anche le diagonali (un border CSS verrebbe tagliato dal clip-path). */
  --taglio-in: polygon(0 0, calc(100% - 17.6px) 0, 100% 17.6px, 100% 100%, 17.6px 100%, 0 calc(100% - 17.6px));
  --filo: rgba(143, 224, 229, .3);
  --filo-forte: rgba(143, 224, 229, .6);
  --tile: #0c2a36;
  --tile-hover: #11343f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
  color: #fff; -webkit-font-smoothing: antialiased;
  background-color: #001f2a;
  background-image:
    linear-gradient(to right, rgba(0,176,185,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,176,185,.06) 1px, transparent 1px),
    radial-gradient(ellipse 120% 60% at 70% 0%, #004b62 0%, #002f3f 45%, #001621 90%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-attachment: scroll;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Sfondo: bagliore cyan e glifo TID in wireframe, come l'hero del sito. */
.bg { position: absolute; inset: 0 0 auto 0; height: 620px; overflow: hidden; pointer-events: none; z-index: 0; }
.flare { position: absolute; width: 620px; height: 620px; right: -240px; top: -200px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,176,185,.22), rgba(0,176,185,.05) 45%, transparent 70%); filter: blur(20px); }
.glyph { position: absolute; width: 360px; right: -130px; top: 30px; opacity: .32; }

.wrap { position: relative; z-index: 1; max-width: 480px; margin: 0 auto;
  padding: 36px 18px calc(110px + env(safe-area-inset-bottom)); }

.crumbs, .eyebrow, .annot, .micro, .spaced, .tile-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500; text-transform: uppercase;
}
.eyebrow { display: block; font-size: 11px; letter-spacing: .18em; color: var(--cyan-400); }
h2 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.acc { color: var(--cyan-300); }
.text { font-size: 15px; line-height: 1.6; color: var(--testo); }

/* Testata come un profilo: mark, logo, una riga, social */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar { position: relative; isolation: isolate; display: grid; place-items: center; width: 84px; height: 84px;
  background: rgba(143, 224, 229, .55); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.avatar::before { content: ""; position: absolute; inset: 1px; z-index: -1;
  /* Digital Blue del brand: si stacca dal fondo teal; il graphite, quasi nero, sembrava un vuoto. */
  background: linear-gradient(140deg, #0033A0 0%, #0a3fb0 55%, #005f8f 100%);
  clip-path: polygon(0 0, calc(100% - 13.6px) 0, 100% 13.6px, 100% 100%, 13.6px 100%, 0 calc(100% - 13.6px)); }
.avatar img { width: 44px; height: 44px; }
.logo { height: 22px; width: auto; margin-top: 16px; }
.crumbs { margin-top: 10px; font-size: 10.5px; letter-spacing: .22em; color: var(--testo); }
.crumbs b { font-weight: 500; color: #fff; }
.bio { margin-top: 14px; max-width: 34ch; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 19px;
  line-height: 1.3; letter-spacing: -.015em; text-wrap: balance; }
.social { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--linea);
  text-decoration: none; color: #fff; transition: background .2s, border-color .2s; }
.social a:hover { background: rgba(255,255,255,.06); border-color: var(--cyan-400); }

/* Annotazione tecnica con linea: separa i gruppi di link */
.annot { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; font-size: 10.5px; letter-spacing: .2em; color: var(--cyan-400); }
.annot .ln { flex: 1; height: 1px; background: var(--linea); }

/* I bottoni-link, uno sotto l'altro a tutta larghezza (stile link in bio) */
.tiles { display: grid; gap: 10px; }
.tile { position: relative; isolation: isolate; display: grid; grid-template-columns: 42px 1fr 16px; align-items: center; gap: 14px;
  /* Altezza fissa: tutti i bottoni uguali, qualunque sia il testo. */
  height: 72px; margin-bottom: 10px; padding: 0 16px 0 14px; text-decoration: none;
  background: var(--filo); clip-path: var(--taglio);
  transition: background .2s cubic-bezier(.22,1,.36,1); }
.tile::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--tile);
  clip-path: var(--taglio-in); transition: background .2s cubic-bezier(.22,1,.36,1); }
.tiles .tile { margin-bottom: 0; }
.tile:hover { background: var(--filo-forte); }
.tile:hover::before { background: var(--tile-hover); }
.tile:active { transform: translateY(1px); }
.ico { display: grid; place-items: center; width: 42px; height: 42px; background: rgba(0,176,185,.14); color: var(--cyan-300); font-size: 16px;
  /* Angolo in basso a sinistra tagliato a 45°, parallelo al taglio del bottone. */
  --cut-ico: 10px; clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut-ico) 100%, 0 calc(100% - var(--cut-ico))); }
.tile-body { display: grid; gap: 2px; min-width: 0; }
.tile-title, .tile-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 16.5px; line-height: 1.25; letter-spacing: -.01em; }
.tile-sub { font-size: 13px; line-height: 1.4; color: var(--testo); }
.tile .go { color: var(--cyan-300); font-size: 13px; transition: transform .2s; }
.tile:hover .go { transform: translateX(3px); }

/* Bottoni: angoli vivi, la CTA principale (arancio) sta sempre a destra. */
.btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 14px 18px; border: 0; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 15px; line-height: 1; text-decoration: none;
  transition: background .2s cubic-bezier(.22,1,.36,1), border-color .2s;
}
.btn.site { background: var(--arancio); color: #fff; }
.btn.site:hover { background: var(--arancio-700); }
.btn.outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.8); }
.btn.outline:hover { background: rgba(255,255,255,.08); }
.btn:focus-visible, .tile:focus-visible, .social a:focus-visible, input:focus-visible, .linklike:focus-visible, .chiudi:focus-visible {
  outline: 2px solid var(--cyan-600); outline-offset: 2px;
}

/* Barra delle CTA, sempre visibile in basso */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 22, 33, .82); border-top: 1px solid var(--linea);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.dock-in { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; max-width: 480px; margin: 0 auto; }
.dock .btn { width: 100%; }

/* Pannello newsletter dal basso */
.sheet { margin: auto auto 0; width: 100%; max-width: 480px; max-height: 92vh; padding: 0; border: 0;
  background: transparent; color: var(--graphite-900); overflow: visible; }
.sheet::backdrop { background: rgba(0, 12, 20, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet[open] .sheet-in { animation: sale .32s cubic-bezier(.22,1,.36,1); }
@keyframes sale { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-in { position: relative; max-height: 92vh; overflow-y: auto; padding: 30px 22px calc(24px + env(safe-area-inset-bottom));
  background: var(--ice); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
.chiudi { position: absolute; top: 14px; right: 26px; width: 40px; height: 40px; border: 0; background: transparent;
  color: var(--graphite-900); font-size: 18px; cursor: pointer; }

/* Newsletter: contenuto del pannello */
.sheet .spaced { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .5em; color: var(--teal-600); }
.sheet h2 { margin-top: 12px; }
.sheet .acc { color: var(--blu-700); }
.sheet .text { margin-top: 10px; color: #455667; }
form { margin-top: 20px; display: grid; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: #455667; }
input:not([type=checkbox]) { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #C9D3DC; border-radius: 0; background: #fff;
  font: 400 16px/1 'Inter', sans-serif; color: var(--graphite-900); }
input:not([type=checkbox]):focus { border-color: var(--blu-700); outline: none; box-shadow: 0 0 0 1px var(--blu-700); }
.check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--blu-700); }
.check a { color: var(--blu-700); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 1em; font-size: 13.5px; color: #C2341B; }
.sheet .btns { margin-top: 4px; }
.done { margin-top: 18px; }
.done .eyebrow { color: var(--teal-600); }
.done-title { margin-top: 8px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.02em; }

/* Piede */
.foot { margin-top: 30px; }
.legal { margin-top: 14px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--testo); }
.legal a, .linklike { color: var(--testo); text-decoration: underline; text-underline-offset: 3px; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; }

@media (max-width: 360px) {
  .grid2 { grid-template-columns: 1fr; }
  /* Telefoni stretti: stessa altezza, icona e spazi più piccoli perché il testo stia in una riga. */
  .tile { grid-template-columns: 34px 1fr 14px; gap: 10px; padding: 0 12px 0 10px; }
  .ico { width: 34px; height: 34px; font-size: 14px; --cut-ico: 8px; }
  .tile-title { font-size: 15.5px; }
  .tile-sub { font-size: 12px; }
  .dock .btn { padding: 14px 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
