/* ═══════════════════════════════════════════════════════════
   Contact Page – Styles + Animations (v4 – deep polish)
   ═══════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--vh-font-body);
    color: var(--vh-text);
    background: var(--vh-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    opacity: 0;
    animation: vh-pageIn .55s cubic-bezier(.22,1,.36,1) .1s both;
}
body::before { display: none; }

/* ═══════════════════════════════════════════════════════════
   SUBTLE BACKGROUND PATTERN
   ═══════════════════════════════════════════════════════════ */

.page::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(var(--vh-primary-rgb),.05), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(var(--vh-primary-rgb),.04), transparent 50%);
}

/* Dot grid pattern overlay */
.page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(var(--vh-primary-rgb),.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.3) 20%, rgba(0,0,0,.3) 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.3) 20%, rgba(0,0,0,.3) 80%, transparent);
}

/* ═══════════════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════════════ */

@keyframes ct-fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ct-fieldSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ct-shake {
    0%, 100% { transform: translateX(0); }
    15%      { transform: translateX(-6px); }
    30%      { transform: translateX(5px); }
    45%      { transform: translateX(-4px); }
    60%      { transform: translateX(3px); }
    75%      { transform: translateX(-2px); }
}

@keyframes ct-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes ct-spin {
    to { transform: rotate(360deg); }
}

@keyframes ct-checkCircle {
    0%   { stroke-dashoffset: 157; }
    100% { stroke-dashoffset: 0; }
}

@keyframes ct-checkMark {
    0%   { stroke-dashoffset: 36; }
    100% { stroke-dashoffset: 0; }
}

@keyframes ct-successPop {
    0%   { opacity: 0; transform: scale(.7) translateY(20px); }
    60%  { transform: scale(1.03) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ct-pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--vh-primary-rgb),.3); }
    50%      { box-shadow: 0 0 0 8px rgba(var(--vh-primary-rgb),0); }
}

@keyframes ct-errorAppear {
    from { opacity: 0; transform: translateY(-4px); max-height: 0; }
    to   { opacity: 1; transform: translateY(0); max-height: 30px; }
}

@keyframes ct-overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ct-iconBounce {
    0%   { transform: scale(1) rotate(0deg); }
    25%  { transform: scale(1.18) rotate(-6deg); }
    50%  { transform: scale(1.05) rotate(3deg); }
    75%  { transform: scale(1.12) rotate(-2deg); }
    100% { transform: scale(1.08) rotate(0deg); }
}

@keyframes ct-iconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

@keyframes ct-progressBar {
    0%   { width: 0%; }
    20%  { width: 25%; }
    50%  { width: 55%; }
    80%  { width: 80%; }
    100% { width: 95%; }
}

@keyframes ct-progressDone {
    to { width: 100%; }
}

@keyframes ct-checkGlow {
    0%   { filter: drop-shadow(0 0 0 rgba(var(--vh-success-rgb),0)); }
    50%  { filter: drop-shadow(0 0 12px rgba(var(--vh-success-rgb),.35)); }
    100% { filter: drop-shadow(0 0 0 rgba(var(--vh-success-rgb),0)); }
}

@keyframes ct-confettiDot {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--cx, 20px), var(--cy, -30px)) scale(0); }
}

@keyframes ct-counterPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

@keyframes ct-validPop {
    0%   { opacity: 0; transform: scale(0) rotate(-45deg); }
    60%  { transform: scale(1.2) rotate(0); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ct-loadingStepIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ct-btnSuccess {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes ct-btnErrorShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-4px); }
    40%      { transform: translateX(4px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}

@keyframes ct-confettiFloat {
    0% {
        opacity: 1;
        transform: translate(var(--start-x, 0), 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--end-x, 20px), var(--end-y, -80px)) scale(0) rotate(var(--rot, 180deg));
    }
}

@keyframes ct-dropzonePulse {
    0%, 100% { border-color: rgba(var(--vh-primary-rgb),.3); }
    50%      { border-color: rgba(var(--vh-primary-rgb),.7); }
}

@keyframes ct-fileSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes ct-successConfettiBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 40px), var(--ty, -60px)) rotate(var(--rot, 360deg)) scale(0);
    }
}

@keyframes ct-checkRingPulse {
    0%   { r: 25; opacity: 1; }
    100% { r: 32; opacity: 0; }
}

@keyframes ct-loadingDots {
    0%, 80%, 100% { opacity: .3; transform: scale(.8); }
    40% { opacity: 1; transform: scale(1); }
}

@keyframes ct-spinnerTrail {
    0%   { stroke-dashoffset: 125; }
    50%  { stroke-dashoffset: 30; }
    100% { stroke-dashoffset: 125; }
}

@keyframes ct-selectChevronBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(2px); }
}

