/* ============================================================
   AITCOH Healthcare Referral Portal — refer.aitcoh.com
   Products division (Trust Blue) per brand/BRAND.md
   ============================================================ */

:root {
    /* Canonical BRAND.md tokens */
    --trust-blue:        #255ea0;
    --trust-blue-dark:   #1b477e;
    --trust-blue-light:  #d9ecff;
    --radiant-gold:      #fdd841;
    --charcoal:          #333333;
    --gray:              #e0e0e0;
    --light-linen:       #fffce5;

    /* Supporting neutrals (match 2026-07 landing-page conventions) */
    --deep-navy:   #0e2a47;
    --text-grey:   #4a5568;
    --pure-white:  #ffffff;
    --wash:        #f4f9ff;
    --accent-gold: #d69e2e;

    --trust-rgb: 37, 94, 160;
    --radius: 16px;
    --shadow-soft: 0 14px 34px -12px rgba(var(--trust-rgb), 0.18);
    --shadow-card: 0 8px 24px -10px rgba(14, 42, 71, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-grey);
    background: linear-gradient(180deg, var(--wash) 0%, #ffffff 55%);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, legend {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--deep-navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

em { font-style: italic; }
sup { font-size: 0.55em; }

img { max-width: 100%; height: auto; }

a { color: var(--trust-blue); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray);
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-logo img { display: block; width: 200px; height: auto; }

.header-right {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.header-tag {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--trust-blue-dark);
    background: var(--trust-blue-light);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.header-phone {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--trust-blue-dark);
    text-decoration: none;
    white-space: nowrap;
}
.header-phone:hover { color: var(--trust-blue); }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(253, 216, 65, 0.14), transparent 60%),
        linear-gradient(160deg, var(--deep-navy) 0%, var(--trust-blue-dark) 62%, var(--trust-blue) 100%);
    color: var(--pure-white);
    padding: 3.6rem 1.25rem 4.6rem;
}

.hero-inner { max-width: 860px; margin: 0 auto; text-align: center; }

.hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--radiant-gold);
    margin-bottom: 1rem;
}

.hero h1 {
    color: var(--pure-white);
    font-size: clamp(1.9rem, 4.4vw, 2.9rem);
    margin-bottom: 1rem;
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 1.6rem;
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
}

.hero-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.hero-chips li {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.38rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

/* ---------- Portal shell ---------- */
.portal { padding: 0 1.25rem 3.5rem; margin-top: -2.2rem; }

.portal-inner { max-width: 820px; margin: 0 auto; }

.tabs {
    display: flex;
    gap: 0.4rem;
    background: var(--pure-white);
    border: 1px solid var(--gray);
    border-radius: 999px;
    padding: 0.35rem;
    box-shadow: var(--shadow-soft);
    max-width: 480px;
    margin: 0 auto 1.6rem;
}

.tab {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--trust-blue-dark);
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.tab:hover { background: var(--wash); }

.tab.is-active {
    background: var(--trust-blue-dark);
    color: var(--pure-white);
}

.tab:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(var(--trust-rgb), 0.45);
    outline-offset: 2px;
}

.panel {
    background: var(--pure-white);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 2rem 2.2rem 2.4rem;
}

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

.form-section {
    border: none;
    padding: 1.6rem 0 0.4rem;
    border-top: 1px solid var(--gray);
    margin-top: 1.4rem;
}
.form-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0.4rem; }

.form-section > legend {
    font-size: 1.22rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.4rem 0 0.2rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--trust-blue-dark);
    color: var(--pure-white);
    font-size: 0.95rem;
    flex: none;
}

.step-num.gold { background: var(--radiant-gold); color: var(--charcoal); }

.section-note {
    font-size: 0.93rem;
    color: var(--text-grey);
    background: var(--wash);
    border-left: 3px solid var(--trust-blue);
    border-radius: 0 8px 8px 0;
    padding: 0.55rem 0.9rem;
    margin: 0.7rem 0 1rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    margin-top: 0.8rem;
}

