/* ==========================================================================
   /contact — "The Summoning"
   Glass form fields on the void, gold focus glow, and a sealed-in-gold
   success state. Antiforgery-friendly, server-rendered.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.contact-hero {
  padding-top: var(--hero-pad-top);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.contact-title {
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  max-width: 16ch;
  margin-top: 1.1rem;
}

.contact-lede {
  max-width: 58ch;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--star-3);
}

/* --------------------------------------------------------------------------
   Layout — form + direct-channel aside
   -------------------------------------------------------------------------- */
.contact-main { padding-top: clamp(1rem, 2vw, 2rem); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: start;
}

/* --------------------------------------------------------------------------
   The form — glass fields on --void-2
   -------------------------------------------------------------------------- */
.contact-form-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(242, 193, 78, 0.05), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  backdrop-filter: blur(14px);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
}

.contact-form { display: grid; gap: 1.35rem; }

.field { display: grid; gap: 0.5rem; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.field-optional {
  color: var(--star-3);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  margin-left: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--void-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--star-1);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 350;
  line-height: 1.5;
  padding: 0.85rem 1.05rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { resize: vertical; min-height: 9.5rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--star-4); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--void-3);
  box-shadow:
    0 0 0 3px rgba(242, 193, 78, 0.14),
    0 0 32px -8px rgba(242, 193, 78, 0.45);
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--gold);
}

/* Validation */
.field-error {
  color: var(--rose);
  font-size: 0.85rem;
  min-height: 1em;
}
.field-error:empty { display: none; }

.field input.input-validation-error,
.field textarea.input-validation-error {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(239, 107, 168, 0.12);
}

.form-errors { color: var(--rose); font-size: 0.92rem; }
.form-errors ul { list-style: none; display: grid; gap: 0.3rem; }
.form-errors:empty,
.form-errors .validation-summary-valid { display: none; }

/* Honeypot — parked far off-canvas, out of the tab order */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit { justify-self: start; margin-top: 0.3rem; }

/* --------------------------------------------------------------------------
   Success state — the gold seal
   -------------------------------------------------------------------------- */
.contact-success {
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0.5rem;
}

.seal {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.6rem;
}

.seal-disc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1a1206;
  background:
    radial-gradient(circle at 32% 28%, var(--gold-hot), var(--gold) 55%, #b8860b 100%);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.45),
    inset 0 -4px 10px rgba(90, 60, 0, 0.4),
    var(--glow-gold);
  animation: seal-stamp 0.7s var(--ease-spring) both;
}

.seal-disc svg { width: 52px; height: 52px; }

/* Expanding rings — the seal's afterglow */
.seal::before,
.seal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 193, 78, 0.55);
  animation: seal-ripple 2.6s ease-out infinite;
}
.seal::after { animation-delay: 1.3s; }

@keyframes seal-stamp {
  0%   { transform: scale(1.6) rotate(-14deg); opacity: 0; }
  60%  { transform: scale(0.94) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes seal-ripple {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

.contact-success h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }

.contact-success-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  background: var(--aurora);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 0.4rem;
}

.contact-success-note {
  color: var(--star-3);
  max-width: 42ch;
  margin: 1.2rem auto 1.8rem;
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   Aside — direct channel
   -------------------------------------------------------------------------- */
.contact-aside-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  backdrop-filter: blur(14px);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.contact-aside-card h2 {
  font-size: 1.45rem;
  margin-top: 0.9rem;
}

.contact-aside-card > p {
  color: var(--star-3);
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

.contact-email {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  letter-spacing: 0.02em;
  color: var(--gold-hot);
  border: 1px solid rgba(242, 193, 78, 0.3);
  background: var(--gold-dim);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
  overflow-wrap: anywhere;
}
.contact-email:hover {
  color: var(--gold-hot);
  border-color: var(--line-bright);
  box-shadow: var(--glow-gold);
  transform: translateY(-2px);
}

.contact-meta {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
}

.contact-meta-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--star-3);
  font-size: 0.92rem;
}
.contact-meta-row svg { color: var(--gold); flex: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside-card { position: static; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .seal-disc { animation: none; }
  .seal::before, .seal::after { animation: none; opacity: 0; }
  .contact-email:hover { transform: none; }
}