/* ═══════════════════════════════════════════════════════════
   STAGGERED ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.ct-animate-in {
    opacity: 0;
    animation: ct-fadeInUp .6s cubic-bezier(.22,1,.36,1) both;
    animation-delay: calc(.2s + var(--stagger, 0) * .1s);
}

.ct-field-stagger {
    opacity: 0;
    animation: ct-fieldSlideIn .45s cubic-bezier(.22,1,.36,1) both;
    animation-delay: calc(.4s + var(--field-i, 0) * .1s);
}

/* ── Scroll reveal ── */
.ct-scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.ct-scroll-reveal.ct-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
    padding: calc(72px + 4rem) 2rem 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-eyebrow {
    display: inline-block;
    padding: .4rem .9rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--vh-text);
    background: rgba(var(--vh-primary-rgb),.1);
    border: 1px solid rgba(var(--vh-primary-rgb),.25);
    border-radius: var(--radius-pill);
    margin-bottom: 1.25rem;
    animation: vh-fadeUp .5s both;
}
.hero-title {
    font-family: var(--vh-font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: .75rem;
    animation: vh-fadeUp .5s .05s both;
}
.hero-desc {
    font-size: clamp(.92rem, 1.3vw, 1.05rem);
    color: var(--vh-text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.65;
    animation: vh-fadeUp .5s .1s both;
}

/* ═══════════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════════ */

.page { position: relative; z-index: 1; }
.grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 2.25rem;
    align-items: start;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT FORM CARD
   ═══════════════════════════════════════════════════════════ */

.form-card {
    background: var(--vh-surface, #fff);
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-xl, 22px);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, .06));
    transition: box-shadow .3s ease, border-color .3s ease;
}
.form-card:focus-within {
    box-shadow: 0 4px 24px rgba(var(--vh-primary-rgb),.08), 0 1px 3px rgba(15,23,42,.06);
    border-color: rgba(var(--vh-primary-rgb),.2);
}
.form-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .4rem;
    letter-spacing: -.01em;
}
.form-card .sub {
    font-size: .85rem;
    color: var(--vh-text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.55;
}

/* ── Form fields ── */
form#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.field {
    position: relative;
    margin-bottom: 0; /* gap handles spacing now */
}

.field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--vh-text-secondary);
    margin-bottom: .45rem;
    transition: color .2s ease;
}

/* Required asterisk styling */
.field label .ct-required {
    color: var(--vh-error, var(--vh-error));
    font-weight: 700;
    margin-left: 2px;
}

/* Screen-reader only — visually hidden */
.sr-only,
.field .sr-only,
#contactForm .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-md);
    font: 400 .88rem/1.5 var(--vh-font-body);
    color: var(--vh-text);
    outline: none;
    background: var(--vh-surface, #fff);
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

/* Placeholder styling */
.field input::placeholder,
.field textarea::placeholder {
    color: var(--vh-text-tertiary, #a8a29e);
    opacity: 1;
    transition: opacity .2s ease;
}
.field input:focus::placeholder,
.field textarea:focus::placeholder {
    opacity: .4;
}

/* ── Enhanced focus with glow ── */
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--vh-primary, #F2C94C);
    box-shadow: 0 0 0 3px rgba(var(--vh-primary-rgb),.15), 0 0 12px rgba(var(--vh-primary-rgb),.08);
    background-color: rgba(var(--vh-primary-rgb),.02);
}

/* ── Focus label color change ── */
/* Label keeps its default color on focus — only the border changes */

/* ── Focus-visible ring for keyboard navigation ── */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 1px;
}
.field input:focus:not(:focus-visible),
.field select:focus:not(:focus-visible),
.field textarea:focus:not(:focus-visible) {
    outline: none;
}

/* ── Valid field indicator ── */
.field.field-valid input,
.field.field-valid select,
.field.field-valid textarea {
    border-color: var(--vh-success, var(--vh-success));
    box-shadow: 0 0 0 2px rgba(var(--vh-success-rgb),.08);
}
.field.field-valid label {
    color: var(--vh-success);
}

