:root {
    --accent: #a5cfc5;
    --bg: #eef4f2;
    --text: #1f2a28;
    --muted: #64726e;
    --card: #ffffff;
    --border: #e5ebe9;
}

* { box-sizing: border-box; }

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

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 55%, white), transparent 60%),
        var(--bg);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 620px;
    margin: 0 auto;
    padding: 40px 18px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 32px rgba(31, 42, 40, 0.14);
    margin-bottom: 8px;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-share {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(31, 42, 40, 0.15);
    transition: transform .15s ease, background .15s ease;
}

.cover-share:hover { transform: translateY(-2px); background: #fff; }

/* When a cover exists, the avatar tucks under it as a smaller badge */
.cover + .avatar {
    width: 92px;
    height: 92px;
    margin-top: -52px;
    position: relative;
    z-index: 2;
}

.avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 42, 40, 0.12);
    border: 4px solid #fff;
    display: grid;
    place-items: center;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.avatar-placeholder {
    font-size: 44px;
    font-weight: 700;
    color: var(--accent);
}

.company-name {
    margin: 18px 0 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.description {
    margin: 10px 0 0;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

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

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(31, 42, 40, 0.05);
    transition: transform .15s ease, color .15s ease, background .15s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    color: #fff;
    background: var(--accent);
}

.links {
    width: 100%;
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 14px rgba(31, 42, 40, 0.06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 42, 40, 0.12);
}

.link-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    overflow: hidden;
    background: color-mix(in srgb, var(--accent) 30%, white);
    display: grid;
    place-items: center;
}

.link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-icon-fallback {
    font-weight: 700;
    color: var(--text);
    font-size: 18px;
}

.link-icon i {
    font-size: 20px;
    color: var(--text);
}

.link-title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 15.5px;
    font-weight: 600;
    padding: 0 6px;
}

.link-chevron {
    flex: 0 0 auto;
    color: var(--muted);
    display: grid;
    place-items: center;
}

.empty {
    color: var(--muted);
    font-size: 14px;
}

.share-btn {
    margin-top: 26px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

.share-btn:hover { transform: translateY(-2px); opacity: .92; }

.footer {
    margin-top: 40px;
    font-size: 13px;
    color: var(--muted);
}

/* Share sheet */
.share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 28, 26, 0.45);
    display: grid;
    place-items: end center;
    z-index: 50;
    padding: 0;
}

.share-overlay[hidden] { display: none; }

.share-sheet {
    width: 100%;
    max-width: 620px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
    animation: slideUp .2s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.share-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.share-sheet-head button {
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.share-copy {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.share-copy input {
    flex: 1;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #f7faf9;
    color: var(--text);
}

.share-copy button {
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--text);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.share-networks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-networks a {
    flex: 1 1 auto;
    text-align: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    min-width: 90px;
}

.share-networks a:hover { background: #f2f7f5; }

@media (min-width: 640px) {
    .share-overlay { place-items: center; padding: 20px; }
    .share-sheet { border-radius: 20px; }
}
