/* enquiry.css -- Contact Us form: refined inputs, validation, modal & toast (site-scoped tokens) */
.index-contact-us {
    --cn-fg: #ffffff;
    --cn-fg-dim: rgba(255, 255, 255, 0.74);
    --cn-fg-faint: rgba(255, 255, 255, 0.55);
    --cn-surface: rgba(255, 255, 255, 0.16);
    --cn-surface-hover: rgba(255, 255, 255, 0.21);
    --cn-border: rgba(255, 255, 255, 0.3);
    --cn-border-strong: rgba(255, 255, 255, 0.62);
    --cn-ring: rgba(255, 255, 255, 0.26);
    --cn-danger: #ffd9cc;
    --cn-danger-border: rgba(255, 140, 108, 0.88);
    --cn-danger-tint: rgba(255, 110, 80, 0.18);
    --cn-ok: #c8ffdd;
    --cn-accent: #fa8c32;
    --cn-accent-2: #ffb066;
    --cn-ink: #0f2e1f;
    --cn-radius-field: 18px 6px 18px 6px;
    --cn-radius-pill: 26px 6px 26px 6px;
    --cn-radius-box: 8px;
    --cn-shadow-btn: 0 14px 26px -12px rgba(10, 46, 28, 0.6);
    --cn-shadow-modal: 0 32px 64px -24px rgba(6, 32, 20, 0.55);
    --cn-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- layout ---------- */
.index-contact-us .cn-form { margin: 0; }
.index-contact-us .cn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px 18px;
}
@media (min-width: 640px) {
    .index-contact-us .cn-grid { grid-template-columns: 1fr 1fr; }
    .index-contact-us .cn-grid--one { grid-template-columns: 1fr; }
}
.index-contact-us .cn-field { position: relative; display: block; min-width: 0; }
.index-contact-us .cn-field--full { margin-top: 14px; }
@media (min-width: 640px) {
    .index-contact-us .cn-field--full { margin-top: 18px; }
}

/* ---------- inputs ---------- */
.index-contact-us .cn-field input,
.index-contact-us .cn-field textarea {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    color: var(--cn-fg);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    background: var(--cn-surface);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius-field);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    transition: background-color 220ms var(--cn-ease), border-color 220ms var(--cn-ease),
                box-shadow 220ms var(--cn-ease), transform 220ms var(--cn-ease);
}
.index-contact-us .cn-field textarea {
    min-height: 120px;
    padding: 16px 20px;
    line-height: 1.65;
    resize: none;
    overflow-y: auto;
}
.index-contact-us .cn-field input::placeholder,
.index-contact-us .cn-field textarea::placeholder {
    color: var(--cn-fg-dim);
    opacity: 1;
}
.index-contact-us .cn-field input:hover,
.index-contact-us .cn-field textarea:hover { background: var(--cn-surface-hover); }

.index-contact-us .cn-field input:focus,
.index-contact-us .cn-field textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--cn-border-strong);
    box-shadow: 0 0 0 3px var(--cn-ring), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* valid state */
.index-contact-us .cn-field .cn-ok {
    position: absolute;
    top: 17px;
    right: 16px;
    width: 20px;
    height: 20px;
    color: var(--cn-ok);
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 200ms var(--cn-ease), transform 200ms var(--cn-ease);
}
.index-contact-us .cn-field .cn-ok svg { width: 100%; height: 100%; display: block; }
.index-contact-us .cn-field.is-valid .cn-ok { opacity: 1; transform: scale(1); }
.index-contact-us .cn-field.is-valid input,
.index-contact-us .cn-field.is-valid textarea { border-color: rgba(200, 255, 221, 0.5); }

/* invalid state */
.index-contact-us .cn-field.is-invalid input,
.index-contact-us .cn-field.is-invalid textarea {
    border-color: var(--cn-danger-border);
    background: var(--cn-danger-tint);
    box-shadow: 0 0 0 3px rgba(255, 122, 92, 0.22);
}
.index-contact-us .cn-field.is-invalid .cn-ok { opacity: 0; }
.index-contact-us .cn-field.is-invalid { animation: cn-shake 320ms var(--cn-ease); }

/* ---------- errors & status ---------- */
.index-contact-us .cn-err {
    display: block;
    margin-top: 7px;
    padding-left: 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cn-danger);
    position: relative;
}
.index-contact-us .cn-err:empty { display: none; }
.index-contact-us .cn-err::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cn-danger);
}
.index-contact-us .cn-err--check { margin-top: 8px; }
.index-contact-us .cn-status:empty { display: none; }
.index-contact-us .cn-status {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--cn-fg-dim);
}

