/* Poptávka: rozložení stránky, formulář a jeho stavy (výchozí, chyby, odesílání,
   úspěch, chyba odeslání). Podle Figmy, uzly 127:2, 132:2, 137:2, 114:2, 119:2. */

/* ---------- rozložení ---------- */
.inquiry {
  padding-block: clamp(48px, 6vw, 86px) clamp(64px, 8vw, 112px);
  /* mřížka na pozadí jako v hero úvodu */
  background-image:
    linear-gradient(rgb(var(--text-rgb) / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--text-rgb) / 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}
.inquiry-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 86px);
  align-items: start;
}
@media (max-width: 960px) {
  .inquiry-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- levý sloupec ---------- */
.inquiry-title {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 14px;
}
/* linka mřížky pod nadpisem s křížky u konců (dekorace) */
.inquiry-title::after {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  bottom: 0;
  height: 20px;
  transform: translateY(50%);
  pointer-events: none;
  background:
    linear-gradient(var(--grid-line), var(--grid-line)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--grid-line), var(--grid-line)) 14px center / 1.5px 100% no-repeat,
    linear-gradient(var(--grid-line), var(--grid-line)) calc(100% - 14px) center / 1.5px 100% no-repeat;
}
@media (max-width: 560px) {
  .inquiry-title::after { left: -8px; right: -8px; }
}
.inquiry-lead { font-size: 18px; color: var(--text-muted); }

.inquiry-steps-h {
  margin-top: 32px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.inquiry-steps {
  list-style: none;
  padding: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.inquiry-steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
}
.inquiry-steps li:first-child .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.step-title { font-weight: 600; }
.step-text { margin-top: 2px; font-size: 15px; color: var(--text-muted); }

.inquiry-mail {
  margin-top: 36px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-muted);
  font-size: 15px;
  color: var(--text-muted);
}
.inquiry-mail-h { margin-bottom: 6px; font-size: 16px; font-weight: 600; color: var(--text); }
.inquiry-note { margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* ---------- karta s formulářem ---------- */
.inquiry-card {
  padding: clamp(20px, 3.5vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--shadow-lg);
}
.inquiry-form { display: flex; flex-direction: column; gap: 22px; }
.form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.form-head h2 { font-size: 22px; letter-spacing: 0; }
.form-required-note { font-size: 13px; color: var(--text-muted); }
.req { color: var(--danger); }
.optional { font-weight: 400; color: var(--text-muted); }

/* ---------- pole ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 15px; font-weight: 600; }
.field-hint { font-size: 13px; color: var(--text-muted); }
.field input:not([type="checkbox"]), .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text);
  font-size: 16px; /* 16 px brání přiblížení stránky na iOS */
  line-height: 1.4;
}
.field textarea { min-height: 120px; resize: vertical; }
.field ::placeholder { color: var(--text-muted); opacity: 1; }
.field input:not([type="checkbox"]):hover, .field textarea:hover { border-color: var(--text-muted); }
.field [aria-invalid="true"]:not([type="checkbox"]) { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }

/* ikona chyby přes masku, barvu bere z currentColor */
.field-error, .form-alert-title {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E");
}
.field-error {
  display: flex;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--danger);
}
.field-error::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* past na roboty mimo obrazovku (ne display:none, to roboti poznají) */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- souhrn chyb a chyba odeslání ---------- */
.form-alert {
  padding: 16px 18px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background: var(--danger-soft);
  font-size: 15px;
}
.form-alert-title {
  display: flex;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
}
.form-alert-title::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: var(--danger);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.form-alert > :not(.form-alert-title) { margin-left: 32px; }
.form-alert p + p { margin-top: 2px; }
.form-alert-list { padding: 6px 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
.form-alert-list a { color: var(--danger); font-weight: 500; }
.form-alert-list a:hover { color: var(--text); }

/* ---------- odeslání ---------- */
.form-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 6px; }
/* místo pro křížky tlačítka, ať nepřetékají přes okraj karty */
.form-actions .gbtn { margin: 10px 0 0 10px; }
#form-submit[aria-busy="true"] { cursor: progress; }
#form-submit[aria-busy="true"] .form-submit-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: form-spin .8s linear infinite;
}
@keyframes form-spin { to { transform: rotate(360deg); } }
.form-info { font-size: 14px; color: var(--text-muted); }
.form-recaptcha { font-size: 12px; color: var(--text-muted); }

/* Text o reCAPTCHA je pod tlačítkem, odznak Googlu proto skrýváme (Google to tak dovoluje). */
.grecaptcha-badge { visibility: hidden; }

/* ---------- úspěch ---------- */
.form-success { padding-block: clamp(8px, 2vw, 32px); }
.success-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 8px 0 32px 8px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
}
/* křížek mřížky vlevo dole jako u loga */
.success-icon::before, .success-icon::after {
  content: "";
  position: absolute;
  background: var(--grid-line);
}
.success-icon::before { left: -10px; bottom: -8px; width: 86px; height: 1.5px; }
.success-icon::after { left: -8px; bottom: -10px; width: 1.5px; height: 86px; }
.form-success h2 { font-size: clamp(24px, 2.6vw, 30px); }
.success-lead { margin-top: 14px; font-size: 17px; color: var(--text-muted); }
.success-lead strong { color: var(--text); overflow-wrap: anywhere; }
.success-note { margin-top: 12px; font-size: 15px; color: var(--text-muted); }
.form-success .gbtn { margin: 34px 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  #form-submit[aria-busy="true"] .form-submit-label::before { animation: none; border-right-color: currentColor; opacity: .6; }
}