/* Valid checkmark indicator */
.field .ct-valid-check {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 18px;
    height: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.field .ct-valid-check svg {
    width: 100%;
    height: 100%;
}
.field.field-valid .ct-valid-check {
    opacity: 1;
    animation: ct-validPop .35s cubic-bezier(.22,1,.36,1) both;
}

/* Position the checkmark correctly for different field types */
.field:has(input) .ct-valid-check {
    top: calc(.45rem + .72rem + .45rem + .75rem + .35rem);
}
.field:has(select) .ct-valid-check {
    top: calc(.45rem + .72rem + .45rem + .75rem + .35rem);
    right: 36px; /* leave room for select arrow */
}
.field:has(textarea) .ct-valid-check {
    top: calc(.45rem + .72rem + .45rem + .75rem);
    right: 12px;
}

/* ── Overridden by error state ── */
.field-error input,
.field-error select,
.field-error textarea {
    border-color: var(--vh-error) !important;
    box-shadow: 0 0 0 3px rgba(var(--vh-error-rgb),.08) !important;
    background-color: rgba(var(--vh-error-rgb),.02) !important;
}
.field-error label {
    color: var(--vh-error) !important;
}
.field-error .ct-valid-check {
    opacity: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   TEXTAREA — auto-grow, counter, validation
   ═══════════════════════════════════════════════════════════ */

.field textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 320px;
    line-height: 1.6;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease, height .15s ease;
}

/* Textarea wrapper for positioning counter bar below */
.ct-textarea-wrap {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM SELECT DROPDOWN
   ═══════════════════════════════════════════════════════════ */

.field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease, background-image .2s ease;
}

/* Chevron color on focus */
.field select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D4A017' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Chevron color on hover */
.field select:hover:not(:focus) {
    border-color: rgba(var(--vh-primary-rgb),.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23F2C94C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Select option hover (limited browser support, but helps Firefox) */
.field select option {
    padding: .5rem;
    background: var(--vh-surface, #fff);
    color: var(--vh-text);
}
.field select option:checked {
    background: rgba(var(--vh-primary-rgb),.15);
}

/* ── Inline error messages ── */
.field-error-msg {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 500;
    color: var(--vh-error);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
    margin-top: 0;
}
.field-error-msg.visible {
    max-height: 30px;
    opacity: 1;
    margin-top: .4rem;
    animation: ct-errorAppear .3s ease both;
}

/* Error icon prepended via CSS */
.field-error-msg.visible::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23DC2626'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Field error state ── */
.ct-shake {
    animation: ct-shake .45s ease-in-out;
}

/* ═══════════════════════════════════════════════════════════
   CHARACTER COUNTER — with progress bar
   ═══════════════════════════════════════════════════════════ */

.char-counter {
    font-size: .68rem;
    font-weight: 500;
    color: var(--vh-text-muted);
    transition: color .3s ease, transform .15s ease;
    text-transform: none;
    letter-spacing: 0;
    padding: .15rem .5rem;
    border-radius: var(--radius-xs);
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* Min-length hint */
.char-counter .ct-min-hint {
    font-size: .62rem;
    opacity: .7;
}
.char-counter .ct-min-hint.met {
    color: var(--vh-success);
    opacity: 1;
}

.char-counter.warn {
    color: var(--vh-warning);
    background: rgba(var(--vh-warning-rgb),.06);
    animation: ct-counterPulse .8s ease infinite;
}
.char-counter.over {
    color: var(--vh-error);
    font-weight: 700;
    background: rgba(var(--vh-error-rgb),.06);
    animation: ct-counterPulse .6s ease infinite;
}

/* Progress bar under textarea */
.ct-char-progress {
    height: 2px;
    border-radius: 0 0 12px 12px;
    background: var(--vh-border, #e5e5e5);
    overflow: hidden;
    margin-top: -2px;
    opacity: 0;
    transition: opacity .3s ease;
}
.ct-char-progress.visible {
    opacity: 1;
}
.ct-char-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--vh-primary, #F2C94C);
    border-radius: var(--radius-xs);
    transition: width .15s ease, background .3s ease;
}
.ct-char-progress-bar.warn {
    background: var(--vh-warning);
}
.ct-char-progress-bar.over {
    background: var(--vh-error);
}

/* ═══════════════════════════════════════════════════════════
   FILE ATTACHMENT — drag-drop zone + file list
   ═══════════════════════════════════════════════════════════ */

.ct-attachment-field {
    opacity: 0;
    animation: ct-fieldSlideIn .45s cubic-bezier(.22,1,.36,1) both;
    animation-delay: calc(.4s + var(--field-i, 0) * .1s);
}

.ct-dropzone {
    border: 2px dashed var(--vh-border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.ct-dropzone:hover {
    border-color: rgba(var(--vh-primary-rgb),.5);
    background: rgba(var(--vh-primary-rgb),.03);
}

.ct-dropzone:focus-within {
    border-color: var(--vh-primary, #F2C94C);
    box-shadow: 0 0 0 3px rgba(var(--vh-primary-rgb),.12);
    background: rgba(var(--vh-primary-rgb),.03);
}

.ct-dropzone.dragover {
    border-color: var(--vh-primary, #F2C94C);
    background: rgba(var(--vh-primary-rgb),.06);
    animation: ct-dropzonePulse 1s ease infinite;
    box-shadow: 0 0 0 4px rgba(var(--vh-primary-rgb),.12);
}

.ct-dropzone-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto .6rem;
    color: var(--vh-text-muted);
    transition: color .25s ease, transform .25s ease;
}
.ct-dropzone:hover .ct-dropzone-icon {
    color: var(--vh-primary, #F2C94C);
    transform: translateY(-2px);
}
.ct-dropzone.dragover .ct-dropzone-icon {
    color: var(--vh-primary, #F2C94C);
    transform: scale(1.15);
}

.ct-dropzone-text {
    font-size: .82rem;
    color: var(--vh-text-secondary);
    line-height: 1.5;
}
.ct-dropzone-text strong {
    color: var(--vh-primary-hover, var(--vh-primary-deep));
    font-weight: 600;
}
.ct-dropzone-hint {
    font-size: .68rem;
    color: var(--vh-text-muted);
    margin-top: .35rem;
}

/* Hidden file input */
.ct-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* File list */
.ct-file-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .75rem;
}

.ct-file-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    background: var(--vh-surface, #fff);
    border: 1px solid var(--vh-border);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    animation: ct-fileSlideIn .3s ease both;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ct-file-item:hover {
    border-color: rgba(var(--vh-primary-rgb),.3);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.ct-file-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    background: rgba(var(--vh-primary-rgb),.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ct-file-icon svg {
    width: 14px;
    height: 14px;
    color: var(--vh-primary-deep);
}

.ct-file-info {
    flex: 1;
    min-width: 0;
}
.ct-file-name {
    font-weight: 600;
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--vh-text);
}
.ct-file-size {
    font-size: .65rem;
    color: var(--vh-text-muted);
}

.ct-file-remove {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vh-text-muted);
    flex-shrink: 0;
    transition: all .2s ease;
}
.ct-file-remove:hover {
    background: rgba(var(--vh-error-rgb),.06);
    border-color: rgba(var(--vh-error-rgb),.15);
    color: var(--vh-error);
}
.ct-file-remove:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 1px;
}
.ct-file-remove svg {
    width: 14px;
    height: 14px;
}

.ct-file-error {
    font-size: .7rem;
    color: var(--vh-error);
    padding: .25rem .5rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    animation: ct-errorAppear .3s ease both;
}

/* ═══════════════════════════════════════════════════════════
   SUBMIT BUTTON – all states
   ═══════════════════════════════════════════════════════════ */

.submit-btn {
    width: 100%;
    padding: .8rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--vh-text);
    color: var(--vh-surface);
    font: 600 .88rem var(--vh-font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: all .3s cubic-bezier(.22,1,.36,1);
    margin-top: .35rem;
    position: relative;
    overflow: hidden;
}

/* Shimmer/glow on hover */
.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(var(--vh-primary-rgb),.15) 40%,
        rgba(var(--vh-primary-rgb),.25) 50%,
        rgba(var(--vh-primary-rgb),.15) 60%,
        transparent 80%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.submit-btn:hover::before {
    opacity: 1;
    animation: ct-shimmer 1.2s ease infinite;
}

.submit-btn:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31,31,31,.15), 0 0 20px rgba(var(--vh-primary-rgb),.1);
}
.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(31,31,31,.1);
}
.submit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.submit-btn:disabled::before {
    display: none;
}

/* ── Focus ring for keyboard ── */
.submit-btn:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 2px;
}

.submit-icon {
    width: 15px;
    height: 15px;
    transition: transform .3s ease;
}
.submit-btn:hover .submit-icon {
    transform: translateX(2px) translateY(-2px);
}

/* ── Loading state ── */
.submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: var(--vh-surface);
    border-radius: 50%;
    animation: ct-spin .6s linear infinite;
}
.submit-btn.loading .submit-icon { display: none; }
.submit-btn.loading .submit-label { display: none; }
.submit-btn.loading .submit-spinner { display: block; }
.submit-btn.loading .submit-loading-text { display: inline; }
.submit-btn.loading {
    pointer-events: none;
    animation: ct-pulseGlow 1.5s ease infinite;
}
.submit-loading-text {
    display: none;
}

/* ── Success state ── */
.submit-btn.btn-success {
    background: var(--vh-success);
    pointer-events: none;
    animation: ct-btnSuccess .45s cubic-bezier(.22,1,.36,1) both;
}
.submit-btn.btn-success .submit-icon { display: none; }
.submit-btn.btn-success .submit-label { display: none; }
.submit-btn.btn-success .submit-loading-text { display: none; }
.submit-btn.btn-success .submit-spinner { display: none; }
.submit-btn.btn-success .submit-success-text { display: inline; }
.submit-btn.btn-success .submit-success-icon { display: inline-flex; }
.submit-btn.btn-success::before { display: none; }

.submit-success-text { display: none; }
.submit-success-icon {
    display: none;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
}

/* ── Error state ── */
.submit-btn.btn-error {
    background: var(--vh-error);
    animation: ct-btnErrorShake .5s ease both;
}
.submit-btn.btn-error .submit-icon { display: none; }
.submit-btn.btn-error .submit-label { display: none; }
.submit-btn.btn-error .submit-loading-text { display: none; }
.submit-btn.btn-error .submit-spinner { display: none; }
.submit-btn.btn-error .submit-error-text { display: inline; }
.submit-btn.btn-error::before { display: none; }

.submit-error-text { display: none; }

/* ── Status messages ── */
.ct-status {
    display: none;
    padding: .55rem .85rem;
    border-radius: var(--radius-xs);
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: .75rem;
    text-align: center;
    transition: all .3s ease;
}

/* ── Fallback email ── */
.fallback {
    text-align: center;
    font-size: .8rem;
    color: var(--vh-text-muted);
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--vh-border);
}
.fallback a {
    color: var(--vh-text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(var(--vh-primary-rgb),.4);
    transition: border-color .25s ease, color .25s ease;
}
.fallback a:hover {
    border-color: var(--vh-primary);
    color: var(--vh-primary-hover);
}

/* ═══════════════════════════════════════════════════════════
   INFO CARDS (right column) — consistent sizing
   ═══════════════════════════════════════════════════════════ */

.info-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: calc(72px + 1.5rem);
}

.icard {
    background: var(--vh-surface, #fff);
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-lg, 18px);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, .06));
    transition: transform .35s cubic-bezier(.22,1,.36,1),
                box-shadow .35s cubic-bezier(.22,1,.36,1),
                border-color .35s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.icard:hover {
    border-color: rgba(var(--vh-primary-rgb),.4);
    box-shadow: 0 12px 32px rgba(var(--vh-primary-rgb),.08), 0 4px 12px rgba(15,23,42,.04);
    transform: translateY(-4px);
}

.icard-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .85rem;
    flex-shrink: 0;
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, background .3s ease;
}

/* ── Enhanced icon hover animations ── */
.icard:hover .icard-icon {
    animation: ct-iconBounce .5s cubic-bezier(.22,1,.36,1) forwards;
}
.icard:hover .icard-icon.icon-honey {
    box-shadow: 0 4px 16px rgba(var(--vh-primary-rgb),.2);
    background: rgba(var(--vh-primary-rgb),.18);
}
.icard:hover .icard-icon.icon-green {
    box-shadow: 0 4px 16px rgba(var(--vh-success-rgb),.15);
    background: rgba(var(--vh-success-rgb),.12);
}
.icard:hover .icard-icon svg {
    animation: ct-iconFloat 1.2s ease-in-out infinite;
    animation-delay: .5s;
}

/* Icon ripple on hover */
.icard-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid transparent;
    transition: border-color .3s ease, transform .3s ease;
    pointer-events: none;
}
.icard:hover .icard-icon.icon-honey::after {
    border-color: rgba(var(--vh-primary-rgb),.15);
    transform: scale(1.1);
}
.icard:hover .icard-icon.icon-green::after {
    border-color: rgba(var(--vh-success-rgb),.1);
    transform: scale(1.1);
}

