/*
 * Shared lead-form styles: enquiry dialog, inline form, thank-you state, toast.
 * Loaded on every page (including the homepage). Markup: src/layout.mjs (briefModal, briefFields, thanks);
 * behavior: assets/js/forms.js. Scoped under .kmodal / .inline-form so it cannot collide with page CSS.
 */
.kmodal { zoom: var(--z, 1); border: 1.5px solid var(--ink, #111111); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow-y: auto; background: #fff; color: var(--ink, #111111); font-family: var(--serif, Georgia,"K57 Serif","Times New Roman",serif); box-shadow: 8px 8px 0 var(--or, #F2A33A); }
.kmodal[open] { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.97); } }
.kmodal::backdrop { background: rgba(17, 17, 17, 0.55); backdrop-filter: blur(3px); }
.kmodal form, .kmodal .thanks { padding: 34px 34px 30px; position: relative; }
.kmodal h3, .kmodal .mh { font-size: clamp(26px, 3.4vw, 34px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 18px; padding-right: 30px; }
.kmodal .eyebrow { margin-bottom: 14px; }
.kmodal .sub { margin: -6px 0 18px; color: var(--soft, rgba(17,17,17,.62)); font-size: 16px; }
.kmodal .x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font: 400 32px/1 var(--serif, Georgia,"K57 Serif","Times New Roman",serif); cursor: pointer; color: var(--ink, #111111); width: 40px; height: 40px; }
.kmodal .x:hover { color: var(--or, #F2A33A); }
:is(.kmodal, .inline-form) .f { display: block; margin-bottom: 14px; }
:is(.kmodal, .inline-form) .f span { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
:is(.kmodal, .inline-form) .f input, :is(.kmodal, .inline-form) .f textarea { width: 100%; font: 400 17px/1.4 var(--serif, Georgia,"K57 Serif","Times New Roman",serif); color: var(--ink, #111111); background: #fff; border: 1.5px solid var(--ink, #111111); border-radius: 0; padding: 11px 12px; transition: box-shadow 0.25s, border-color 0.25s; }
:is(.kmodal, .inline-form) .f textarea { resize: vertical; min-height: 96px; }
:is(.kmodal, .inline-form) .f input:focus, :is(.kmodal, .inline-form) .f textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--or, #F2A33A); }
:is(.kmodal, .inline-form) .f input[aria-invalid="true"], :is(.kmodal, .inline-form) .f textarea[aria-invalid="true"] { border-color: #b3261e; box-shadow: 3px 3px 0 rgba(179, 38, 30, 0.25); }
:is(.kmodal, .inline-form) .f ::placeholder { color: rgba(17, 17, 17, 0.42); font-style: italic; }
:is(.kmodal, .inline-form) .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:is(.kmodal, .inline-form) .err { color: #b3261e; font-size: 15px; margin: 0 0 12px; font-weight: 700; }
.kmodal .cta.wide, .inline-form .cta.wide { width: 100%; justify-content: center; padding: 15px 18px; }
.kmodal .cta[disabled], .inline-form .cta[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
:is(.kmodal, .inline-form) .fine { margin: 12px 0 0; font-size: 13px; color: var(--soft, rgba(17,17,17,.62)); text-align: center; }
:is(.kmodal, .inline-form) .thanks { text-align: center; padding-top: 44px !important; }
:is(.kmodal, .inline-form) .thanks p { color: var(--soft, rgba(17,17,17,.62)); margin: 0 0 24px; }
:is(.kmodal, .inline-form) .sunmark { display: block; width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 22px; background: radial-gradient(circle at 36% 30%, rgba(255,255,255,.4), rgba(255,255,255,0) 48%), var(--or, #F2A33A); box-shadow: 0 0 0 10px rgba(242,163,58,.12), 0 0 36px 14px rgba(242,163,58,.2); animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { transform: translateY(26px) scale(0.6); opacity: 0; } }
.ktoast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: var(--ink, #111111); color: #fff; padding: 12px 20px; font-size: 15px; border-left: 4px solid var(--or, #F2A33A); opacity: 0; pointer-events: none; z-index: 120; transition: opacity 0.35s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); max-width: calc(100vw - 32px); }
.ktoast.on { opacity: 1; transform: translate(-50%, 0); }

.inline-form { border: 1.5px solid var(--ink, #111111); box-shadow: 8px 8px 0 var(--or, #F2A33A); background: #fff; }
.inline-form .mwrap > form, .inline-form .thanks { padding: 28px 28px 24px; position: relative; }
.inline-form h2 { margin: 0 0 16px; }
:is(.kmodal, .inline-form) .mh { margin: 0 0 16px; }
@media (max-width: 650px) { .kmodal form, .kmodal .thanks { padding: 28px 20px 24px; } }
