/* TAM profile download — standalone page, independent of the public site styles. */
:root {
    color-scheme: light;
    --profile-burgundy: #590d29;
    --profile-burgundy-hover: #44091f;
    --profile-gold: #896c34;
    --profile-ink: #352b30;
    --profile-muted: #71676b;
    --profile-line: #e9e2e2;
    --profile-input-line: #a28e95;
    --profile-error: #a02b39;
    --profile-radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-inline-size: 0; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
svg, img { display: block; }
.icon { inline-size: 20px; block-size: 20px; flex: 0 0 auto; }

.profile-page {
    min-block-size: 100vh;
    min-block-size: 100svh;
    display: flex;
    padding: 32px 20px;
    background: radial-gradient(ellipse at 50% 0, #f0eae5 0, transparent 65%), #f8f6f3;
    color: var(--profile-ink);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: .875rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Auto margins center a short card, while keeping tall content reachable. */
.profile-card {
    inline-size: 100%;
    max-inline-size: 552px;
    min-inline-size: 0;
    margin: auto;
    padding: 32px 36px 24px;
    background: #fff;
    border: 1px solid var(--profile-line);
    border-block-start: 3px solid var(--profile-burgundy);
    border-radius: 18px;
    box-shadow: 0 16px 48px -24px rgb(55 26 37 / 20%), 0 2px 6px rgb(55 26 37 / 3%);
}

.profile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding-block-end: 25px;
    border-block-end: 1px solid var(--profile-line);
}
.profile-brand__mark {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    block-size: 56px;
    border-radius: 9px;
    background: var(--profile-burgundy);
}
.profile-brand__mark img { object-fit: contain; max-inline-size: 100%; }
.profile-brand__text { min-inline-size: 0; text-align: start; }
.profile-brand__name {
    color: var(--profile-burgundy);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.profile-brand__arabic { margin-block-start: 3px; color: var(--profile-muted); font-size: .75rem; }

.profile-document { padding-block: 23px 25px; text-align: center; }
.profile-document__eyebrow { color: var(--profile-gold); font-size: .75rem; font-weight: 600; }
.profile-document__title {
    max-inline-size: 420px;
    margin: 8px auto 10px;
    color: var(--profile-burgundy);
    font-size: 1.3125rem;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: normal;
    text-wrap: balance;
}
.profile-document__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--profile-muted);
    font-size: .75rem;
    line-height: 1.5;
}
.profile-document__meta .icon { inline-size: 16px; block-size: 16px; color: var(--profile-gold); }
.profile-document__dot { inline-size: 3px; block-size: 3px; border-radius: 50%; background: var(--profile-input-line); }
.profile-document__description { margin-block-start: 12px; color: var(--profile-muted); font-size: .8125rem; }

.profile-form { position: relative; }
.profile-form__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; justify-content: space-between; margin-block-end: 14px; }
.profile-form__heading h2 { font-size: .875rem; font-weight: 600; }
.profile-form__heading > span { color: var(--profile-muted); font-size: .6875rem; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-field { min-inline-size: 0; }
.profile-field--full { grid-column: 1 / -1; }
.profile-field label { display: block; margin-block-end: 6px; font-size: .8125rem; font-weight: 600; }
.profile-field input {
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    min-block-size: 48px;
    padding: 11px 12px;
    border: 1px solid var(--profile-input-line);
    border-radius: var(--profile-radius);
    background: #fff;
    color: var(--profile-ink);
    /* 16px prevents automatic focus zoom on iOS. */
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.profile-field input[name="visitor_name"]:placeholder-shown { direction: rtl; }
.profile-field input::placeholder { color: var(--profile-muted); opacity: 1; font-size: .875rem; }
.profile-field input:hover:not(:read-only) { border-color: var(--profile-burgundy); }
.profile-field input:focus {
    border-color: var(--profile-burgundy);
    outline: 2px solid var(--profile-burgundy);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgb(137 108 52 / 9%);
}
.profile-field input[aria-invalid="true"] { border-color: var(--profile-error); }
.profile-field input[aria-invalid="true"]:focus { outline-color: var(--profile-error); }
.profile-field input:read-only { background: #faf8f7; }
.profile-field__error { margin-block-start: 6px; color: var(--profile-error); font-size: .75rem; line-height: 1.6; overflow-wrap: anywhere; }
.profile-alert { margin-block-end: 16px; padding: 11px 13px; border: 1px solid #d5a5aa; border-radius: var(--profile-radius); background: #fff7f7; color: var(--profile-error); font-size: .8125rem; overflow-wrap: anywhere; }
.profile-honeypot { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.profile-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    inline-size: 100%;
    min-block-size: 52px;
    margin-block-start: 24px;
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: var(--profile-radius);
    background: var(--profile-burgundy);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
    transition: background 150ms ease, box-shadow 150ms ease;
}
.profile-submit:hover:not(:disabled) { background: var(--profile-burgundy-hover); box-shadow: 0 4px 12px rgb(89 13 41 / 15%); }
.profile-submit:active:not(:disabled) { background: #350719; }
.profile-submit:disabled { cursor: default; }
.profile-form[aria-busy="true"] .profile-submit { cursor: wait; }
.profile-submit:focus-visible, .profile-download-again:focus-visible, .profile-alert:focus-visible { outline: 2px solid var(--profile-burgundy); outline-offset: 4px; }
.profile-submit__spinner { inline-size: 18px; block-size: 18px; flex: 0 0 auto; border: 2px solid rgb(255 255 255 / 35%); border-block-start-color: #fff; border-radius: 50%; animation: profile-spin 800ms linear infinite; }
@keyframes profile-spin { to { transform: rotate(360deg); } }
.profile-result { margin-block-start: 14px; text-align: center; font-size: .8125rem; color: var(--profile-muted); }
.profile-download-again { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; padding-inline: 8px; color: var(--profile-burgundy); text-decoration: underline; text-underline-offset: 4px; border-radius: 4px; }
.profile-download-again:hover { color: var(--profile-burgundy-hover); text-decoration-thickness: 2px; }

.profile-privacy { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin-block-start: 20px; padding-block-start: 17px; border-block-start: 1px solid var(--profile-line); color: var(--profile-muted); font-size: .75rem; }
.profile-privacy .icon { inline-size: 15px; block-size: 15px; margin-block-start: 2px; }
.profile-privacy p { min-inline-size: 0; overflow-wrap: anywhere; }

@media (max-width: 540px) {
    .profile-page { padding: 20px 14px; }
    .profile-card { padding: 25px 22px 20px; border-radius: 16px; }
    .profile-brand { padding-block-end: 21px; }
    .profile-document { padding-block: 20px 22px; }
    .profile-document__title { font-size: 1.25rem; }
    .profile-fields { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .profile-submit { margin-block-start: 22px; }
}
@media (max-width: 359px) {
    .profile-page { padding: 16px 12px; }
    .profile-card { padding-inline: 18px; }
    .profile-brand { gap: 10px; }
    .profile-brand__name { font-size: .6875rem; letter-spacing: .6px; }
    .profile-document__title { font-size: 1.1875rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
    .profile-submit { border-color: ButtonText; }
    .profile-submit__spinner { border-color: GrayText; border-block-start-color: ButtonText; }
}