.icard-icon svg {
    width: 20px;
    height: 20px;
    transition: transform .3s ease;
}
.icard-icon.icon-honey { background: rgba(var(--vh-primary-rgb),.1); position: relative; }
.icard-icon.icon-blue { background: rgba(59,130,246,.08); position: relative; }
.icard-icon.icon-green { background: rgba(var(--vh-success-rgb),.06); position: relative; }
.icard-icon.icon-purple { background: rgba(139,92,246,.06); position: relative; }
.icard h3 {
    font-size: .92rem;
    font-weight: 700;
    margin-bottom: .35rem;
    letter-spacing: -.01em;
    transition: color .25s ease;
}
.icard:hover h3 {
    color: var(--vh-primary-hover, var(--vh-primary-deep));
}
.icard p {
    font-size: .82rem;
    color: var(--vh-text-secondary);
    line-height: 1.6;
}
.icard a {
    color: var(--vh-text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(var(--vh-primary-rgb),.4);
    transition: border-color .25s ease;
}
.icard a:hover {
    border-color: var(--vh-primary);
}

/* ── Focus visible for keyboard nav ── */
.icard:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   COMPANY INFO / SUPPORT HOURS
   ═══════════════════════════════════════════════════════════ */

.company-info {
    margin-top: 3rem;
}
.company-info h2 {
    font-family: var(--vh-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}
.info-item {
    background: var(--vh-surface, #fff);
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-lg, 18px);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform .35s cubic-bezier(.22,1,.36,1),
                box-shadow .35s cubic-bezier(.22,1,.36,1),
                border-color .35s ease;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, .06));
}
.info-item:hover {
    border-color: rgba(var(--vh-primary-rgb),.35);
    box-shadow: 0 10px 28px rgba(var(--vh-primary-rgb),.08), 0 4px 12px rgba(15,23,42,.04);
    transform: translateY(-5px);
}
.info-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(var(--vh-primary-rgb),.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
    position: relative;
}
.info-item:hover .info-icon {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(var(--vh-primary-rgb),.15);
    background: rgba(var(--vh-primary-rgb),.15);
}
/* Icon float on hover */
.info-item:hover .info-icon svg {
    animation: ct-iconFloat 1.2s ease-in-out infinite;
}
.info-icon svg {
    width: 18px;
    height: 18px;
}
.info-item h4 {
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .2rem;
    letter-spacing: -.01em;
}
.info-item p {
    font-size: .8rem;
    color: var(--vh-text-secondary);
    line-height: 1.5;
}
.info-item a {
    color: var(--vh-text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(var(--vh-primary-rgb),.4);
    transition: border-color .25s ease;
}
.info-item a:hover {
    border-color: var(--vh-primary);
}

/* ═══════════════════════════════════════════════════════════
   LOADING OVERLAY – enhanced spinner + rotating step text
   ═══════════════════════════════════════════════════════════ */

.ct-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.ct-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
    animation: ct-overlayIn .3s ease both;
}
.ct-loading-card {
    background: var(--vh-surface, #fff);
    border-radius: var(--radius-xl);
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    transform: scale(.9);
    transition: transform .35s cubic-bezier(.22,1,.36,1);
    min-width: 300px;
    border: 1px solid var(--vh-border);
}
.ct-loading-overlay.active .ct-loading-card {
    transform: scale(1);
}

/* Polished SVG spinner */
.ct-loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.15rem;
    position: relative;
}
.ct-loading-spinner::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border: 3.5px solid var(--vh-border);
    border-top-color: var(--vh-primary, #F2C94C);
    border-right-color: rgba(var(--vh-primary-rgb),.3);
    border-radius: 50%;
    animation: ct-spin .75s cubic-bezier(.5,.1,.5,.9) infinite;
}
/* Inner glow dot */
.ct-loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--vh-primary, #F2C94C);
    border-radius: 50%;
    animation: ct-pulseGlow 1.5s ease infinite;
}

