/* link in bio — /links, /links/vain, /links/monantropo, /links/simone */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&display=swap');

/* ---------- palette per brand ---------- */

:root {
    --bg: #0a0a0a;
    --glow-a: rgba(255, 255, 255, 0.10);
    --glow-b: rgba(255, 255, 255, 0.04);
    --accent-rgb: 255, 255, 255;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.62);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.10);
    --line: rgba(255, 255, 255, 0.10);
    --radius: 16px;
    color-scheme: dark;
}

/* vain: marroni */
[data-brand="vain"] {
    --bg: #0c0907;
    --glow-a: rgba(139, 94, 60, 0.36);
    --glow-b: rgba(96, 62, 38, 0.30);
    --accent-rgb: 199, 154, 107;
}

/* monantropo: rosso / arancione */
[data-brand="monantropo"] {
    --bg: #0b0605;
    --glow-a: rgba(226, 64, 28, 0.30);
    --glow-b: rgba(255, 138, 40, 0.22);
    --accent-rgb: 255, 106, 43;
}

/* simone gandini: nero e bianco */
[data-brand="simone"],
[data-brand="hub"] {
    --bg: #090909;
    --glow-a: rgba(255, 255, 255, 0.11);
    --glow-b: rgba(255, 255, 255, 0.04);
    --accent-rgb: 255, 255, 255;
}

/* ---------- base ---------- */

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

html, body { margin: 0; padding: 0; }

body {
    min-height: 100dvh;
    background: #000;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

/* sfondo desktop: la foto del brand sfocata dietro la colonna */
body::before {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 50% 60%, var(--glow-a), transparent 70%),
        var(--photo, none) center / cover no-repeat,
        #000;
    filter: blur(70px) brightness(0.45);
}

/* ---------- colonna ---------- */

.page {
    position: relative;
    max-width: 460px;
    min-height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
    background:
        radial-gradient(130% 38% at 50% 62%, var(--glow-a), transparent 75%),
        radial-gradient(80% 30% at 0% 88%, var(--glow-b), transparent 72%),
        radial-gradient(80% 30% at 100% 100%, var(--glow-b), transparent 72%),
        var(--bg);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 600px) {
    .page {
        margin: 32px auto;
        min-height: calc(100dvh - 64px);
        border-radius: 28px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
    }
}

/* monantropo si scrive in minuscolo */
[data-brand="monantropo"] .page { text-transform: lowercase; }

/* ---------- hero ---------- */

.hero { position: relative; text-align: center; }

.hero-media {
    aspect-ratio: 1 / 1;
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, #000 35%, rgba(0, 0, 0, 0.45) 68%, transparent 94%);
    mask-image: linear-gradient(to bottom, #000 35%, rgba(0, 0, 0, 0.45) 68%, transparent 94%);
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* nessuna foto ancora caricata: la hero si accorcia */
.hero-media.is-empty { aspect-ratio: auto; height: 150px; }

.hero-body {
    position: relative;
    margin-top: -88px;
    padding: 0 24px;
}

.hero-media.is-empty + .hero-body { margin-top: 0; }

.name {
    margin: 0;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.bio {
    margin: 10px 0 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.86);
    letter-spacing: 0.01em;
}

/* ---------- social ---------- */

.socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.socials:empty { display: none; }

.social {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social:hover { background: var(--glass-hover); transform: translateY(-1px); }

.social .icon { width: 26px; height: 26px; }

/* ---------- icone (maschere svg, prendono il colore del testo) ---------- */

.icon {
    display: block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

/* ---------- box ---------- */

.links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 32px 18px 12px;
    flex: 1;
}

.lk {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 12px 16px 12px 12px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lk:hover {
    background: var(--glass-hover);
    border-color: rgba(var(--accent-rgb), 0.35);
    transform: translateY(-2px);
}

.lk:active { transform: translateY(0) scale(0.99); }

.lk:focus-visible,
.social:focus-visible,
.foot a:focus-visible {
    outline: 2px solid rgba(var(--accent-rgb), 0.9);
    outline-offset: 3px;
}

.lk-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
}

.lk-text { flex: 1; min-width: 0; }

.lk-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.lk-sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.35;
}

.lk-arrow {
    flex: none;
    width: 16px;
    height: 16px;
    opacity: 0.45;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lk:hover .lk-arrow { opacity: 1; transform: translate(2px, -2px); }

/* box in evidenza */

.lk--featured {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.03) 60%),
        var(--glass);
    border-color: rgba(var(--accent-rgb), 0.30);
}

.lk--featured .lk-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.lk--featured .lk-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 14px;
}

.lk--featured .lk-title { font-size: 16px; font-weight: 600; }

.lk-label {
    display: inline-block;
    margin-bottom: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgb(var(--accent-rgb));
    background: rgba(var(--accent-rgb), 0.14);
}

/* hub: quadratino col colore del brand al posto dell'icona */
.lk-swatch {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.lk-swatch--vain { background: radial-gradient(circle at 30% 30%, #b98559, #3a2616); }
.lk-swatch--monantropo { background: radial-gradient(circle at 30% 30%, #ff8a28, #8e1e0c); }
.lk-swatch--simone { background: radial-gradient(circle at 30% 30%, #ffffff, #1a1a1a); }

/* ---------- footer ---------- */

.foot {
    padding: 28px 24px 32px;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
}

.foot a { text-decoration: none; transition: color 0.2s ease; }
.foot a:hover { color: #fff; }
.foot span { margin: 0 6px; opacity: 0.6; }

/* ---------- entrata ---------- */

@media (prefers-reduced-motion: no-preference) {
    .hero-body, .lk {
        animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    }
    .lk { animation-delay: calc(0.12s + var(--i, 0) * 0.05s); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
