/* ==========================================================================
   Binzard — contact.css
   The contact page: page header, two-column layout, and every form
   component. Loaded only where a form exists.
   ========================================================================== */

/* ----------------------------------------------------------- Page header */
.page-header {
  position: relative;
  padding-block: clamp(2.75rem, 1.5rem + 5vw, 5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -55%;
  left: 50%;
  width: min(900px, 120%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(85, 37, 241, 0.28) 0%, rgba(85, 37, 241, 0) 62%);
  pointer-events: none;
  z-index: -1;
}
.page-header h1 { margin-bottom: var(--sp-5); }
.page-header .lead { max-width: 58ch; }

/* ---------------------------------------------------------------- Layout */
.contact-layout {
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  align-items: start;
}
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

.form-panel {
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Sidebar with the direct-contact details */
.contact-aside { display: grid; gap: var(--sp-5); }

.contact-method {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.2s var(--ease);
}
.contact-method:hover { border-color: rgba(173, 149, 255, 0.4); }
.contact-method .card-icon { margin-bottom: 0; width: 40px; height: 40px; }
.contact-method .card-icon svg { width: 19px; height: 19px; }
.contact-method h2 {
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: var(--sp-2);
}
.contact-method .value {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--t-heading);
  text-decoration: none;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
a.value:hover { color: var(--c-lavender); text-decoration: underline; }
.contact-method p { font-size: var(--fs-sm); color: var(--t-muted); margin-top: var(--sp-2); }

/* ----------------------------------------------------------------- Form */
.field { margin-bottom: var(--sp-5); }

.field > label,
.fieldset-legend {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--t-heading);
}

.field .req { color: var(--c-lavender); }

.field .hint {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--t-muted);
}

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 48px;
  color: var(--t-heading);
  background: rgba(2, 4, 14, 0.5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.42); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.3); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--t-accent);
  box-shadow: 0 0 0 3px rgba(196, 181, 255, 0.28);
}

/* The native select arrow can't be styled consistently — draw our own. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5ff' stroke-width='2.5' 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 1rem center;
  background-size: 18px;
}
.field select option { background: #0b1130; color: #fff; }

.field-row {
  display: grid;
  gap: 0 var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

/* Errors are announced through aria-describedby + role="alert". */
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #ff9aa8; }
.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(255, 154, 168, 0.28); }

.field-error {
  display: none;
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #ffb3be;            /* 8.6:1 on the form surface */
}
.field.has-error .field-error { display: block; }

.checkbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}
.checkbox input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--c-violet);
  cursor: pointer;
}
.checkbox label {
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.6;
  color: var(--t-muted);
  cursor: pointer;
}

/* Honeypot. Deliberately not display:none — some bots skip hidden inputs,
   and this one needs to look fillable to them but never to a human. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.hp-field input { width: 1px; }

.form-status {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
}
.form-status:empty { display: none; }
.form-status--error   { border-color: rgba(255, 154, 168, 0.55); color: #ffb3be; }
.form-status--success { border-color: rgba(134, 239, 172, 0.55); color: #a7f3c0; }

.btn[aria-disabled='true'] { opacity: 0.65; cursor: progress; }
.btn[aria-disabled='true']:hover { transform: none; }

/* Success panel swapped in for the form after a successful submit. */
.form-success { text-align: center; padding-block: var(--sp-5); }
.form-success .tick-lg {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto var(--sp-5);
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.16);
  border: 1px solid rgba(134, 239, 172, 0.5);
  color: #a7f3c0;
}
.form-success .tick-lg svg { width: 30px; height: 30px; }
.form-success h2 { margin-bottom: var(--sp-4); }
.form-success p { color: var(--t-muted); max-width: 44ch; margin-inline: auto; }

/* hCaptcha renders a fixed 303x78 iframe. Reserving the height up front keeps
   the widget from shoving the consent checkbox and submit button down the page
   when it finishes loading — that shift is a Core Web Vitals (CLS) penalty. */
.h-captcha {
  margin-bottom: var(--sp-5);
  min-height: 78px;
}
.h-captcha iframe { border-radius: var(--r-sm); }

/* Shown only when the Web3Forms key has not been configured yet. */
.setup-note {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px dashed rgba(235, 175, 105, 0.6);
  border-radius: var(--r-md);
  background: rgba(235, 175, 105, 0.09);
  color: var(--c-gold);
  font-size: var(--fs-sm);
}
.setup-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #ffd9a8;
}
