/* ==========================================================================
   Kandryn Performance - Contact page (/contact-us)
   Gradient hero + two-column contact layout (details aside + form card).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.ct-hero {
    position: relative;
    background:
        radial-gradient(130% 130% at 82% 8%, rgba(255,255,255,0.10), transparent 55%),
        linear-gradient(120deg, var(--teal-dark) 0%, var(--teal-deep) 55%, var(--charcoal) 100%);
    color: #fff;
    text-align: center;
    padding-block: clamp(4rem, 11vw, 7.5rem);
}
.ct-hero .eyebrow { color: #7de0df; }
.ct-hero h1 { color: #fff; margin-bottom: 0.9rem; font-size: clamp(2.4rem, 5.2vw, 3.7rem); }
.ct-hero p { color: #e4eaec; font-size: 1.18rem; line-height: 1.6; max-width: 44rem; margin: 0 auto; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.ct-grid {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    max-width: 1040px;
    margin-inline: auto;
}
/* let columns shrink below their content's natural width on small screens */
.ct-aside,
.ct-card { min-width: 0; }
.ct-aside h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
.ct-aside__rule { width: 64px; height: 4px; background: var(--teal); border-radius: 2px; margin-bottom: 1.6rem; }
.ct-aside p { color: var(--muted); font-size: 1.08rem; line-height: 1.75; margin-bottom: 1.6rem; }
.ct-aside__email {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
    color: var(--teal-dark);
    max-width: 100%;
    overflow-wrap: anywhere;
}
.ct-aside__email i { color: var(--teal); }
.ct-support {
    margin-top: 2rem;
    background: var(--grey);
    border: 1px solid var(--grey-line);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--ink);
}
.ct-support a { color: var(--teal-dark); font-weight: 600; }

/* --------------------------------------------------------------------------
   Form card
   -------------------------------------------------------------------------- */
.ct-card {
    background: #fff;
    border: 1px solid var(--grey-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.8rem, 3.5vw, 2.6rem);
}
.ct-field { margin-bottom: 1.3rem; }
.ct-field label {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--charcoal);
    margin-bottom: 0.45rem;
}
.ct-field input,
.ct-field select,
.ct-field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--grey-line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ct-field select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a2d30' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.85rem;
}
.ct-field textarea { min-height: 150px; resize: none; }
.ct-field input:focus,
.ct-field select:focus,
.ct-field textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(3, 182, 181, 0.16);
}
.ct-field--error input,
.ct-field--error select,
.ct-field--error textarea { border-color: var(--ab-red); }
.ct-err { display: block; margin-top: 0.4rem; color: var(--ab-red-dark); font-size: 0.88rem; }
.ct-form .btn { width: 100%; justify-content: center; margin-top: 0.4rem; }
.ct-note { margin-top: 1rem; font-size: 0.88rem; color: var(--muted); text-align: center; }
.ct-note a { color: var(--teal-dark); text-decoration: underline; }

/* Honeypot - hidden from people, visible to bots */
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Alerts */
.ct-alert { border-radius: var(--radius); padding: 1.2rem 1.4rem; font-size: 1rem; line-height: 1.6; }
.ct-alert--ok {
    background: rgba(3, 182, 181, 0.10);
    border: 1px solid rgba(3, 182, 181, 0.35);
    color: var(--teal-dark);
}
.ct-alert--ok strong { color: var(--teal-dark); }
.ct-alert--err {
    background: rgba(217, 72, 75, 0.08);
    border: 1px solid rgba(217, 72, 75, 0.30);
    color: var(--ab-red-dark);
    margin-bottom: 1.4rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
    .ct-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* --------------------------------------------------------------------------
   Eligibility / crisis callout - sits inside the hero, below the intro text
   -------------------------------------------------------------------------- */
.ct-eligibility {
    max-width: 620px;
    margin: 2.4rem auto 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 4px solid #7de0df;
    border-radius: var(--radius);
    padding: 1.15rem 1.4rem;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ct-eligibility p { margin: 0; color: #eaf1f2; font-size: 0.95rem; line-height: 1.6; }
.ct-eligibility p + p { margin-top: 0.7rem; }
.ct-eligibility p strong { color: #fff; }
.ct-eligibility a { color: #fff; font-weight: 600; text-decoration: underline; }
.ct-eligibility__crisis {
    color: #d6e0e2 !important;
    font-size: 0.88rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.ct-eligibility__crisis a { color: #ffb4af !important; }

/* Emphasised when the visitor selects "I need support" */
.ct-eligibility.is-flagged {
    border-left-color: #ffb4af;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

/* --------------------------------------------------------------------------
   Processing overlay (shown on submit until the redirect)
   Fixed + flex-centred so it sits dead centre on any device.
   -------------------------------------------------------------------------- */
.ct-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(20, 26, 30, 0.72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.ct-overlay.is-active { display: flex; }
.ct-overlay__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 2.6rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.ct-overlay__spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(3, 182, 181, 0.2);
    border-top-color: var(--teal);
    animation: ct-spin 0.8s linear infinite;
}
.ct-overlay__text {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--charcoal);
}
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* Stop background scrolling while the overlay is up */
body.ct-processing { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .ct-overlay__spinner { animation-duration: 1.6s; }
}
