/* Arthur Labs — contact CTA band, footer, theme toggle, scroll reveal (ART-291) */

/* ---- Theme toggle ------------------------------------------------------- */
.theme-toggle { padding: 0; width: 36px; justify-content: center; }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}
@media (max-width: 640px) {
  .theme-toggle { width: 100%; min-height: 44px; }
}

/* ---- Contact CTA band --------------------------------------------------- */
.cta-band {
  padding-block: clamp(var(--space-12), 8vw, var(--space-16));
  text-align: center;
  background:
    radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 70%),
    var(--color-surface-sunken);
  border-block: 1px solid var(--color-border);
}
.cta-band h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cta-band p {
  margin: 0 auto var(--space-6);
  max-width: 36rem;
  color: var(--color-text-muted);
}

.contact-form {
  position: relative;
  display: grid;
  gap: var(--space-4);
  max-width: 36rem;
  margin: 0 auto;
  text-align: left;
}
.contact-form__row {
  display: grid;
  gap: var(--space-4);
}
.contact-form__field {
  display: grid;
  gap: var(--space-2);
}
.contact-form__field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
}
.contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}
.contact-form__status {
  margin: 0;
  padding: 0.75rem 0.9rem;
  max-width: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.contact-form__status[data-state="success"] {
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
}
.contact-form__status[data-state="error"] {
  background: color-mix(in srgb, var(--al-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--al-danger) 45%, transparent);
}
.contact-form__turnstile:not([hidden]) { min-height: 65px; }
.contact-form .al-btn { width: 100%; }
/* Off-screen honeypot. Avoid display:none so naive bots still fill it. */
.contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cta-band .contact-fallback {
  margin: var(--space-5) auto 0;
}
.contact-fallback a {
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
}
@media (min-width: 640px) {
  .contact-form__row { grid-template-columns: 1fr 1fr; }
}

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  padding: var(--space-12) 0 var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
}
.site-footer__brand p { margin: var(--space-3) 0 0; max-width: 18rem; }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__col h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.site-footer__col a { font-weight: 400; color: var(--color-text-muted); }
.site-footer__col a:hover { color: var(--color-accent); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.site-footer__legal p { margin: 0; max-width: none; }
.site-footer__lang {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.site-footer__lang a {
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: none;
}
.site-footer__lang a[aria-current="true"] { color: var(--color-text); }
.site-footer__lang a:hover { color: var(--color-accent); }
@media (max-width: 640px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---- Scroll reveal --------------------------------------------------------
   The head script adds .js. landing.js then adds .is-visible as each block
   enters the viewport. The animation is the no-JS backstop: a missing or
   stale landing.js must not leave headings stuck at opacity 0. Reduced
   motion skips the hide entirely. */
@keyframes al-reveal-fallback {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .js [data-reveal]:not(.is-visible) {
    animation: al-reveal-fallback 0.45s var(--ease-out) 2.5s forwards;
  }
}
