/* ═══ Contact section — homepage ═══ */

#contact {
  scroll-margin-top: calc(var(--nav-height, 72px) + 18px);
}

.contact-section {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 24px clamp(3.5rem, 6vw, 5rem);
  background: var(--bg-primary, var(--background, #000000));
  color: var(--text-primary, #ffffff);
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
}

.contact-section__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1380px);
  margin-inline: auto;
}

.contact-section__intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 48px;
}

.contact-section__eyebrow {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
}

.contact-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-primary, #ffffff);
  margin: 0 0 0.85rem;
}

.contact-section__subtitle {
  margin: 0 auto;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
}

.contact-section__divider {
  width: 72px;
  height: 2px;
  margin: 1.35rem auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
}

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

.contact-info-card,
.contact-form-card {
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.contact-form-card {
  position: relative;
  overflow: visible;
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.contact-form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent) top / 100% 1px no-repeat,
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.08), transparent 26%);
  opacity: 0;
}

.contact-form-card > * {
  position: relative;
  z-index: 1;
}

.contact-info-card__label,
.contact-form-card__label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  margin-bottom: 0.75rem;
}

.contact-info-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary, #ffffff);
  margin: 0 0 0.75rem;
}

.contact-info-card__text,
.contact-form-card__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
}

.contact-form-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary, #ffffff);
  margin: 8px 0;
}

.contact-form-card__header {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.16);
}

.contact-detail-list {
  display: grid;
  gap: 0;
  margin-top: 28px;
}

.contact-detail-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
}

.contact-detail-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--accent-cyan, #ffffff);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-detail-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255, 255, 255, 0.45));
}

.contact-detail-value {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary, #ffffff);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-detail-value a {
  color: inherit;
  text-decoration: none;
}

.contact-detail-value a:hover {
  color: var(--accent-cyan, #ffffff);
  opacity: 0.9;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.contact-social a:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form {
  width: 100%;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-form__field,
.form-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.contact-form-grid > .contact-form__field:not(.form-field--full) {
  grid-template-rows: auto 54px minmax(0, auto);
}

.contact-form__field:focus-within,
.form-field:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(255, 255, 255, 0.055),
    0 16px 34px rgba(0, 0, 0, 0.18);
}

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

.contact-form__field > label,
.form-field > label,
.contact-service-field > legend {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.contact-service-field {
  margin: 0;
  min-inline-size: 0;
}

.contact-service-field > legend {
  float: none;
  width: auto;
  padding: 0;
  margin: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.135), rgba(255, 255, 255, 0.085));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -16px 34px rgba(0, 0, 0, 0.08);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.contact-form input,
.contact-form select {
  min-height: 54px;
  padding: 0 15px;
}

.contact-form select {
  appearance: auto;
  cursor: pointer;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.135), rgba(255, 255, 255, 0.085));
}

.contact-form select option {
  color: #ffffff;
  background: #151515;
}

.contact-form textarea {
  min-height: 145px;
  padding: 15px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.115));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.18);
}

.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill,
.contact-form textarea:-webkit-autofill:hover,
.contact-form textarea:-webkit-autofill:focus {
  border-color: rgba(255, 255, 255, 0.54);
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  box-shadow:
    0 0 0 1000px #2c2c2c inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.18);
  transition: background-color 9999s ease-out 0s;
}

.contact-form input.is-invalid,
.contact-form select.is-invalid,
.contact-form textarea.is-invalid {
  border-color: #ff6b6b;
}

.contact-service-field.is-invalid {
  border-color: #ff6b6b;
}

.service-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.service-checkbox:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
}

.service-checkbox:has(input:checked) {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.service-checkbox input[type="checkbox"] {
  appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: none;
}

.service-checkbox input[type="checkbox"]:checked {
  border-color: #ffffff;
  background:
    #ffffff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 7 2.4 2.4L11 3.8'/%3E%3C/svg%3E")
    center / 14px 14px no-repeat;
}

.service-checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.service-checkbox span {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contact-form__error {
  font-size: 0.82rem;
  color: #ff8a8a;
}

.contact-form__alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffb4b4;
  font-size: 0.9rem;
}

.contact-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4px;
}

.contact-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 170px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.contact-submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #000000;
}

.contact-submit-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-form-success {
  text-align: center;
  padding: 2rem 1rem;
}

