/* contact.css — scoped to .cu-page
   All selectors begin with .cu- or are nested under .cu-page.
   No hardcoded brand hex — --brand / --brand-deep reference --zf-primary / --zf-secondary.
*/

/* ─────────────────────────────────────────────
   TOKEN BLOCK
───────────────────────────────────────────── */
.cu-page {
    --ink:        #0b1b34;
    --ink-soft:   #2d3a52;
    --muted:      #6b7487;
    --hair:       #e5e7ef;
    --paper:      #fbfbfd;
    --wash:       #f3f5fb;
    --brand:      var(--zf-primary,   #1870d1);
    --brand-deep: var(--zf-secondary, #0f4ea3);
    --teal:       #07c3d6;
    --current:    #0f8b5a;  --current-bg: #e6f4ed;
    --past:       #64748b;  --past-bg:    #eef0f6;
    --warn:       #b45309;  --warn-bg:    #fdf3e4;
    --danger:     #b82347;  --danger-bg:  #fdecef;
    color: var(--ink);
    font-family: "Montserrat", sans-serif;
    padding-bottom: 48px;
}

/* ─────────────────────────────────────────────
   DARK THEME OVERRIDE
───────────────────────────────────────────── */
html[data-theme="dark"] .cu-page {
    --ink:        #e8ecf5;
    --ink-soft:   #c6cbd8;
    --muted:      #8d95a8;
    --hair:       #2a3142;
    --paper:      #161a25;
    --wash:       #1c2231;
    --past:       #a4adc0;
    --past-bg:    #232a3a;
    --current-bg: rgba(15, 139, 90, 0.18);
    --danger-bg:  rgba(184, 35, 71, 0.18);
    --warn-bg:    rgba(180, 83, 9, 0.18);
}

html[data-theme="dark"] .cu-form-card {
    background: #161a25;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .cu-info-card__icon {
    background: transparent;
    color: #58A6FF;
}

html[data-theme="dark"] .cu-info-card__link,
html[data-theme="dark"] .cu-info-card__text,
html[data-theme="dark"] .cu-info-card__hours {
    color: var(--ink);
}

html[data-theme="dark"] .cu-field__input,
html[data-theme="dark"] .cu-field__select,
html[data-theme="dark"] .cu-field__textarea {
    background: #1c2231;
    color: var(--ink);
    border-color: var(--hair);
}

/* ─────────────────────────────────────────────
   ENTRANCE ANIMATION
───────────────────────────────────────────── */
@keyframes cu-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cu-info-card {
    opacity: 0;
    transform: translateY(6px);
    animation: cu-rise 0.5s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

.cu-info-card:nth-child(1) { animation-delay: 0.05s; }
.cu-info-card:nth-child(2) { animation-delay: 0.12s; }
.cu-info-card:nth-child(3) { animation-delay: 0.19s; }
.cu-info-card:nth-child(4) { animation-delay: 0.26s; }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.cu-hero {
    text-align: center;
    max-width: 720px;
    margin-inline: auto;
    padding-block: 32px 48px;
}

.cu-hero__eyebrow {
    display: block;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 10px;
}

.cu-hero__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 14px;
    line-height: 1.15;
}

.cu-hero__title em {
    color: var(--brand);
    font-style: normal;
    font-weight: 700;
}

.cu-hero__subtitle {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 55ch;
    margin-inline: auto;
    margin-block: 0;
}

/* ─────────────────────────────────────────────
   LAYOUT GRID
───────────────────────────────────────────── */
.cu-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    max-width: 1200px;
    margin: 48px auto 0;
    padding-inline: clamp(16px, 3vw, 32px);
    padding-bottom: 48px;
}

@media (max-width: 1080px) {
    .cu-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 32px;
    }
}

/* ─────────────────────────────────────────────
   INFO ASIDE
───────────────────────────────────────────── */
.cu-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─────────────────────────────────────────────
   INFO CARDS
───────────────────────────────────────────── */
.cu-info-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 28px;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 24px 0;
    box-shadow: none;
    transition: none;
}

.cu-info-card + .cu-info-card {
    border-top: 1px solid var(--hair);
}

.cu-info-card:hover {
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.cu-info-card__icon {
    width: auto;
    height: auto;
    min-width: 52px;
    border-radius: 0;
    background: transparent;
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 36px;
    grid-row: span 2;
    flex-shrink: 0;
    align-self: center;
}

.cu-info-card__title {
    font-size: 16px;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--ink);
    margin: 0 0 4px;
    align-self: end;
    text-transform: none;
}

