/* Contact-page-only styles. Loaded after styles.css — override/extend here, don't edit styles.css. */

/* ===== Layout balance ===== */
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 40px;
  height: 100%;
}

/* ===== Contact info ===== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 0;
}

.info-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--graphite-900);
  border: 1px solid var(--graphite-600);
  border-radius: 2px;
  color: var(--steel-200);
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.info-icon svg { width: 20px; height: 20px; }

.info-item:hover .info-icon {
  border-color: var(--steel-400);
  color: var(--white);
  transform: translateY(-2px);
}

.contact-info .label { margin-bottom: 5px; }
.contact-info a { font-size: 1.15rem; }
.contact-info .info-item p {
  margin: 0;
  color: var(--steel-400);
  font-size: 0.95rem;
  max-width: 36ch;
}

/* ===== Contact photo ===== */
.contact-photo {
  position: relative;
  margin: 0;
  flex: 1 1 320px;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--graphite-600);
  border-radius: 2px;
}
.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.contact-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(10, 10, 11, 0) 45%, rgba(10, 10, 11, 0.55) 100%);
  pointer-events: none;
}
.contact-photo:hover img {
  transform: scale(1.05);
  filter: grayscale(0%) contrast(1.05);
}

/* ===== Form panel ===== */
form.contact-form {
  position: relative;
  padding: 48px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.65);
}
form.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sheen);
}

.form-required-note {
  margin: 0 0 32px;
  color: var(--steel-400);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.form-required-note span {
  color: var(--steel-200);
  font-weight: 600;
}

/* ===== Field grouping ===== */
.form-fieldset {
  border: none;
  margin: 0 0 36px;
  padding: 0;
  min-width: 0;
}
.form-fieldset:last-of-type { margin-bottom: 28px; }

.form-legend {
  display: block;
  width: 100%;
  padding: 0 0 14px;
  margin: 0 0 22px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--steel-400);
  border-bottom: 1px solid var(--graphite-600);
}

/* ===== Labels & required marks ===== */
.form-row label {
  position: relative;
  padding-left: 14px;
}
.form-row label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 2px;
  background: var(--graphite-600);
  transform: translateY(-50%) rotate(var(--tilt));
  transition: background-color 0.2s ease, width 0.2s ease;
}
.form-row:focus-within label::before {
  background: var(--white);
  width: 14px;
}
.form-row .req {
  color: var(--steel-400);
  margin-left: 2px;
}

/* ===== Inputs ===== */
.form-row input,
.form-row select,
.form-row textarea {
  padding: 13px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.form-row input:hover:not(:focus),
.form-row select:hover:not(:focus),
.form-row textarea:hover:not(:focus) {
  border-color: var(--steel-400);
}
.form-row textarea { min-height: 140px; }

/* Custom select chevron */
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-color: var(--graphite-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8F98' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.form-row select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F5F5F4' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Custom file input */
.form-row input[type="file"] {
  padding: 10px 10px;
  border-style: dashed;
  color: var(--steel-400);
  font-size: 0.88rem;
  cursor: pointer;
}
.form-row input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 10px 20px;
  border-radius: 2px;
  border: 1px solid var(--graphite-600);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.form-row input[type="file"]:hover { border-color: var(--steel-400); }
.form-row input[type="file"]::file-selector-button:hover { background: var(--steel-200); }

/* ===== Validation states ===== */
.form-row:has(.form-error) input,
.form-row:has(.form-error) select,
.form-row:has(.form-error) textarea {
  border-color: #e2622a;
  background-color: rgba(226, 98, 42, 0.08);
}
.form-error {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
.form-error::before {
  content: "!";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e2622a;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
}

/* ===== Submit row ===== */
.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 4px;
  padding-top: 28px;
  border-top: 1px solid var(--graphite-600);
}
.form-submit-row .btn-primary {
  padding: 16px 40px;
}
.form-submit-row .form-note {
  margin: 0;
  color: var(--steel-400);
  font-size: 0.85rem;
  max-width: 30ch;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  form.contact-form { padding: 32px 24px; }
  .contact-aside { gap: 32px; height: auto; }
  .contact-photo { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
  form.contact-form { padding: 28px 20px; }
  .form-submit-row { flex-direction: column; align-items: stretch; text-align: center; }
  .form-submit-row .btn-primary { justify-content: center; }
  .form-submit-row .form-note { max-width: none; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .info-icon,
  .contact-photo img,
  .form-row label::before,
  .form-row input,
  .form-row select,
  .form-row textarea {
    transition: none;
  }
  .info-item:hover .info-icon,
  .contact-photo:hover img {
    transform: none;
  }
}