.contact-form-success .bi {
  font-size: 2rem;
  color: var(--accent-cyan, #ffffff);
  margin-bottom: 0.75rem;
}

.contact-form-success h3 {
  color: var(--text-primary, #ffffff);
  margin: 0 0 0.5rem;
}

.contact-form-success p {
  margin: 0;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
}

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

@media (max-width: 640px) {
  .contact-section {
    padding-inline: 14px;
  }

  .contact-section__inner {
    width: min(100%, 1380px);
  }

  .contact-section__intro {
    margin-bottom: 36px;
  }

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

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

  .service-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .contact-submit-button {
    width: 100%;
    min-width: 0;
  }

  .contact-form-card {
    padding: 0 0 5.5rem;
  }
}

[data-theme="light"] .contact-section {
  background: #ffffff;
  color: #000000;
}

[data-theme="light"] .contact-section::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .contact-section__title,
[data-theme="light"] .contact-info-card__title,
[data-theme="light"] .contact-form-card__title,
[data-theme="light"] .contact-detail-value {
  color: #000000;
}

[data-theme="light"] .contact-section__eyebrow,
[data-theme="light"] .contact-section__subtitle,
[data-theme="light"] .contact-info-card__text,
[data-theme="light"] .contact-form-card__desc,
[data-theme="light"] .contact-info-card__label,
[data-theme="light"] .contact-form-card__label {
  color: rgba(0, 0, 0, 0.62);
}

[data-theme="light"] .contact-info-card,
[data-theme="light"] .contact-form-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .contact-form-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

[data-theme="light"] .contact-form-card__header {
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.045), rgba(0, 0, 0, 0.015));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .contact-detail-row {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .contact-detail-icon {
  color: #000000;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-detail-label {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .contact-form__field > label,
[data-theme="light"] .form-field > label,
[data-theme="light"] .contact-service-field > legend {
  color: rgba(0, 0, 0, 0.82);
}

[data-theme="light"] .contact-form__field,
[data-theme="light"] .form-field {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.035), rgba(0, 0, 0, 0.015));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(0, 0, 0, 0.045);
}

[data-theme="light"] .contact-form__field:focus-within,
[data-theme="light"] .form-field:focus-within {
  border-color: rgba(0, 0, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.045), rgba(0, 0, 0, 0.018));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 3px rgba(0, 0, 0, 0.045),
    0 16px 34px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form select,
[data-theme="light"] .contact-form textarea {
  color: #000000;
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.9));
  border-color: rgba(0, 0, 0, 0.13);
}

[data-theme="light"] .contact-form select {
  color: #000000;
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.9));
}

[data-theme="light"] .contact-form select option {
  color: #000000;
  background: #ffffff;
}

[data-theme="light"] .contact-form input::placeholder,
[data-theme="light"] .contact-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.42);
}

[data-theme="light"] .contact-form input:-webkit-autofill,
[data-theme="light"] .contact-form input:-webkit-autofill:hover,
[data-theme="light"] .contact-form input:-webkit-autofill:focus,
[data-theme="light"] .contact-form textarea:-webkit-autofill,
[data-theme="light"] .contact-form textarea:-webkit-autofill:hover,
[data-theme="light"] .contact-form textarea:-webkit-autofill:focus {
  border-color: rgba(0, 0, 0, 0.18);
  -webkit-text-fill-color: #000000;
  caret-color: #000000;
  box-shadow:
    0 0 0 1000px #ffffff inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 3px rgba(0, 0, 0, 0.045),
    0 16px 34px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .service-checkbox {
  color: rgba(0, 0, 0, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .service-checkbox:hover,
[data-theme="light"] .service-checkbox:has(input:checked) {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.22);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .service-checkbox input[type="checkbox"] {
  border-color: rgba(0, 0, 0, 0.28);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.82));
}

[data-theme="light"] .service-checkbox input[type="checkbox"]:checked {
  border-color: #000000;
  background:
    #000000
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 7 2.4 2.4L11 3.8'/%3E%3C/svg%3E")
    center / 14px 14px no-repeat;
}

[data-theme="light"] .contact-submit-button {
  background: #000000;
  color: #ffffff;
}

[data-theme="light"] .contact-submit-button:hover:not(:disabled) {
  background: #1a1a18;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .contact-social a {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
}

@media (prefers-reduced-motion: reduce) {
  .contact-submit-button {
    transition: none;
  }
}
