/* ── Mammoth Careers — Brand-aligned dark glassmorphism ── */

:root {
  --mammoth-purple: #9300d6;
  --mammoth-purple-soft: #b44dff;
  --mammoth-purple-glow: rgba(147, 0, 214, 0.25);
  --bg-base: #0d0a12;
  --bg-card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #fff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --success: #69f0ae;
  --error: #ff8ca8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 580px at 10% -10%, rgba(147, 0, 214, 0.25), transparent 55%),
    radial-gradient(980px 520px at 92% 0%, rgba(182, 73, 240, 0.18), transparent 52%),
    var(--bg-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout shell ── */

.career-shell {
  width: min(720px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

/* ── Header ── */

.career-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.brand-logo {
  height: 28px;
  width: auto;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.career-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.header-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Main stage card (glassmorphism) ── */

.career-stage {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.3);
}

/* Only reserve space when views have content */
#listings-view:empty,
#apply-view:empty {
  display: none;
}

/* ── Job listings grid ── */

.section-intro {
  margin-bottom: 1rem;
}

.section-intro h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.jobs-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ── Job card ── */

.job-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
  transition: border-color 200ms ease, background 200ms ease;
}

.job-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.job-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.job-card p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── Metadata chips ── */

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Back link + job title ── */

.text-link {
  color: var(--mammoth-purple-soft);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.job-title {
  margin: 0.6rem 0 0.4rem;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ── Description block ── */

.description-block {
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-height: 220px;
  overflow-y: auto;
}

.description-block::-webkit-scrollbar {
  width: 6px;
}

.description-block::-webkit-scrollbar-track {
  background: transparent;
}

.description-block::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.description-block p {
  margin: 0 0 0.5rem;
}

.description-block p:last-child {
  margin-bottom: 0;
}

.description-block ul {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
}

.description-block li {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.15rem;
}

/* ── Screener questions ── */

.screener-section {
  margin-bottom: 0.5rem;
}

.screener-question {
  margin-bottom: 0.75rem;
}

.screener-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.required-mark {
  color: var(--mammoth-purple-soft);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 150ms ease, background 150ms ease;
}

.radio-option:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.radio-option input[type="radio"] {
  accent-color: var(--mammoth-purple-soft);
}

.number-input,
.text-input {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 150ms ease;
}

.number-input:focus,
.text-input:focus {
  border-color: var(--mammoth-purple-soft);
}

.text-input {
  max-width: 100%;
  resize: vertical;
}

.number-input::placeholder,
.text-input::placeholder {
  color: var(--text-muted);
}

.screener-gate-hint {
  text-align: center;
  font-style: italic;
  margin-top: 0.5rem;
}

/* ── Apply form ── */

.apply-form {
  display: grid;
  gap: 0.6rem;
}

.field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.honeypot-field,
.resume-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── Upload zone ── */

.upload-zone {
  border: 2px dashed rgba(147, 0, 214, 0.4);
  border-radius: var(--radius-md);
  background: rgba(147, 0, 214, 0.06);
  color: var(--text-secondary);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.upload-zone:hover {
  border-color: rgba(147, 0, 214, 0.6);
  background: rgba(147, 0, 214, 0.1);
}

.upload-zone.is-dragover {
  border-color: var(--mammoth-purple);
  background: rgba(147, 0, 214, 0.15);
}

/* ── Buttons ── */

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(135deg, var(--mammoth-purple) 0%, var(--mammoth-purple-soft) 100%);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 4px 14px rgba(147, 0, 214, 0.25);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(147, 0, 214, 0.35);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* ── Status / helper text ── */

.status-note {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-note.success {
  color: var(--success);
  font-weight: 600;
}

.error-text {
  color: var(--error);
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

/* ── Loading spinner ── */

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(147, 0, 214, 0.2);
  border-top-color: var(--mammoth-purple);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Calendly embed ── */

.calendly-shell {
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(147, 0, 214, 0.2);
  background: rgba(147, 0, 214, 0.05);
}

.calendly-embed {
  width: 100%;
  min-height: 700px;
}

.calendly-inline-widget {
  width: 100%;
}

/* ── Mobile ── */

@media (max-width: 600px) {
  .career-shell {
    width: min(100% - 1rem, 720px);
    padding-top: 1rem;
  }

  .career-header h1 {
    font-size: 1.4rem;
  }

  .career-stage {
    padding: 0.85rem;
    border-radius: var(--radius-md);
  }

  .primary-btn {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .calendly-embed {
    min-height: 620px;
  }

  .calendly-inline-widget {
    min-width: 100% !important;
  }

  .description-block {
    max-height: 180px;
  }
}
