/*****************************************
***  Contact — form controls            ***
***  Loads after cards.css.             ***
*****************************************/

.contact-form {
  display: grid;
  gap: 1.1rem;
  margin-top: .4rem;
}

.contact-field {
  display: grid;
  gap: .4rem;
}

.contact-field label {
  font-family: 'anton', Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .95rem;
  color: #fff;
}

/* Class selectors rather than the old #ljpMail / input[type=text] rules, so
   these stay scoped to this form and don't leak into the FAB menu checkbox. */
.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .72rem .85rem;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  color: #fff;
  font-family: 'ibm', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color .2s ease, background .2s ease;
}

.contact-form textarea {
  min-height: 165px;
  /* vertical only — horizontal resize breaks the card layout */
  resize: vertical;
}

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

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: rgba(255, 255, 255, .4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #8585eb;
  outline-offset: 2px;
  border-color: transparent;
  background: rgba(255, 255, 255, .14);
}

/* only flags a field once the user has actually typed something invalid */
.contact-form input:not(:placeholder-shown):invalid {
  border-color: rgba(255, 120, 120, .8);
}

.contact-send {
  justify-self: start;
  padding: .8rem 2.4rem;
  font-family: 'anton', Impact, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: #4f4fd0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease, transform .12s ease;
}

.contact-send:hover {
  background: #6a6ae0;
}

.contact-send:active {
  transform: translateY(1px);
}

.contact-send:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/*** direct contact details ***/

.contact-lines {
  display: grid;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-lines dt {
  font-family: 'anton', Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .85rem;
  opacity: .7;
  margin-bottom: .15rem;
}

.contact-lines dd {
  margin: 0;
  font-family: 'ibm', system-ui, sans-serif;
  font-size: clamp(1.05rem, .9rem + .5vw, 1.4rem);
}

.contact-lines a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(133, 133, 235, .8);
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}

.contact-lines a:hover {
  color: #cfcfff;
  border-bottom-color: #cfcfff;
}

/* The address runs to two lines, and the underline the other links use would
   draw under each one. Plain until hovered instead. */
.contact-lines .contact-address {
  border-bottom: 0;
  display: inline-block;
  line-height: 1.45;
}

.contact-lines .contact-address:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-lines a:focus-visible {
  outline: 2px solid #8585eb;
  outline-offset: 3px;
  border-radius: 3px;
}

/* off-screen but still reachable by assistive tech / bots */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {

  .contact-form input,
  .contact-form textarea,
  .contact-send,
  .contact-lines a {
    transition: none;
  }
}
