/*
 * NB Contact Form styles. Loaded on the contact route only, after the
 * NB Minimal theme stylesheet, and built on its CSS variables.
 */

/* The theme locks the body to one screen; let the form page grow and scroll. */
body.nb-contact {
  height: auto;
  overflow: auto;
}

.nb-contact-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  /* Top padding clears the theme's absolutely positioned nav bar. */
  padding: calc(var(--nb-nav-height, 76px) + clamp(16px, 4vh, 40px)) 20px clamp(32px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 40px);
}

.nb-contact .nb-mark {
  width: clamp(64px, 10vw, 88px);
}

.nb-contact-card {
  width: 100%;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(244, 244, 246, 0.08);
  border-radius: 16px;
  background: rgba(14, 15, 22, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: nb-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

.nb-contact-title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  color: var(--muted);
}

.nb-contact-thanks {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.nb-contact-summary {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  background: rgba(244, 114, 182, 0.08);
  font-size: 14px;
  line-height: 1.5;
}

.nb-contact-summary p {
  margin: 0;
}

.nb-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nb-field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nb-field input,
.nb-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(244, 244, 246, 0.14);
  border-radius: 10px;
  background: rgba(7, 8, 12, 0.6);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nb-field textarea {
  resize: vertical;
  min-height: 140px;
}

.nb-field input:focus,
.nb-field textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

.nb-field--error input,
.nb-field--error textarea {
  border-color: var(--accent-2);
}

.nb-field-error {
  margin: 0;
  font-size: 13px;
  color: var(--accent-2);
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.nb-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nb-contact-submit {
  margin-top: 4px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.nb-contact-submit:hover {
  filter: brightness(1.08);
}

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

.nb-contact-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-1);
}

@media (prefers-reduced-motion: reduce) {
  .nb-contact-card {
    animation: none;
  }

  .nb-field input,
  .nb-field textarea,
  .nb-contact-submit {
    transition: none;
  }
}
