/* ==========================================================================
   Contact page only — the demo request form.
   ========================================================================== */

.form-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }

.frow { margin-bottom: 20px; }
.frow label { display: block; font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: 7px; }
.frow input, .frow select, .frow textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: .95rem; color: var(--ink); background: #fff;
}
.frow textarea { resize: vertical; min-height: 110px; }
.frow input:focus-visible, .frow select:focus-visible, .frow textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.frow .err { display: none; font-size: .8rem; color: var(--bad); margin-top: 6px; }
.frow.is-bad input, .frow.is-bad select { border-color: var(--bad); }
.frow.is-bad .err { display: block; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }

/* Honeypot. Off-screen rather than display:none — some bots skip hidden
   fields, and the aria-hidden + tabindex in the markup keeps it away from
   real users and screen readers alike. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

fieldset { border: none; padding: 0; margin: 0 0 20px; }
fieldset legend { font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: 9px; padding: 0; }
.checks { display: grid; gap: 9px; }
.checks label { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 400; font-size: .93rem; color: var(--ink-2); margin: 0; cursor: pointer; }
.checks input { width: auto; }

.form-msg { margin-top: 18px; padding: 13px 15px; border-radius: 10px; font-size: .9rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: var(--good-soft); color: #166534; }
.form-msg.bad { background: var(--bad-soft); color: #991b1b; }

.form-card button[disabled] { opacity: .6; cursor: progress; transform: none; }

/* --------------------------------------------------------------------------
   Contact Form 7 (or any other shortcode) rendered in place of the built-in
   form.

   The ShigenTech CF7 form template is written with this theme's own .fgrid /
   .frow / .checks classes, so the rules above reach it directly. What is left
   here covers the wrappers CF7 adds of its own accord, plus a fallback set of
   control styles for any other form pasted in as a shortcode.
   -------------------------------------------------------------------------- */
.form-card--plugin .wpcf7 { margin: 0; }

/* CF7 runs the template through an autop pass, which wraps the contents of
   each .frow in a <p>. That paragraph is an artefact, not a block of its own —
   .frow already provides the row spacing, so zero it out and let only genuine
   top-level paragraphs (the submit row) keep a margin. */
.form-card--plugin .wpcf7-form p { margin: 0; }
.form-card--plugin .wpcf7-form > p { margin: 0 0 20px; }
.form-card--plugin .wpcf7-form > p:last-child { margin-bottom: 0; }

/* CF7 wraps every control in an inline span; block makes width:100% behave. */
.form-card--plugin .wpcf7-form-control-wrap { display: block; }

.form-card--plugin .wpcf7-form label {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: .88rem; color: var(--ink); margin-bottom: 7px;
}
.form-card--plugin .wpcf7-form input[type="text"],
.form-card--plugin .wpcf7-form input[type="email"],
.form-card--plugin .wpcf7-form input[type="tel"],
.form-card--plugin .wpcf7-form input[type="url"],
.form-card--plugin .wpcf7-form input[type="number"],
.form-card--plugin .wpcf7-form input[type="date"],
.form-card--plugin .wpcf7-form select,
.form-card--plugin .wpcf7-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: .95rem; color: var(--ink); background: #fff;
}
.form-card--plugin .wpcf7-form textarea { resize: vertical; min-height: 110px; }
.form-card--plugin .wpcf7-form input:focus-visible,
.form-card--plugin .wpcf7-form select:focus-visible,
.form-card--plugin .wpcf7-form textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.form-card--plugin .wpcf7-form input[type="checkbox"],
.form-card--plugin .wpcf7-form input[type="radio"] { width: auto; margin: 0; }
.form-card--plugin .wpcf7-list-item { margin: 0 18px 8px 0; display: inline-flex; align-items: center; }
.form-card--plugin .wpcf7-list-item-label { font-weight: 400; font-size: .93rem; color: var(--ink-2); }

/* Inside our own .checks grid the items stack one per row, matching the
   built-in form's checkbox list. */
.form-card--plugin .checks .wpcf7-list-item { display: block; margin: 0; }
.form-card--plugin .checks .wpcf7-list-item label {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--font-body); font-weight: 400; font-size: .93rem;
  color: var(--ink-2); cursor: pointer;
}

/* CF7 draws its own submit button, so it needs the .btn treatment applying. */
.form-card--plugin .wpcf7-form input[type="submit"],
.form-card--plugin .wpcf7-form button[type="submit"] {
  display: inline-flex; align-items: center; gap: 9px; width: auto;
  padding: 14px 26px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  transition: background .18s ease, transform .18s ease;
}
.form-card--plugin .wpcf7-form input[type="submit"]:hover,
.form-card--plugin .wpcf7-form button[type="submit"]:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* Validation and response text. CF7 ships its own colours; these bring them
   onto the palette the rest of the page uses. */
.form-card--plugin .wpcf7-not-valid-tip { font-size: .8rem; color: var(--bad); margin-top: 6px; }
.form-card--plugin .wpcf7-form .wpcf7-not-valid { border-color: var(--bad); }
.form-card--plugin .wpcf7-response-output {
  margin: 18px 0 0 !important; padding: 13px 15px !important;
  border: none !important; border-radius: 10px; font-size: .9rem;
  background: var(--bad-soft); color: #991b1b;
}
.form-card--plugin .wpcf7 form.sent .wpcf7-response-output { background: var(--good-soft); color: #166534; }
.form-card--plugin .wpcf7-spinner { margin-left: 10px; }

.steps { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: s; }
.steps li { position: relative; padding-left: 44px; margin-bottom: 18px; font-size: .95rem; color: var(--muted); }
.steps li strong { color: var(--ink); display: block; font-family: var(--font-display); font-size: .97rem; margin-bottom: 2px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .88rem;
}
