/* ==========================================================================
   Zenh link hub
   Nova cosmic identity, same palette as recraft.fr.
   Author: zenh
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
    font-family: 'Nunito';
    src: url('../fonts/nunito-latin.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito';
    src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Sora';
    src: url('../fonts/sora-latin.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Sora';
    src: url('../fonts/sora-latin-ext.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Nova palette (recraft.fr) ---------- */
:root {
    --primary: #6d28d9;
    --primary-light: #8b5cf6;
    --primary-dark: #4c1d95;
    --primary-glow: rgba(109, 40, 217, 0.3);
    --accent: #fbbf24;
    --bg-dark: #0c0c1d;
    --bg-card: #111128;
    --bg-card-hover: #161636;
    --text-primary: #e8e8f0;
    --text-secondary: #9d9dba;
    --text-muted: #8a8ab0;
    --border-color: #1e1e40;
    --border-light: #2a2a55;
    --nova-grad: linear-gradient(100deg, var(--primary-light), var(--accent));
    --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.32, 0.64, 1);
    --radius: 14px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Starfield: two layered radial-gradient tile patterns, pure CSS. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 25px 45px, rgba(232, 232, 240, 0.55) 50%, transparent 51%),
        radial-gradient(1.4px 1.4px at 130px 170px, rgba(139, 92, 246, 0.45) 50%, transparent 51%);
    background-size: 190px 190px, 270px 270px;
}

/* Soft violet orb behind the profile header. */
body::after {
    content: "";
    position: fixed;
    top: -140px;
    left: 50%;
    width: 460px;
    height: 460px;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.32), transparent 68%);
}

.page {
    max-width: 480px;
    margin: 0 auto;
    padding: 2.2rem 1rem 1.6rem;
}

a { color: var(--primary-light); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Profile header ---------- */
.profile {
    text-align: center;
    margin-bottom: 1.4rem;
}

.avatar-ring {
    position: relative;
    z-index: 0;
    display: inline-block;
    padding: 3px;
    border-radius: 50%;
    background: var(--nova-grad);
}

/* Soft halo behind the avatar, drifting slowly for a subtle sense of life.
   Sits inside the ring's own stacking context so it never bleeds behind the
   page background. Composited: only transform and opacity animate. */
.avatar-ring::before {
    content: "";
    position: absolute;
    inset: -16px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 68%);
    animation: avatar-float 7s ease-in-out infinite;
    will-change: transform, opacity;
    pointer-events: none;
}

@keyframes avatar-float {
    0%, 100% { transform: translateY(-5px) scale(0.97); opacity: 0.75; }
    50%      { transform: translateY(5px) scale(1.06); opacity: 1; }
}

.avatar-ring img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    object-fit: cover;
}

.profile-name {
    margin: 0.7rem 0 0.25rem;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--primary-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: name-sheen 6s linear infinite;
}

@keyframes name-sheen {
    to { background-position: 200% center; }
}

.profile-bio {
    margin: 0 auto;
    max-width: 34ch;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- Contact call to action ---------- */
/* Rendered only when the owner has filled the email field in the panel.
   A pill in the Nova palette, gold mail glyph, lifting on hover like the
   cards and social pills so every interactive element reads the same way. */
.profile-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding: 0.5rem 1.15rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: transform 0.25s var(--ease-spring), border-color 0.2s ease,
                box-shadow 0.2s ease, background 0.2s ease;
}

.profile-contact svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.profile-contact:hover,
.profile-contact:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary-light);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.profile-contact:active {
    transform: translateY(0) scale(0.97);
}

/* ---------- Social pills (row above the footer) ---------- */
.socials-bottom {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin: 2.1rem 0 0;
    padding: 0;
    list-style: none;
}

.social-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.25s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-pill svg {
    width: 20px;
    height: 20px;
}

.social-pill:hover,
.social-pill:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary-light);
    box-shadow: 0 0 18px var(--primary-glow);
}

/* ---------- Link cards ---------- */
.links {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    position: relative;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.3s var(--ease-spring), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.card:hover,
.card:focus-within {
    transform: translateY(-3px);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 26px var(--primary-glow);
}

/* The whole card fills with a ring, so tuck the anchor's outline just inside
   the rounded edge instead of letting it float outside the card. */
.card-link:focus-visible {
    outline-offset: -4px;
    border-radius: var(--radius);
}

.card-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    color: inherit;
    text-decoration: none;
    border-radius: inherit;
}

.card-thumb {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    /* A very subtle neutral tint, never the near-black --bg-dark: an uploaded
       transparent logo shows the card colour through it and blends in instead
       of sitting on a dark square. Opaque photo thumbs cover it entirely. */
    background: rgba(255, 255, 255, 0.04);
}

.card-body { min-width: 0; flex: 1; }

