/* ============================================================
   contact.css — page-specific layout for contact.html
   Two sections:
     1. .contact-stage   — dark hero with logo + headline
     2. .contact-form-section — light surface, full form,
                                custom checkboxes, mailto handoff
   ============================================================ */

/* ============================================================
   SEC 1 — DARK CONTACT STAGE
   ============================================================ */
.contact-stage {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  background: var(--bg);
  isolation: isolate;
}

.contact-stage-inner {
  position: relative;
  z-index: 1;
}

/* Head block — logo + eyebrow + headline + subhead, centered */
.contact-stage-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.contact-stage-logo {
  display: block;
  margin: 0 auto 32px;
  height: 36px;
  width: auto;
  opacity: 0.95;
}
.contact-stage .contact-stage-head .lbl {
  display: inline-block;
  margin-bottom: 18px;
}
.contact-stage-h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 22px;
}
.contact-stage-sub {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.65;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   SEC 2 — CONTACT FORM SECTION (light surface)
   ============================================================ */
.contact-form-section {
  position: relative;
  padding: 88px 0 96px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.contact-form-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.contact-form-section .lbl { display: inline-block; }

/* Form grid */
.cf-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.cf-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  border: none;
  padding: 0;
  margin: 0;
}
.cf-fieldset { gap: 12px; }
.cf-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text2);
  padding: 0;
}
.cf-req {
  margin-left: 4px;
  color: var(--text);
}
.cf-hint {
  font-size: 12px;
  color: var(--text3);
  letter-spacing: .02em;
}
.cf-input {
  background: var(--bg);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  width: 100%;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.cf-input:focus {
  outline: none;
  border-color: var(--text);
  background: var(--bg3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06);
}
.cf-input.is-error {
  border-color: #d8505a;
  background: rgba(216, 80, 90, .06);
}
.cf-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

/* Hardware-control checkboxes — equal-width grid, 4px equipment radius */
.cf-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.cf-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border-md);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  user-select: none;
}
.cf-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cf-check > span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text2);
}
.cf-check::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 1px solid var(--border-md);
  border-radius: 0;
  background-color: transparent;
  background-image: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  flex-shrink: 0;
  transition: border-color .2s ease, background-color .2s ease;
}
.cf-check:hover {
  border-color: var(--border-hi);
  background: var(--bg3);
}
.cf-check:hover > span { color: var(--text); }
.cf-check:has(input:checked) {
  border-color: var(--text);
  background: var(--text);
}
.cf-check:has(input:checked) > span { color: var(--bg); }
.cf-check:has(input:checked)::before {
  border-color: var(--bg);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.cf-check input:focus-visible + span {
  outline: 2px solid var(--border-hi);
  outline-offset: 4px;
  border-radius: 4px;
}
.cf-fieldset.is-error .cf-check {
  border-color: #d8505a;
}

/* Submit + status */
.cf-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  margin-top: 4px;
}
.cf-submit {
  align-self: center;
  min-width: 260px;
  border-radius: 4px;
}
.cf-status {
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  min-height: 1.55em;
  color: var(--text3);
  transition: color .2s ease;
}
.cf-status[data-state="error"]    { color: #d8505a; }
.cf-status[data-state="success"]  { color: var(--text); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 720px) {
  .contact-stage { padding: 96px 0 72px; }
  .contact-stage-logo { margin-bottom: 24px; height: 30px; }
  .contact-stage-h1 { font-size: 32px; }
  .contact-form-section { padding: 64px 0 72px; }
  .contact-form-head { margin-bottom: 36px; padding: 0 24px; }
  .cf-form { padding: 0 24px; }
  .cf-checkboxes { gap: 8px; }
  .cf-check { padding: 10px 14px; }
  .cf-submit { width: 100%; min-width: 0; }
}

@media (max-width: 540px) {
  /* Checkbox pills — single column, full-width, left-aligned, 48px tap target */
  .cf-form { gap: 22px; padding: 0 18px; }
  .cf-checkboxes { grid-template-columns: 1fr; gap: 10px; }
  .cf-check {
    padding: 14px 16px;
    min-height: 48px;
    justify-content: flex-start;
    gap: 12px;
  }
  .cf-submit { width: 100%; min-width: 0; min-height: 52px; font-size: 15px; }
}
