/* contact-form.html, adapted to the portfolio's light palette and typefaces. */
.contact-section {
  --contact-ink: #253858;
  --contact-muted: #52627a;
  --contact-field: #edf2fc;
  --contact-field-hover: #e5edf9;
  --contact-border: #7387a7;
  --contact-accent: #2455af;
  width: min(90%, 1223px);
  margin-inline: auto;
  padding-block: 64px 32px;
  scroll-margin-top: 128px;
  color: var(--contact-ink);
  font: 400 16px/1.6 "Be Vietnam Pro", Arial, sans-serif;
}
.contact-section *, .contact-section *::before, .contact-section *::after { box-sizing: border-box; }
.contact-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 48px; width: 100%; margin-inline: auto; }
.contact-photo { position: relative; width: 100%; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; border-radius: 12px; background: #e4edfc; }
.contact-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.contact-photo-explore { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: var(--contact-ink); font: inherit; cursor: crosshair; touch-action: pan-y pinch-zoom; }
.contact-photo-explore:focus-visible { outline: 2px solid var(--contact-accent); outline-offset: -5px; }
.contact-photo-zones { position: absolute; inset: 0; pointer-events: none; }
.contact-photo-point { position: absolute; left: var(--point-x); top: var(--point-y); }
.contact-photo-point::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / 24%), transparent 68%); translate: -50% -50%; opacity: 0; transition: opacity .2s; }
.contact-photo-point::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff8e9; translate: -50% -50%; opacity: 0; }
.contact-photo-tag {
  position: absolute;
  left: var(--tag-left, 0px);
  top: var(--tag-top, 0px);
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff8e9;
  color: #253858;
  box-shadow: 0 6px 16px rgb(37 56 88 / 18%);
  font: 600 clamp(11px, 1.2vw, 16px)/1.4 "Be Vietnam Pro", Arial, sans-serif;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px) rotate(-7deg) scale(.65);
  transform-origin: center bottom;
  transition: opacity .18s, transform .38s cubic-bezier(.2, 1.2, .35, 1);
}
.contact-photo-point.is-active { z-index: 1; }
.contact-photo-point.is-active::before, .contact-photo-point.is-active::after { opacity: 1; }
.contact-photo-point.is-active::after { animation: contact-point-ping 1.2s ease-out infinite; }
.contact-photo-point.is-active .contact-photo-tag { opacity: 1; transform: translateY(0) rotate(var(--tag-angle)) scale(1); }
@keyframes contact-point-ping { to { box-shadow: 0 0 0 12px rgb(255 248 233 / 0%); } from { box-shadow: 0 0 0 0 rgb(255 248 233 / 65%); } }
.contact-copy { min-width: 0; }
.contact-title {
  margin: 0 0 40px;
  font: 700 clamp(56px, 6.7vw, 96px)/1.05 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.contact-title span { display: block; color: #7186aa; }
.contact-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 24px; }
.contact-field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.contact-field--full { grid-column: 1 / -1; }
.contact-field label { color: var(--contact-muted); font-size: 14px; }
.contact-field input, .contact-field select, .contact-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 15px;
  border: 1px solid var(--contact-border);
  border-radius: 10px;
  background-color: var(--contact-field);
  color: var(--contact-ink);
  font: 400 16px/1.5 "Be Vietnam Pro", Arial, sans-serif;
  transition: background-color .2s, border-color .2s;
}
.contact-field input, .contact-field select { height: 50px; }
.contact-field input::placeholder, .contact-field textarea::placeholder { color: #596b87; opacity: 1; }
.contact-field input:hover, .contact-field select:hover, .contact-field textarea:hover { background-color: var(--contact-field-hover); }
.contact-field input:focus, .contact-field select:focus, .contact-field textarea:focus {
  border-color: var(--contact-accent);
  outline: 2px solid var(--contact-accent);
  outline-offset: 2px;
}
.contact-field select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2352627a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.contact-field select option { background: #f9faff; color: var(--contact-ink); }
.contact-field textarea { min-height: 126px; resize: vertical; }
.contact-submit {
  grid-column: 1 / -1;
  min-height: 50px;
  margin-top: 2px;
  padding: 12px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--contact-accent);
  color: #fff;
  font: 600 16px/1.5 "Be Vietnam Pro", Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.contact-submit:hover { background: #1d438b; }
.contact-submit:active { transform: scale(.99); }
.contact-submit:focus-visible { outline: 2px solid var(--contact-accent); outline-offset: 4px; }
.contact-submit:disabled { background: #52627a; cursor: not-allowed; }
.contact-status { grid-column: 1 / -1; margin: 0; min-height: 1.8em; color: var(--contact-muted); font-size: 13px; }
#contact .contact-status:empty { display: none; }
.contact-dialog-open { overflow: hidden; }
.contact-dialog.contact-section {
  --contact-ink: #233b60;
  --contact-muted: #526887;
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d5e2f6;
  border-radius: 24px;
  background: linear-gradient(135deg, #f9fbff, #e7effb);
  box-shadow: 0 24px 80px rgb(35 59 96 / 24%);
  scrollbar-color: #a8bcd2 transparent;
}
.contact-dialog[open] { animation: contact-dialog-enter .3s cubic-bezier(.16, 1, .3, 1); }
.contact-dialog::backdrop { background: rgb(24 42 70 / 36%); backdrop-filter: blur(5px); }
.contact-dialog .contact-title { margin: 0 0 24px; font-size: clamp(38px, 5vw, 56px); outline: none; }
.contact-dialog .contact-form { gap: 16px 20px; }
.contact-dialog .contact-field { gap: 6px; }
.contact-dialog .contact-field textarea { min-height: 100px; }
@keyframes contact-dialog-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .contact-dialog.contact-section { padding: 24px 20px; border-radius: 20px; }
}
@media (min-width: 768px) {
  #contact .contact-form { transform: translateY(-8px); }
}
@media (max-width: 767px) {
  .contact-section { padding-block: 32px 24px; scroll-margin-top: 104px; }
  .contact-inner { grid-template-columns: minmax(112px, .4fr) minmax(0, .6fr); gap: 24px 20px; }
  .contact-copy { display: contents; }
  .contact-photo { grid-column: 1; grid-row: 1; }
  .contact-photo-tag { padding: 6px 10px; }
  .contact-title { grid-column: 2; grid-row: 1; margin: 0; font-size: clamp(32px, 8vw, 44px); }
  .contact-form { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .contact-form { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-dialog[open] { animation: none; }
  .contact-field input, .contact-field select, .contact-field textarea, .contact-submit { transition: none; }
  .contact-photo-tag, .contact-photo-point::before { transition: none; }
  .contact-photo-point.is-active::after { animation: none; }
}
