/* ============================================================
   ILLUMINATE — Contact page styles
   Extends main.css and book.css (form elements).
   ============================================================ */

/* ── Section ─────────────────────────────────────────────── */

.contact-section {
  padding-top: calc(var(--section-py) + 5rem); /* clear fixed nav */
  padding-bottom: var(--section-py);
}

/* ── Panel (unified hero + form container) ───────────────── */

.contact-panel {
  max-width: 38rem;
  margin-inline: auto;
}

.contact-panel__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ── Hero text ───────────────────────────────────────────── */

.contact-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.contact-hero__subtitle {
  font-size: clamp(1rem, 1.75vw, 1.125rem);
  line-height: 1.75;
  color: var(--color-lake-light);
  margin-bottom: 0.875rem;
}

.contact-hero__note {
  font-size: 0.875rem;
  color: var(--color-lake-light);
  font-style: italic;
}

/* ── Select arrow ────────────────────────────────────────── */

.contact-select {
  cursor: pointer;
  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='%2359a0b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

/* ── Textarea ────────────────────────────────────────────── */

.contact-textarea {
  resize: vertical;
  min-height: 8rem;
}

/* ── Submit button full-width ────────────────────────────── */

.contact-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

/* ── Consent text ────────────────────────────────────────── */

.contact-consent {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  line-height: 1.6;
  margin-top: 0.875rem;
  text-align: center;
}

/* ── Submit-level error ──────────────────────────────────── */

.contact-submit-error {
  font-size: 0.875rem;
  color: oklch(65% 0.16 25);
  background: oklch(60% 0.18 25 / 0.08);
  border: 1px solid oklch(60% 0.18 25 / 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.contact-submit-error a {
  color: oklch(70% 0.14 25);
  text-decoration: underline;
}

/* ── Success state ───────────────────────────────────────── */

.contact-success[hidden] { display: none; }

.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 1rem;
}

.contact-success__icon {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--color-lake-light);
  margin-bottom: 0.25rem;
}

.contact-success__icon svg {
  width: 100%;
  height: 100%;
}

.contact-success__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.contact-success__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 22rem;
}

/* ── Direct email section ────────────────────────────────── */

.contact-email-alt {
  border-top: 1px solid var(--color-border);
  padding-top: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}

.contact-email-alt__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-lake-light);
  margin-bottom: 0.5rem;
}

.contact-email-alt__address {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.contact-email-alt__link {
  color: var(--color-lake-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.contact-email-alt__link:hover {
  color: var(--color-lake);
}

/* ── Sending state (button) ──────────────────────────────── */

.contact-submit[aria-busy="true"] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Light mode overrides ────────────────────────────────── */

body.theme-light .contact-select {
  background-color: oklch(99% 0 0 / 0.7);
  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='%23345f7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

body.theme-light .contact-email-alt {
  border-top-color: oklch(59% 0.160 200 / 0.15);
}

/* Glass panel for legibility over the background image */
body.theme-light .contact-panel {
  background: oklch(99% 0.005 195 / 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 4px 20px oklch(14% 0.025 210 / 0.06);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 30rem) {
  .contact-section {
    padding-top: calc(var(--section-py) + 4rem);
  }

  body.theme-light .contact-panel {
    padding: 1.5rem;
  }
}
