:root {
    --bg: #ffffff;
    --text: #1f2540;
    --muted: #6b7390;
    --edge: #e8ecf7;
    --shadow-soft: 10px 14px 28px rgba(88, 101, 160, 0.16);
    --clay-inset: inset 3px 4px 8px #ffffff, inset -4px -5px 10px rgba(110, 124, 180, 0.14);
}

[hidden] { display: none !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: var(--bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.card-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    padding: 8px 12px 32px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
}

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

.tile {
    --c1: #8aa4ff;
    --c2: #4f6cf5;
    --glow: rgba(79, 108, 245, 0.45);
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--c1), var(--c2));
    box-shadow:
        6px 9px 16px var(--glow),
        inset 3px 4px 7px rgba(255, 255, 255, 0.55),
        inset -4px -5px 9px rgba(0, 0, 0, 0.18);
}

.tile svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22));
}

.tile-google { --c1: #ffffff; --c2: #eef1fb; --glow: rgba(100, 116, 170, 0.30); }
.tile-google svg { width: 26px; height: 26px; stroke: none; filter: none; }

.tile-web   { --c1: #5ec8ff; --c2: #1976f2; --glow: rgba(25, 118, 242, 0.40); }
.tile-text  { --c1: #b69bff; --c2: #7a47ee; --glow: rgba(122, 71, 238, 0.40); }
.tile-call  { --c1: #62e68a; --c2: #17ad4b; --glow: rgba(23, 173, 75, 0.40); }
.tile-map   { --c1: #ff8a80; --c2: #e53935; --glow: rgba(229, 57, 53, 0.40); }
.tile-mail  { --c1: #ffc861; --c2: #f57c1f; --glow: rgba(245, 124, 31, 0.40); }
.tile-share { --c1: #4fe3d0; --c2: #0ea5a0; --glow: rgba(14, 165, 160, 0.40); }
.tile-save  { --c1: #ff9bdc; --c2: #c026d3; --glow: rgba(192, 38, 211, 0.38); }

.profile {
    width: 100%;
    background: #fff;
    border: 1px solid var(--edge);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
}

.banner {
    position: relative;
    aspect-ratio: 8 / 3;
    border-radius: 29px 29px 0 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.55), transparent 40%),
        linear-gradient(120deg, #8b7bff 0%, #ff7eb6 55%, #ffc46b 100%);
}

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

.profile-body {
    padding: 0 20px 24px;
    text-align: left;
}

.avatar {
    width: 120px;
    height: 120px;
    margin-top: -60px;
    position: relative;
    border-radius: 50%;
    border: 5px solid #fff;
    background: #eef1ff;
    box-shadow: 8px 12px 22px rgba(88, 101, 160, 0.28), inset -3px -4px 8px rgba(110, 124, 180, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar span {
    font-size: 36px;
    font-weight: 800;
    color: #6a5cf0;
}

.name {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.1px;
    color: var(--text);
}

.verified {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 4px rgba(20, 113, 240, 0.40));
}

.verified .badge {
    fill: url(#vbg);
}

.verified .check {
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subtitle {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #6a5cf0;
}

.description {
    margin-top: 6px;
    max-width: 340px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.hero-buttons {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
}

.btn {
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn svg.fill {
    fill: currentColor;
    stroke: none;
}

.btn:active,
.action:active,
.social:active {
    transform: scale(0.96);
}

.btn-instagram {
    color: #fff;
    background: linear-gradient(145deg, #feda75, #fa7e1e 30%, #d62976 64%, #5b51d8);
    box-shadow:
        6px 9px 18px rgba(214, 41, 118, 0.38),
        inset 3px 4px 7px rgba(255, 255, 255, 0.50),
        inset -4px -5px 9px rgba(80, 20, 90, 0.28);
    text-shadow: 0 1px 2px rgba(80, 20, 60, 0.35);
}

.hero-buttons.single {
    grid-template-columns: 1fr;
}

.btn-whatsapp {
    color: #fff;
    background: linear-gradient(145deg, #5ff08f, #1db954);
    box-shadow:
        6px 9px 18px rgba(29, 185, 84, 0.40),
        inset 3px 4px 7px rgba(255, 255, 255, 0.55),
        inset -4px -5px 9px rgba(0, 80, 30, 0.25);
    text-shadow: 0 1px 2px rgba(0, 80, 30, 0.35);
}

.btn:hover {
    filter: brightness(1.04);
}

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

.action {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 10px;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #f3f5ff);
    border: 1px solid var(--edge);
    box-shadow: 8px 11px 22px rgba(88, 101, 160, 0.14), var(--clay-inset);
    color: var(--text);
    text-decoration: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.action:hover {
    box-shadow: 10px 14px 26px rgba(88, 101, 160, 0.20), var(--clay-inset);
}

.action-label {
    flex: 1;
}

.chev {
    font-size: 26px;
    line-height: 1;
    color: #aab1d1;
    font-weight: 400;
}

.socials {
    width: 100%;
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.socials:empty {
    display: none;
}

.social {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    transition: transform 0.2s ease;
}

.social:hover {
    transform: translateY(-3px);
}

.social svg {
    width: 22px;
    height: 22px;
}

.tile-linkedin svg,
.tile-tiktok svg,
.tile-youtube svg,
.tile-x svg,
.tile-facebook svg,
.tile-pinterest svg {
    stroke: none;
}

.tile-linkedin  { --c1: #3b97e3; --c2: #0a66c2; --glow: rgba(10, 102, 194, 0.40); }
.tile-tiktok    { --c1: #3a3a44; --c2: #0b0b0f; --glow: rgba(0, 0, 0, 0.35); }
.tile-youtube   { --c1: #ff5a5a; --c2: #e00000; --glow: rgba(224, 0, 0, 0.38); }
.tile-x         { --c1: #4a4a52; --c2: #0f0f12; --glow: rgba(0, 0, 0, 0.35); }
.tile-facebook  { --c1: #4c9bff; --c2: #1565e8; --glow: rgba(21, 101, 232, 0.40); }
.tile-pinterest { --c1: #ff4d63; --c2: #d4001f; --glow: rgba(212, 0, 31, 0.38); }

.card-footer {
    width: 100%;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--edge);
    text-align: center;
    font-size: 12px;
    color: #9aa1bd;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.lock {
    font-size: 11px;
}

.card-error {
    padding: 40px 0;
    text-align: center;
    font-weight: 500;
}

@media (max-width: 360px) {
    .name { font-size: 20px; }
    .avatar { width: 104px; height: 104px; margin-top: -52px; }
    .btn { font-size: 12.5px; gap: 6px; white-space: nowrap; }
    .hero-buttons { grid-template-columns: 1fr 1fr; }
    .hero-buttons { gap: 10px; }
}

@media (min-width: 640px) {
    body {
        background: linear-gradient(160deg, #f4f6ff 0%, #ffffff 45%, #fff5fa 100%) fixed;
    }

    .card-page { padding-top: 32px; padding-bottom: 48px; }
    .card { max-width: 620px; }

    .profile-body { padding: 0 32px 32px; }
    .avatar { width: 140px; height: 140px; margin-top: -70px; }
    .avatar span { font-size: 42px; }
    .name { font-size: 28px; }
    .verified { width: 26px; height: 26px; }
    .subtitle { font-size: 15px; }
    .description { max-width: 460px; font-size: 14px; }
    .hero-buttons { margin-top: 24px; }

    .actions {
        margin-top: 26px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .action:hover { transform: translateY(-2px); }
    .btn:hover { transform: translateY(-1px); }
}

@media (min-width: 960px) {
    .card-page {
        align-items: center;
        padding: 48px 32px;
    }

    .card {
        max-width: 1020px;
        display: grid;
        grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
        grid-template-rows: auto auto 1fr auto;
        column-gap: 36px;
        align-items: start;
    }

    .profile {
        grid-column: 1;
        grid-row: 1 / 5;
        position: sticky;
        top: 32px;
    }

    .actions {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
        align-content: start;
    }

    .socials {
        grid-column: 2;
        grid-row: 2;
        margin-top: 28px;
        justify-content: flex-start;
    }

    .card-footer {
        grid-column: 2;
        grid-row: 4;
        align-self: end;
        margin-top: 28px;
    }

    .card-error { grid-column: 1 / -1; }

    .profile-body { padding: 0 28px 32px; }
    .description { max-width: none; }
}

@media (min-width: 1400px) {
    .card { max-width: 1120px; grid-template-columns: 420px minmax(0, 1fr); }
    .action { font-size: 16px; }
}

@media (max-height: 640px) and (min-width: 960px) {
    .profile { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

.card.slim { max-width: 480px; }
.card.slim .actions { display: flex; flex-direction: column; gap: 14px; }

@media (min-width: 640px) {
    .card.slim { max-width: 520px; }
}

@media (min-width: 960px) {
    .card.slim {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 520px;
    }
    .card.slim .profile { position: static; grid-column: auto; grid-row: auto; }
    .card.slim .actions,
    .card.slim .socials,
    .card.slim .card-footer { grid-column: auto; grid-row: auto; }
    .card.slim .actions { margin-top: 24px; width: 100%; }
    .card.slim .socials { justify-content: center; margin-top: 24px; }
    .card.slim .card-footer { align-self: stretch; }
}