.card-title {
    display: block;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-subtitle {
    display: block;
    margin-top: 0.1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.card-chevron {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.25s var(--ease-out), color 0.2s ease;
}

.card:hover .card-chevron {
    transform: translateX(3px);
    color: var(--accent);
}

/* Discreet partner tag, top right corner. */
.tag {
    position: absolute;
    top: -0.55em;
    right: 12px;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}

/* ---------- Link chips ---------- */
/* A chip sits under a card. Two modes share the same pill so the page reads
   as one system; only the glyph and behaviour differ:
     .js-copy   copies its value on click (tracker toggles .copied)
     .card-chip-link is an anchor to an outbound URL
   .code-chip is kept as an alias for the copy pill's legacy markup. */
.js-copy,
.card-chip-link,
.code-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0.9rem 0.8rem 4.7rem;
    padding: 0.3rem 0.72rem;
    border: 1px dashed var(--border-light);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
                transform 0.14s var(--ease-spring);
}

.js-copy strong,
.code-chip strong {
    color: var(--accent);
    letter-spacing: 0.05em;
}

.js-copy svg,
.card-chip-link svg,
.code-chip svg {
    width: 13px;
    height: 13px;
    flex: none;
}

.js-copy:hover,
.js-copy:focus-visible,
.code-chip:hover,
.code-chip:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent);
    background: rgba(251, 191, 36, 0.06);
}

/* Link mode reads as a small tappable button: solid edge, violet accent. */
.card-chip-link {
    border-style: solid;
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
}

.card-chip-link svg {
    color: var(--primary-light);
}

.card-chip-link:hover,
.card-chip-link:focus-visible {
    border-color: var(--primary-light);
    background: rgba(139, 92, 246, 0.16);
    box-shadow: 0 0 16px var(--primary-glow);
}

/* Discount badge on a promo code chip, e.g. -10%. Solid gold pill so the
   saving reads at a glance next to the code. */
.card-chip-percent {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--accent);
    color: #2a1a00;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* Springy press feedback on both chip modes. */
.js-copy:active,
.card-chip-link:active,
.code-chip:active {
    transform: scale(0.95);
}

/* Copied confirmation: the tracker adds .copied for ~1.5s. The pill's own
   content fades to transparent and a French label is laid over it, so the
   box keeps its size and nothing reflows. */
.js-copy.copied,
.code-chip.copied {
    border-style: solid;
    border-color: var(--accent);
    color: transparent;
}

.js-copy.copied svg,
.code-chip.copied svg,
.js-copy.copied strong,
.code-chip.copied strong,
.js-copy.copied .card-chip-percent {
    color: transparent;
    opacity: 0;
}

.js-copy.copied::after,
.code-chip.copied::after {
    content: "Copié !";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.03em;
    pointer-events: none;
}

/* ---------- Featured card (Re:Craft) ---------- */
.card-featured {
    /* isolate contains the pulse pseudo's stacking context, so its glow sits
       behind the card without a z-index that could escape the layout. */
    isolation: isolate;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-card-hover), var(--bg-card-hover)) padding-box,
        var(--nova-grad) border-box;
}

/* Soft glow that breathes around the featured border. Only opacity animates,
   so it stays on the compositor and never triggers layout. */
.card-featured::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 30px var(--primary-glow);
    opacity: 0.6;
    animation: featured-pulse 3.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes featured-pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.95; }
}

.card-featured:hover,
.card-featured:focus-within {
    background:
        linear-gradient(var(--bg-card-hover), var(--bg-card-hover)) padding-box,
        var(--nova-grad) border-box;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 40px rgba(139, 92, 246, 0.4);
}

.card-featured .card-link { padding: 1.1rem 1rem; }

.card-featured .card-thumb {
    width: 72px;
    height: 72px;
    border-radius: 14px;
}

.card-featured .card-title { font-size: 1.15rem; }

.chip-featured {
    display: inline-block;
    margin-bottom: 0.3rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    background: var(--nova-grad);
    color: #14061f;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ---------- Footer (minimal: mark + year) ---------- */
.footer {
    margin-top: 1.6rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-mark {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

/* ---------- Entrance animation, staggered fade-up ---------- */
.profile,
.card,
.socials-bottom,
.footer {
    animation: fade-up 0.55s var(--ease-out) both;
}

.links .card:nth-child(1) { animation-delay: 0.10s; }
.links .card:nth-child(2) { animation-delay: 0.16s; }
.links .card:nth-child(3) { animation-delay: 0.22s; }
.links .card:nth-child(4) { animation-delay: 0.28s; }
.links .card:nth-child(5) { animation-delay: 0.34s; }
.links .card:nth-child(6) { animation-delay: 0.40s; }
.socials-bottom { animation-delay: 0.46s; }
.footer { animation-delay: 0.52s; }

/* Fade in with a slight rise and scale; transform/opacity only. */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile, .card, .socials-bottom, .footer,
    .profile-name,
    .avatar-ring::before,
    .card-featured::before { animation: none; }
    .card, .social-pill, .card-chevron,
    .profile-contact, .js-copy, .card-chip-link, .code-chip { transition: none; }
    .card:hover, .card:focus-within,
    .social-pill:hover, .social-pill:focus-visible,
    .profile-contact:hover, .profile-contact:focus-visible { transform: none; }
    /* Keep the glows as calm static states rather than removing them. */
    .avatar-ring::before { transform: none; opacity: 0.85; }
    .card-featured::before { opacity: 0.6; }
}

/* ---------- Slightly wider screens ---------- */
@media (min-width: 480px) {
    .page { padding-top: 3rem; }
    .profile-name { font-size: 1.9rem; }
}

/* Honeypot anchor: physically present for HTML parsers, absent for people.
   Any visitor that follows it is discarded from the statistics. */
.lh-skip {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