.cu-info-card__link {
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.18s ease;
    display: block;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.cu-info-card__link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.cu-info-card__text {
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
}

.cu-info-card__hours {
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    white-space: pre-line;
    font-variant-numeric: tabular-nums;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────
   SOCIAL ROW
───────────────────────────────────────────── */
.cu-social-heading {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: var(--ink);
    margin: 24px 0 12px;
}

.cu-social {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding-top: 4px;
}

.cu-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cu-social a:hover {
    background: var(--brand-deep);
    transform: translateY(-1px);
}

.cu-social a:hover {
    background: var(--brand);
    color: #fff;
}

html[data-theme="dark"] .cu-social a {
    background: var(--brand);
    color: #fff;
}

html[data-theme="dark"] .cu-social a:hover {
    background: var(--brand-deep);
    color: #fff;
}

/* ─────────────────────────────────────────────
   FORM CARD
───────────────────────────────────────────── */
.cu-form-card {
    background: #F5F5FF;
    border: 1px solid transparent;
    border-radius: 24px;
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: none;
}

.cu-form-card #cu-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cu-form-card__head {
    margin-bottom: 12px;
}

.cu-form-card__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 2.4vw, 2.2rem);
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 10px;
    line-height: 1.15;
}

.cu-form-card__subtitle {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
    max-width: 60ch;
}

/* ─────────────────────────────────────────────
   FORM LAYOUT
───────────────────────────────────────────── */
.cu-form__row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .cu-form__row-2 {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────
   FORM FIELDS
───────────────────────────────────────────── */
.cu-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Labels visually hidden — placeholder serves as the label in the reference design.
   Kept in DOM so screen readers still associate name/email/etc. with the inputs. */
.cu-field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cu-field__required {
    color: var(--danger);
}

.cu-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cu-field__input-wrap--textarea {
    align-items: flex-start;
}

.cu-field__icon {
    position: absolute;
    left: auto;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 20px;
    pointer-events: none;
    z-index: 1;
}

.cu-field__icon--top {
    top: 22px;
    transform: none;
    align-self: auto;
}

.cu-field__input {
    width: 100%;
    min-height: 56px;
    padding: 17px 48px 17px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.4;
    font-family: inherit;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    box-sizing: border-box;
    box-shadow: none;
}

.cu-field__input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(59, 113, 202, 0.133);
    outline: none;
    background: #fff;
}

.cu-field__input::placeholder {
    color: #6c757d;
    opacity: 1;
}

.cu-field__input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.cu-field__textarea {
    resize: none;
    min-height: 140px;
    padding: 18px 48px 18px 20px;
}

.cu-field__select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7487' stroke-width='1.75' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    cursor: pointer;
}

.cu-field__input-wrap:has(.cu-field__select) .cu-field__icon {
    display: none;
}

/* ─────────────────────────────────────────────
   HONEYPOT — off-screen, never visible
───────────────────────────────────────────── */
.cu-honey {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ─────────────────────────────────────────────
   SUCCESS STATE
───────────────────────────────────────────── */
.cu-form-success {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--current-bg);
    color: var(--current);
    border: 1px solid rgba(15, 139, 90, 0.25);
    font-weight: 600;
    font-size: 15px;
}

/* ─────────────────────────────────────────────
   FINEPRINT
───────────────────────────────────────────── */
.cu-fineprint {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 6px;
    margin-bottom: 0;
}

.cu-fineprint a {
    color: inherit;
    text-decoration: none;
}

.cu-fineprint a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────
   SUBMIT BUTTON (self-contained — _Button partial renders .zf-button
   but no global .zf-button rules exist on the public layout, so we
   scope full styling here rather than depend on app.css)
───────────────────────────────────────────── */
.cu-form-card .zf-button {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 30px;
    border: 0;
    border-radius: 38px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--teal) 100%);
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px -14px rgba(24, 112, 209, 0.45);
    transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.18s ease, background 0.22s ease;
    margin-top: 12px;
}

.cu-form-card .zf-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -14px rgba(24, 112, 209, 0.65);
    filter: brightness(1.05);
}

.cu-form-card .zf-button:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.97);
}

.cu-form-card .zf-button:focus-visible {
    outline: 3px solid rgba(24, 112, 209, 0.35);
    outline-offset: 2px;
}

