/* =========================================================
   Kainovis — contact / consultation
   ========================================================= */

.contact-page {
  background: var(--paper);
  color: var(--ink);
  padding: 72px 0 104px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 45px;
  align-items: start;
}

.consult-card {
  padding: 38px;
  border: 1px solid #dedbd0;
  border-radius: 18px;
  background: #fbfaf6;
  box-shadow: 0 24px 60px rgba(26, 47, 42, 0.06);
}

.consult-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e6e3d8;
}

.consult-head h2 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.consult-head p {
  margin-top: 6px;
  color: #7b8680;
  font-size: 12.5px;
}

.consult-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 9px;
  border: 1px solid #d9d6ca;
  border-radius: 999px;
  color: #7b8680;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.consult-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d19a54;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  color: #4e5b55;
  font-size: 12px;
  font-weight: 600;
}

.form-field label .req {
  color: #c07939;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d8d5c9;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input,
.form-field select {
  height: 46px;
  padding: 0 13px;
}

.form-field textarea {
  min-height: 104px;
  padding: 12px 13px;
  line-height: 1.7;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #a9b0aa;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7773' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #c65c4e;
  box-shadow: 0 0 0 3px rgba(198, 92, 78, 0.08);
}

.field-error {
  display: none;
  color: #b34f42;
  font-size: 10.5px;
}

.form-field.has-error .field-error {
  display: block;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 2px;
  color: #7b8680;
  font-size: 11px;
  line-height: 1.6;
}

.consent input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: #0f766e;
  flex: none;
}

.consent a {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.form-actions .btn {
  min-height: 48px;
  padding: 0 26px;
  border-radius: 9px;
  background: #0f766e;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.16);
}

.form-actions .btn:hover {
  background: #0d665f;
  transform: translateY(-1px);
}

.form-actions small {
  color: #939b95;
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
}

.form-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #d5e4df;
  border-radius: 9px;
  background: #f0f7f4;
  color: #416d63;
  font-size: 11.5px;
  line-height: 1.65;
}

.form-notice.is-visible {
  display: flex;
}

.form-notice.is-error {
  border-color: #ecd3ce;
  background: #fbf1ef;
  color: #9b4c40;
}

.form-notice .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- aside ---------- */

.contact-aside {
  position: sticky;
  top: calc(var(--header-h) + 30px);
  display: grid;
  gap: 12px;
}

.aside-card {
  padding: 28px;
  border: 1px solid #dad7cb;
  border-radius: 16px;
  background: #f7f6f0;
}

.aside-card--dark {
  position: relative;
  overflow: hidden;
  border-color: rgba(92, 225, 194, 0.18);
  background: linear-gradient(150deg, #0e1c1d, #081115);
  color: #e8eef6;
}

.aside-card--dark::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 225, 194, 0.14), transparent 66%);
}

.aside-card h3 {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aside-card h3 .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #0f766e;
  vertical-align: middle;
}

.aside-card--dark h3 {
  color: #7fa99f;
}

.aside-card--dark h3 .dot {
  background: var(--accent);
}

.aside-response {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.aside-response b {
  color: #0f766e;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.aside-response span {
  color: #6f7a75;
  font-size: 12px;
}

.aside-card--dark .aside-response b {
  color: var(--accent);
}

.aside-card--dark .aside-response span {
  color: #8aa39e;
}

.aside-card > p {
  color: #7b8680;
  font-size: 11.5px;
  line-height: 1.7;
}

.aside-card--dark > p {
  color: #8fa6a1;
}

.aside-steps {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.aside-step {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aside-step:last-child {
  padding-bottom: 0;
}

.aside-step span {
  color: #588178;
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding-top: 1px;
}

.aside-step p {
  color: #a4b8b3;
  font-size: 11px;
  line-height: 1.55;
}

.aside-step b {
  color: #dbe7e3;
  font-weight: 500;
}

.aside-contact {
  display: grid;
  gap: 11px;
}

.aside-contact--spaced {
  margin-top: 14px;
}

.aside-contact a,
.aside-contact div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4e5b55;
  font-size: 12px;
}

.aside-contact .icon {
  width: 15px;
  height: 15px;
  color: #0f766e;
}

.aside-contact a:hover {
  color: #0f766e;
}

.aside-note {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e0ddd1;
  color: #969e98;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.6;
}

/* ---------- prepare ---------- */

.prepare-section {
  padding: 76px 0 96px;
  border-top: 1px solid #dedbd0;
  background: #ecebe3;
  color: var(--ink);
}

.prepare-section .section-lead {
  color: var(--ink-3);
}

.prepare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 38px;
}

.prepare-card {
  padding: 26px;
  border: 1px solid #dedbd0;
  border-radius: 13px;
  background: #f7f6f0;
}

.prepare-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 20px;
  border: 1px solid #d2d9d4;
  border-radius: 8px;
  color: #0f766e;
  font-family: var(--font-mono);
  font-size: 9px;
}

.prepare-card h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.prepare-card p {
  color: #737e78;
  font-size: 12px;
  line-height: 1.75;
}

@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-aside {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .aside-card--dark {
    grid-row: span 2;
  }

  .prepare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .contact-page {
    padding: 40px 0 74px;
  }

  .consult-card {
    padding: 24px 20px;
  }

  .consult-head {
    flex-direction: column;
    gap: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }

  .contact-aside {
    grid-template-columns: 1fr;
  }

  .aside-card--dark {
    grid-row: auto;
  }
}
