/* ==========================================================================
   Moja Studňa — Kontaktný formulár
   ========================================================================== */

.mscf {
  --mscf-blue-700: #0f4f9c;
  --mscf-blue-600: #1664c0;
  --mscf-blue-500: #2278d1;
  --mscf-blue-400: #3d9eff;
  --mscf-blue-300: #7cbbf2;
  --mscf-blue-100: #eef5fd;
  --mscf-blue-50:  #f5f9fe;
  --mscf-ink-900: #0b1f3a;
  --mscf-ink-700: #2c3c54;
  --mscf-ink-500: #5a6b82;
  --mscf-ink-400: #8a99ad;
  --mscf-ink-300: #aab6c6;
  --mscf-line:    #e7ebf1;
  --mscf-line-soft: #eef1f5;
  --mscf-field-bg: #f6f8fc;
  --mscf-danger:  #d6404a;

  --mscf-radius-card: 26px;
  --mscf-radius-md: 14px;
  --mscf-radius-sm: 11px;

  --mscf-shadow-card: 0 24px 56px -28px rgba(11, 32, 58, .22), 0 6px 18px -12px rgba(11, 32, 58, .12);

  --mscf-font-h: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mscf-font-b: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mscf-font-m: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  font-family: var(--mscf-font-b);
  color: var(--mscf-ink-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.mscf *, .mscf *::before, .mscf *::after { box-sizing: border-box; }

/* ---- Karta (biela) ----------------------------------------------------- */
.mscf-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #fff;
  border-radius: var(--mscf-radius-card);
  padding: 36px;
  border: 1px solid var(--mscf-line-soft);
  box-shadow: var(--mscf-shadow-card);
}

.mscf-head { display: flex; flex-direction: column; gap: 8px; }
.mscf-eyebrow {
  margin: 0;
  font-family: var(--mscf-font-m);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mscf-blue-600);
}
.mscf-title {
  margin: 0;
  font-family: var(--mscf-font-h);
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 28px);
  letter-spacing: -.02em;
  color: var(--mscf-ink-900);
  line-height: 1.18;
}
.mscf-intro {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--mscf-ink-500);
}

/* ---- Polia ------------------------------------------------------------- */
.mscf-fields { display: flex; flex-direction: column; }
.mscf-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mscf-fields-row + .mscf-fields-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--mscf-line-soft);
}
.mscf-fields-row-full { grid-template-columns: 1fr; }

.mscf-field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; }
.mscf-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mscf-ink-700);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.mscf-field-optional {
  font-weight: 500;
  font-size: 12px;
  color: var(--mscf-ink-400);
}
.mscf-field input,
.mscf-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--mscf-line);
  border-radius: var(--mscf-radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--mscf-ink-900);
  background: var(--mscf-field-bg);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
  appearance: none;
}
.mscf-field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}
.mscf-field input::placeholder,
.mscf-field textarea::placeholder { color: var(--mscf-ink-300); opacity: 1; }
.mscf-field input:focus,
.mscf-field textarea:focus {
  outline: none;
  border-color: var(--mscf-blue-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 100, 192, .1);
}
.mscf-field-error { display: none; font-size: 12px; font-weight: 500; color: var(--mscf-danger); }
.mscf-field.has-error input,
.mscf-field.has-error textarea { border-color: var(--mscf-danger); background: #fdf5f5; }
.mscf-field.has-error input:focus,
.mscf-field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(214, 64, 74, .12); }
.mscf-field.has-error .mscf-field-error { display: block; }

/* ---- GDPR súhlas ------------------------------------------------------- */
.mscf-consent {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.mscf-consent input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.mscf-consent-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--mscf-line);
  background: var(--mscf-field-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.mscf-consent-box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.mscf-consent input:checked ~ .mscf-consent-box {
  background: var(--mscf-blue-600);
  border-color: var(--mscf-blue-600);
}
.mscf-consent input:checked ~ .mscf-consent-box svg { opacity: 1; transform: scale(1); }
.mscf-consent input:focus-visible ~ .mscf-consent-box { box-shadow: 0 0 0 4px rgba(22, 100, 192, .22); }
.mscf-consent:hover .mscf-consent-box { border-color: var(--mscf-blue-300); }
.mscf-consent-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mscf-ink-500);
}
.mscf-consent-text a {
  color: var(--mscf-blue-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mscf-consent-text a:hover { color: var(--mscf-blue-700); }
.mscf-consent .mscf-field-error { display: none; font-size: 12px; font-weight: 500; color: var(--mscf-danger); grid-column: 2; margin-top: 4px; }
.mscf-consent.has-error .mscf-consent-box { border-color: var(--mscf-danger); background: #fdf5f5; }
.mscf-consent.has-error .mscf-field-error { display: block; }

/* ---- Tlačidlo ---------------------------------------------------------- */
.mscf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: var(--mscf-radius-md);
  padding: 16px 24px;
  font-family: var(--mscf-font-h);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, transform .15s ease, opacity .2s ease;
  appearance: none;
}
.mscf-btn svg { flex-shrink: 0; transition: transform .2s ease; }
.mscf-btn-submit {
  color: #fff;
  background: linear-gradient(180deg, #14315c 0%, #0a1d36 100%);
  box-shadow: 0 14px 28px -12px rgba(10, 29, 54, .55), 0 2px 6px rgba(10, 29, 54, .2);
}
.mscf-btn-submit:hover {
  background: linear-gradient(180deg, #1a3d6f 0%, #0e2747 100%);
  box-shadow: 0 18px 34px -12px rgba(10, 29, 54, .6);
  transform: translateY(-1px);
}
.mscf-btn-submit:hover svg { transform: translateX(3px); }
.mscf-btn-submit:active { transform: translateY(0); }
.mscf-btn-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(22, 100, 192, .35); }
.mscf-btn[disabled], .mscf-btn.is-loading { opacity: .6; cursor: default; transform: none; pointer-events: none; }

.mscf-note {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--mscf-ink-400);
  text-align: center;
}

/* ==========================================================================
   Stav po odoslaní
   ========================================================================== */
.mscf-card.mscf-success {
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 0;
  padding: 56px 36px;
}
.mscf-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--mscf-blue-400), var(--mscf-blue-600));
  box-shadow: 0 0 0 10px rgba(22, 100, 192, .1);
  margin: 0 auto 20px;
}
.mscf-success-icon svg { width: 30px; height: 30px; }
.mscf-success h3 {
  margin: 0 0 10px;
  font-family: var(--mscf-font-h);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--mscf-ink-900);
}
.mscf-success p { margin: 0 0 22px; color: var(--mscf-ink-500); line-height: 1.55; }
.mscf-success p strong { color: var(--mscf-ink-900); }
.mscf-btn-ghost {
  width: auto;
  background: transparent;
  color: #0a1d36;
  border: 1.5px solid var(--mscf-line);
  box-shadow: none;
}
.mscf-btn-ghost:hover { border-color: #0a1d36; background: var(--mscf-field-bg); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .mscf-card { padding: 28px 22px; }
  .mscf-fields-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mscf-fields-row + .mscf-fields-row { margin-top: 14px; padding-top: 14px; }
}
@media (max-width: 560px) {
  .mscf-card { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mscf *, .mscf *::before, .mscf *::after { transition-duration: .001ms !important; }
}