.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; margin-top: 0.8rem; }

.field label,
.sub-legend {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--deep-navy);
    margin-bottom: 0.35rem;
    font-family: 'Source Sans Pro', sans-serif;
    letter-spacing: 0;
}

.req { color: #b23b3b; }
.opt { font-weight: 400; color: #8a94a3; font-size: 0.85em; }

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    font: inherit;
    color: var(--charcoal);
    background: var(--pure-white);
    border: 1.5px solid #c9d4e2;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    width: 100%;
    transition: border-color 0.15s ease;
}

input:hover, select:hover, textarea:hover { border-color: var(--trust-blue); }

.field-hint {
    font-size: 0.82rem;
    color: #8a94a3;
    margin-top: 0.3rem;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #b23b3b; }

.sub-group { border: none; margin-top: 0.8rem; }

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.choice-stack { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.4rem; }

.choice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1.5px solid #c9d4e2;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--charcoal);
    transition: border-color 0.15s ease, background 0.15s ease;
    background: var(--pure-white);
}

.choice:hover { border-color: var(--trust-blue); background: var(--wash); }

.choice input { accent-color: var(--trust-blue); width: 17px; height: 17px; flex: none; }

.choice:has(input:checked) {
    border-color: var(--trust-blue);
    background: var(--trust-blue-light);
}

/* Consent section */
.consent-section {
    background: var(--light-linen);
    border: 1.5px solid var(--radiant-gold);
    border-radius: 12px;
    padding: 0.4rem 1.4rem 1.3rem;
    margin-top: 1.8rem;
}

.consent-section > legend { padding-left: 0.2rem; }

.consent-section .section-note {
    background: rgba(255, 255, 255, 0.75);
    border-left-color: var(--accent-gold);
}

.consent-check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: var(--pure-white);
    border: 1.5px solid var(--gray);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    font-size: 0.98rem;
    color: var(--charcoal);
}

.consent-check input {
    accent-color: var(--trust-blue);
    width: 19px;
    height: 19px;
    margin-top: 0.2rem;
    flex: none;
}

.consent-grid { margin-top: 0.4rem; }

/* Errors + actions */
.form-error {
    margin-top: 1.2rem;
    background: #fdecec;
    border: 1px solid #e5b4b4;
    border-radius: 10px;
    color: #8f2727;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
}

.form-actions { margin-top: 1.6rem; text-align: center; }

.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    border-radius: 999px;
    padding: 0.85rem 2.4rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
    background: var(--trust-blue-dark);
    color: var(--pure-white);
    box-shadow: 0 10px 22px -8px rgba(var(--trust-rgb), 0.55);
}

.btn-primary:hover { background: var(--trust-blue); transform: translateY(-1px); }