/* ---------- checkbox ---------- */
.index-contact-us .cn-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 18px;
}
.index-contact-us .cn-check {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    color: var(--cn-fg);
    font-size: 15px;
}
.index-contact-us .cn-check input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
.index-contact-us .cn-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--cn-ink);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--cn-radius-box);
    transition: background-color 200ms var(--cn-ease), box-shadow 200ms var(--cn-ease),
                border-color 200ms var(--cn-ease);
}
.index-contact-us .cn-box svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 180ms var(--cn-ease), transform 180ms var(--cn-ease);
}
.index-contact-us .cn-check:hover .cn-box { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16); }
.index-contact-us .cn-check input:checked + .cn-box {
    background: linear-gradient(135deg, #ffffff, #d9ffe8);
    border-color: #ffffff;
}
.index-contact-us .cn-check input:checked + .cn-box svg { opacity: 1; transform: scale(1); }
.index-contact-us .cn-check input:focus-visible + .cn-box { box-shadow: 0 0 0 3px var(--cn-ring); }
.index-contact-us .cn-check.is-invalid .cn-box { border-color: var(--cn-danger-border); box-shadow: 0 0 0 3px rgba(255, 122, 92, 0.18); }
.index-contact-us .cn-check-text { line-height: 1.5; }
.index-contact-us .cn-check-text a {
    color: #ffd9b8;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 180ms var(--cn-ease);
}
.index-contact-us .cn-check-text a:hover { color: #ffffff; }

/* ---------- submit button ---------- */
.index-contact-us .cn-send {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    margin-top: 20px;
    padding: 0 34px;
    font-family: 'Ubuntu-B', inherit;
    font-size: 15px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffffff;
    background-image: linear-gradient(135deg, var(--cn-accent-2) 0%, var(--cn-accent) 62%, #f07d1e 100%);
    border: 0;
    border-radius: var(--cn-radius-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), var(--cn-shadow-btn);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    transition: transform 220ms var(--cn-ease), box-shadow 220ms var(--cn-ease), filter 220ms var(--cn-ease);
}
@media (min-width: 640px) { .index-contact-us .cn-send { width: 190px; } }
.index-contact-us .cn-send:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 20px 34px -14px rgba(10, 46, 28, 0.7); filter: saturate(1.06); }
.index-contact-us .cn-send:active { transform: translateY(0); box-shadow: 0 10px 18px -10px rgba(10, 46, 28, 0.6); }
.index-contact-us .cn-send:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), var(--cn-shadow-btn); }
.index-contact-us .cn-send[disabled],
.index-contact-us .cn-send.is-loading { cursor: progress; filter: saturate(0.85) brightness(0.98); transform: none; }
.index-contact-us .cn-send[disabled] { opacity: 0.75; }
.index-contact-us .cn-send-label { position: relative; z-index: 1; }
.index-contact-us .cn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cn-spin 780ms linear infinite;
}
.index-contact-us .cn-send.is-loading .cn-spinner { display: inline-block; }

/* ---------- success modal & error toast ---------- */
.cn-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 28, 18, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cn-overlay.is-open { opacity: 1; }
.cn-modal {
    width: min(420px, 100%);
    padding: 34px 30px 26px;
    text-align: center;
    color: #16382a;
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
    border-radius: 22px;
    box-shadow: 0 32px 64px -24px rgba(6, 32, 20, 0.55);
    transform: translateY(10px) scale(0.97);
    transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cn-overlay.is-open .cn-modal { transform: translateY(0) scale(1); }
.cn-modal-mark {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #e9fff2 0%, #d2f6e2 100%);
}
.cn-modal-mark svg { width: 34px; height: 34px; color: #1f9d5b; }
.cn-modal-mark path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: cn-draw 520ms cubic-bezier(0.65, 0, 0.35, 1) 120ms forwards;
}
.cn-modal h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: 0.01em; color: #123b28; }
.cn-modal p { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: #4a6b5c; }
.cn-modal-btn {
    min-height: 48px;
    padding: 0 30px;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #34b36a 0%, #1f9d5b 100%);
    border: 0;
    border-radius: 26px;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cn-modal-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgba(15, 84, 52, 0.55); }
.cn-modal-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(52, 179, 106, 0.35); }

.cn-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(480px, calc(100vw - 32px));
    padding: 14px 16px 14px 18px;
    color: #fff3ef;
    background: rgba(24, 32, 28, 0.96);
    border-left: 3px solid #ff8a65;
    border-radius: 12px;
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, 16px);
    opacity: 0;
    transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cn-toast.is-open { transform: translate(-50%, 0); opacity: 1; }
.cn-toast p { margin: 0; font-size: 14px; line-height: 1.5; }
.cn-toast button {
    margin-left: auto;
    padding: 0 6px;
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.cn-toast button:hover { color: #fff; }
.cn-toast button:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); border-radius: 4px; }

@keyframes cn-shake {
    0%, 100% { transform: translateX(0); }
    22% { transform: translateX(-4px); }
    44% { transform: translateX(3px); }
    66% { transform: translateX(-2px); }
}
@keyframes cn-spin { to { transform: rotate(360deg); } }
@keyframes cn-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .index-contact-us .cn-field.is-invalid { animation: none; }
    .index-contact-us .cn-field input,
    .index-contact-us .cn-field textarea,
    .index-contact-us .cn-send,
    .index-contact-us .cn-box,
    .cn-overlay,
    .cn-modal,
    .cn-toast { transition: none; }
    .index-contact-us .cn-spinner { animation-duration: 1.6s; }
    .cn-modal-mark path { animation: none; stroke-dashoffset: 0; }
}
