/* =========================================================
   Dra. Ale Francisqueto — Bio Links
   Palette: #9ecbc4 (mint), #b4787c (dusty rose), #ebece9 (bg)
   ========================================================= */

:root {
    --mint: #9ecbc4;
    --mint-soft: #c6e0dc;
    --mint-deep: #6fa9a0;
    --rose: #b4787c;
    --rose-soft: #d9a9ac;
    --bg: #ebece9;
    --bg-soft: #f4f5f2;
    --surface: #ffffff;
    --ink: #2c3a3a;
    --ink-soft: #5b6a6a;
    --line: rgba(44, 58, 58, 0.08);
    --shadow-sm: 0 2px 6px rgba(44, 58, 58, 0.06);
    --shadow-md: 0 10px 24px -10px rgba(44, 58, 58, 0.18);
    --shadow-lg: 0 24px 50px -20px rgba(44, 58, 58, 0.22);
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    --tap: 0.08s ease;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100%;
    line-height: 1.5;
}

body {
    /* soft pediatric backdrop using the palette */
    background:
        radial-gradient(900px 600px at 50% -10%, rgba(158, 203, 196, 0.45), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(180, 120, 124, 0.18), transparent 60%),
        radial-gradient(600px 400px at 0% 100%, rgba(158, 203, 196, 0.20), transparent 60%),
        var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 110px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* =========================================================
   Layout & card
   ========================================================= */
.page {
    width: 100%;
    display: flex;
    justify-content: center;
    animation: page-fade 0.55s var(--ease) both;
}

.card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: 28px 22px 22px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 140px;
    background: linear-gradient(180deg, rgba(158, 203, 196, 0.55), rgba(158, 203, 196, 0));
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   Profile
   ========================================================= */
.profile {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding-top: 4px;
}

.avatar-ring {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 220deg, var(--mint), var(--rose-soft), var(--mint));
    box-shadow: var(--shadow-md);
    display: grid;
    place-items: center;
    animation: avatar-pop 0.6s var(--ease) both;
}

.avatar {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    border: 3px solid var(--surface);
    display: block;
}

.name {
    margin: 8px 0 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.bio {
    margin: 0;
    font-size: 14.5px;
    color: var(--ink-soft);
    max-width: 30ch;
}

.badge {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(180, 120, 124, 0.10);
    color: var(--rose);
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid rgba(180, 120, 124, 0.18);
}

/* =========================================================
   Link buttons
   ========================================================= */
.links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}

.link-btn {
    --btn-bg: #ffffff;
    --btn-fg: var(--ink);
    --btn-icon-bg: rgba(158, 203, 196, 0.18);
    --btn-icon-fg: var(--mint-deep);
    --btn-border: rgba(44, 58, 58, 0.08);

    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
    overflow: hidden;
    animation: btn-rise 0.5s var(--ease) both;
}

.link-btn:nth-child(1) { animation-delay: 0.05s; }
.link-btn:nth-child(2) { animation-delay: 0.14s; }
.link-btn:nth-child(3) { animation-delay: 0.22s; }

.link-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
    pointer-events: none;
}

.link-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.link-btn:hover::after { transform: translateX(120%); }
.link-btn:active { transform: translateY(0) scale(0.985); transition-duration: var(--tap); }

.link-btn:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 3px;
}

.link-btn__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--btn-icon-bg);
    color: var(--btn-icon-fg);
    display: grid;
    place-items: center;
}

.link-btn__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.link-btn__label {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.25;
    min-width: 0;
}

.link-btn__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--btn-fg);
    letter-spacing: -0.005em;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.link-btn__sub {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-soft);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.link-btn__chev {
    flex: 0 0 auto;
    color: var(--ink-soft);
    opacity: 0.7;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.link-btn:hover .link-btn__chev {
    transform: translateX(3px);
    opacity: 1;
}

/* Primary (guide) button — mint */
.link-btn--primary {
    --btn-bg: linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
    --btn-icon-bg: rgba(158, 203, 196, 0.22);
    --btn-icon-fg: var(--mint-deep);
}

/* WhatsApp — keep neutral icon container with mint tone */
.link-btn--whatsapp {
    --btn-icon-bg: rgba(158, 203, 196, 0.25);
    --btn-icon-fg: #2f7d6e;
}

/* Instagram — rose tone */
.link-btn--instagram {
    --btn-icon-bg: rgba(180, 120, 124, 0.15);
    --btn-icon-fg: var(--rose);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: 12px;
}

.footer p { margin: 0; }

/* =========================================================
   Cookie banner
   ========================================================= */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%) translateY(120%);
    width: min(94vw, 460px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    z-index: 30;
    opacity: 0;
    transition: transform 0.45s var(--ease), opacity 0.35s var(--ease);
}

/* keep the cookie banner clear of the fixed Emergent badge (bottom-right) */
@media (max-width: 520px) {
    .cookie-banner { bottom: 70px; }
}

.cookie-banner[data-visible="true"] {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-banner__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.cookie-banner__text p {
    margin: 0;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.45;
}

.cookie-banner__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* =========================================================
   Buttons (modal/banner)
   ========================================================= */
.btn {
    appearance: none;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.005em;
    transition: transform 0.18s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
    line-height: 1;
    min-height: 40px;
}

.btn:active { transform: scale(0.97); }
.btn:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 2px;
}

.btn--solid {
    background: var(--mint);
    color: #0f3a35;
    box-shadow: 0 6px 14px -6px rgba(111, 169, 160, 0.7);
}
.btn--solid:hover {
    background: var(--mint-deep);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn--ghost:hover {
    background: rgba(44, 58, 58, 0.04);
}

/* =========================================================
   Cookie modal
   ========================================================= */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.cookie-banner[hidden],
.cookie-modal[hidden] { display: none !important; }

.cookie-modal[data-visible="true"] {
    opacity: 1;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 58, 58, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cookie-modal__dialog {
    position: relative;
    width: min(94vw, 460px);
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 22px 20px 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.35s var(--ease);
}

.cookie-modal[data-visible="true"] .cookie-modal__dialog {
    transform: translateY(0) scale(1);
}

.cookie-modal__close {
    position: absolute;
    top: 10px; right: 10px;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--ink-soft);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid; place-items: center;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cookie-modal__close:hover { background: rgba(44, 58, 58, 0.06); color: var(--ink); }

.cookie-modal__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

.cookie-modal__text {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.5;
}

.cookie-options {
    border: 0;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.cookie-option:hover { border-color: rgba(158, 203, 196, 0.55); }

.cookie-option input {
    margin: 2px 0 0;
    accent-color: var(--mint-deep);
    flex: 0 0 auto;
}

.cookie-option__box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cookie-option__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.cookie-option__sub {
    font-size: 12px;
    color: var(--ink-soft);
}

.cookie-option:has(input:checked) {
    border-color: var(--mint-deep);
    background: rgba(158, 203, 196, 0.12);
}

.cookie-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* =========================================================
   Body lock when modal open
   ========================================================= */
body.is-modal-open { overflow: hidden; }

/* =========================================================
   Animations
   ========================================================= */
@keyframes page-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes avatar-pop {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes btn-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* =========================================================
   Tiny phones tuning
   ========================================================= */
@media (max-width: 360px) {
    .card { padding: 22px 16px 18px; }
    .link-btn__title { font-size: 14px; }
    .link-btn__sub { font-size: 11.5px; }
    .name { font-size: 20px; }
}

/* =========================================================
   Larger screens — keep narrow, centered
   ========================================================= */
@media (min-width: 768px) {
    body { padding-top: 56px; }
}