.btn-primary[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.btn-ghost {
    background: var(--pure-white);
    color: var(--trust-blue-dark);
    border-color: var(--trust-blue-dark);
}

.btn-ghost:hover { background: var(--trust-blue-light); }

.btn-small { font-size: 0.85rem; padding: 0.45rem 1.2rem; }

.actions-note { font-size: 0.85rem; color: #8a94a3; margin-top: 0.65rem; }

/* ---------- Success panel ---------- */
.success-panel { text-align: center; padding: 1rem 0.5rem; }

.success-badge {
    width: 62px;
    height: 62px;
    margin: 0.4rem auto 1rem;
    border-radius: 50%;
    background: var(--trust-blue-light);
    color: var(--trust-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-panel h2 { font-size: 1.7rem; margin-bottom: 0.4rem; }

.ref-code-box {
    margin: 1.4rem auto 0.8rem;
    max-width: 420px;
    background: var(--deep-navy);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ref-code-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--radiant-gold);
}

.ref-code {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.1rem;
    letter-spacing: 0.12em;
    color: var(--pure-white);
}

.ref-code-box .btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--pure-white); background: transparent; }
.ref-code-box .btn-ghost:hover { background: rgba(255,255,255,0.12); }

.ref-code-note { max-width: 480px; margin: 0 auto; font-size: 0.92rem; }

.next-steps {
    text-align: left;
    max-width: 520px;
    margin: 1.6rem auto;
    padding-left: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.next-steps strong { color: var(--deep-navy); }

.success-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Status view ---------- */
.status-lookup h2 { font-size: 1.5rem; padding-top: 0.4rem; }

.status-result { margin-top: 2rem; border-top: 1px solid var(--gray); padding-top: 1.6rem; }

.status-head h3 { font-size: 1.3rem; }
.status-head h3 span { color: var(--trust-blue); letter-spacing: 0.06em; }

.status-meta {
    font-size: 0.95rem;
    color: var(--text-grey);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b6c2d2;
    display: inline-block;
    flex: none;
}

.timeline {
    list-style: none;
    margin: 1.6rem 0 0.4rem;
    padding: 0;
}

.timeline li {
    position: relative;
    padding: 0 0 1.4rem 2.3rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 22px;
    bottom: -2px;
    width: 2px;
    background: var(--gray);
}

.timeline li:last-child::before { display: none; }

.tl-dot {
    position: absolute;
    left: 0;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid #c9d4e2;
    background: var(--pure-white);
}

.timeline li strong {
    font-family: 'Montserrat', sans-serif;
    color: #8a94a3;
    font-size: 1rem;
}

.timeline li p { font-size: 0.88rem; color: #a3adbb; margin-top: 0.1rem; }

.timeline li.done .tl-dot {
    border-color: var(--trust-blue);
    background: var(--trust-blue);
    box-shadow: inset 0 0 0 3.5px var(--pure-white);
}

.timeline li.done strong { color: var(--deep-navy); }
.timeline li.done p { color: var(--text-grey); }

.timeline li.current .tl-dot {
    border-color: var(--trust-blue);
    background: var(--radiant-gold);
    box-shadow: 0 0 0 5px rgba(253, 216, 65, 0.35);
}

.timeline li.current strong { color: var(--trust-blue-dark); }

.status-flag {
    background: var(--light-linen);
    border: 1.5px solid var(--radiant-gold);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-top: 0.6rem;
}

.status-note {
    margin-top: 1rem;
    background: var(--wash);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

.status-note strong { color: var(--deep-navy); display: block; margin-bottom: 0.2rem; }

.status-updated { margin-top: 0.9rem; font-size: 0.85rem; color: #8a94a3; }

/* ---------- Trust band ---------- */
.trust { padding: 0 1.25rem 3rem; }

.trust-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.trust-card {
    background: var(--pure-white);
    border: 1px solid var(--gray);
    border-top: 4px solid var(--trust-blue);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.6rem;
    box-shadow: var(--shadow-card);
}

.trust-card h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.trust-card p { font-size: 0.95rem; }

/* ---------- About strip ---------- */
.about { padding: 0 1.25rem 3rem; }

.about-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    color: var(--text-grey);
    border-top: 1px solid var(--gray);
    padding-top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--deep-navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 2.6rem 1.25rem 2.2rem;
    text-align: center;
}

.footer-logo { width: 190px; margin-bottom: 1rem; }

.footer-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.98rem;
}

.footer-contact a { color: var(--radiant-gold); font-weight: 700; text-decoration: none; }
.footer-contact .dot { background: rgba(255,255,255,0.4); }

.footer-note { margin-top: 0.9rem; font-size: 0.88rem; color: rgba(255, 255, 255, 0.65); }

.footer-legal { margin-top: 1.2rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .header-tag { display: none; }

    .hero { padding: 2.6rem 1.1rem 3.8rem; }

    .panel { padding: 1.4rem 1.1rem 1.8rem; }

    .field-grid { grid-template-columns: 1fr; }

    .trust-inner { grid-template-columns: 1fr; }

    .consent-section { padding: 0.3rem 1rem 1.1rem; }

    .success-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
