/* Coen J. Voskuilen · digital business card
   Colors and type follow the Foxwise brand guidelines v2.0 */

:root {
    --coral: #E5533D;
    --blue: #144A85;
    --blue-deep: #0D3260;
    --green: #0C8464;
    --green-hover: #0A6B52;
    --ivory: #F4F0E6;
    --ink: #22262E;
    --mist: #8B93A6;
    --cloud: #E9E5D9;

    --text: var(--ivory);
    --text-soft: #C3CCDB;
    --surface: rgba(244, 240, 230, 0.07);
    --surface-hover: rgba(244, 240, 230, 0.12);
    --line: rgba(244, 240, 230, 0.14);

    --radius: 18px;
    --font-head: "Sora", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--blue-deep);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Deep-blue field with a coral arc, a nod to the wordmark's connecting line */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 70% at 50% 0%, #1A5A9E 0%, var(--blue) 38%, var(--blue-deep) 100%);
    overflow: hidden;
}
.backdrop::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -340px;
    width: 760px;
    height: 520px;
    transform: translateX(-50%) rotate(-8deg);
    border-radius: 50%;
    border: 2px solid var(--coral);
    border-color: var(--coral) transparent transparent transparent;
    opacity: 0.35;
}

a { color: inherit; }

button { font: inherit; color: inherit; }

.sprite { position: absolute; }

.ico { width: 22px; height: 22px; flex: none; }

:focus-visible {
    outline: 3px solid var(--ivory);
    outline-offset: 3px;
    border-radius: 12px;
}

.card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: max(40px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

/* Profile ---------------------------------------------------------------- */
.profile { text-align: center; }

.avatar {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    border-radius: 22px;
    box-shadow: 0 0 0 4px rgba(244, 240, 230, 0.10), 0 18px 40px rgba(5, 20, 45, 0.45);
}

h1 {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.org {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 15px;
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
}
.tags li {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-soft);
}
.tags li:first-child { border-color: rgba(229, 83, 61, 0.6); color: var(--ivory); }

/* Primary call to action (green = "click here", per brand rules) ---------- */
.btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    margin-top: 32px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(4, 40, 30, 0.35);
    transition: background-color .2s ease, transform .2s ease;
}
.btn-cta:hover { background: var(--green-hover); }
.btn-cta:active { transform: scale(0.98); }
.btn-cta[disabled] { opacity: .6; cursor: progress; }

.hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
}

/* Quick actions ------------------------------------------------------------ */
.quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 28px;
}
.quick a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color .2s ease;
}
.quick a:hover { background: var(--surface-hover); }

/* Link list --------------------------------------------------------------- */
.links {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
}
.links li + li { border-top: 1px solid var(--line); }
.links a,
.links button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    border: 0;
    background: none;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease;
}
.links a:hover,
.links button:hover { background: var(--surface-hover); }
.links span { flex: 1; min-width: 0; }
.links strong { display: block; font-weight: 600; font-size: 15px; }
.links small { display: block; font-size: 13px; color: var(--text-soft); }
.links .chev { width: 18px; height: 18px; color: var(--text-soft); flex: none; transition: transform .2s ease; }
.links button[aria-expanded="true"] .chev { transform: rotate(90deg); }

/* Contact form ------------------------------------------------------------- */
.panel {
    margin-top: 12px;
    padding: 22px 18px 18px;
    border-radius: var(--radius);
    background: var(--ivory);
    color: var(--ink);
}
.panel h2 {
    margin: 0 0 14px;
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 600;
    color: var(--blue);
}
.panel label { display: block; margin-bottom: 12px; }
.panel label > span {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.panel label em { font-style: normal; font-weight: 400; color: #5C6475; }
.panel input,
.panel textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #CFC9B8;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px; /* prevents iOS zoom on focus */
}
.panel textarea { resize: vertical; min-height: 120px; }
.panel input:focus,
.panel textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 74, 133, 0.18);
}
.panel input[aria-invalid="true"],
.panel textarea[aria-invalid="true"] { border-color: var(--coral); }
.panel .btn-cta { margin-top: 6px; box-shadow: none; }
.panel :focus-visible { outline-color: var(--blue); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.turnstile { margin: 4px 0 8px; }

.status { min-height: 1.5em; margin: 12px 0 0; font-size: 14px; font-weight: 500; text-align: center; }
.status.is-error { color: #B3341F; }
.status.is-ok { color: var(--green); }

.fine { margin: 10px 0 0; font-size: 12px; color: #5C6475; text-align: center; }
.fine a { color: var(--blue); }

.panel.is-sent form > :not(.status) { display: none; }
.panel.is-sent .status { font-size: 16px; margin: 0; }

/* Share / QR ----------------------------------------------------------------- */
.utility {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}
.utility button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.utility button:hover { background: var(--surface); }
.utility .ico { width: 18px; height: 18px; }

/* Footer ------------------------------------------------------------------- */
.foot {
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
}
.wordmark { display: inline-block; padding: 8px; }
.wordmark img { display: block; width: 150px; height: auto; }
.foot p { margin: 6px 0 0; }

/* QR dialog ------------------------------------------------------------------ */
dialog {
    width: min(340px, calc(100vw - 32px));
    padding: 28px 24px 22px;
    border: 0;
    border-radius: 24px;
    background: var(--ivory);
    color: var(--ink);
    text-align: center;
}
dialog::backdrop { background: rgba(6, 20, 40, 0.7); backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 16px; font-family: var(--font-head); font-size: 18px; color: var(--blue); }
dialog .qr { padding: 16px; background: #fff; border-radius: 16px; }
dialog .qr img { display: block; width: 100%; height: auto; }
dialog p { margin: 12px 0 0; font-weight: 600; color: var(--blue); }
dialog .close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
dialog .close:hover { background: var(--cloud); }

/* Toast (share fallback) --------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ivory);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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