/* =========================
   CONTACT PAGE
   ========================= */

.contact-page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(247, 37, 168, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(255, 138, 42, 0.09), transparent 28rem),
    linear-gradient(
      180deg,
      var(--color-background) 0%,
      var(--color-background-soft) 48%,
      var(--color-background) 100%
    );
  color: var(--color-text);
}

.contact-page *,
.contact-page *::before,
.contact-page *::after {
  box-sizing: border-box;
}

.contact-container {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

/* =========================
   LAYOUT
   ========================= */

.contact-hero {
  min-height: calc(100vh - var(--header-height, 72px));
  display: flex;
  align-items: center;
  padding: 42px 0 56px;
}

.contact-form-card {
  width: min(100%, 1040px);
  margin-inline: auto;
  position: relative;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(247, 37, 168, 0.24);
  background:
    radial-gradient(circle at top left, rgba(247, 37, 168, 0.13), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 138, 42, 0.09), transparent 42%),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 88%, transparent),
      color-mix(in srgb, var(--color-surface) 64%, transparent)
    );
  box-shadow: var(--shadow-soft);
}

/* =========================
   HEADING
   ========================= */

.contact-form-heading {
  max-width: 760px;
  margin: 0 auto 18px;
  text-align: center;
}

.contact-kicker {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.contact-form-heading h1 {
  margin: 7px auto 0;
  color: var(--color-text);
  font-size: clamp(1.75rem, 2.7vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.contact-form-heading p {
  margin: 9px auto 0;
  max-width: 680px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* =========================
   STATUS MESSAGE
   ========================= */

.contact-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 74%, transparent);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.contact-status__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.contact-status__content strong {
  display: block;
  margin: 0;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 850;
}

.contact-status__content p {
  margin: 3px 0 0;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.contact-status--success {
  border: 1px solid rgba(247, 37, 168, 0.32);
  background:
    linear-gradient(135deg, rgba(247, 37, 168, 0.11), rgba(255, 138, 42, 0.055));
}

.contact-status--success .contact-status__icon {
  background: var(--gradient-brand);
  box-shadow: 0 10px 26px rgba(247, 37, 168, 0.22);
}

.contact-status--error {
  border: 1px solid rgba(255, 95, 95, 0.34);
  background: rgba(255, 95, 95, 0.09);
}

.contact-status--error .contact-status__icon {
  background: #ff5f5f;
  box-shadow: 0 10px 26px rgba(255, 95, 95, 0.22);
}

/* =========================
   FORM LAYOUT
   ========================= */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.contact-form-row {
  display: grid;
  gap: 10px;
}

.contact-form-row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-field label {
  color: var(--color-text);
  font-size: 0.76rem;
  font-weight: 750;
}

/* =========================
   FORM CONTROLS
   ========================= */

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 78%, transparent);
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 170ms ease,
    background-color 170ms ease,
    box-shadow 170ms ease;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: color-mix(in srgb, var(--color-text-muted) 68%, transparent);
}

.contact-field select {
  cursor: pointer;
}

.contact-field select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.contact-field textarea {
  min-height: 36px;
  max-height: 72px !important;
  padding: 9px 12px;
  resize: vertical;
  line-height: 1.45;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: rgba(247, 37, 168, 0.62);
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  box-shadow: 0 0 0 4px rgba(247, 37, 168, 0.12);
}

/* =========================
   CAPTCHA
   ========================= */

.contact-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
}

.contact-captcha img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
}

.contact-captcha input {
  flex: 1;
  min-width: 0;
}

/* =========================
   ERRORS
   ========================= */

.contact-form-errors {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.1);
  color: var(--color-text);
  font-size: 0.84rem;
  line-height: 1.45;
}

.contact-form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.contact-error {
  margin: 0;
  color: #ff6b6b;
  font-size: 0.74rem;
  line-height: 1.3;
}

/* =========================
   BUTTON
   ========================= */

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  margin-top: 0;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid rgba(247, 37, 168, 0.6);
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(247, 37, 168, 0.24);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(247, 37, 168, 0.34);
}

/* =========================
   DARK THEME TUNING
   ========================= */

html[data-theme="dark"] .contact-form-card {
  background:
    radial-gradient(circle at top left, rgba(247, 37, 168, 0.14), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 138, 42, 0.10), transparent 42%),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 92%, transparent),
      color-mix(in srgb, var(--color-surface) 70%, transparent)
    );
}

html[data-theme="dark"] .contact-field input,
html[data-theme="dark"] .contact-field select,
html[data-theme="dark"] .contact-field textarea {
  background: rgba(11, 11, 16, 0.68);
}

html[data-theme="dark"] .contact-field input:focus,
html[data-theme="dark"] .contact-field select:focus,
html[data-theme="dark"] .contact-field textarea:focus {
  background: rgba(11, 11, 16, 0.86);
}

html[data-theme="dark"] .contact-captcha {
  background: rgba(11, 11, 16, 0.50);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
  .contact-container {
    width: min(100% - 40px, 1120px);
  }

  .contact-form-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .contact-container {
    width: min(100% - 32px, 1120px);
  }

  .contact-hero {
    min-height: auto;
    padding: 42px 0 64px;
  }

  .contact-form-card {
    padding: 20px;
    border-radius: 18px;
  }

  .contact-form-heading {
    margin-bottom: 18px;
  }

  .contact-form-heading h1 {
    font-size: clamp(1.85rem, 8vw, 2.55rem);
  }

  .contact-form-heading p {
    font-size: 0.9rem;
  }

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

  .contact-field input,
  .contact-field select,
  .contact-field textarea {
    min-height: 40px;
  }

  .contact-field textarea {
    min-height: 96px;
    max-height: none !important;
  }

  .contact-captcha {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-captcha img {
    height: auto;
    width: fit-content;
    max-width: 100%;
  }

  .contact-status {
    padding: 14px;
  }

  .contact-status__icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

@media (max-width: 430px) {
  .contact-container {
    width: min(100% - 24px, 1120px);
  }

  .contact-hero {
    padding: 36px 0 56px;
  }

  .contact-form-card {
    padding: 18px;
    border-radius: 18px;
  }

  .contact-form-heading h1 {
    font-size: 1.95rem;
  }

  .contact-captcha {
    padding: 10px;
  }
}