.ct-loading-card p {
    font-size: .92rem;
    color: var(--vh-text);
    font-weight: 600;
    margin-bottom: .5rem;
}

/* Progress bar inside loading card */
.ct-loading-progress {
    width: 100%;
    height: 4px;
    background: var(--vh-border, #e7e5e4);
    border-radius: var(--radius-xs);
    overflow: hidden;
    margin-top: .75rem;
}
.ct-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--vh-primary, #F2C94C), #E5B93A);
    border-radius: var(--radius-xs);
    width: 0%;
    animation: ct-progressBar 4s cubic-bezier(.4,0,.2,1) forwards;
    transition: width .2s ease;
}
.ct-loading-overlay.active .ct-loading-progress-bar {
    animation: ct-progressBar 4s cubic-bezier(.4,0,.2,1) forwards;
}
.ct-loading-overlay:not(.active) .ct-loading-progress-bar {
    animation: ct-progressDone .3s ease forwards;
}

/* Step text below progress with crossfade */
.ct-loading-step {
    font-size: .75rem;
    color: var(--vh-text-muted);
    margin-top: .65rem;
    transition: opacity .2s ease;
    min-height: 1.2em;
}
.ct-loading-step.ct-step-entering {
    animation: ct-loadingStepIn .3s ease both;
}

/* ═══════════════════════════════════════════════════════════
   SUCCESS OVERLAY – SVG checkmark draw + confetti burst
   ═══════════════════════════════════════════════════════════ */