.cu-form-card .zf-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.cu-form-card .zf-button.is-loading {
    pointer-events: none;
}

.cu-form-card .zf-button.is-loading .button-content::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -3px;
    animation: cu-spin 0.7s linear infinite;
}

@keyframes cu-spin {
    to { transform: rotate(360deg); }
}

.cu-form-card .zf-button .button-content {
    line-height: 1;
}

/* ─────────────────────────────────────────────
   PER-FIELD VALIDATION STATES
───────────────────────────────────────────── */
.cu-field--error .cu-field__label {
    color: var(--danger);
}

.cu-field--valid .cu-field__label {
    color: var(--current);
}

.cu-field--valid .cu-field__icon {
    color: var(--current);
}

.cu-field__input--invalid {
    border-color: var(--danger) !important;
    background: #fff8f9 !important;
    box-shadow: 0 0 0 3px rgba(184, 35, 71, 0.15) !important;
}

.cu-field__input--invalid:focus {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(184, 35, 71, 0.22) !important;
}

.cu-field--valid .cu-field__input {
    border-color: rgba(15, 139, 90, 0.45) !important;
}

.cu-field--valid .cu-field__input:focus {
    border-color: var(--current) !important;
    box-shadow: 0 0 0 3px rgba(15, 139, 90, 0.12) !important;
}

.cu-field__error {
    margin: 6px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--danger);
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-height: 1em;
}

.cu-field__error:empty {
    display: none;
}

.cu-field__error::before {
    content: "\F3D5"; /* bi-exclamation-circle-fill glyph */
    font-family: "bootstrap-icons";
    font-size: 13px;
    line-height: 1;
    padding-top: 2px;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   INFO CARD CAPTION (CMS-driven sub-line)
───────────────────────────────────────────── */
.cu-info-card__caption {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin: 8px 0 0;
    grid-column: 2;
    font-weight: 400;
}

/* ─────────────────────────────────────────────
   PageHero (shared partial, used by /contact)
   Uses canon tokens so tenant theme propagates.
───────────────────────────────────────────── */
.ph-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 64px 24px 48px;
    text-align: center;
    background: radial-gradient(ellipse at 15% 10%, rgba(196, 181, 253, 0.35), transparent 55%),
                radial-gradient(ellipse at 85% 15%, rgba(253, 245, 180, 0.35), transparent 55%),
                var(--paper);
    border-radius: 18px;
}

.ph-hero__pill {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    border: 1px solid rgba(24, 112, 209, 0.18);
    color: var(--brand-deep);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(10, 27, 52, 0.05);
}

.ph-hero__title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 22ch;
}

.ph-hero__title--accent {
    color: var(--brand);
    display: block;
}

.ph-hero__title--main {
    color: var(--ink);
    display: block;
}

.ph-hero__subtitle {
    margin: 0;
    max-width: 62ch;
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
}

.ph-hero__cta {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.18s ease;
    box-shadow: 0 10px 24px -14px rgba(24, 112, 209, 0.55);
}

.ph-hero__cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 14px 28px -14px rgba(24, 112, 209, 0.65);
    color: #fff;
}

/* ─────────────────────────────────────────────
   Form card — entrance animation only (background + shadow
   set on the primary .cu-form-card rule above).
───────────────────────────────────────────── */
.cu-form-card {
    opacity: 0;
    transform: translateY(6px);
    animation: cu-rise 0.55s cubic-bezier(0.2, 0.7, 0.25, 1) 0.1s forwards;
}

/* ─────────────────────────────────────────────
   Dark-theme variants
───────────────────────────────────────────── */
html[data-theme="dark"] .ph-hero {
    background: radial-gradient(ellipse at 15% 10%, rgba(80, 70, 180, 0.35), transparent 55%),
                radial-gradient(ellipse at 85% 15%, rgba(90, 110, 40, 0.2), transparent 55%),
                var(--paper);
}

html[data-theme="dark"] .ph-hero__pill {
    background: var(--wash);
    border-color: rgba(120, 160, 255, 0.25);
    color: #7FB0FF;
}

html[data-theme="dark"] .cu-form-card {
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .cu-form-alert {
    background: var(--danger-bg);
    border-color: rgba(184, 35, 71, 0.35);
}

html[data-theme="dark"] .cu-form-alert__list { color: var(--ink-soft); }
