/* Forms: contact page, captcha widget, honeypot. Base field styles are in base.css. */

.page-head { max-width: 680px; margin-bottom: 36px; }
.page-head h1 { margin-bottom: 10px; }

.contact-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details h2, .contact-form-card h2 { font-size: 21px; margin: 0 0 16px; }
.contact-note { margin: 0 0 16px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.contact-details dl { margin: 0; }
.contact-details dt { font-size: 13px; color: var(--text-2); margin-top: 12px; }
.contact-legal { margin: 18px 0 0; }
@media (max-width: 700px) { .contact-legal a { display: inline-flex; align-items: center; min-height: 44px; } }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 2px 0 0; font-size: 17px; word-break: break-word; }
.contact-form-card { padding: clamp(20px, 4vw, 32px); }
.contact-form-card .notice { margin: 0 0 18px; }

.field-hint { color: var(--text-3, #86868b); font-size: 13px; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field .form-error { margin: 0; }
.form-actions { margin: 8px 0 0; }
.form-done h2 { color: var(--ok); }

/* honeypot: out of sight for people and screen readers, still in the DOM for bots */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* "I'm not a robot" widget */
.captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px;
  max-width: 360px; background: var(--surface-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.captcha-box { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; color: var(--text); }
.captcha-check { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; margin: 0;
  border: 2px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; position: relative;
  transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.captcha-check:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(10, 116, 214, .28); border-color: var(--blue); }
.captcha[data-state="solving"] .captcha-check { border-color: var(--blue); border-top-color: transparent; border-radius: 50%;
  animation: captcha-spin .8s linear infinite; }
.captcha[data-state="done"] .captcha-check { background: var(--ok); border-color: var(--ok); }
.captcha[data-state="done"] .captcha-check::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.captcha-status { font-size: 13px; color: var(--text-2); }
.captcha[data-state="done"] .captcha-status { color: var(--ok); }
.captcha[data-state="error"] .captcha-status { color: var(--danger); }
.captcha noscript p { flex-basis: 100%; margin: 0; }
@keyframes captcha-spin { to { transform: rotate(360deg); } }

/* legal page (shares this file: one small stylesheet for the quiet pages) */
.legal-page .container { max-width: 820px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: -12px 0 28px; font-size: 14px; }
.legal-company { margin-bottom: 40px; }
.legal-company h2, .legal-section h2 { font-size: 24px; margin: 0 0 14px; }
.legal-company dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 16px; }
.legal-company dt { color: var(--text-2); }
.legal-company dd { margin: 0; }
@media (max-width: 560px) { .legal-company dl { grid-template-columns: 1fr; gap: 2px; } .legal-company dd { margin-bottom: 8px; } }
.legal-lursoft { margin: 0; font-size: 14px; }
.legal-url { color: var(--text-2); word-break: break-all; }
.legal-section { margin-bottom: 36px; }
.legal-section p { color: var(--text); max-width: 68ch; }
.legal-updated { color: var(--text-2); font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .captcha[data-state="solving"] .captcha-check { border-radius: 7px; border-top-color: var(--blue); }
}

/* Picture code of the contact form (task 16) */
.captcha-picture { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.captcha-picture img { display: block; width: 200px; max-width: 100%; height: auto; border: 1px solid var(--line);
  border-radius: 8px; background: #f5f7fa; }
.captcha-code input[name="captcha_code"] { max-width: 200px; text-transform: uppercase; letter-spacing: .15em; font-size: 18px; }

/* G20: phone ergonomics (<= 700px) — secondary text 15px+, large captcha picture and code field, full-width send button */
@media (max-width: 700px) {
  .page-head { margin-bottom: 28px; }
  .contact-note, .field-hint, .captcha-status, .contact-details dt { font-size: 15px; }
  .contact-details dd a { display: inline-flex; align-items: center; min-height: 44px; }
  .captcha { max-width: none; padding: 14px 16px; }
  .captcha-box { min-height: 44px; font-size: 17px; }
  .captcha .captcha-check { width: 28px; height: 28px; }
  .captcha[data-state="done"] .captcha-check::after { left: 8px; top: 3px; }
  .captcha-picture img { width: 100%; max-width: 320px; }
  .captcha-picture .btn { width: 100%; }
  .captcha-code input[name="captcha_code"] { max-width: 320px; font-size: 20px; }
  .form-actions .btn { width: 100%; }
  .legal-toc { gap: 0 20px; font-size: 15px; }
  .legal-toc a { display: inline-flex; align-items: center; min-height: 44px; }
  .legal-lursoft, .legal-updated { font-size: 15px; }
  .legal-lursoft a { display: inline-flex; align-items: center; min-height: 44px; }
}