.ct-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.ct-success-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.ct-success-card {
    background: var(--vh-surface, #fff);
    border-radius: var(--radius-xl);
    padding: 3rem 3rem 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 32px 80px rgba(0,0,0,.2);
    animation: ct-successPop .5s cubic-bezier(.22,1,.36,1) both;
    position: relative;
    overflow: visible;
    border: 1px solid var(--vh-border);
}
.ct-success-overlay:not(.active) .ct-success-card {
    animation: none;
    opacity: 0;
}

/* Static pseudo-element confetti (always present) */
.ct-success-card::before,
.ct-success-card::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
}
.ct-success-overlay.active .ct-success-card::before {
    background: var(--vh-primary, #F2C94C);
    top: 30%;
    left: 15%;
    --cx: -20px;
    --cy: -25px;
    animation: ct-confettiDot .8s .4s ease-out forwards;
}
.ct-success-overlay.active .ct-success-card::after {
    background: var(--vh-success, var(--vh-success));
    top: 25%;
    right: 18%;
    --cx: 18px;
    --cy: -20px;
    animation: ct-confettiDot .8s .5s ease-out forwards;
}

/* Dynamic confetti dot particles (injected by JS) */
.ct-confetti-particle {
    position: absolute;
    width: var(--size, 6px);
    height: var(--size, 6px);
    border-radius: var(--shape, 50%);
    background: var(--color, var(--vh-primary));
    pointer-events: none;
    opacity: 0;
    top: 40%;
    left: 50%;
}
.ct-success-overlay.active .ct-confetti-particle {
    animation: ct-confettiFloat var(--dur, .8s) var(--delay, .3s) cubic-bezier(.22,1,.36,1) forwards;
}

/* Polished animated checkmark with glow ring */
.ct-success-check {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
}
.ct-success-check svg {
    width: 100%;
    height: 100%;
}
.ct-success-overlay.active .ct-success-check {
    animation: ct-checkGlow 1.5s ease .8s;
}

/* Pulse ring behind checkmark */
.ct-success-check::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(var(--vh-success-rgb),.15);
    opacity: 0;
}
.ct-success-overlay.active .ct-success-check::before {
    animation: ct-checkRingPulse 1s ease .6s forwards;
}

.ct-success-check circle {
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
}
.ct-success-overlay.active .ct-success-check circle {
    animation: ct-checkCircle .6s cubic-bezier(.22,1,.36,1) .2s forwards;
}
.ct-success-check path {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
}
.ct-success-overlay.active .ct-success-check path {
    animation: ct-checkMark .4s cubic-bezier(.22,1,.36,1) .6s forwards;
}
.ct-success-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vh-success, #166534);
    margin-bottom: .5rem;
}
.ct-success-card p {
    font-size: .88rem;
    color: var(--vh-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Ticket ID display in success */
.ct-success-ticket {
    display: inline-block;
    font-family: var(--vh-font-body);
    font-size: .75rem;
    padding: .3rem .7rem;
    background: rgba(var(--vh-success-rgb),.06);
    border: 1px solid rgba(var(--vh-success-rgb),.15);
    border-radius: var(--radius-xs);
    color: var(--vh-success);
    margin-bottom: 1rem;
    letter-spacing: .02em;
}

.ct-success-close {
    display: inline-block;
    padding: .7rem 2.25rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--vh-success);
    color: var(--vh-surface);
    font: 600 .88rem var(--vh-font-body);
    cursor: pointer;
    transition: background .25s ease, transform .15s ease, box-shadow .25s ease;
}
.ct-success-close:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--vh-success-rgb),.25);
}
.ct-success-close:active {
    transform: translateY(0);
}
.ct-success-close:focus-visible {
    outline: 2px solid var(--vh-success);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   MESSAGE INBOX
   ═══════════════════════════════════════════════════════════ */

.inbox {
    margin-top: 3rem;
    animation: vh-fadeUp .5s .3s both;
}
.inbox h2 {
    font-family: var(--vh-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.inbox-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.inbox-empty {
    text-align: center;
    padding: 2rem;
    color: var(--vh-text-muted);
    font-size: .85rem;
}
.ticket-card {
    background: var(--vh-surface, #fff);
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-lg, 18px);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, .06));
}
.ticket-card:hover {
    border-color: rgba(var(--vh-primary-rgb),.4);
    box-shadow: 0 8px 24px rgba(var(--vh-primary-rgb),.08), 0 4px 12px rgba(15,23,42,.04);
    transform: translateY(-3px);
}
.ticket-card:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 2px;
}
.ticket-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--vh-border);
    transition: all .3s ease;
}
.ticket-dot.unread {
    background: #F59E0B;
    box-shadow: 0 0 8px rgba(245,158,11,.3);
}
.ticket-info {
    flex: 1;
    min-width: 0;
}
.ticket-subject {
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticket-meta {
    font-size: .72rem;
    color: var(--vh-text-muted);
    margin-top: .2rem;
    display: flex;
    gap: .75rem;
}
.ticket-id {
    font-size: .68rem;
    color: var(--vh-text-muted);
    font-family: var(--vh-font-body);
    flex-shrink: 0;
}
.ticket-arrow {
    color: var(--vh-text-muted);
    flex-shrink: 0;
    transition: transform .25s ease;
}
.ticket-card:hover .ticket-arrow {
    transform: translateX(3px);
    color: var(--vh-primary);
}

/* ═══════════════════════════════════════════════════════════
   THREAD DIALOG – polished
   ═══════════════════════════════════════════════════════════ */

.thread-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.thread-overlay.open {
    display: flex;
    animation: ct-overlayIn .25s ease both;
}
.thread-card {
    background: var(--vh-surface, #fff);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    overflow: hidden;
    animation: ct-successPop .35s cubic-bezier(.22,1,.36,1) both;
    border: 1px solid var(--vh-border);
}
.thread-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--vh-border);
    display: flex;
    align-items: center;
    gap: .75rem;
    background: linear-gradient(to bottom, rgba(var(--vh-primary-rgb),.03), transparent);
}
.thread-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.thread-close {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--vh-border);
    background: var(--vh-surface, #fff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--vh-text-secondary);
    transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.thread-close:hover {
    background: rgba(var(--vh-error-rgb),.06);
    border-color: rgba(var(--vh-error-rgb),.2);
    color: var(--vh-error);
    transform: scale(1.08);
}
.thread-close:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 2px;
}
.thread-id {
    font-size: .65rem;
    color: var(--vh-text-muted);
    font-family: var(--vh-font-body);
}
.thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    overscroll-behavior: contain;
}
.msg-bubble {
    max-width: 85%;
    padding: .85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: .85rem;
    line-height: 1.6;
    position: relative;
    animation: ct-fieldSlideIn .3s ease both;
}
.msg-bubble.user {
    align-self: flex-end;
    background: rgba(var(--vh-primary-rgb),.1);
    border: 1px solid rgba(var(--vh-primary-rgb),.2);
    border-bottom-right-radius: 4px;
}
.msg-bubble.admin {
    align-self: flex-start;
    background: var(--vh-bg);
    border: 1px solid var(--vh-border);
    border-bottom-left-radius: 4px;
}
.msg-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}
.msg-bubble.user .msg-label {
    color: var(--vh-primary-hover);
}
.msg-bubble.admin .msg-label {
    color: #3B82F6;
}
.msg-time {
    font-size: .62rem;
    color: var(--vh-text-muted);
    margin-top: .3rem;
    text-align: right;
}
.thread-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--vh-border);
    display: flex;
    gap: .5rem;
    background: linear-gradient(to top, rgba(var(--vh-primary-rgb),.02), transparent);
}
.thread-input {
    flex: 1;
    padding: .65rem .85rem;
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-sm);
    font: .85rem/1.4 var(--vh-font-body);
    color: var(--vh-text);
    outline: none;
    resize: none;
    background: var(--vh-surface, #fff);
    min-height: 40px;
    max-height: 100px;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.thread-input:focus {
    border-color: var(--vh-primary);
    box-shadow: 0 0 0 3px rgba(var(--vh-primary-rgb),.12), 0 0 10px rgba(var(--vh-primary-rgb),.06);
}
.thread-send {
    padding: .65rem 1.15rem;
    background: var(--vh-text);
    color: var(--vh-surface, #fff);
    border: none;
    border-radius: var(--radius-sm);
    font: 600 .8rem var(--vh-font-body);
    cursor: pointer;
    transition: background .25s, transform .15s, box-shadow .25s;
    white-space: nowrap;
    align-self: flex-end;
}
.thread-send:hover {
    background: var(--vh-text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31,31,31,.12);
}
.thread-send:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
}
.thread-send:focus-visible {
    outline: 2px solid var(--vh-primary, #F2C94C);
    outline-offset: 2px;
}
.thread-hint {
    font-size: .65rem;
    color: var(--vh-text-muted);
    padding: .25rem 0 0 .25rem;
}

/* ═══════════════════════════════════════════════════════════
   INBOX LOADING SKELETON
   ═══════════════════════════════════════════════════════════ */

.inbox-skeleton {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.skeleton-card {
    background: var(--vh-surface, #fff);
    border: 1.5px solid var(--vh-border);
    border-radius: var(--radius-lg, 18px);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.skeleton-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--vh-border);
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-lines {
    flex: 1;
}
.skeleton-line {
    height: 12px;
    border-radius: var(--radius-xs);
    background: linear-gradient(90deg, var(--vh-border) 25%, rgba(0,0,0,.04) 50%, var(--vh-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line:first-child { width: 60%; margin-bottom: .5rem; }
.skeleton-line:last-child { width: 35%; height: 10px; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   FORM ERROR SUMMARY (shown at top of form)
   ═══════════════════════════════════════════════════════════ */

.ct-error-summary {
    display: none;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(var(--vh-error-rgb),.04);
    border: 1px solid rgba(var(--vh-error-rgb),.15);
    margin-bottom: .5rem;
    font-size: .82rem;
    color: var(--vh-error);
    line-height: 1.5;
    animation: ct-fieldSlideIn .3s ease both;
}
.ct-error-summary.visible {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.ct-error-summary svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    /* Info cards move below the form in single-column layout */
    .info-col {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        order: 2;
    }
    .form-card {
        order: 1;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Info cards stack single column on mobile */
    .info-col {
        grid-template-columns: 1fr;
    }
    .info-grid { grid-template-columns: 1fr; }
    .hero { padding: calc(64px + 3rem) 1.25rem 2rem; }
    .form-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .icard {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    /* Disable hover lift on touch devices — it gets stuck */
    .icard:hover {
        transform: none;
    }
    .ct-loading-card,
    .ct-success-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }
    .ct-loading-card {
        min-width: auto;
        width: 85%;
    }
    .thread-card {
        width: 100%;
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }
    .thread-overlay {
        padding: .5rem;
    }
    .thread-header,
    .thread-body,
    .thread-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .msg-bubble {
        max-width: 92%;
    }
    .form-card h2 { font-size: 1.05rem; }
    .form-card .sub { font-size: .82rem; }

    /* Prevent iOS zoom on input focus — font must be >= 16px */
    .field input,
    .field select,
    .field textarea {
        font-size: 16px;
    }
    .thread-input {
        font-size: 16px;
    }

    /* Submit button: full-width + touch-friendly height */
    .submit-btn {
        width: 100%;
        min-height: 52px;
        font-size: .92rem;
        border-radius: var(--radius-md);
    }

    /* File dropzone: larger touch target + friendlier text */
    .ct-dropzone {
        padding: 2rem 1rem;
        min-height: 110px;
        border-width: 2.5px;
    }
    .ct-dropzone-icon {
        width: 40px;
        height: 40px;
    }
    .ct-dropzone-icon svg {
        width: 40px;
        height: 40px;
    }
    /* File remove button: larger tap target */
    .ct-file-remove {
        min-width: 40px;
        min-height: 40px;
    }

    /* Success overlay: readable on small screens */
    .ct-success-card {
        width: 92%;
        max-width: 360px;
        padding: 2rem 1.5rem 1.75rem;
    }
    .ct-success-card h3 {
        font-size: 1.15rem;
    }
    .ct-success-card p {
        font-size: .84rem;
        margin-bottom: 1.25rem;
    }
    .ct-success-check {
        width: 68px;
        height: 68px;
        margin-bottom: 1.15rem;
    }
    .ct-success-close {
        width: 100%;
        min-height: 48px;
        font-size: .9rem;
    }
    .ct-success-ticket {
        font-size: .7rem;
    }
}

@media (max-width: 480px) {
    .hero { padding: calc(56px + 2.5rem) 1rem 1.5rem; }
    .form-card { padding: 1.5rem 1rem; }
    .icard { padding: 1.1rem; }
    .ct-success-card,
    .ct-loading-card { padding: 1.75rem 1.25rem; }
    .ct-success-check {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }
    .ct-success-card h3 { font-size: 1.05rem; }
    .ct-success-card p { font-size: .8rem; }
    .ct-success-close {
        padding: .65rem 1.5rem;
        font-size: .85rem;
    }
    .submit-btn { font-size: .84rem; }
    .ct-dropzone-text { font-size: .78rem; }
    .ct-dropzone-hint { font-size: .62rem; }
    /* Ensure form field labels don't wrap awkwardly */
    .field label {
        font-size: .68rem;
    }
    /* Loading overlay fits small screens */
    .ct-loading-card {
        width: 92%;
        padding: 1.5rem 1rem;
    }
    .ct-loading-spinner {
        width: 40px;
        height: 40px;
    }
    .ct-loading-card p { font-size: .85rem; }
    .ct-loading-step { font-size: .7rem; }
    /* Company info section tighter */
    .company-info h2 { font-size: 1.2rem; }
    .info-item { padding: 1rem 1.15rem; }
}

/* ═══════════════════════════════════════════════════════════
   TOUCH DEVICES — larger targets
   ═══════════════════════════════════════════════════════════ */

@media (pointer: coarse) {
    .submit-btn { min-height: 52px; }
    .field input,
    .field select,
    .field textarea { min-height: 48px; }
    .thread-send { min-height: 44px; }
    .thread-input { min-height: 48px; }
    .ct-success-close { min-height: 48px; padding-left: 2.5rem; padding-right: 2.5rem; }
    .ct-file-remove { min-width: 44px; min-height: 44px; }
    /* Dropzone: generous touch area, visual feedback */
    .ct-dropzone {
        min-height: 120px;
        padding: 2rem 1.25rem;
    }
    .ct-dropzone-icon {
        margin-bottom: .85rem;
    }
    /* Prevent sticky hover states on touch */
    .icard:hover { transform: none; }
    .info-item:hover { transform: none; }
    .submit-btn:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ct-scroll-reveal {
        opacity: 1;
        transform: none;
    }
    .ct-animate-in,
    .ct-field-stagger {
        opacity: 1;
        transform: none;
    }
    .ct-loading-progress-bar {
        animation: none !important;
        width: 50% !important;
    }
    .ct-confetti-particle {
        display: none !important;
    }
    .icard:hover {
        transform: none;
    }
    .info-item:hover {
        transform: none;
    }
    .submit-btn:hover {
        transform: none;
    }
    .ct-loading-spinner::before {
        animation: ct-spin 2s linear infinite !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   SKIP LINK (accessibility)
   ═══════════════════════════════════════════════════════════ */

.ct-skip-link {
    position: absolute;
    top: -40px;
    left: 1rem;
    background: var(--vh-primary, #F2C94C);
    color: var(--vh-on-primary, #1a1a1a);
    padding: .5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 99999;
    transition: top .2s ease;
}
.ct-skip-link:focus {
    top: 0;
}

/* ═══════════════════════════════════════════════════════════
   HIGH CONTRAST MODE
   ═══════════════════════════════════════════════════════════ */

@media (forced-colors: active) {
    .field input,
    .field select,
    .field textarea {
        border: 2px solid ButtonText;
    }
    .field input:focus,
    .field select:focus,
    .field textarea:focus {
        outline: 2px solid Highlight;
    }
    .submit-btn {
        border: 2px solid ButtonText;
    }
    .ct-dropzone {
        border: 2px dashed ButtonText;
    }
}
